hyprland working again, spicetify module

This commit is contained in:
Charlie Root 2024-05-15 17:28:32 +02:00
commit 1ce02a6e14
8 changed files with 148 additions and 27 deletions

View file

@ -42,10 +42,12 @@
kitty.enable = true;
hyprland.enable = true;
newsboat.enable = true;
# foot.enable = true;
fish.enable = true;
stylix.enable = true;
helix.enable = true;
nh.enable = true;
spicetify.enable = true;
schizofox.enable = true;
anyrun.enable = true;
};

View file

@ -180,7 +180,7 @@ in {
];
bind = [
"$mainMod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$mainMod, RETURN, exec, ${pkgs.kitty}/bin/kitty -d ~"
"$mainMod, Q, killactive"
"$mainMod, F, fullscreen, 0"
"$mainMod, D, exec, ${pkgs.procps}/bin/pkill anyrun || ${anyrun}/bin/anyrun"
@ -213,9 +213,9 @@ in {
"$mainMod, V, togglespecialworkspace, pipewire"
"$mainMod, N, togglespecialworkspace, nixos"
"$mainMod, X, togglespecialworkspace, keepassxc"
"$mainMod, R, exec, ${hyprland}/bin/hyprctl reload"
"$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${waybar}/bin/waybar"
];
binde = [
# window focus
"$mainMod, H, movefocus, l"
@ -271,37 +271,24 @@ in {
exec = [
# kill (almost) everything on special workspaces
"${pkgs.procps}/bin/pkill btop"
"${pkgs.procps}/bin/pkill helvum"
"${pkgs.procps}/bin/pkill pavucontrol"
# and run it all again
"[workspace special:btop silent;tile] ${pkgs.kitty}/bin/kitty -e ${pkgs.btop}/bin/btop"
"[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum"
# "[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum"
"[workspace special:pipewire silent;tile] ${pkgs.pavucontrol}/bin/pavucontrol"
"${pkgs.networkmanagerapplet}/bin/nm-applet --indicator"
# "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator"
];
plugin = {
split-monitor-workspaces = {
count = 10;
keep_focused = 0;
enable_notifications = 0;
keep_focused = true;
};
};
};
};
};
hardware = {
opengl.enable = true;
nvidia.modesetting.enable = true;
};
environment.systemPackages = with pkgs; [
(waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
}))
mako
libnotify
];
environment.systemPackages = with pkgs; [ mako libnotify ];
};
}

View file

@ -2,11 +2,12 @@ _: {
imports = [
./vesktop.nix
./gtk.nix
./foot.nix
./mpv.nix
./qt.nix
./zathura.nix
./stylix.nix
#./spicetify.nix
./spicetify.nix
./anyrun
./rofi.nix
./kitty.nix

117
modules/gui/foot.nix Normal file
View file

@ -0,0 +1,117 @@
{ config, inputs, lib, pkgs, ... }:
let
cfg = config.modules.programs.foot;
inherit (config.modules.other.system) username;
inherit (lib) mkEnableOption mkIf;
in {
options.modules.programs.foot = {
enable = mkEnableOption "foot";
server = mkEnableOption "foot server mode";
};
config = mkIf cfg.enable {
environment.sessionVariables = { TERM = "foot"; };
home-manager.users.${username} = {
programs.foot = {
enable = true;
package = inputs.nixpkgs-wayland.packages.${pkgs.system}.foot;
server.enable = cfg.server;
settings = {
main = {
# term = "foot";
# app-id = "foot";
# title = "foot";
# locked-title = "no";
# font = "JetBrains Mono Nerd Font:size=14";
# line-height = 20;
# letter-spacing = 0;
# horizontal-letter-offset = 0;
# vertical-letter-offset = -0.75;
# box-drawings-uses-font-glyphs = "no";
# dpi-aware = "no";
# initial-window-size-chars = "104x36";
# initial-window-mode = "windowed";
# pad = "5x5 center";
# resize-delay-ms = 100;
# notify =
# "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
# bold-text-in-bright = "no";
# word-delimiters = '',│`|:"'()[]{}<>'';
# selection-target = "primary";
};
bell = {
urgent = "yes";
notify = "yes";
command = "${pkgs.libnotify}/bin/notify-send bell";
command-focused = "no";
};
scrollback = {
lines = 100000;
multiplier = 10.0;
indicator-position = "relative";
indicator-format = "line";
};
url = {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "always";
protocols =
"http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
uri-characters = ''
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
};
cursor = {
style = "block";
blink = "no";
};
mouse = {
hide-when-typing = "yes";
alternate-scroll-mode = "yes";
};
# colors = {
# alpha = 0.85;
# foreground = "cdd6f4"; # Text
# background = "1e1e2e"; # Base
# regular0 = "45475a"; # Surface 1
# regular1 = "f38ba8"; # red
# regular2 = "a6e3a1"; # green
# regular3 = "f9e2af"; # yellow
# regular4 = "89b4fa"; # blue
# regular5 = "f5c2e7"; # pink
# regular6 = "94e2d5"; # teal
# regular7 = "bac2de"; # Subtext 1
# bright0 = "585b70"; # Surface 2
# bright1 = "f38ba8"; # red
# bright2 = "a6e3a1"; # green
# bright3 = "f9e2af"; # yellow
# bright4 = "89b4fa"; # blue
# bright5 = "f5c2e7"; # pink
# bright6 = "94e2d5"; # teal
# bright7 = "a6adc8"; # Subtext 0
# };
csd = { preferred = "server"; };
key-bindings = {
show-urls-launch = "Control+Shift+u";
unicode-input = "Control+Shift+i";
};
mouse-bindings = {
# selection-override-modifiers = "Shift";
# primary-paste = "BTN_MIDDLE";
# select-begin = "BTN_LEFT";
# select-begin-block = "Control+BTN_LEFT";
# select-extend = "BTN_RIGHT";
# select-extend-character-wise = "Control+BTN_RIGHT";
# select-word = "BTN_LEFT-2";
# select-word-whitespace = "Control+BTN_LEFT-2";
# #select-row = "BTN_LEFT-3";
};
};
};
};
};
}

View file

@ -98,7 +98,7 @@ in {
};
};
security = {
sanitizeOnShutdown = true;
sanitizeOnShutdown = false;
sandbox = true;
userAgent =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";

View file

@ -3,10 +3,24 @@ with lib;
let
cfg = config.modules.programs.spicetify;
username = config.modules.other.system.username;
#inherit (inputs.spicetify-nix.packages.${pkgs.system}.default) spicePkgs;
inherit (inputs.spicetify-nix.packages.${pkgs.system}) spicetify-nix;
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
# inherit (inputs.spicetify-nix.packages.${pkgs.system}) spicetify-nix;
in {
options.modules.programs.spicetify.enable = mkEnableOption "spicetify";
imports = [ spicetify-nix.homeManagerModule ];
config = mkIf cfg.enable { programs.spicetify = { enable = true; }; };
config = mkIf cfg.enable {
home-manager.users.${username} = {
imports = [ inputs.spicetify-nix.homeManagerModule ];
programs.spicetify = {
enable = true;
spotifyPackage = pkgs.spotify;
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [
shuffle
hidePodcasts
adblock
];
};
};
};
}

View file

@ -3,7 +3,7 @@ let
username = config.modules.other.system.username;
hmCfg = config.home-manager.users.${username};
primary_browser = "librewolf.desktop";
primary_browser = "firefox-schizo.desktop";
mail_client = "thunderbird.desktop";
file_manager = "pcmanfm.desktop";
media_player = "mpv.desktop";

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: {
{ config, ... }: {
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl = {
enable = true;