From e2b093a0bb6db9f7eca214e0792a7e6905c75c76 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Wed, 25 Dec 2024 01:42:55 -0500 Subject: [PATCH] Add and replace some hotkeys and apps and such --- modules/home/settings/fonts/default.nix | 4 +- modules/home/wms/niri/hotkeys/default.nix | 1 + modules/home/wms/programs/default.nix | 3 +- .../{grimedit => grimsnap}/default.nix | 3 +- modules/home/wms/programs/swappy/default.nix | 11 -- modules/home/wms/sway/hotkeys/README.md | 135 +++++++++--------- modules/home/wms/sway/hotkeys/default.nix | 3 +- 7 files changed, 73 insertions(+), 87 deletions(-) rename modules/home/wms/programs/{grimedit => grimsnap}/default.nix (93%) delete mode 100644 modules/home/wms/programs/swappy/default.nix diff --git a/modules/home/settings/fonts/default.nix b/modules/home/settings/fonts/default.nix index 9768422..81f05e0 100644 --- a/modules/home/settings/fonts/default.nix +++ b/modules/home/settings/fonts/default.nix @@ -6,9 +6,7 @@ noto-fonts sarasa-gothic ubuntu_font_family - (nerdfonts.override { - fonts = [ "UbuntuMono" ]; - }) + (nerdfonts.override { fonts = [ "UbuntuMono" ]; }) ]; fonts.fontconfig = { diff --git a/modules/home/wms/niri/hotkeys/default.nix b/modules/home/wms/niri/hotkeys/default.nix index 6c9f128..58d6c5b 100644 --- a/modules/home/wms/niri/hotkeys/default.nix +++ b/modules/home/wms/niri/hotkeys/default.nix @@ -40,6 +40,7 @@ // Volume ${secMod}+j { spawn "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; } ${secMod}+k { spawn "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; } + ${secMod}+m { spawn "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } // MPD ${primeMod}+Backslash { spawn "sh" "-c" "mpc toggle"; } diff --git a/modules/home/wms/programs/default.nix b/modules/home/wms/programs/default.nix index 6972de2..cb16a23 100644 --- a/modules/home/wms/programs/default.nix +++ b/modules/home/wms/programs/default.nix @@ -1,9 +1,8 @@ { pkgs, ... }: { imports = [ - ./grimedit + ./grimsnap ./mako - ./swappy ./swaylock ./waybar ./wlpicker diff --git a/modules/home/wms/programs/grimedit/default.nix b/modules/home/wms/programs/grimsnap/default.nix similarity index 93% rename from modules/home/wms/programs/grimedit/default.nix rename to modules/home/wms/programs/grimsnap/default.nix index 2d1a197..e00d32c 100644 --- a/modules/home/wms/programs/grimedit/default.nix +++ b/modules/home/wms/programs/grimsnap/default.nix @@ -1,7 +1,7 @@ { pkgs, config, ... }: { home.packages = with pkgs; [ - (pkgs.writeScriptBin "grimedit" '' + (pkgs.writeScriptBin "grimsnap" '' # Freeze the screen using hyprpicker hyprpicker -r -z & HYPRPICKER_PID=$! @@ -22,7 +22,6 @@ # Save and edit screenshot grim -g "$GEOM" "$FILE" - swappy -f $FILE & # Notify user that the screenshot is saved notify-send -a grim "Screenshot" "Area saved to $FILE" -i "$FILE" diff --git a/modules/home/wms/programs/swappy/default.nix b/modules/home/wms/programs/swappy/default.nix deleted file mode 100644 index e343544..0000000 --- a/modules/home/wms/programs/swappy/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: -{ - home = { - packages = with pkgs; [ swappy ]; - file.".config/swappy/config".text = '' - [Default] - early_exit=true - save_dir=$HOME/Pictures/Screenshots - ''; - }; -} diff --git a/modules/home/wms/sway/hotkeys/README.md b/modules/home/wms/sway/hotkeys/README.md index e81f67b..80fb47f 100644 --- a/modules/home/wms/sway/hotkeys/README.md +++ b/modules/home/wms/sway/hotkeys/README.md @@ -1,84 +1,83 @@ -# Sway Window Manager Hotkeys +# Sway Superdow Manager Hotkeys ## Application Launchers -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Win + F1 | Launch **LibreWolf** (Jim profile) | -| Win + F2 | Launch **LibreWolf** (Alt profile) | -| Win + F3 | Launch **LibreWolf** (Misc profile) | -| Win + F4 | Launch **Discord** | -| Win + F5 | Launch **Steam** | -| Win + F6 | Launch **Heroic Games** | -| Win + F7 | Launch **Looking Glass** VM Client | -| Win + F10 | Launch **Virt-Manager** | -| Win + F11 | Open **Rofi Scratchpads** | -| Win + F12 | Open **NixOS Configuration Files** | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + F1 | Launch **LibreWolf** (Jim profile) | +| Super + F2 | Launch **LibreWolf** (Alt profile) | +| Super + F3 | Launch **LibreWolf** (Misc profile) | +| Super + F4 | Launch **Virt-Manager** | +| Super + F5 | Launch **Looking Glass** | -## Window Management -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Win + Arrows | Focus in the specified direction | -| Win + Shift + Arrows | Move window in the specified direction | -| Win + Shift + Space | Toggle window floating | -| Win + Space | Switch focus between floating/tiled | -| Win + Shift + {1-9} | Move window to a workspace and focus | -| Win + {1-9} | Switch to specified workspace | -| Win + 0 | Pin window and toggle border | -| Win + F | Toggle fullscreen | -| Win + Shift + R | Reload configuration | -| Win + Q | Close the current window | +## Superdow Management +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + Arrows | Focus in the specified direction | +| Super + Shift + Arrows | Move window in the specified direction | +| Super + Shift + Space | Toggle window floating | +| Super + Space | Switch focus between floating/tiled | +| Super + Shift + 1-9 | Move window to a workspace and focus | +| Super + 1-9 | Switch to specified workspace | +| Super + 0 | Pin window and toggle border | +| Super + F | Toggle fullscreen | +| Super + Shift + R | Reload configuration | +| Super + Q | Close the current window | ## Layout Management -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Win + W | Toggle split layout | -| Win + E | Toggle tabbed/stacking layout | -| Win + H/V | Split window horizontally/vertically | -| Win + A/D | Focus parent/child container | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + W | Toggle split layout | +| Super + E | Toggle tabbed/stacking layout | +| Super + H/V | Split window horizontally/vertically | +| Super + A/D | Focus parent/child container | ## Volume and Media Controls -| Key Combination | Action | -|----------------------|-------------------------------------------| -| XF86AudioRaiseVolume | Raise system volume | -| XF86AudioLowerVolume | Lower system volume | -| XF86AudioMute | Mute/unmute audio | -| XF86AudioPlay | Toggle media playback | -| XF86AudioNext | Skip to the next track | -| XF86AudioPrev | Go to the previous track | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Alt + J | Lower system volume | +| Alt + K | Raise system volume | +| Alt + M | Mute/unmute audio | +| Super + Backslash | Toggle media playback | +| Alt + Shift + H | Skip to the next track | +| Alt + Shift + L | Go to the previous track | ## Screenshot and Brightness Controls -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Print | Take a screenshot | -| Shift + Print | Screenshot of the current window | -| Brightness Up + Down | Change screen brightness | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Alt + F | Take a screenshot | +| Alt + Shift + F | Screenshot of the current screen | +| Alt + Ctrl + F | Screenshot of the current window | +| Super + = | Brightness up | +| Super + - | Brightness down | ## Scratchpads -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Ctrl + Shift + Escape | Open **Gotop** (monitoring) | -| Win + Shift + M | Open **Music** scratchpad | -| Win + Shift + V | Open **Sound Settings** scratchpad | -| Win + Shift + Backslash | Open **EasyEffects** scratchpad | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + Shift + Backslash | Open **Btop** (monitoring) | +| Super + Shift + M | Open **Music** scratchpad | +| Super + Shift + V | Open **Sound Settings** scratchpad | ## Special Sway Tools -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Win + Escape | **Kill** selected window | -| Win + Ctrl + X | **Inspect** window properties | -| Win + Ctrl + Prior/Next | Switch OBS scene to **Main**/**Guest** | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + Escape | **Kill** selected window | +| Super + Ctrl + X | **Inspect** window properties | ## Miscellaneous -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Win + Return | Open **Foot terminal** | -| Win + S | Open **Rofi (run commands)** | -| Win + C | Open **Clipman (clipboard manager)** | -| Win + X | Open **Power Menu** | -| Win + B | Show/Hide **Waybar** | +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + Return | Open **Foot terminal** | +| Super + S | Open **Rofi** (run commands) | +| Super + C | Open **Clipman** (clipboard manager) | +| Super + X | Open **Power Menu** | +| Super + B | Toggle **Waybar** | +| Super + Ctrl + S | Open **Rofi Scratchpads** | +| Super + Ctrl + X | Open **Rofi Power Menu** | -## Workspaces (Alternate) -| Key Combination | Action | -|----------------------|-------------------------------------------| -| Alt + F1-F9 | Switch to alternate workspace | -| Alt + Shift + F1-F9 | Move window to alt workspace and focus | +## Workspaces +| Key Combination | Action | +|----------------------------|----------------------------------------| +| Super + 1-9 | Switch to workspace | +| Super + Shift + 1-9 | Move window to workspace and focus | +| Alt + F1-F9 | Switch to alternate workspace | +| Alt + Shift + F1-F9 | Move window to alt workspace and focus | diff --git a/modules/home/wms/sway/hotkeys/default.nix b/modules/home/wms/sway/hotkeys/default.nix index 451bb33..26fff27 100644 --- a/modules/home/wms/sway/hotkeys/default.nix +++ b/modules/home/wms/sway/hotkeys/default.nix @@ -44,6 +44,7 @@ # Volume "${secMod}+j" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-''; "${secMod}+k" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+''; + "${secMod}+m" = ''exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle''; # MPD "${primeMod}+Backslash" = ''exec mpc toggle''; @@ -60,7 +61,7 @@ "${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a''; # Screenshots - "${secMod}+f" = ''exec grimedit''; + "${secMod}+f" = ''exec grimsnap''; "${secMod}+Shift+f" = ''exec shot-sway --screen''; # Display and keyboard brightness