Complete bindings (30+ added), PAM lock config, installer cleans stale files/execs.lua

swadhinbiswas committed 2 months ago
d902a0f
1 parent 9fab3c1
commit d902a0f
3 files changed
+124 -18
▼config/hypr/deo-bindings.lua
+79-1
1
1
-- ============================================================================
2
+-- de-omarchy curated bindings — ALL Omarchy defaults that don't conflict
2
3
--
4
+-- Host (Moonrice) keymap stays untouched above this. Every conflicting key
5
+-- is skipped here and documented in audit/MAPPING.md + keybindings/KEYMAP.md.
3
6
--
7
+-- Skipped (host owns):
8
+-- SUPER+SPACE (float), SUPER+SHIFT+SPACE (center), SUPER+W (wallpaper),
9
+-- SUPER+T (theme switcher), SUPER+C (code), SUPER+V (clipboard history),
10
+-- SUPER+X (nvim), SUPER+L (lock), SUPER+ESCAPE (emergency lock),
11
+-- CTRL+ALT+DELETE (power), SUPER+F (fullscreen), SUPER+SHIFT+F (maximized),
12
+-- SUPER+SHIFT+arrows (move window), workspace digits 1-0,
13
+-- all XF86 media/brightness (user scripts), SUPER+CTRL+S (region screenshot),
14
+-- SUPER+CTRL+R (hyprctl reload), SUPER+SHIFT+COMMA (playerctl prev),
15
+-- SUPER+ALT+G (lazygit), SUPER+ALT+Left/Right (move to monitor)
4
16
-- ============================================================================
5
17
6
18
----------------------------
23
25
o.bind("SUPER + ALT + F", "Full width", hl.dsp.window.fullscreen({ mode = "maximized" }))
24
26
o.bind("SUPER + ALT + Home", "Save window width", "omarchy-hyprland-window-width save")
25
27
o.bind("SUPER + Home", "Restore window width", "omarchy-hyprland-window-width restore")
28
+o.bind("SUPER + G", "Toggle grouping", hl.dsp.group.toggle())
29
+o.bind("SUPER + ALT + SHIFT + TAB", "Previous in group", hl.dsp.group.prev())
30
+o.bind("SUPER + CTRL + LEFT", "Move group focus left", hl.dsp.group.prev())
31
+o.bind("SUPER + CTRL + RIGHT", "Move group focus right", hl.dsp.group.next())
32
+o.bind("SUPER + ALT + mouse_down", "Next in group", hl.dsp.group.next())
33
+o.bind("SUPER + ALT + mouse_up", "Previous in group", hl.dsp.group.prev())
34
+for i = 1, 5 do
35
+ o.bind("SUPER + ALT + code:" .. tostring(10 + i), "Switch to group window " .. i, hl.dsp.group.active({ index = i }))
36
+end
37
+o.bind("SUPER + SLASH", "Monitor scaling up", "omarchy-hyprland-monitor-scaling up")
38
+o.bind("SUPER + ALT + SLASH", "Monitor scaling down", "omarchy-hyprland-monitor-scaling down")
26
39
27
40
----------------------------
28
41
---- Workspaces ----
49
62
o.bind("CTRL + ALT + TAB", "Focus on next monitor", hl.dsp.focus({ monitor = "+1" }))
50
63
o.bind("CTRL + ALT + SHIFT + TAB", "Focus on previous monitor", hl.dsp.focus({ monitor = "-1" }))
51
64
65
+----------------------------
66
+---- Resize (minus/equals family) ----
67
+----------------------------
52
68
o.bind("SUPER + code:20", "Expand window left", hl.dsp.window.resize({ x = -100, y = 0, relative = true }))
53
69
o.bind("SUPER + code:21", "Shrink window left", hl.dsp.window.resize({ x = 100, y = 0, relative = true }))
54
70
o.bind("SUPER + SHIFT + code:20", "Shrink window up", hl.dsp.window.resize({ x = 0, y = -100, relative = true }))
63
78
o.bind("SUPER + CTRL + SHIFT + code:20", "Shrink window up a lot", hl.dsp.window.resize({ x = 0, y = -300, relative = true }))
64
79
o.bind("SUPER + CTRL + SHIFT + code:21", "Expand window down a lot", hl.dsp.window.resize({ x = 0, y = 300, relative = true }))
65
80
81
+----------------------------
82
+---- Mouse scroll workspaces ----
83
+----------------------------
66
84
o.bind("SUPER + mouse_down", "Scroll active workspace forward", hl.dsp.focus({ workspace = "e+1" }))
67
85
o.bind("SUPER + mouse_up", "Scroll active workspace backward", hl.dsp.focus({ workspace = "e-1" }))
68
86
69
87
----------------------------
70
88
---- Menus & utilities ----
71
89
----------------------------
90
+-- SUPER+SPACE (Omarchy upstream) is taken by host (float toggle).
91
+-- Omarchy menu → SUPER+SHIFT+M; apps menu → SUPER+ALT+SPACE.
72
92
o.bind("SUPER + SHIFT + M", "Omarchy menu", "omarchy-menu toggle")
73
93
o.bind("SUPER + ALT + SPACE", "Apps menu", "omarchy-menu toggle apps")
74
94
o.bind("SUPER + CTRL + E", "Emojis", "omarchy-shell shell toggle omarchy.emojis")
75
-o.bind("SUPER + CTRL + C", "Capture menu", "omarchy-menu toggle capture")
76
95
o.bind("SUPER + CTRL + O", "Toggle menu", "omarchy-menu toggle toggle")
77
96
o.bind("SUPER + CTRL + H", "Hardware menu", "omarchy-menu toggle hardware")
97
+o.bind("SUPER + SHIFT + code:201", "Omarchy menu", "omarchy-menu toggle root")
78
98
o.bind("SUPER + K", "Keybindings", "omarchy-menu-keybindings")
99
+o.bind("SUPER + ALT + K", "Tmux keybindings", "omarchy-menu-tmux-keybindings")
100
+o.bind("SUPER + CTRL + K", "Herdr keybindings", "omarchy-menu-herdr-keybindings")
79
101
o.bind("SUPER + CTRL + Q", "Calculator", "omacalc")
102
+o.bind("XF86Calculator", "Calculator", "omacalc")
103
+o.bind("XF86PowerOff", "Power menu", "omarchy-menu toggle system", { locked = true })
104
+
105
+----------------------------
106
+---- Bar panel toggles ----
107
+----------------------------
108
+o.bind("SUPER + CTRL + SPACE", "Background switcher", "omarchy-menu toggle background")
109
+o.bind("SUPER + SHIFT + CTRL + SPACE", "Theme menu", "omarchy-menu toggle theme")
110
+o.bind("SUPER + CTRL + A", "Audio panel", "omarchy-shell shell toggle omarchy.audio")
111
+o.bind("SUPER + CTRL + B", "Bluetooth panel", "omarchy-shell shell toggle omarchy.bluetooth")
112
+o.bind("SUPER + CTRL + D", "Display panel", "omarchy-shell shell toggle omarchy.monitor")
113
+o.bind("SUPER + CTRL + ALT + D", "Calendar panel", "omarchy-shell shell toggle omarchy.clock")
114
+o.bind("SUPER + CTRL + W", "Network panel", "omarchy-shell shell toggle omarchy.network")
115
+o.bind("SUPER + CTRL + P", "Power panel", "omarchy-shell shell toggle omarchy.power")
116
+o.bind("SUPER + CTRL + T", "Activity (btop)", "{ tui = \"btop\" }")
117
+for i = 1, 9 do
118
+ o.bind("SUPER + CTRL + code:" .. tostring(10 + i), "Bar panel " .. i, "omarchy-shell -q shell togglePanelAt right " .. i)
119
+end
80
120
121
+----------------------------
122
+---- Notifications ----
123
+----------------------------
81
124
o.bind("SUPER + comma", "Dismiss last notification", "omarchy-shell notifications dismissOne")
82
125
o.bind("SUPER + ALT + comma", "Invoke last notification", "omarchy-shell notifications invokeLast")
83
126
o.bind("SUPER + SHIFT + ALT + comma", "Open notification history", "omarchy-shell notifications showHistory")
84
127
o.bind_toggle("SUPER + CTRL + comma", "Toggle silencing notifications", "notification-silencing")
85
128
129
+----------------------------
130
+---- Toggles ----
131
+----------------------------
86
132
o.bind_toggle("SUPER + CTRL + I", "Toggle locking on idle", "idle")
87
133
o.bind_toggle("SUPER + CTRL + N", "Toggle nightlight", "nightlight")
88
134
o.bind("SUPER + BACKSPACE", "Toggle window transparency", "omarchy-hyprland-window-transparency-toggle")
89
135
o.bind("SUPER + SHIFT + BACKSPACE", "Toggle window gaps", "omarchy-hyprland-window-gaps-toggle")
90
136
o.bind("SUPER + CTRL + BACKSPACE", "Toggle single-window square aspect", "omarchy-hyprland-window-single-square-aspect-toggle")
91
137
138
+----------------------------
139
+---- Zoom ----
140
+----------------------------
141
+o.bind("SUPER + CTRL + Z", "Zoom in", "omarchy-hyprland-cursor-zoom in")
142
+o.bind("SUPER + CTRL + ALT + Z", "Reset zoom", "omarchy-hyprland-cursor-zoom reset")
143
+
144
+----------------------------
145
+---- Reminders & notifications ----
146
+----------------------------
147
+o.bind("SUPER + CTRL + ALT + R", "Show reminders", "omarchy-reminder show")
148
+o.bind("SUPER + SHIFT + CTRL + R", "Clear reminders", "omarchy-reminder clear")
149
+o.bind("SUPER + CTRL + ALT + T", "Show time", "omarchy-notification-time")
150
+o.bind("SUPER + CTRL + ALT + B", "Show battery remaining", "omarchy-notification-battery")
151
+o.bind("SUPER + CTRL + ALT + W", "Toggle weather", "omarchy-notification-weather")
152
+
92
153
----------------------------
93
154
---- Capture ----
94
155
----------------------------
100
157
o.bind("ALT + PRINT", "Screenrecording", "omarchy-capture-screenrecording --stop-recording || omarchy-menu toggle trigger.capture.screenrecord")
101
158
o.bind("SUPER + PRINT", "Color picker", "pkill hyprpicker || hyprpicker -a")
102
159
o.bind("SUPER + CTRL + PRINT", "Extract text (OCR) from screenshot", "omarchy-capture-text")
160
+o.bind("SUPER + CTRL + PERIOD", "Transcode", "omarchy-transcode")
161
+
162
+----------------------------
163
+---- Agent ----
164
+----------------------------
165
+o.bind("SUPER + SHIFT + CTRL + A", "Agent", "omarchy-agent --pick")
103
166
104
167
----------------------------
105
168
---- Laptop / hardware switches ----
106
169
▼config/pam/omarchy-lock-password
+4-0
1
+#%PAM-1.0
2
+auth include system-auth
3
+account include system-auth
4
+password include system-auth
0
5
▼install.sh
+41-2
182
182
fi
183
183
184
184
# ----------------------------------------------------------------------------
185
-# 6. Omarchy state init + default theme
185
+# 6. PAM config for Omarchy shell lock screen
186
+# ----------------------------------------------------------------------------
187
+if [[ ! -f /etc/pam.d/omarchy-lock-password ]]; then
188
+ log "Installing PAM config for Omarchy shell lock"
189
+ sudo cp "$REPO_DIR/config/pam/omarchy-lock-password" /etc/pam.d/omarchy-lock-password
190
+ sudo chmod 644 /etc/pam.d/omarchy-lock-password
191
+fi
192
+
193
+# ----------------------------------------------------------------------------
194
+# 7. Clean up stale host config (additive: only comments out dead code)
195
+# ----------------------------------------------------------------------------
196
+log "Cleaning up stale host config"
197
+
198
+# Remove stale zsh files from old shell ecosystem
199
+for stale in moonrice.zsh dots-hyprland.zsh auto-Hypr.sh; do
200
+ [[ -f "$HOME/.config/zshrc.d/$stale" ]] && rm "$HOME/.config/zshrc.d/$stale" && log "removed stale zsh: $stale"
201
+done
202
+
203
+# Comment out dead code paths in execs.lua (wallpaper daemon, moonshell fallback, hypridle)
204
+EXECS_LUA="$HOME/.config/hypr/hyprland/execs.lua"
205
+if [[ -f $EXECS_LUA ]]; then
206
+ # Wallpaper daemon: Omarchy shell renders wallpapers natively
207
+ if grep -q 'scripts/wallpaper.sh' "$EXECS_LUA" && ! grep -q 'Wallpaper: Omarchy shell' "$EXECS_LUA"; then
208
+ sed -i 's|hl.exec_cmd(vars.hyprDir .. "/scripts/wallpaper.sh")|-- Wallpaper: Omarchy shell renders natively (disabled by de-omarchy)\n -- hl.exec_cmd(vars.hyprDir .. "/scripts/wallpaper.sh")|' "$EXECS_LUA"
209
+ log "commented out wallpaper.sh in execs.lua"
210
+ fi
211
+ # Moonshell/waybar/swaync fallback: Omarchy shell is started by de-omarchy bridge
212
+ if grep -q 'moonshell\|waybar.*swaync' "$EXECS_LUA" && ! grep -q 'Omarchy Quickshell shell' "$EXECS_LUA"; then
213
+ sed -i '/moonshell when installed/,/fi/c\ -- Desktop shell: Omarchy Quickshell shell launched by de-omarchy bridge.\n -- hl.exec_cmd("if [ -x " .. vars.shellBin .. " ]; then " .. vars.shellCmd .. "; else waybar \& swaync \& fi")' "$EXECS_LUA"
214
+ log "commented out moonshell/waybar fallback in execs.lua"
215
+ fi
216
+ # hypridle: Omarchy idle service handles lock/screen-off/suspend
217
+ if grep -q 'hypridle' "$EXECS_LUA" && ! grep -q 'Omarchy idle service' "$EXECS_LUA"; then
218
+ sed -i 's|hl.exec_cmd("pgrep -x hypridle.*")|-- Idle: Omarchy idle service handles lock/screen-off/suspend.\n -- hl.exec_cmd("pgrep -x hypridle >/dev/null 2>\&1 || hypridle \&")|' "$EXECS_LUA"
219
+ log "commented out hypridle in execs.lua"
220
+ fi
221
+fi
222
+
223
+# ----------------------------------------------------------------------------
224
+# 8. Omarchy state init + default theme
186
225
# ----------------------------------------------------------------------------
187
226
log "Initializing Omarchy state + rose-pine theme"
188
227
export OMARCHY_PATH=$RUNTIME
192
231
unset OMARCHY_PATH
193
232
194
233
# ----------------------------------------------------------------------------
195
-# 7. Done
234
+# 9. Done
196
235
# ----------------------------------------------------------------------------
197
236
log "Verifying installation"
198
237
bash "$REPO_DIR/scripts/verify.sh" || warn "verification reported issues above"
199
238