Files
desktop/modules/hyprland/desktopctl.sh
T
illustris 3fcf3c9c57 add Hyprland desktop with XMonad-style layouts
Manage the desktop through native Lua and UWSM with Grid, Monocle, Tabs and Scrolling layouts. Add workspace-local navigation, bounded scrolling focus and a runtime Grid ratio defaulting to 1.20.

Configure the HDR OLED and portrait LG, HDMI recovery, NVIDIA suspend handling, independent locking and Plasma fallback. Fix Waybar workspace IPC and provide immediate per-output layout status.

Include desktop controls, screenshots, usage documentation and controller/panel regression tests. Use the authorized local illustris flake input.
2026-10-04 09:43:45 +05:30

30 lines
1.6 KiB
Bash

case "${1:-menu}" in
grid|monocle|tabbed|scrolling)
hyprctl eval "desktop.layout_set(\"$1\")" ;;
cycle) hyprctl eval 'desktop.layout_cycle()' ;;
dual) hyprctl eval 'desktop.display_profile(true)' ;;
solo) hyprctl eval 'desktop.display_profile(false)' ;;
hdr) hyprctl eval 'desktop.hdr_toggle()' ;;
wake) hyprctl eval 'desktop.wake()' ;;
sleep) hyprctl eval 'hl.dispatch(hl.dsp.dpms({action="disable"}))' ;;
status) exec desktop-panel --once ;;
help)
hyprctl -j binds | jq -r 'map(select(.description != "")) | .[] |
([if (.modmask % 128 >= 64) then "Super" else empty end,
if (.modmask % 8 >= 4) then "Ctrl" else empty end,
if (.modmask % 16 >= 8) then "Alt" else empty end,
if (.modmask % 2 == 1) then "Shift" else empty end,
.key] | join("+")) + " - " + .description' |
wofi --dmenu --prompt 'Shortcuts' --width 750 --height 650 >/dev/null ;;
menu)
choice=$(printf '%s\n' 'Grid' 'Monocle' 'Tabs' 'Scroll' 'Dual monitors' 'OLED only' 'Toggle HDR' 'Retrain LG HDMI' 'Lock' 'Suspend' 'Log out' |
wofi --dmenu --prompt 'Desktop') || exit 0
case "$choice" in
Grid) desktopctl grid ;; Monocle) desktopctl monocle ;; Tabs) desktopctl tabbed ;; Scroll) desktopctl scrolling ;;
'Dual monitors') desktopctl dual ;; 'OLED only') desktopctl solo ;; 'Toggle HDR') desktopctl hdr ;;
'Retrain LG HDMI') desktopctl wake ;; Lock) hyprlock ;; Suspend) systemctl suspend ;;
'Log out') uwsm stop ;;
esac ;;
*) echo 'Usage: desktopctl {grid|monocle|tabbed|scrolling|cycle|dual|solo|hdr|wake|sleep|status|help|menu}' >&2; exit 2 ;;
esac