diff --git a/modules/home/programs/gui/mako/default.nix b/modules/home/programs/gui/mako/default.nix index 67e7b6e..8c61912 100644 --- a/modules/home/programs/gui/mako/default.nix +++ b/modules/home/programs/gui/mako/default.nix @@ -22,8 +22,8 @@ ''; }; - home.packages = let - makoToggle = pkgs.writeScriptBin "makotoggle" '' + home.packages = with pkgs; [ + (pkgs.writeScriptBin "makotoggle" '' # Run makoctl mode and store the output in a variable mode_output=$(makoctl mode) @@ -40,6 +40,6 @@ sleep 2 makoctl mode -a do-not-disturb fi - ''; - in with pkgs; [ makoToggle ]; + '') + ]; } diff --git a/modules/home/programs/gui/rofi/default.nix b/modules/home/programs/gui/rofi/default.nix index a46ab78..c72fde0 100644 --- a/modules/home/programs/gui/rofi/default.nix +++ b/modules/home/programs/gui/rofi/default.nix @@ -123,9 +123,8 @@ }; }; }; - home.packages = let - # A script to execute commands with Rofi - rofiScripts = pkgs.writeScriptBin "rofiscripts" '' + home.packages = with pkgs; [ + (pkgs.writeScriptBin "rofiscripts" '' # Scratchpad function handle_scratchpads() { SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads") @@ -143,7 +142,7 @@ case $POWER in Shutdown) poweroff;; Reboot) reboot;; - Sleep) swaylock --sleep &;; + Sleep) swaysleep &;; Lock) swaylock &;; Kill) pkill -9 sway;; esac @@ -176,9 +175,7 @@ else echo "Please use a valid argument." fi - ''; - in with pkgs; [ - rofiScripts + '') rofi-bluetooth bemoji ]; diff --git a/modules/home/programs/terminal/fastfetch/small/default.nix b/modules/home/programs/terminal/fastfetch/small/default.nix index 9589f19..cdc8fb8 100644 --- a/modules/home/programs/terminal/fastfetch/small/default.nix +++ b/modules/home/programs/terminal/fastfetch/small/default.nix @@ -2,8 +2,8 @@ { home = { file.".config/fastfetch/small.jsonc".source = ./small.jsonc; - packages = let - pFetch = pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc"; - in with pkgs; [ pFetch ]; + packages = with pkgs; [ + (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") + ]; }; } diff --git a/modules/home/sway/swaylock/default.nix b/modules/home/sway/swaylock/default.nix index d89cbb2..fc53b1d 100644 --- a/modules/home/sway/swaylock/default.nix +++ b/modules/home/sway/swaylock/default.nix @@ -1,64 +1,57 @@ { pkgs, config, ... }: let - swayLock = pkgs.writeScriptBin "swaylock" '' - # Set the lock script - lockscript() { - BLANK='#00000000' - CLEAR='#FFFFFF22' - DEFAULT='#${config.look.colors.prime}FF' - TEXT='#FFFFFFFF' - WRONG='#${config.look.colors.split}FF' - VERIFYING='#${config.look.colors.accent}FF' + default = "#${config.look.colors.prime}FF"; + wrong = "#${config.look.colors.split}FF"; + verifying = "#${config.look.colors.accent}FF"; + blank = "#00000000"; + clear = "#FFFFFF22"; + text = "#FFFFFFFF"; +in { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + clock = true; + image = "~/.assets/lockscreen/lock.png"; + font = config.look.fonts.main; + font-size = 30; + timestr = "%I:%M%p"; + datestr = "%a %b %d %Y"; - ${pkgs.swaylock-effects}/bin/swaylock -f -e \ - --key-hl-color=$VERIFYING \ - --bs-hl-color=$WRONG \ - \ - --ring-clear-color=$CLEAR \ - --ring-ver-color=$VERIFYING \ - --ring-wrong-color=$WRONG \ - --ring-color=$DEFAULT \ - --ring-clear-color=$VERIFYING \ - \ - --inside-color=$CLEAR \ - --inside-ver-color=$CLEAR \ - --inside-wrong-color=$CLEAR \ - --inside-clear-color=$CLEAR \ - \ - --text-color=$TEXT \ - --text-clear-color=$TEXT \ - --text-ver-color=$TEXT \ - --text-caps-lock-color=$TEXT \ - --text-wrong-color=$TEXT \ - \ - --indicator \ - --indicator-radius=80 \ - --image=~/.assets/lockscreen/lock.png \ - --clock \ - --font=${config.look.fonts.main} \ - --font-size=30 \ - --timestr="%I:%M%p" \ - --datestr="%a %b %d %Y" - } + key-hl-color = verifying; + bs-hl-color = wrong; - # Handle whether to lock or sleep - if [ "$1" == "--sleep" ]; then - lockscript & - exec ${pkgs.swayidle}/bin/swayidle -w \ + ring-clear-color = clear; + ring-ver-color = verifying; + ring-wrong-color = wrong; + ring-color = default; + + inside-color = clear; + inside-ver-color = clear; + inside-wrong-color = clear; + inside-clear-color = clear; + + text-color = text; + text-clear-color = text; + text-ver-color = text; + text-caps-lock-color = text; + text-wrong-color = text; + + indicator = true; + indicator-radius = 80; + }; + }; + + home.packages = with pkgs; [ + (pkgs.writeScriptBin "swaysleep" '' + swaylock & ${pkgs.swayidle}/bin/swayidle -w \ timeout 1 'swaymsg "output * dpms off"' \ resume 'swaymsg "output * dpms on"; pkill -9 swayidle' - else - lockscript - fi - ''; -in { - # Enable Sway and write some scripts - home.packages = with pkgs; [ - swayLock + '') ]; - # Enable Sway lock on startup + # Enable Swaylock on startup wayland.windowManager.sway.config.startup = [ - {command = "swaylock";} + { command = "swaylock"; } ]; } diff --git a/modules/home/sway/swayshot/default.nix b/modules/home/sway/swayshot/default.nix index 0c80863..07307e0 100644 --- a/modules/home/sway/swayshot/default.nix +++ b/modules/home/sway/swayshot/default.nix @@ -4,8 +4,8 @@ ./swappy ]; - home.packages = let - swayShot = pkgs.writeScriptBin "swayshot" '' + home.packages = with pkgs; [ + (pkgs.writeScriptBin "swayshot" '' # Swappy handle_swappy() { # Create an imv window to act as a static screen @@ -57,8 +57,6 @@ else echo "Please use the arguments --swappy or --screen." fi - ''; - in with pkgs; [ - swayShot + '') ]; } diff --git a/modules/home/sway/swayshot/swappy/default.nix b/modules/home/sway/swayshot/swappy/default.nix index 1249649..e343544 100644 --- a/modules/home/sway/swayshot/swappy/default.nix +++ b/modules/home/sway/swayshot/swappy/default.nix @@ -2,12 +2,10 @@ { home = { packages = with pkgs; [ swappy ]; - file = { - ".config/swappy/config".text = '' - [Default] - early_exit=true - save_dir=$HOME/Pictures/Screenshots - ''; - }; + file.".config/swappy/config".text = '' + [Default] + early_exit=true + save_dir=$HOME/Pictures/Screenshots + ''; }; } diff --git a/modules/home/sway/theme/default.nix b/modules/home/sway/theme/default.nix index 403497c..a62d77e 100644 --- a/modules/home/sway/theme/default.nix +++ b/modules/home/sway/theme/default.nix @@ -1,9 +1,6 @@ { config, ... }: { wayland.windowManager.sway = { - enable = true; - wrapperFeatures.gtk = true; - checkConfig = false; config = { colors = { focused = { diff --git a/modules/system/devices/disks/impermanence/jimbo/default.nix b/modules/system/devices/disks/impermanence/jimbo/default.nix index 5325d28..04efb35 100644 --- a/modules/system/devices/disks/impermanence/jimbo/default.nix +++ b/modules/system/devices/disks/impermanence/jimbo/default.nix @@ -9,7 +9,7 @@ "Pictures" "Videos" "Games" - "VMs" + "VMs" ".snapshots" ".mozilla"