Repository navigation
Expand file tree
/
Copy pathmangowm.nix
More file actions
163 lines (142 loc) · 4.04 KB
/
Copy pathmangowm.nix
File metadata and controls
163 lines (142 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{
pkgs,
lib,
...
}:
{
wayland.windowManager.mango = {
enable = true;
settings = {
xkb_rules_layout = "us";
xkb_rules_variant = "altgr-intl";
xkb_rules_options = "ctrl:nocaps";
bind = [
# Launchers
"ALT,t,spawn,foot"
"ALT+SHIFT,t,spawn,ghostty"
"ALT,space,spawn,rofi -show drun"
# Window management
"ALT,q,killclient"
"SUPER,m,quit"
# "SUPER,r,reload_config"
"SUPER,f,togglefullscreen"
# Set specific layout
"SUPER,t,setlayout,tile"
"SUPER,g,setlayout,grid"
"SUPER,s,setlayout,scroller"
# screen shot
"NONE,Print,spawn,sh -c 'grim \"$HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png\"'"
# lock screen
"SUPER+SHIFT,l,spawn,swaylock"
# Focus with arrow keys
"ALT,Left,focusdir,left"
"ALT,Right,focusdir,right"
"ALT,Up,focusdir,up"
"ALT,Down,focusdir,down"
"SUPER,Left,viewtoleft,0"
"SUPER,Right,viewtoright,0"
]
++ lib.concatMap (n: [
"SUPER,${toString n},view,${toString n}"
"SUPER+SHIFT,${toString n},tag,${toString n}"
]) (lib.range 1 9);
exec_once = [
"swaybg -i /etc/nixos/wallpapers/nixos.png -m fill"
"swaync"
"wl-clipboard"
"grim"
"gobatmon"
];
};
};
services.mangobar = {
enable = true;
settings = {
modules-left = [
"workspaces"
"layout"
"window"
];
modules-right = [
"custom/ssid"
"custom/wifi"
"cpu"
"memory"
"custom/disk"
"battery"
"clock#date"
"clock#time"
];
"custom/ssid" = {
exec = ''nmcli -t -f ACTIVE,SSID dev wifi | awk -F: '$1=="yes"{print $2}' '';
interval = 10;
format = " {}";
};
"custom/wifi" = {
exec = ''nmcli -t -f IN-USE,SIGNAL dev wifi | awk -F: '$1=="*"{print $2"%"}' '&
7925
#039;;
interval = 10;
format = "{}";
};
"custom/disk" = {
exec = ''df -h / | awk 'NR==2{print $3"/"$2}' '';
interval = 60;
format = " {}";
};
"clock#date" = {
format = " {:L%b%d·%A}";
};
"clock#time" = {
format = " {:L%I:%M %p}";
};
};
};
programs.swaylock = {
enable = true;
# Package choice: pkgs.swaylock or pkgs.swaylock-effects (for blur/fade)
package = pkgs.swaylock;
settings = {
# Visual layout
# color = "000000"; # Solid black background
# image = "/path/to/wall.png"; # Or use a wallpaper image instead
image = "/home/ruahman/Pictures/wallhaven-p9pd23_1920x1080.png";
scaling = "fill";
# Indicator options
indicator = true;
indicator-radius = 100;
indicator-thickness = 7;
# Color themes for the ring (Hex codes without '#')
ring-color = "ffffff";
key-hl-color = "8839ef"; # Highlight color when typing
line-color = "00000000"; # Invisible inner line
inside-color = "00000088"; # Semi-transparent inside circle
# Behavior
show-failed-attempts = true;
ignore-empty-password = true;
};
};
services.swayidle = {
enable = true;
# Target MangoWM's graphical session
# systemdTargets = [ "mango-session.target" ];
# systemdTargets = [ "graphical-session.target" ];
# Extra arguments (e.g., -w to wait for command completion)
# extraArgs = [ "-w" ];
timeouts = [
{
timeout = 300; # 5 minutes
# Lock the screen
command = "${pkgs.swaylock}/bin/swaylock -fF";
}
# {
# timeout = 600; # 10 minutes
# # Turn off display using wlr-randr (or your preferred monitor tool)
# command = "${pkgs.wlr-randr}/bin/wlr-randr --output HEADLESS-1 --off";
# resumeCommand = "${pkgs.wlr-randr}/bin/wlr-randr --output HEADLESS-1 --on";
# }
];
events = {
before-sleep = "${pkgs.swaylock}/bin/swaylock -fF";
lock = "${pkgs.swaylock}/bin/swaylock -fF";
};
};
}