caelestia.lua (3905B)
1 -- caelestia.lua — shortcuts/caelestia.lua from the vault, adapted: 2 -- * the ~/.local/state/caelestia-mode/enabled gate is gone: Caelestia is the 3 -- only shell here, so these keys are always live; 4 -- * `qs -p … ipc call` became `caelestia shell <target> <fn> …`; 5 -- * this shell version has no audio raise/lower IPC and no per-panel toggle, 6 -- so volume goes through wpctl (the OSD still reacts) and the Wi-Fi / 7 -- Bluetooth / Audio / Battery panels open the sidebar, where they live now; 8 -- * the Omarchy root menu does not exist on NixOS. 9 local SHELL = "caelestia shell " 10 11 -- Rebind a key the stock binds already use: unbind first, then bind. 12 local function take(keys, description, command, options) 13 hl.unbind(keys) 14 o.bind(keys, description, command, options) 15 end 16 17 -- ── Drawers ────────────────────────────────────────────────────────────────── 18 take("SUPER + SPACE", "Caelestia launcher", hl.dsp.global("caelestia:launcher")) 19 take("SUPER + SHIFT + SPACE", "Omarchy menu", "omarchy-not-ported 'Omarchy menu' 'the Omarchy root menu'") 20 take("SUPER + ESCAPE", "Caelestia session menu", hl.dsp.global("caelestia:session")) 21 o.bind("SUPER + D", "Caelestia dashboard", hl.dsp.global("caelestia:dashboard")) 22 o.bind("SUPER + A", "Caelestia sidebar", hl.dsp.global("caelestia:sidebar")) 23 o.bind("SUPER + U", "Caelestia utilities", hl.dsp.global("caelestia:utilities")) 24 o.bind("SUPER + I", "Caelestia settings", hl.dsp.global("caelestia:nexus")) 25 26 -- ── Panels (replace the Omarchy shell popups on the same keys) ─────────────── 27 take("SUPER + CTRL + W", "Wi-Fi panel", SHELL .. "drawers toggle sidebar") 28 take("SUPER + CTRL + B", "Bluetooth panel", SHELL .. "drawers toggle sidebar") 29 take("SUPER + CTRL + A", "Audio panel", SHELL .. "drawers toggle sidebar") 30 o.bind("SUPER + ALT + B", "Battery panel", SHELL .. "drawers toggle sidebar") 31 32 -- ── Notifications ──────────────────────────────────────────────────────────── 33 take("SUPER + COMMA", "Clear notifications", hl.dsp.global("caelestia:clearNotifs")) 34 take("SUPER + CTRL + COMMA", "Do not disturb", SHELL .. "notifs toggleDnd") 35 36 -- ── OSD: volume, brightness, media ─────────────────────────────────────────── 37 local held = { locked = true, repeating = true } 38 local locked = { locked = true } 39 take("XF86AudioRaiseVolume", "Volume up", "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+", held) 40 take("XF86AudioLowerVolume", "Volume down", "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-", held) 41 take("XF86AudioMute", "Mute", "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", locked) 42 take("XF86AudioMicMute", "Mute microphone", "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", locked) 43 take("XF86MonBrightnessUp", "Brightness up", SHELL .. "brightness set +5%", held) 44 take("XF86MonBrightnessDown", "Brightness down", SHELL .. "brightness set 5%-", held) 45 take("XF86AudioPlay", "Play/pause", hl.dsp.global("caelestia:mediaToggle"), locked) 46 take("XF86AudioPause", "Play/pause", hl.dsp.global("caelestia:mediaToggle"), locked) 47 take("XF86AudioNext", "Next track", hl.dsp.global("caelestia:mediaNext"), locked) 48 take("XF86AudioPrev", "Previous track", hl.dsp.global("caelestia:mediaPrev"), locked) 49 50 -- ── Look ───────────────────────────────────────────────────────────────────── 51 -- Frosted glass for the translucent Caelestia layers. 52 hl.layer_rule({ 53 match = { namespace = "^caelestia-" }, 54 blur = true, 55 ignore_alpha = 0.82, 56 })