diff --git a/home/default.nix b/home/default.nix index 824ec5c..2d43ab1 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,6 +5,7 @@ }: let username = "martin"; + homeDir = "/home/${username}"; in { imports = [ @@ -22,6 +23,11 @@ in home = { username = username; homeDirectory = "/home/${username}"; + + sessionVariables = { + XDG_PICTURES_DIR = "${homeDir}/Pictures"; + }; + # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. diff --git a/home/hyprland/hyprland.conf b/home/hyprland/hyprland.conf index 9966da9..8d6f10e 100644 --- a/home/hyprland/hyprland.conf +++ b/home/hyprland/hyprland.conf @@ -36,7 +36,7 @@ $menu = rofi -show drun # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: -exec-once = $browser & [workspace 2] $terminal & nextcloud +exec-once = $browser & $terminal & nextcloud # Status bar exec-once = waybar @@ -64,6 +64,7 @@ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 env = HYPRCURSOR_THEME,rose-pine-hyprcursor env = ELECTRON_OZONE_PLATFORM_HINT,auto +env = HYPRSHOT_DIR,$HOME/Pictures/screenshots # Store screenshots here ##################### @@ -294,6 +295,7 @@ device { # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier +$shiftMod = $mainMod SHIFT # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Q, exec, $terminal @@ -308,6 +310,13 @@ bind = $mainMod, B, exec, $browser bind = $mainMod, L, exec, hyprlock bind = $mainMod, K, exec, [float] gnome-calculator +# Screenshot a window +bind = $mainMod, PRINT, exec, hyprshot -m window +# Screenshot a monitor +bind = , PRINT, exec, hyprshot -m output +# Screenshot a region +bind = $shiftMod, PRINT, exec, hyprshot -m region + # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r @@ -327,20 +336,20 @@ bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 +bind = $shiftMod, 1, movetoworkspace, 1 +bind = $shiftMod, 2, movetoworkspace, 2 +bind = $shiftMod, 3, movetoworkspace, 3 +bind = $shiftMod, 4, movetoworkspace, 4 +bind = $shiftMod, 5, movetoworkspace, 5 +bind = $shiftMod, 6, movetoworkspace, 6 +bind = $shiftMod, 7, movetoworkspace, 7 +bind = $shiftMod, 8, movetoworkspace, 8 +bind = $shiftMod, 9, movetoworkspace, 9 +bind = $shiftMod, 0, movetoworkspace, 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspace, special:magic +bind = $shiftMod, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 diff --git a/hyprland/default.nix b/hyprland/default.nix index aca4d57..bbcf4ee 100644 --- a/hyprland/default.nix +++ b/hyprland/default.nix @@ -11,6 +11,7 @@ swaynotificationcenter xdg-desktop-portal-hyprland hyprpolkitagent # Auth deamon providing modals for password auth + hyprshot # Screenshots ]; programs = {