dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit cea0fa7c499bd477a2fbd5a0b45d2b2d793d6940 parent 467801f23d6a280a491c2a6da950f2cde7e2ddc0 Author: maydayv7 <maydayv7@gmail.com> Date: Fri, 28 Feb 2025 02:04:21 +0530 fix(Hyprland): Nits Add some keyboard shortcuts and change `wlogout`
Diffstat:
| M | devices/valkyrie/default.nix | | | 2 | +- |
| M | files/hyprland/kebihelp.json | | | 656 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- |
| M | files/hyprland/pypr.toml | | | 4 | ++-- |
| M | files/hyprland/wlogout.css | | | 6 | ++++++ |
| M | flake.lock | | | 6 | +++--- |
| M | modules/gui/desktop/hyprland/apps/panel.nix | | | 13 | +++++++++++-- |
| M | modules/gui/desktop/hyprland/apps/security.nix | | | 70 | ++++++++++++++++++++++++++++++++++++++++++++++++---------------------- |
7 files changed, 707 insertions(+), 50 deletions(-)
diff --git a/devices/valkyrie/default.nix b/devices/valkyrie/default.nix @@ -50,7 +50,7 @@ gui = { desktop = "hyprland"; display = "eDP-1"; - wallpaper = "Thread"; + wallpaper = "Quasar"; fancy = true; }; diff --git a/files/hyprland/kebihelp.json b/files/hyprland/kebihelp.json @@ -58,7 +58,9 @@ "Rules": { "default": "Desktop", "kitty": "Terminal", - "code": "Code" + "code": "Code", + "firefox": "Firefox", + "spotify": "Spotify" }, "Keybindings": { "Desktop": { @@ -268,7 +270,7 @@ "label": "Terminal" }, { - "value": "$mod Shift T", + "value": "$mod SHIFT T", "label": "Toggle Terminal in Quake mode" }, { @@ -419,11 +421,11 @@ "label": "Copy line (empty selection)" }, { - "value": "ALT Up/Down", + "value": "ALT Up / Down", "label": "Move line up/down" }, { - "value": "SHIFT ALT Up/Down", + "value": "SHIFT ALT Up / Down", "label": "Copy line up/down" }, { @@ -443,11 +445,11 @@ "label": "Jump to matching bracket" }, { - "value": "CTRL ]/[", + "value": "CTRL ] / [", "label": "Indent/outdent line" }, { - "value": "Home/End", + "value": "Home / End", "label": "Go to beginning/end of line" }, { @@ -459,11 +461,11 @@ "label": "Go to end of file" }, { - "value": "CTRL Up/Down", + "value": "CTRL Up / Down", "label": "Scroll line up/down" }, { - "value": "ALT PgUp/PgDown", + "value": "ALT PgUp / PgDown", "label": "Scroll page up/down" }, { @@ -544,7 +546,7 @@ "label": "Navigate editor group history" }, { - "value": "ALT Left/Right", + "value": "ALT Left / Right", "label": "Go back/forward" }, { @@ -581,7 +583,7 @@ "label": "Move last selection to next Find match" }, { - "value": "ALT C/R/W", + "value": "ALT C / R / W", "label": "Toggle case-sensitive/regex/whole word" } ] @@ -594,7 +596,7 @@ "label": "Insert cursor" }, { - "value": "CTRL ALT Up/Down", + "value": "CTRL ALT Up / Down", "label": "Insert cursor above/below" }, { @@ -651,19 +653,19 @@ "label": "Split editor" }, { - "value": "CTRL 1/2/3", + "value": "CTRL 1 / 2 / 3", "label": "Focus into 1st, 2nd, or 3rd editor group" }, { - "value": "CTRL K + CTRL Left/Right", + "value": "CTRL K + CTRL Left / Right", "label": "Focus into previous/next editor group" }, { - "value": "CTRL SHIFT PgUp/PgDown", + "value": "CTRL SHIFT PgUp / PgDown", "label": "Move editor left/right" }, { - "value": "CTRL K + Left/Right", + "value": "CTRL K + Left / Right", "label": "Move active editor group" } ] @@ -688,7 +690,7 @@ "label": "Save As..." }, { - "value": "CTRL K S", + "value": "CTRL K + S", "label": "Save All" }, { @@ -843,15 +845,15 @@ "label": "Paste into active terminal" }, { - "value": "CTRL Up/Down", + "value": "CTRL Up / Down", "label": "Scroll up/down" }, { - "value": "SHIFT PgUp/PgDown", + "value": "SHIFT PgUp / PgDown", "label": "Scroll page up/down" }, { - "value": "CTRL Home/End", + "value": "CTRL Home / End", "label": "Scroll to top/bottom" } ] @@ -1039,7 +1041,7 @@ "label": "Unicode input" }, { - "value": "$mod =/+/-", + "value": "$mod = / + / -", "label": "Change font size" }, { @@ -1077,6 +1079,620 @@ } ] } + }, + "Firefox": { + "_hidden": false, + "Navigation": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + Left", + "label": "Back" + }, + { + "value": "CTRL + Right", + "label": "Forward" + }, + { + "value": "ALT + Home", + "label": "Home" + }, + { + "value": "CTRL + O", + "label": "Open File" + }, + { + "value": "CTRL + R", + "label": "Reload" + }, + { + "value": "CTRL + SHIFT + R", + "label": "Reload (override cache)" + }, + { + "value": "CTRL + .", + "label": "Stop" + } + ] + }, + "Current Page": { + "_hidden": false, + "keybindings": [ + { + "value": "Tab", + "label": "Focus Next Link or Input Field" + }, + { + "value": "SHIFT + Tab", + "label": "Focus Previous Link or Input Field" + }, + { + "value": "Space", + "label": "Go Down a Screen" + }, + { + "value": "SHIFT + Space", + "label": "Go Up a Screen" + }, + { + "value": "CTRL + Down", + "label": "Go to Bottom of Page" + }, + { + "value": "CTRL + Up", + "label": "Go to Top of Page" + }, + { + "value": "F6", + "label": "Move to Next Frame" + }, + { + "value": "SHIFT + F6", + "label": "Move to Previous Frame" + }, + { + "value": "CTRL + P", + "label": "Print" + }, + { + "value": "CTRL + S", + "label": "Save Page As" + }, + { + "value": "CTRL + +", + "label": "Zoom In" + }, + { + "value": "CTRL + -", + "label": "Zoom Out" + }, + { + "value": "CTRL + 0", + "label": "Zoom Reset" + } + ] + }, + "Editing": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + C", + "label": "Copy" + }, + { + "value": "CTRL + X", + "label": "Cut" + }, + { + "value": "Backspace", + "label": "Delete" + }, + { + "value": "Home", + "label": "Go to Beginning of Line" + }, + { + "value": "End", + "label": "Go to End of Line" + }, + { + "value": "CTRL + V", + "label": "Paste" + }, + { + "value": "CTRL + SHIFT + V", + "label": "Paste (as plain text)" + }, + { + "value": "CTRL + SHIFT + Z", + "label": "Redo" + }, + { + "value": "CTRL + A", + "label": "Select All" + }, + { + "value": "CTRL + Z", + "label": "Undo" + } + ] + }, + "Search": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + F", + "label": "Find" + }, + { + "value": "CTRL + G", + "label": "Find Again" + }, + { + "value": "CTRL + SHIFT + G", + "label": "Find Previous" + }, + { + "value": "'", + "label": "Quick Find within link-text only" + }, + { + "value": "/", + "label": "Quick Find" + }, + { + "value": "Esc", + "label": "Close the Find or Quick Find bar" + }, + { + "value": "CTRL + K", + "label": "Focus Search bar" + }, + { + "value": "CTRL + Up / Down", + "label": "Change the Default Search Engine" + }, + { + "value": "ALT + Up / Down", + "label": "View menu to switch, add, or manage search engines" + }, + { + "value": "CTRL + W", + "label": "Close Tab" + }, + { + "value": "CTRL + SHIFT + W", + "label": "Close Window" + }, + { + "value": "CTRL + Tab", + "label": "Cycle through Tabs in Recently Used Order" + }, + { + "value": "CTRL + Q", + "label": "Quit" + }, + { + "value": "CTRL + ALT + Left", + "label": "Go one Tab to the Left" + }, + { + "value": "CTRL + ALT + Right", + "label": "Go one Tab to the Right" + }, + { + "value": "CTRL + SHIFT + PgUp", + "label": "Move Tab Left" + }, + { + "value": "CTRL + SHIFT + PgDown", + "label": "Move Tab Right" + }, + { + "value": "CTRL + SHIFT + Home", + "label": "Move Tab in focus to start" + }, + { + "value": "CTRL + SHIFT + End", + "label": "Move Tab in focus to end" + }, + { + "value": "CTRL + M", + "label": "Mute/Unmute Audio" + }, + { + "value": "CTRL + T", + "label": "New Tab" + }, + { + "value": "CTRL + N", + "label": "New Window" + }, + { + "value": "CTRL + SHIFT + P", + "label": "New Private Window" + }, + { + "value": "ALT + Enter", + "label": "Open Address in New Foreground Tab" + }, + { + "value": "Enter", + "label": "Open Focused Bookmark or Link in Current Tab" + }, + { + "value": "CTRL + Enter", + "label": "Open Focused Link in New Background Tab" + }, + { + "value": "CTRL + SHIFT + Enter", + "label": "Open Focused Bookmark in New Background Tab" + }, + { + "value": "SHIFT + Enter", + "label": "Open Focused Bookmark or Link in New Window" + }, + { + "value": "CTRL + SHIFT + T", + "label": "Undo Close Tab" + }, + { + "value": "CTRL + SHIFT + N", + "label": "Undo Close Window" + }, + { + "value": "CTRL + 1-8", + "label": "Select Tab 1-8" + }, + { + "value": "CTRL + 9", + "label": "Select Last Tab" + }, + { + "value": "CTRL + SHIFT + X", + "label": "Moves the URL left or right" + } + ] + }, + "History": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + SHIFT + H", + "label": "History sidebar" + }, + { + "value": "CTRL + SHIFT + Delete", + "label": "Clear Recent History" + } + ] + }, + "Bookmarks": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + SHIFT + D", + "label": "Bookmark All Tabs" + }, + { + "value": "CTRL + D", + "label": "Bookmark This Page" + }, + { + "value": "CTRL + B", + "label": "Bookmarks sidebar" + }, + { + "value": "CTRL + SHIFT + S", + "label": "Library window (Bookmarks)" + }, + { + "value": "(search field in Library) + Space", + "label": "Search for all Bookmarks" + } + ] + }, + "Tools": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + J", + "label": "Downloads" + }, + { + "value": "CTRL + SHIFT + A", + "label": "Add-ons" + }, + { + "value": "CTRL + ALT + I", + "label": "Toggle Developer Tools" + }, + { + "value": "CTRL + ALT + K", + "label": "Web Console" + }, + { + "value": "CTRL + ALT + C", + "label": "Inspector" + }, + { + "value": "CTRL + ALT + S", + "label": "Debugger" + }, + { + "value": "SHIFT + F7", + "label": "Style Editor" + }, + { + "value": "SHIFT + F5", + "label": "Profiler" + }, + { + "value": "CTRL + ALT + E", + "label": "Network" + }, + { + "value": "SHIFT + F2", + "label": "Developer Toolbar" + }, + { + "value": "CTRL + ALT + M", + "label": "Responsive Design View" + }, + { + "value": "SHIFT + F4", + "label": "Scratchpad" + }, + { + "value": "CTRL + U", + "label": "Page Source" + }, + { + "value": "CTRL + SHIFT + J", + "label": "Browser Console" + }, + { + "value": "CTRL + I", + "label": "Page Info" + } + ] + }, + "PDF Viewer": { + "_hidden": false, + "keybindings": [ + { + "value": "N / J / Right", + "label": "Next page" + }, + { + "value": "P / K / Left", + "label": "Previous page" + }, + { + "value": "CTRL + +", + "label": "Zoom in" + }, + { + "value": "CTRL + -", + "label": "Zoom out" + }, + { + "value": "CTRL + 0", + "label": "Automatic Zoom" + }, + { + "value": "R", + "label": "Rotate the document clockwise" + }, + { + "value": "CTRL + R", + "label": "Rotate counterclockwise" + }, + { + "value": "CTRL + ALT + P", + "label": "Switch to Presentation Mode" + }, + { + "value": "S", + "label": "Choose Text Selection Tool" + }, + { + "value": "H", + "label": "Choose Hand Tool" + }, + { + "value": "CTRL + ALT + G", + "label": "Focus the Page Number input box" + } + ] + }, + "Miscellaneous": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + Enter", + "label": "Complete .com address" + }, + { + "value": "SHIFT + Enter", + "label": "Complete .net address" + }, + { + "value": "CTRL + SHIFT + Enter", + "label": "Complete .org address" + }, + { + "value": "SHIFT + Delete", + "label": "Delete Selected Autocomplete Entry" + }, + { + "value": "CTRL + SHIFT + F", + "label": "Toggle Full Screen" + }, + { + "value": "CTRL + ALT + R", + "label": "Toggle Reader Mode" + }, + { + "value": "F7", + "label": "Caret Browsing" + }, + { + "value": "CTRL + L", + "label": "Select Location Bar" + } + ] + }, + "Media": { + "_hidden": false, + "keybindings": [ + { + "value": "Space", + "label": "Toggle Play/Pause" + }, + { + "value": "Down", + "label": "Decrease volume" + }, + { + "value": "Up", + "label": "Increase volume" + }, + { + "value": "CTRL + Down", + "label": "Mute audio" + }, + { + "value": "CTRL + Up", + "label": "Unmute audio" + }, + { + "value": "Left", + "label": "Seek back 15 seconds" + }, + { + "value": "CTRL + Left", + "label": "Seek back 10%" + }, + { + "value": "Right", + "label": "Seek forward 15 seconds" + }, + { + "value": "CTRL + Right", + "label": "Seek forward 10%" + }, + { + "value": "Home", + "label": "Seek to the beginning" + }, + { + "value": "End", + "label": "Seek to the end" + } + ] + } + }, + "Spotify": { + "_hidden": false, + "General": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + N", + "label": "Create new playlist" + }, + { + "value": "CTRL + X", + "label": "Cut" + }, + { + "value": "CTRL + C", + "label": "Copy" + }, + { + "value": "CTRL + V", + "label": "Paste" + }, + { + "value": "Del", + "label": "Delete" + }, + { + "value": "CTRL + A", + "label": "Select all" + }, + { + "value": "CTRL + F", + "label": "Filter (in Songs and Playlists)" + }, + { + "value": "CTRL + L", + "label": "Give focus to search field" + }, + { + "value": "ALT + Left", + "label": "Go back" + }, + { + "value": "ALT + Right", + "label": "Go forward" + }, + { + "value": "F1", + "label": "Show help" + }, + { + "value": "CTRL + P", + "label": "Preferences" + }, + { + "value": "CTRL + SHIFT + W", + "label": "Logout active user" + }, + { + "value": "ALT + F4", + "label": "Quit" + } + ] + }, + "Player": { + "_hidden": false, + "keybindings": [ + { + "value": "Space", + "label": "Play/pause" + }, + { + "value": "CTRL + Right", + "label": "Next track" + }, + { + "value": "CTRL + Left", + "label": "Previous track" + }, + { + "value": "CTRL + Up", + "label": "Volume up" + }, + { + "value": "CTRL + Down", + "label": "Volume down" + }, + { + "value": "CTRL + SHIFT + Down", + "label": "Mute" + }, + { + "value": "CTRL + SHIFT + Up", + "label": "Max volume" + }, + { + "value": "Enter", + "label": "Play selected row" + } + ] + } } } } diff --git a/files/hyprland/pypr.toml b/files/hyprland/pypr.toml @@ -10,6 +10,7 @@ command = "kitty --class kitty-dropterm" class = "kitty-dropterm" lazy = true size = "75% 60%" +unfocus = "hide" [scratchpads.clip] animation = "fromBottom" @@ -24,7 +25,6 @@ animation = "fromRight" lazy = true size = "50% 90%" margin = 30 -unfocus = "hide" restore_excluded = true [scratchpads.bluetooth] @@ -47,6 +47,6 @@ excludes = ["bluetooth", "displays", "volume"] [scratchpads.volume] command = "pavucontrol" -class = "pavucontrol" +class = "org.pulseaudio.pavucontrol" use = "right" excludes = ["bluetooth", "displays", "network"] diff --git a/files/hyprland/wlogout.css b/files/hyprland/wlogout.css @@ -24,3 +24,9 @@ button:hover { background-color: rgba(255, 255, 255, 0.2); outline-style: none; } + +label { + font-size: 10rem; + margin: 5rem; + color: #@base05; +} diff --git a/flake.lock b/flake.lock @@ -592,11 +592,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1732998037, - "narHash": "sha256-HugmFD5pODeXZ22g+34Xv7cjPCXDiKsKqV1R3M9xppg=", + "lastModified": 1740688134, + "narHash": "sha256-AwhCfXhk27Y4V+kWYIqeu3dK9OIy8elwQbf+QS7asqc=", "owner": "maydayv7", "repo": "proprietary", - "rev": "d2c901db758e8a0ac0b007218ce8b930ab462f87", + "rev": "9c31d3a59216d57f69bd281e93536ecfb7204a86", "type": "github" }, "original": { diff --git a/modules/gui/desktop/hyprland/apps/panel.nix b/modules/gui/desktop/hyprland/apps/panel.nix @@ -164,7 +164,10 @@ in { "group/menu" = { orientation = "horizontal"; modules = ["custom/dropdown" "keyboard-state" "tray"]; - drawer.transition-left-to-right = true; + drawer = { + click-to-reveal = true; + transition-left-to-right = true; + }; }; "custom/dropdown" = { @@ -211,7 +214,10 @@ in { "group/media" = { orientation = "horizontal"; modules = ["wireplumber" "mpris"]; - drawer.transition-left-to-right = false; + drawer = { + transition-left-to-right = false; + transition-duration = 1000; + }; }; wireplumber = { @@ -233,6 +239,9 @@ in { format-paused = " <i>{player}</i>"; format-stopped = ""; tooltip-format-stopped = "Not Playing"; + on-click = "hyprutils media toggle"; + on-click-right = "hyprutils media next"; + on-click-middle = "hyprutils media previous"; }; backlight = { diff --git a/modules/gui/desktop/hyprland/apps/security.nix b/modules/gui/desktop/hyprland/apps/security.nix @@ -1,11 +1,12 @@ { config, lib, + util, pkgs, files, ... }: let - inherit (lib) concatMapStringsSep getExe getExe'; + inherit (lib) getExe getExe'; locker = pkgs.swaylock-effects; in { ## Security Configuration @@ -53,8 +54,8 @@ in { timeouts = let audio = command: "${pkgs.writeShellScript "audio" '' - ${getExe' pkgs.pipewire "pw-cli"} info all | ${getExe pkgs.gnugrep} running - if [ $? == 1 ]; then ${command}; fi + ${getExe pkgs.playerctl} status | grep Playing + if [ $? != 1 ]; then ${command}; fi ''}"; # Check if audio is playing shader = getExe pkgs.hyprshade; dpms = "${getExe' config.programs.hyprland.package "hyprctl"} dispatch dpms"; @@ -71,7 +72,7 @@ in { } { timeout = 500; # Suspend then Hibernate device - command = audio "${dpms} on && ${lock "" ""} && ${getExe' pkgs.systemd "systemctl"} suspend-then-hibernate "; + command = audio "${dpms} on && ${lock "" ""} && ${getExe' pkgs.systemd "systemctl"} suspend-then-hibernate"; } ]; }; @@ -79,24 +80,49 @@ in { # Logout programs.wlogout = { enable = true; - style = - files.hyprland.wlogout - + '' - ${concatMapStringsSep "\n" ( - name: '' - #${name} { - background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/${name}.png")); - } - '' - ) [ - "lock" - "logout" - "suspend" - "hibernate" - "shutdown" - "reboot" - ]} - ''; + style = util.build.theme { + inherit (config.lib.stylix) colors; + file = files.hyprland.wlogout; + }; + + layout = [ + { + label = "lock"; + action = "loginctl lock-session"; + text = ""; + keybind = "l"; + } + { + label = "logout"; + action = "loginctl terminate-user $USER"; + text = ""; + keybind = "e"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = ""; + keybind = "s"; + } + { + label = "suspend"; + action = "systemctl suspend"; + text = ""; + keybind = "u"; + } + { + label = "hibernate"; + action = "systemctl hibernate"; + text = ""; + keybind = "h"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = ""; + keybind = "r"; + } + ]; }; }; }