diff --git a/flake.lock b/flake.lock index 860fc34..47bef07 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "app2unit-src": { + "flake": false, + "locked": { + "lastModified": 1751917736, + "narHash": "sha256-TjePNU9Wu9kaXSczMAZcMV0HSC9zqzLcgKXdbkyLSAU=", + "owner": "Vladimir-csp", + "repo": "app2unit", + "rev": "6a2fe29210fd939571fdfcd78581965ef479c749", + "type": "github" + }, + "original": { + "owner": "Vladimir-csp", + "repo": "app2unit", + "type": "github" + } + }, "aquamarine": { "inputs": { "hyprutils": [ @@ -33,6 +49,62 @@ "type": "github" } }, + "caelestia-cli-src": { + "flake": false, + "locked": { + "lastModified": 1751862939, + "narHash": "sha256-BlQQF73Qkk2uKfS0yYEQLWdnkf+uWzbvyqkvLqpyUCM=", + "owner": "caelestia-dots", + "repo": "cli", + "rev": "e2a34210e58cbd593be63fd4b3e5d2d6257f5c37", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "cli", + "type": "github" + } + }, + "caelestia-shell": { + "inputs": { + "app2unit-src": "app2unit-src", + "caelestia-cli-src": "caelestia-cli-src", + "caelestia-shell-src": "caelestia-shell-src", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752550660, + "narHash": "sha256-cTIzmSA4ykmPKc+1BygDfet6uJVETez9ZgaR55iSDxs=", + "ref": "refs/heads/master", + "rev": "d45a34673a9b7f0001c8974af127af82752aad0c", + "revCount": 5, + "type": "git", + "url": "https://git.sakamoto.dev/kenji/caelestia-nix" + }, + "original": { + "type": "git", + "url": "https://git.sakamoto.dev/kenji/caelestia-nix" + } + }, + "caelestia-shell-src": { + "flake": false, + "locked": { + "lastModified": 1751355641, + "narHash": "sha256-GDarX9uOlXGc2NstZmCFXBl1g5iWvchL1QA9zuWKw4Q=", + "ref": "refs/heads/main", + "rev": "4b341ca16fda528987e5ac2745945d28f422d839", + "revCount": 806, + "type": "git", + "url": "https://git.sakamoto.dev/kenji/caelestia-dots" + }, + "original": { + "type": "git", + "url": "https://git.sakamoto.dev/kenji/caelestia-dots" + } + }, "chaotic": { "inputs": { "flake-schemas": "flake-schemas", @@ -223,7 +295,25 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_4" + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_5" }, "locked": { "lastModified": 1731533236, @@ -447,7 +537,7 @@ "nixpkgs" ], "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": "systems_3", "xdph": "xdph" }, "locked": { @@ -693,7 +783,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1745334376, @@ -903,7 +993,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "ixx": "ixx", "nixpkgs": [ "nixovim", @@ -970,9 +1060,10 @@ }, "root": { "inputs": { + "caelestia-shell": "caelestia-shell", "chaotic": "chaotic", "darwin": "darwin", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "home-manager": "home-manager_2", "hyprland": "hyprland", "matugen": "matugen", @@ -1038,16 +1129,16 @@ }, "systems_2": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -1067,6 +1158,21 @@ } }, "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index dfb9c10..434dc65 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,11 @@ url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; inputs.nixpkgs.follows = "nixpkgs"; }; + + caelestia-shell = { + url = "git+https://git.sakamoto.dev/kenji/caelestia-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { diff --git a/modules/default/desktop.nix b/modules/default/desktop.nix index 9bd7ff8..7bd9532 100644 --- a/modules/default/desktop.nix +++ b/modules/default/desktop.nix @@ -3,6 +3,7 @@ [ ../../packages/hyprland/default.nix ../../packages/matugen/default.nix + ../../packages/quickshell/default.nix ] ++ [ ../../packages/steam/default.nix diff --git a/packages/hyprland/config/binds.nix b/packages/hyprland/config/binds.nix index f90a248..bfd2384 100644 --- a/packages/hyprland/config/binds.nix +++ b/packages/hyprland/config/binds.nix @@ -4,80 +4,259 @@ ... }: { wayland.windowManager.hyprland.settings = { + # Define your Super key (Mod) here, typically Super_L for the left Super key + # If you use the right Super key, you might want Super_R + # If you just use 'Super' it usually means either. + # $mod = Super; + + # Note: I'm assuming 'Super' is your $mod key based on your binds. + # If it's not defined elsewhere in your Hyprland config, you might need to add: + # "$mod = Super;" to your Hyprland environment or options. + + exec = [ + "hyprctl dispatch submap global" # This line might need to be elsewhere if it's a global exec command, not a keybind. + # For now, it's just text in the original context. + ]; + + submap = [ + "global" + ]; + + # Shell keybinds bind = [ - "$mod, Return, exec, $term" - "$mod, Q, killactive," - "$mod, E, exec, $fileManager" - "$mod, V, togglefloating," - "$mod, R, exec, $menu" - "$mod, P, pseudo," - "$mod, B, togglesplit," - "$mod, W, exec, $browser" + # Launcher + "$mod, Super_L, exec, caelestia launcher" # bind to `bind` because `bindi` maps to it + "$mod, catchall, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse:272, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse:273, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse:274, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse:275, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse:276, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse:277, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse_up, exec, caelestia launcherInterrupt" # bindin + "$mod, mouse_down, exec, caelestia launcherInterrupt" # bindin + # Misc + "Control+Alt, Delete, exec, caelestia session" + "$mod, K, exec, caelestia showall" + "$mod, L, exec, caelestia lock" + + # Restore lock - these are `bindl` in your original, but `exec` should be fine here. + # However, `bindl` is typically for a *release* event. If `caelestia shell -d` is a daemon, + # and `caelestia:lock` is a quickshell internal, you might need to reconsider. + # For direct translation, they go into `bindl` list. + + # Media - handled by bindl below + + # Apps + "$mod, Return, exec, app2unit -- kitty" + "$mod, W, exec, app2unit -- zen-browser" + "$mod, C, exec, app2unit -- codium" + "$mod, G, exec, app2unit -- github-desktop" + "$mod, E, exec, app2unit -- thunar" + "$mod ALT, E, exec, app2unit -- nemo" + "Control+Alt, Escape, exec, app2unit -- qps" + "Control+Alt, V, exec, app2unit -- pavucontrol" + + # Utilities + "$mod SHIFT, S, global, caelestia:screenshotFreeze" + "$mod SHIFT ALT, S, global, caelestia:screenshot" + "$mod ALT, R, exec, caelestia record -s" + "Control+Alt, R, exec, caelestia record" + "$mod SHIFT ALT, R, exec, caelestia record -r" + "$mod SHIFT, C, exec, hyprpicker -a" # Colour picker + + # Sleep + "$mod SHIFT, L, exec, systemctl suspend-then-hibernate" + + # Clipboard and emoji picker + "$mod, V, exec, pkill fuzzel || caelestia clipboard" + "$mod ALT, V, exec, pkill fuzzel || caelestia clipboard -d" + "$mod, Period, exec, pkill fuzzel || caelestia emoji -p" + + # Testing + # This is a `bindl` (key release), so move it to `bindl` list below. + + # Window actions "$mod, H, movefocus, l" "$mod, L, movefocus, r" "$mod, K, movefocus, u" "$mod, J, movefocus, d" - - "$mod SHIFT, M, exit," - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, J, movewindow, d" "$mod SHIFT, H, movewindow, l" "$mod SHIFT, L, movewindow, r" - - "$mod CTRL, K, resizeactive, 0 -50" - "$mod CTRL, J, resizeactive, 0 50" - "$mod CTRL, H, resizeactive, -50 0" - "$mod CTRL, L, resizeactive, 50 0" - - "$mod, S, togglespecialworkspace, magic" - "$mod SHIFT, S, movetoworkspace, special:magic" - - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - + "$mod SHIFT, K, movewindow, u" + "$mod SHIFT, J, movewindow, d" + "$mod CTRL, Backslash, centerwindow, 1" + "$mod CTRL ALT, Backslash, resizeactive, exact 55% 70%" + "$mod CTRL ALT, Backslash, centerwindow, 1" + "$mod ALT, Backslash, exec, caelestia pip" + "$mod, P, pin" "$mod, F, fullscreen, 0" + "$mod ALT, F, fullscreen, 1" - "$mod, Space, exec, pkill rofi || rofi -show drun" - "$mod, C, exec, pkill rofi || rofi -show calc -modi calc -no-show-match -no-sort" + # Special workspace toggles + "Control+Shift, Escape, exec, caelestia toggle sysmon" + "$mod, M, exec, caelestia toggle music" + "$mod, D, exec, caelestia toggle communication" + "$mod, R, exec, caelestia toggle todo" + + # Toggle special workspace + "$mod, S, exec, caelestia toggle specialws" + + # Window groups + "$mod, Comma, togglegroup" + "$mod SHIFT, Comma, lockactivegroup, toggle" + + # Go to workspace -1/+1 (mouse binds are `bind` for mouse-wheel) + "$mod, mouse_down, workspace, -1" + "$mod, mouse_up, workspace, +1" + + # Move window to workspace -1/+1 + "$mod ALT, mouse_down, movetoworkspace, -1" + "$mod ALT, mouse_up, movetoworkspace, +1" + + # Move window to/from special workspace + "$mod CTRL SHIFT, up, movetoworkspace, special:special" + "$mod CTRL SHIFT, down, movetoworkspace, e+0" + "$mod ALT, S, movetoworkspace, special:special" ] ++ ( - # workspaces - builtins.concatLists (builtins.genList ( - i: let - ws = i + 1; - in [ - "$mod, ${toString ws}, workspace, ${toString ws}" - "$mod SHIFT, ${toString ws}, movetoworkspace, ${toString ws}" - ] - ) - 9) + # Go to workspace # + let + wsaction = "~/.config/hypr/scripts/wsaction.fish"; + in + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "$mod, ${toString ws}, exec, ${wsaction} workspace ${toString ws}" + ] + ) + 9) # For workspaces 1-9 ) ++ [ - "$mod, 0, workspace, 10" - "$mod, 0, movetoworkspace, 10" + # "$mod, 0, exec, ${config.wayland.windowManager.hyprland.settings.workspaceRule."0".exec} workspace 10" # Workaround for workspace 0 + # Re-adding `wsaction` since it's used here. + "$mod, 0, exec, ~/.config/hypr/scripts/wsaction.fish workspace 10" + ] + ++ ( + # Go to workspace group # + let + wsaction = "~/.config/hypr/scripts/wsaction.fish"; + in + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "Control+$mod, ${toString ws}, exec, ${wsaction} -g workspace ${toString ws}" + ] + ) + 9) + ) + ++ [ + "Control+$mod, 0, exec, ~/.config/hypr/scripts/wsaction.fish -g workspace 10" + ] + ++ ( + # Move window to workspace # + let + wsaction = "~/.config/hypr/scripts/wsaction.fish"; + in + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "$mod ALT, ${toString ws}, exec, ${wsaction} movetoworkspace ${toString ws}" + ] + ) + 9) + ) + ++ [ + "$mod ALT, 0, exec, ~/.config/hypr/scripts/wsaction.fish movetoworkspace 10" + ] + ++ ( + # Move window to workspace group # + let + wsaction = "~/.config/hypr/scripts/wsaction.fish"; + in + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "Control+$mod ALT, ${toString ws}, exec, ${wsaction} -g movetoworkspace ${toString ws}" + ] + ) + 9) + ) + ++ [ + "Control+$mod ALT, 0, exec, ~/.config/hypr/scripts/wsaction.fish -g movetoworkspace 10" ]; + binde = [ + "$mod, Minus, splitratio, -0.1" + "$mod, Equal, splitratio, 0.1" + "Control+$mod, left, workspace, -1" + "$mod, Page_Up, workspace, -1" + "Control+$mod, right, workspace, +1" + "$mod, Page_Down, workspace, +1" + "$mod ALT, Page_Up, movetoworkspace, -1" + "$mod ALT, Page_Down, movetoworkspace, +1" + "Control+$mod SHIFT, right, movetoworkspace, +1" + "Control+$mod SHIFT, left, movetoworkspace, -1" + "Alt, Tab, cyclenext, activewindow" # `binde` for cycle next + "Control+Alt, Tab, changegroupactive, f" # `binde` for change group active + ]; + bindm = [ "$mod, mouse:272, movewindow" + "$mod, Z, movewindow" "$mod, mouse:273, resizewindow" - ]; - - bindel = [ - ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" - ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ",XF86MonBrightnessUp, exec, brightnessctl s 10%+" - ",XF86MonBrightnessDown, exec, brightnessctl s 10%-" + "$mod, X, resizewindow" ]; bindl = [ - ",XF86AudioNext, exec, playerctl next" - ",XF86AudioPause, exec, playerctl play-pause" - ",XF86AudioPlay, exec, playerctl play-pause" - ",XF86AudioPrev, exec, playerctl previous" + # Restore lock + "$mod ALT, L, exec, caelestia shell -d" + "$mod ALT, L, global, caelestia:lock" # This is a Hyprland `global` command, not an `exec` + + # Brightness + ", XF86MonBrightnessUp, global, caelestia:brightnessUp" + ", XF86MonBrightnessDown, global, caelestia:brightnessDown" + + # Media + "Control+$mod, Space, global, caelestia:mediaToggle" + ", XF86AudioPlay, global, caelestia:mediaToggle" + ", XF86AudioPause, global, caelestia:mediaToggle" + "Control+$mod, Equal, global, caelestia:mediaNext" + ", XF86AudioNext, global, caelestia:mediaNext" + "Control+$mod, Minus, global, caelestia:mediaPrev" + ", XF86AudioPrev, global, caelestia:mediaPrev" + ", XF86AudioStop, global, caelestia:mediaStop" + + # Utilities (screenshot is `bindl` in your original) + ", Print, exec, caelestia screenshot" # Full screen capture > clipboard + + # Volume + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + "$mod SHIFT, M, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + + # Clipboard and emoji picker (alternate paste is `bindl`) + "Control+Shift+Alt, V, exec, sleep 0.5s && ydotool type -d 1 \"$(cliphist list | head -1 | cliphist decode)\"" + + # Testing + "$mod ALT, f12, exec, notify-send -u low -i dialog-information-symbolic 'Test notification' \"Here's a really long message to test truncation and wrapping\\nYou can middle click or flick this notification to dismiss it!\" -a 'Shell' -A \"Test1=I got it!\" -A \"Test2=Another action\"" + ]; + + bindel = [ + # Volume + ", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%+" + ", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-" + ]; + + bindr = [ + # Kill/restart + "Control+$mod SHIFT, R, exec, qs -c caelestia kill" + "Control+$mod ALT, R, exec, qs -c caelestia kill; caelestia shell -d" ]; }; } diff --git a/packages/quickshell/default.nix b/packages/quickshell/default.nix new file mode 100644 index 0000000..1812409 --- /dev/null +++ b/packages/quickshell/default.nix @@ -0,0 +1,14 @@ +{ + inputs, + pkgs, + ... +}: { + imports = [ + inputs.caelestia-shell.nixosModules.default + ]; + servies.caelestia-shell = { + enable = true; + config = { + }; + }; +} diff --git a/packages/quickshell/home.nix b/packages/quickshell/home.nix index 8ce3c58..ac92140 100644 --- a/packages/quickshell/home.nix +++ b/packages/quickshell/home.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: let +{ + pkgs, + inputs, + ... +}: let caelestia-shell = pkgs.fetchFromGitHub { owner = "caelestia-dots"; repo = "shell"; @@ -6,7 +10,10 @@ sha256 = "sha256-FHPCSy/Fd9hIpFA2BxhTkbwBtY9vtvsEUYC3+ZX6zNQ="; }; in { + imports = [ + ]; home.packages = with pkgs; [ + fuzzel inotify-tools app2unit quickshell @@ -26,7 +33,7 @@ in { curl material-symbols ]; - home.file.".config/quickshell" = { - source = caelestia-shell; - }; + # home.file.".config/quickshell/caelestia" = { + # source = caelestia-shell; + # }; }