diff --git a/.jpg b/.jpg new file mode 100644 index 0000000..44ff2d3 Binary files /dev/null and b/.jpg differ diff --git a/config/home/default.nix b/config/home/default.nix index be67673..5ee833f 100644 --- a/config/home/default.nix +++ b/config/home/default.nix @@ -14,6 +14,7 @@ ./starship.nix ./style1-waybar.nix ./style2-waybar.nix + ./swappy.nix ./swaylock.nix ./swaync.nix diff --git a/config/home/hyprland.nix b/config/home/hyprland.nix index 4e24f93..3c17bc7 100644 --- a/config/home/hyprland.nix +++ b/config/home/hyprland.nix @@ -126,12 +126,12 @@ in with lib; { new_is_master = true } bind = ${modifier},Return,exec,kitty - bind = ${modifier}SHIFT,Return,exec,rofi -show drun + bind = ${modifier}SHIFT,Return,exec,rofi-launcher bind = ${modifier}SHIFT,W,exec,web-search bind = ${modifier}SHIFT,S,exec,swaync-client -rs bind = ${modifier},W,exec,${browser} bind = ${modifier},E,exec,emopicker9000 - bind = ${modifier},S,exec,grim -g "$(slurp)" - | swappy -f - + bind = ${modifier},S,exec,screenshootin bind = ${modifier},D,exec,discord bind = ${modifier},O,exec,obs bind = ${modifier},G,exec,gimp diff --git a/config/home/packages.nix b/config/home/packages.nix index 9b04488..7a1e006 100644 --- a/config/home/packages.nix +++ b/config/home/packages.nix @@ -22,5 +22,7 @@ in { (import ./../scripts/theme-selector.nix { inherit pkgs; }) (import ./../scripts/nvidia-offload.nix { inherit pkgs; }) (import ./../scripts/web-search.nix { inherit pkgs; }) + (import ./../scripts/rofi-launcher.nix { inherit pkgs; }) + (import ./../scripts/screenshootin.nix { inherit pkgs; }) ]; } diff --git a/config/home/swappy.nix b/config/home/swappy.nix new file mode 100644 index 0000000..8ac8dbd --- /dev/null +++ b/config/home/swappy.nix @@ -0,0 +1,18 @@ +{ pkgs, config, ... }: + +let + inherit (import ../../options.nix) screenshotDir; +in { + home.file.".config/swappy/config".text = '' + [Default] + save_dir=${screenshotDir} + save_filename_format=swappy-%Y%m%d-%H%M%S.png + show_panel=false + line_size=5 + text_size=20 + text_font=Ubuntu + paint_mode=brush + early_exit=true + fill_shape=false + ''; +} diff --git a/config/scripts/rofi-launcher.nix b/config/scripts/rofi-launcher.nix new file mode 100644 index 0000000..153b3ec --- /dev/null +++ b/config/scripts/rofi-launcher.nix @@ -0,0 +1,10 @@ +{ pkgs }: + +pkgs.writeShellScriptBin "rofi-launcher" '' + if pgrep -x "rofi" > /dev/null; then + # Rofi is running, kill it + pkill -x rofi + exit 0 + fi + rofi -show drun +'' diff --git a/config/scripts/screenshootin.nix b/config/scripts/screenshootin.nix new file mode 100644 index 0000000..15042b4 --- /dev/null +++ b/config/scripts/screenshootin.nix @@ -0,0 +1,5 @@ +{ pkgs }: + +pkgs.writeShellScriptBin "screenshootin" '' + grim -g "$(slurp)" - | swappy -f - +'' diff --git a/options.nix b/options.nix index 8822e87..b4685ca 100644 --- a/options.nix +++ b/options.nix @@ -2,7 +2,9 @@ # VALUES FOR THIS PAGE. # https://gitlab.com/Zaney/zaneyos/-/wikis/Setting-Options -{ +let + userHome = "/home/zaney"; +in { # User Variables gitUsername = "Tyler Kelley"; gitEmail = "tylerzanekelley@gmail.com"; @@ -11,8 +13,9 @@ borderAnim = true; # anything other than on disables anim borders in Hyprland browser = "firefox"; wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; - wallpaperDir = "/home/zaney/Pictures/Wallpapers"; - flakeDir = "/home/zaney/zaneyos"; + wallpaperDir = "${userHome}/Pictures/Wallpapers"; + flakeDir = "${userHome}/zaneyos"; + screenshotDir = "${userHome}/Pictures/Screenshots"; # System Settings theLocale = "en_US.UTF-8";