From 995a79e600de427a5ea6f6d4ce128b03fe78beac Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 May 2025 16:44:33 +0200 Subject: [PATCH 1/2] feat: move scripts to packages --- modules/home/hyprland/scripts.nix | 19 ------------------- modules/home/scripts/scripts.nix | 4 ++++ modules/home/scripts/scripts/setbg | 4 ++++ modules/home/scripts/scripts/walp | 4 ++++ 4 files changed, 12 insertions(+), 19 deletions(-) create mode 100644 modules/home/scripts/scripts/setbg create mode 100644 modules/home/scripts/scripts/walp diff --git a/modules/home/hyprland/scripts.nix b/modules/home/hyprland/scripts.nix index 6aca500..4ebbc4a 100644 --- a/modules/home/hyprland/scripts.nix +++ b/modules/home/hyprland/scripts.nix @@ -19,24 +19,5 @@ done ''; }; - "/home/${username}/.local/bin/setbg" = { - executable = true; - text = '' - #!/usr/bin/env bash - - magick convert "$1" ~/.local/share/bg.png - swww img ~/.local/share/bg.png --transition-type fade - ''; - }; - "/home/${username}/.local/bin/walp" = { - executable = true; - text = '' - #!/usr/bin/env bash - - which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet. - $SIV -t ~/Pictures/wallpapers/others/* - ''; - }; }; - } diff --git a/modules/home/scripts/scripts.nix b/modules/home/scripts/scripts.nix index a999f8f..417d193 100644 --- a/modules/home/scripts/scripts.nix +++ b/modules/home/scripts/scripts.nix @@ -1,5 +1,7 @@ { pkgs, ... }: let + setbg = pkgs.writeScriptBin "setbg" (builtins.readFile ./scripts/setbg); + walp = pkgs.writeScriptBin "walp" (builtins.readFile ./scripts/walp); runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh); notes = pkgs.writeShellScriptBin "notes" (builtins.readFile ./scripts/notes.sh); grabtext = pkgs.writeShellScriptBin "grabtext" (builtins.readFile ./scripts/grabtext.sh); @@ -12,6 +14,8 @@ let in { home.packages = with pkgs; [ + setbg + walp runbg notes grabtext diff --git a/modules/home/scripts/scripts/setbg b/modules/home/scripts/scripts/setbg new file mode 100644 index 0000000..c0e7277 --- /dev/null +++ b/modules/home/scripts/scripts/setbg @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +magick convert "$1" ~/.local/share/bg.png +swww img ~/.local/share/bg.png --transition-type fade diff --git a/modules/home/scripts/scripts/walp b/modules/home/scripts/scripts/walp new file mode 100644 index 0000000..17a1153 --- /dev/null +++ b/modules/home/scripts/scripts/walp @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet. +$SIV -t ~/Pictures/wallpapers/others/* From 9f09c2ad8248703248355c17df173af134d9537c Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 May 2025 16:44:44 +0200 Subject: [PATCH 2/2] fix: some hyprland configuration garbage --- modules/home/hyprland/config.nix | 34 ++++---------------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index bfcb509..a95efb9 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -42,34 +42,6 @@ size = 24; }; - # gtk = { - # enable = true; - # theme = { - # name = "Orchis-Dark"; - # package = pkgs.orchis-theme; - # }; - # iconTheme = { - # name = "Adwaita"; - # package = pkgs.gnome.adwaita-icon-theme; - # }; - # cursorTheme = { - # name = "Adwaita"; - # package = pkgs.gnome.adwaita-icon-theme; - # }; - # font = { - # name = "JetBrainsMono Nerd Font"; - # size = 11; - # }; - # }; - - # home.pointerCursor = { - # gtk.enable = true; - # # x11.enable = true; - # package = pkgs.bibata-cursors; - # name = "Bibata-Modern-Classic"; - # size = 16; - # }; - dconf = { enable = true; settings = { @@ -85,7 +57,7 @@ source = "~/nixos-config/modules/home/hyprland/displays.conf"; "debug:disable_scale_checks" = true; - monitor = "eDP-1, 2256x1504@60, 0x0, 1.5"; # this works as I only have one computer using eDP-1 as a display, I could also add LVDS or DP-1 since that'd also be machine-specific. + monitor = "eDP-1, 2256x1504@60, 0x0, 1.5"; # autostart exec-once = [ @@ -151,7 +123,6 @@ master = { special_scale_factor = 1; - # no_gaps_when_only = true; # Returns errors for some reason }; decoration = { @@ -227,6 +198,8 @@ "$mainMod, G, togglegroup," "SUPER, N, changegroupactive, f" "SUPER, P, changegroupactive, b" + "$mainMod, Tab, changegroupactive, f" + "$mainMod SHIFT, Tab, changegroupactive, b" # clipboard manager "$mainMod SHIFT, V, exec, cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy" @@ -365,6 +338,7 @@ "float,title:^(branchdialog)$" "float,title:^(Confirm to replace files)$" "float,title:^(File Operation Progress)$" + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" ]; };