dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/desktop/hyprland/_features/shell.nix (2113B)
1## Shell Integration
2_: {
3 home = {
4 config,
5 lib,
6 pkgs,
7 ...
8 }: {
9 programs.noctalia.settings = {
10 # Bar
11 bar.main = {
12 start = ["control-center" "taskbar" "group:g1" "media"];
13 capsule_group = lib.mkBefore [
14 {
15 id = "g1";
16 members = [
17 "minimize"
18 "maydayv7/hyprland-layout:indicator"
19 "maydayv7/hyprland-submap:indicator"
20 ];
21 }
22 ];
23 };
24
25 widget = {
26 # Game Mode
27 battery.actions.right = "exec hyprutils gamemode";
28
29 # Minimize Button
30 minimize = {
31 type = "custom_button";
32 glyph = "arrow-bar-to-down";
33 tooltip = "Minimize window";
34 actions = {
35 right = "exec hyprutils toggle minimized";
36 left = ''exec hyprctl dispatch 'hl.dsp.window.move({ workspace = "special:minimized", follow = false })' '';
37 };
38 };
39 };
40
41 # Plugins
42 plugins.enabled = lib.mkAfter [
43 "maydayv7/hyprland-submap"
44 "maydayv7/hyprland-layout"
45 ];
46 plugin_settings = let
47 hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
48 jq = lib.getExe pkgs.jq;
49 socket2 = "${lib.getExe pkgs.socat} -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock -";
50 in {
51 "maydayv7/keyhelp".hyprctl_path = hyprctl;
52 "maydayv7/hyprland-submap" = {
53 command = socket2;
54 aliases = [
55 "inhibit=Inhibit"
56 "resize=Resize"
57 "move=Move"
58 "minimized=Minimized"
59 "scrolloverview=Overview"
60 ];
61 };
62 "maydayv7/hyprland-layout" = {
63 command = socket2;
64 layout_command = "${hyprctl} getoption -j general:layout";
65 float_command = "${hyprctl} -j clients | ${jq} --argjson ws \"$(${hyprctl} -j activeworkspace | ${jq} .id)\" '[.[] | select(.workspace.id == $ws and .mapped)] as $w | (($w | length) > 0) and ($w | map(.floating) | all)'";
66 };
67 };
68 };
69 };
70}