From 6af37d1cebb72f14b42f62207ebdb871630ae1d6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 1 Aug 2026 15:39:37 +0000 Subject: [PATCH] Migrate Hyprland config from hyprlang to Lua Hyprland 0.55 deprecates the hyprlang (.conf) config format in favor of Lua (~/.config/hypr/hyprland.lua). Port the Hypercube compositor configs to the new API. - Convert hyprland.conf -> hyprland.lua (monitors, autostart via hl.on("hyprland.start"), env, look-and-feel via hl.config(), curves and animations, input, gestures, per-device config, keybinds via hl.bind() / hl.dsp.*, window/layer rules). - Convert hyprland-kiosk.conf -> hyprland-kiosk.lua. - Add recommended .luarc.json so the Lua LSP loads Hyprland's stubs from /usr/share/hypr/stubs for manual editing. - Update the /etc/skel stub to require() the system Lua config instead of the old hyprlang `source =` directive. - Update the live-ISO hook to append Lua to hyprland.lua. - Update doc/comment references (CONTRIBUTING.md tree, dark-mode note). hypridle/hyprlock/hyprpaper remain hyprlang (.conf); those Hypr ecosystem tools still use hyprlang, only the compositor moved to Lua. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01T97eCv6imHgfkVWxqBJrmH --- CONTRIBUTING.md | 4 +- build_files/hypercube/03-hypercube-configs.sh | 22 +- dot_files/hypr/.luarc.json | 16 + dot_files/hypr/hyprland-kiosk.conf | 106 ----- dot_files/hypr/hyprland-kiosk.lua | 117 +++++ dot_files/hypr/hyprland.conf | 382 ----------------- dot_files/hypr/hyprland.lua | 399 ++++++++++++++++++ iso_files/hook-post-rootfs.sh | 39 +- .../dconf/db/local.d/01-hypercube-dark-mode | 2 +- 9 files changed, 569 insertions(+), 518 deletions(-) create mode 100644 dot_files/hypr/.luarc.json delete mode 100644 dot_files/hypr/hyprland-kiosk.conf create mode 100644 dot_files/hypr/hyprland-kiosk.lua delete mode 100644 dot_files/hypr/hyprland.conf create mode 100644 dot_files/hypr/hyprland.lua diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 428d01b4..17bba8a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,9 @@ hypercube/ │ ├── gtk-3.0/ # GTK3 settings │ ├── gtk-4.0/ # GTK4 settings │ ├── hypr/ # Hyprland configs -│ │ ├── hyprland.conf # Main compositor config +│ │ ├── hyprland.lua # Main compositor config (Lua, 0.55+) +│ │ ├── hyprland-kiosk.lua # Kiosk-mode compositor config +│ │ ├── .luarc.json # Lua LSP config for editing hyprland.lua │ │ ├── hyprlock.conf # Lock screen │ │ ├── hypridle.conf # Idle management │ │ └── hyprpaper.conf # Wallpaper diff --git a/build_files/hypercube/03-hypercube-configs.sh b/build_files/hypercube/03-hypercube-configs.sh index b6a53886..13a3fb6a 100755 --- a/build_files/hypercube/03-hypercube-configs.sh +++ b/build_files/hypercube/03-hypercube-configs.sh @@ -60,19 +60,21 @@ import = ["/usr/share/hypercube/config/alacritty/alacritty.toml"] # Your customizations below: EOF -### Hyprland - stub that sources system config -# Users can customize by adding settings after the source line -# Hyprland parses linearly: system config first, then user customizations +### Hyprland - stub that requires system config +# Since Hyprland 0.55 the config is Lua (~/.config/hypr/hyprland.lua). +# Users can customize by adding settings after the require line. +# Hyprland evaluates linearly: system config first, then user customizations +# (later hl.config() calls override earlier values). mkdir -p /etc/skel/.config/hypr -cat > /etc/skel/.config/hypr/hyprland.conf << 'EOF' -# Hypercube Hyprland Configuration -# System defaults are sourced below. Add your customizations after this line. -# Settings defined after source will override the defaults. -# To replace defaults entirely, remove or comment out the source line. +cat > /etc/skel/.config/hypr/hyprland.lua << 'EOF' +-- Hypercube Hyprland Configuration +-- System defaults are required below. Add your customizations after this line. +-- Settings defined after the require will override the defaults. +-- To replace defaults entirely, remove or comment out the require line. -source = /usr/share/hypercube/config/hypr/hyprland.conf +require("/usr/share/hypercube/config/hypr/hyprland.lua") -# Your customizations below: +-- Your customizations below: EOF diff --git a/dot_files/hypr/.luarc.json b/dot_files/hypr/.luarc.json new file mode 100644 index 00000000..98686dfd --- /dev/null +++ b/dot_files/hypr/.luarc.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", + "workspace": { + "library": [ + "/usr/share/hypr/stubs" + ] + }, + "runtime": { + "version": "Lua 5.4" + }, + "diagnostics": { + "globals": [ + "hl" + ] + } +} diff --git a/dot_files/hypr/hyprland-kiosk.conf b/dot_files/hypr/hyprland-kiosk.conf deleted file mode 100644 index 0395b461..00000000 --- a/dot_files/hypr/hyprland-kiosk.conf +++ /dev/null @@ -1,106 +0,0 @@ -# Hyprland Kiosk Mode Configuration -# Used for desktop kiosk mode applications -# - No keybindings (locked down) -# - Single fullscreen application -# - Exits when the application closes -# -# Usage: Set KIOSK_CMD environment variable before launching -# KIOSK_CMD="your-app" Hyprland -c /path/to/hyprland-kiosk.conf - -################ -### MONITORS ### -################ - -# Enable all monitors - kiosk app shows on primary, others show wallpaper -monitor=,preferred,auto,auto - -################# -### AUTOSTART ### -################# - -# Wallpaper on all monitors -exec-once = hyprpaper -c /usr/share/hypercube/config/hypr/hyprpaper.conf - -# Launch the kiosk application from environment variable -exec-once = $KIOSK_CMD - -# Exit Hyprland when the last window closes -exec-once = handle=$(hyprctl -j clients | jq -r '.[0].address // empty'); while [ -n "$handle" ]; do sleep 0.5; handle=$(hyprctl -j clients | jq -r '.[0].address // empty'); done; hyprctl dispatch exit - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - -##################### -### LOOK AND FEEL ### -##################### - -general { - gaps_in = 0 - gaps_out = 0 - border_size = 0 - col.active_border = rgba(00000000) - col.inactive_border = rgba(00000000) - resize_on_border = false - allow_tearing = false - layout = dwindle -} - -decoration { - rounding = 0 - active_opacity = 1.0 - inactive_opacity = 1.0 - shadow { - enabled = false - } - blur { - enabled = false - } -} - -animations { - enabled = false -} - -dwindle { - preserve_split = true -} - -misc { - force_default_wallpaper = 0 - disable_hyprland_logo = true -} - -############# -### INPUT ### -############# - -input { - kb_layout = us - kb_variant = - kb_model = - kb_options = - kb_rules = - follow_mouse = 1 - sensitivity = 0 - touchpad { - natural_scroll = false - } -} - -################### -### KEYBINDINGS ### -################### - -# No keybindings - kiosk mode is locked down - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# Force all windows to fullscreen -windowrule = fullscreen, match:class .* -windowrule = nofocus, match:class ^$, match:title ^$ diff --git a/dot_files/hypr/hyprland-kiosk.lua b/dot_files/hypr/hyprland-kiosk.lua new file mode 100644 index 00000000..23197fed --- /dev/null +++ b/dot_files/hypr/hyprland-kiosk.lua @@ -0,0 +1,117 @@ +-- Hyprland Kiosk Mode Configuration +-- Used for desktop kiosk mode applications +-- - No keybindings (locked down) +-- - Single fullscreen application +-- - Exits when the application closes +-- +-- Since Hyprland 0.55, hyprlang (.conf) is deprecated in favor of Lua. +-- +-- Usage: Set KIOSK_CMD environment variable before launching +-- KIOSK_CMD="your-app" Hyprland -c /path/to/hyprland-kiosk.lua + +------------------ +---- MONITORS ---- +------------------ + +-- Enable all monitors - kiosk app shows on primary, others show wallpaper +hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" }) + +------------------- +---- AUTOSTART ---- +------------------- + +hl.on("hyprland.start", function() + -- Wallpaper on all monitors + hl.exec_cmd("hyprpaper -c /usr/share/hypercube/config/hypr/hyprpaper.conf") + + -- Launch the kiosk application from the KIOSK_CMD environment variable + -- (exec_cmd runs via `sh -c`, so the variable is expanded by the shell) + hl.exec_cmd("$KIOSK_CMD") + + -- Exit Hyprland when the last window closes + hl.exec_cmd([[handle=$(hyprctl -j clients | jq -r '.[0].address // empty'); while [ -n "$handle" ]; do sleep 0.5; handle=$(hyprctl -j clients | jq -r '.[0].address // empty'); done; hyprctl dispatch 'hl.dsp.exit()']]) +end) + +------------------------------- +---- ENVIRONMENT VARIABLES ---- +------------------------------- + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") + +----------------------- +---- LOOK AND FEEL ---- +----------------------- + +hl.config({ + general = { + gaps_in = 0, + gaps_out = 0, + border_size = 0, + col = { + active_border = "rgba(00000000)", + inactive_border = "rgba(00000000)", + }, + resize_on_border = false, + allow_tearing = false, + layout = "dwindle", + }, + + decoration = { + rounding = 0, + active_opacity = 1.0, + inactive_opacity = 1.0, + shadow = { + enabled = false, + }, + blur = { + enabled = false, + }, + }, + + animations = { + enabled = false, + }, + + dwindle = { + preserve_split = true, + }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + }, +}) + +--------------- +---- INPUT ---- +--------------- + +hl.config({ + input = { + kb_layout = "us", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + follow_mouse = 1, + sensitivity = 0, + touchpad = { + natural_scroll = false, + }, + }, +}) + +--------------------- +---- KEYBINDINGS ---- +--------------------- + +-- No keybindings - kiosk mode is locked down + +-------------------------------- +---- WINDOWS AND WORKSPACES ---- +-------------------------------- + +-- Force all windows to fullscreen +hl.window_rule({ name = "kiosk-fullscreen", match = { class = ".*" }, fullscreen = true }) +hl.window_rule({ match = { class = "^$", title = "^$" }, no_focus = true }) diff --git a/dot_files/hypr/hyprland.conf b/dot_files/hypr/hyprland.conf deleted file mode 100644 index b135552a..00000000 --- a/dot_files/hypr/hyprland.conf +++ /dev/null @@ -1,382 +0,0 @@ - -# ####################################################################################### -# HYPRLAND CONFIG - Tokyo Night Theme with Vim-like Keybindings -# ####################################################################################### -# -# Tokyo Night Color Palette: -# - Background: #1a1b26 -# - Foreground: #c0caf5 -# - Blue (accent): #7aa2f7 -# - Purple (accent): #bb9af7 -# - Cyan: #7dcfff -# - Green: #9ece6a -# - Red: #f7768e -# - Border inactive: #414868 -# -# Keybindings: -# - Vim-like navigation: SUPER + h/j/k/l (left/down/up/right) -# - Move windows: SUPER + SHIFT + h/j/k/l -# - Resize windows: SUPER + CTRL + h/j/k/l -# - App launcher: SUPER + R (opens left sidebar with search) -# - Quick settings: SUPER + N (opens right sidebar) -# -# ####################################################################################### - -# Refer to the wiki for more information. -# https://wiki.hypr.land/Configuring/ - - -################ -### MONITORS ### -################ - -# See https://wiki.hypr.land/Configuring/Monitors/ -monitor=,preferred,auto,auto - - -################### -### MY PROGRAMS ### -################### - -# See https://wiki.hypr.land/Configuring/Keywords/ - -# Set programs that you use -$terminal = ghostty -$fileManager = files -$menu = qs ipc call shell toggleSidebarLeft - -################# -### AUTOSTART ### -################# - -# Export the Wayland session environment to the systemd user manager and the -# D-Bus activation environment. Without this, D-Bus-activated services such as -# xdg-desktop-portal fail to start when Hyprland is launched directly (i.e. not -# via uwsm), breaking dark-mode detection, file pickers, and screen sharing. -# Runs first so the services started below inherit a populated environment. -exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE HYPRLAND_INSTANCE_SIGNATURE - -# Quickshell - Launcher, Notifications, OSD -exec-once = quickshell - -# Wallpaper -exec-once = hyprpaper -c /usr/share/hypercube/config/hypr/hyprpaper.conf - -# Idle / Lock -exec-once = hypridle -c /usr/share/hypercube/config/hypr/hypridle.conf - -# Hyprland Polkit Authentication Agent (for privilege escalation) -exec-once = systemctl --user start hyprpolkitagent - -# GNOME Keyring (for secrets management, SSH keys, and certificates) -exec-once = gnome-keyring-daemon --start - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -# See https://wiki.hypr.land/Configuring/Environment-variables/ - -# Desktop identity - lets xdg-desktop-portal select the Hyprland backend -# (hyprland-portals.conf) and route the Settings/color-scheme interface. -env = XDG_CURRENT_DESKTOP,Hyprland - -# XDG directories - required for quickshell and other apps to find Hypercube configs -env = XDG_CONFIG_DIRS,/etc/xdg:/usr/share/hypercube/config -env = XDG_DATA_DIRS,/usr/local/share:/usr/share:/usr/share/hypercube/data - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - -# SSH agent socket from GNOME Keyring -env = SSH_AUTH_SOCK,$XDG_RUNTIME_DIR/keyring/ssh - - -################### -### PERMISSIONS ### -################### - -# See https://wiki.hypr.land/Configuring/Permissions/ -# Please note permission changes here require a Hyprland restart and are not applied on-the-fly -# for security reasons - -# ecosystem { -# enforce_permissions = 1 -# } - -# permission = /usr/(bin|local/bin)/grim, screencopy, allow -# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow -# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow - - -##################### -### LOOK AND FEEL ### -##################### - -# Refer to https://wiki.hypr.land/Configuring/Variables/ - -# https://wiki.hypr.land/Configuring/Variables/#general -# Tokyo Night Theme Colors -general { - gaps_in = 5 - gaps_out = 5 - - border_size = 2 - - # Tokyo Night colors - active border uses accent blue/purple gradient - col.active_border = rgba(7aa2f7ee) rgba(bb9af7ee) 45deg - col.inactive_border = rgba(414868aa) - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = dwindle -} - -# https://wiki.hypr.land/Configuring/Variables/#decoration -decoration { - rounding = 0 - rounding_power = 2 - - # Change transparency of focused and unfocused windows - active_opacity = 1.0 - inactive_opacity = 1.0 - - shadow { - enabled = true - range = 4 - render_power = 3 - color = rgba(1a1b26ee) # Tokyo Night background - } - - # https://wiki.hypr.land/Configuring/Variables/#blur - blur { - enabled = true - size = 3 - passes = 1 - - vibrancy = 0.1696 - } -} - -# https://wiki.hypr.land/Configuring/Variables/#animations -animations { - enabled = yes, please :) - - # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves - # NAME, X0, Y0, X1, Y1 - bezier = easeOutQuint, 0.23, 1, 0.32, 1 - bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 - bezier = linear, 0, 0, 1, 1 - bezier = almostLinear, 0.5, 0.5, 0.75, 1 - bezier = quick, 0.15, 0, 0.1, 1 - - # Default animations, see https://wiki.hypr.land/Configuring/Animations/ - # NAME, ONOFF, SPEED, CURVE, [STYLE] - animation = global, 1, 10, default - animation = border, 1, 5.39, easeOutQuint - animation = windows, 1, 4.79, easeOutQuint - animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% - animation = windowsOut, 1, 1.49, linear, popin 87% - animation = fadeIn, 1, 1.73, almostLinear - animation = fadeOut, 1, 1.46, almostLinear - animation = fade, 1, 3.03, quick - animation = layers, 1, 3.81, easeOutQuint - animation = layersIn, 1, 4, easeOutQuint, fade - animation = layersOut, 1, 1.5, linear, fade - animation = fadeLayersIn, 1, 1.79, almostLinear - animation = fadeLayersOut, 1, 1.39, almostLinear - animation = workspaces, 1, 1.94, almostLinear, fade - animation = workspacesIn, 1, 1.21, almostLinear, fade - animation = workspacesOut, 1, 1.94, almostLinear, fade - animation = zoomFactor, 1, 7, quick -} - -# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ -# "Smart gaps" / "No gaps when only" -# uncomment all if you wish to use that. -# workspace = w[tv1], gapsout:0, gapsin:0 -# workspace = f[1], gapsout:0, gapsin:0 -# windowrule = bordersize 0, floating:0, onworkspace:w[tv1] -# windowrule = rounding 0, floating:0, onworkspace:w[tv1] -# windowrule = bordersize 0, floating:0, onworkspace:f[1] -# windowrule = rounding 0, floating:0, onworkspace:f[1] - -# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more -dwindle { - preserve_split = true # You probably want this -} - -# See https://wiki.hypr.land/Configuring/Master-Layout/ for more -master { - new_status = master -} - -# https://wiki.hypr.land/Configuring/Variables/#misc -misc { - force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( -} - - -############# -### INPUT ### -############# - -# https://wiki.hypr.land/Configuring/Variables/#input -input { - kb_layout = us - kb_variant = - kb_model = - # caps:ctrl_modifier - Caps Lock acts as Ctrl - kb_options = caps:ctrl_modifier - kb_rules = - follow_mouse = 1 - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - touchpad { - natural_scroll = false - } -} - -# See https://wiki.hypr.land/Configuring/Gestures -gesture = 3, horizontal, workspace - -# Example per-device config -# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more -device { - name = epic-mouse-v1 - sensitivity = -0.5 -} - - -################### -### KEYBINDINGS ### -################### - -# See https://wiki.hypr.land/Configuring/Keywords/ -$mainMod = SUPER # Sets "Windows" key as main modifier - -# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more -bind = $mainMod, Q, exec, $terminal -bind = $mainMod, C, killactive, -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, F, fullscreen, 0 # Fullscreen -bind = $mainMod, R, exec, $menu -# bind = $mainMod, A, exec, qs ipc call shell toggleSidebarLeft # Removed - use SUPER+R instead -bind = $mainMod, N, exec, qs ipc call shell toggleSidebarRight # Notifications/quick settings -bind = $mainMod, Escape, exec, qs ipc call shell closeAll # Close all panels -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, S, layoutmsg, togglesplit # dwindle -bind = $mainMod CTRL, Escape, exec, hyprlock # Lock screen - -# Move focus with mainMod + vim keys (h/j/k/l) -bind = $mainMod, H, movefocus, l -bind = $mainMod, L, movefocus, r -bind = $mainMod, K, movefocus, u -bind = $mainMod, J, movefocus, d - -# Move focus with mainMod + arrow keys (alternative) -bind = $mainMod, left, movefocus, l -bind = $mainMod, right, movefocus, r -bind = $mainMod, up, movefocus, u -bind = $mainMod, down, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Move windows with vim keys (mainMod + SHIFT + h/j/k/l) -bind = $mainMod SHIFT, H, movewindow, l -bind = $mainMod SHIFT, L, movewindow, r -bind = $mainMod SHIFT, K, movewindow, u -bind = $mainMod SHIFT, J, movewindow, d - -# Resize windows with vim keys (mainMod + CTRL + h/j/k/l) -bind = $mainMod CTRL, H, resizeactive, -50 0 -bind = $mainMod CTRL, L, resizeactive, 50 0 -bind = $mainMod CTRL, K, resizeactive, 0 -50 -bind = $mainMod CTRL, J, resizeactive, 0 50 - -# Example special workspace (scratchpad) -bind = $mainMod, T, togglespecialworkspace, magic -bind = $mainMod SHIFT, T, movetoworkspace, special:magic - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Laptop multimedia keys for volume and LCD brightness -# Volume control with OSD -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ && qs ipc call shell showOsdVolume "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')" -bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%- && qs ipc call shell showOsdVolume "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')" -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && qs ipc call shell showOsdVolume "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')" -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && qs ipc call shell showOsdMic "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED && echo true || echo false)" - -# Brightness control with OSD -bindel = ,XF86MonBrightnessUp, exec, brightnessctl set 5%+ && qs ipc call shell showOsdBrightness "$(brightnessctl -m | cut -d, -f4 | tr -d '%' | awk '{print $1/100}')" -bindel = ,XF86MonBrightnessDown, exec, brightnessctl set 5%- && qs ipc call shell showOsdBrightness "$(brightnessctl -m | cut -d, -f4 | tr -d '%' | awk '{print $1/100}')" - -# Requires playerctl -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPause, exec, playerctl play-pause -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioPrev, exec, playerctl previous - -# Screenshot with Gradia (Print Screen key) -bind = , Print, exec, flatpak run be.alexandervanhee.gradia --screenshot=INTERACTIVE - -# App Switcher (Super+Tab to switch between windows across all workspaces) -bind = $mainMod, Tab, exec, qs ipc call shell nextWindow -bind = $mainMod SHIFT, Tab, exec, qs ipc call shell prevWindow - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hypr.land/Configuring/Window-Rules/ for more -# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules - -# Example windowrule -# windowrule = float,class:^(kitty)$,title:^(kitty)$ - -# Ignore maximize requests from apps. You'll probably like this. -windowrule = suppress_event maximize, match:class .* - -# Fix some dragging issues with XWayland -windowrule = no_focus on, match:class ^$, match:title ^$, match:xwayland true, match:float true, match:fullscreen false, match:pin false - -# Quickshell launcher layer rules -layerrule = blur on, match:namespace quickshell -layerrule = ignore_alpha 0, match:namespace quickshell -layerrule = animation slide, match:namespace quickshell - -# App switcher layer rules -layerrule = animation fade, match:namespace appswitcher diff --git a/dot_files/hypr/hyprland.lua b/dot_files/hypr/hyprland.lua new file mode 100644 index 00000000..9c5234d5 --- /dev/null +++ b/dot_files/hypr/hyprland.lua @@ -0,0 +1,399 @@ +-- ####################################################################################### +-- HYPRLAND CONFIG - Tokyo Night Theme with Vim-like Keybindings +-- ####################################################################################### +-- +-- Tokyo Night Color Palette: +-- - Background: #1a1b26 +-- - Foreground: #c0caf5 +-- - Blue (accent): #7aa2f7 +-- - Purple (accent): #bb9af7 +-- - Cyan: #7dcfff +-- - Green: #9ece6a +-- - Red: #f7768e +-- - Border inactive: #414868 +-- +-- Keybindings: +-- - Vim-like navigation: SUPER + h/j/k/l (left/down/up/right) +-- - Move windows: SUPER + SHIFT + h/j/k/l +-- - Resize windows: SUPER + CTRL + h/j/k/l +-- - App launcher: SUPER + R (opens left sidebar with search) +-- - Quick settings: SUPER + N (opens right sidebar) +-- +-- ####################################################################################### + +-- Since Hyprland 0.55, hyprlang (.conf) is deprecated in favor of Lua. +-- Refer to the wiki for more information. +-- https://wiki.hypr.land/Configuring/ + + +------------------ +---- MONITORS ---- +------------------ + +-- See https://wiki.hypr.land/Configuring/Basics/Monitors/ +hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" }) + + +--------------------- +---- MY PROGRAMS ---- +--------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Variables/ + +-- Set programs that you use +local terminal = "ghostty" +local fileManager = "files" +local menu = "qs ipc call shell toggleSidebarLeft" + + +------------------- +---- AUTOSTART ---- +------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Autostart/ +hl.on("hyprland.start", function() + -- Export the Wayland session environment to the systemd user manager and the + -- D-Bus activation environment. Without this, D-Bus-activated services such as + -- xdg-desktop-portal fail to start when Hyprland is launched directly (i.e. not + -- via uwsm), breaking dark-mode detection, file pickers, and screen sharing. + -- Runs first so the services started below inherit a populated environment. + hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE HYPRLAND_INSTANCE_SIGNATURE") + + -- Quickshell - Launcher, Notifications, OSD + hl.exec_cmd("quickshell") + + -- Wallpaper + hl.exec_cmd("hyprpaper -c /usr/share/hypercube/config/hypr/hyprpaper.conf") + + -- Idle / Lock + hl.exec_cmd("hypridle -c /usr/share/hypercube/config/hypr/hypridle.conf") + + -- Hyprland Polkit Authentication Agent (for privilege escalation) + hl.exec_cmd("systemctl --user start hyprpolkitagent") + + -- GNOME Keyring (for secrets management, SSH keys, and certificates) + hl.exec_cmd("gnome-keyring-daemon --start") +end) + + +------------------------------- +---- ENVIRONMENT VARIABLES ---- +------------------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/ + +-- Desktop identity - lets xdg-desktop-portal select the Hyprland backend +-- (hyprland-portals.conf) and route the Settings/color-scheme interface. +hl.env("XDG_CURRENT_DESKTOP", "Hyprland") + +-- XDG directories - required for quickshell and other apps to find Hypercube configs +hl.env("XDG_CONFIG_DIRS", "/etc/xdg:/usr/share/hypercube/config") +hl.env("XDG_DATA_DIRS", "/usr/local/share:/usr/share:/usr/share/hypercube/data") + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") + +-- SSH agent socket from GNOME Keyring +hl.env("SSH_AUTH_SOCK", os.getenv("XDG_RUNTIME_DIR") .. "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/keyring/ssh") + + +----------------------- +----- PERMISSIONS ----- +----------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/ +-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly +-- for security reasons + +-- hl.config({ +-- ecosystem = { +-- enforce_permissions = true, +-- }, +-- }) + +-- hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow") +-- hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow") +-- hl.permission("/usr/(bin|local/bin)/hyprpm", "plugin", "allow") + + +----------------------- +---- LOOK AND FEEL ---- +----------------------- + +-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables/ +-- Tokyo Night Theme Colors +hl.config({ + -- https://wiki.hypr.land/Configuring/Basics/Variables/#general + general = { + gaps_in = 5, + gaps_out = 5, + + border_size = 2, + + col = { + -- Tokyo Night colors - active border uses accent blue/purple gradient + active_border = { colors = { "rgba(7aa2f7ee)", "rgba(bb9af7ee)" }, angle = 45 }, + inactive_border = "rgba(414868aa)", + }, + + -- Set to true to enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false, + + -- Please see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ before you turn this on + allow_tearing = false, + + layout = "dwindle", + }, + + -- https://wiki.hypr.land/Configuring/Basics/Variables/#decoration + decoration = { + rounding = 0, + rounding_power = 2, + + -- Change transparency of focused and unfocused windows + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { + enabled = true, + range = 4, + render_power = 3, + color = "rgba(1a1b26ee)", -- Tokyo Night background + }, + + -- https://wiki.hypr.land/Configuring/Basics/Variables/#blur + blur = { + enabled = true, + size = 3, + passes = 1, + vibrancy = 0.1696, + }, + }, + + -- https://wiki.hypr.land/Configuring/Basics/Variables/#animations + animations = { + enabled = true, + }, +}) + +-- Default curves, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/#curves +hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } }) +hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } }) +hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } }) +hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } } }) +hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } }) + +-- Default animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ +hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windows", enabled = true, speed = 4.79, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", style = "popin 87%" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" }) +hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" }) +hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" }) +hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" }) +hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" }) +hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" }) +hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" }) +hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" }) +hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" }) +hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" }) +hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" }) +hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" }) + +-- Ref https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ +-- "Smart gaps" / "No gaps when only" +-- uncomment all if you wish to use that. +-- hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 }) +-- hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 }) +-- hl.window_rule({ match = { float = false, workspace = "w[tv1]" }, border_size = 0 }) +-- hl.window_rule({ match = { float = false, workspace = "w[tv1]" }, rounding = 0 }) +-- hl.window_rule({ match = { float = false, workspace = "f[1]" }, border_size = 0 }) +-- hl.window_rule({ match = { float = false, workspace = "f[1]" }, rounding = 0 }) + +-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more +hl.config({ + dwindle = { + preserve_split = true, -- You probably want this + }, +}) + +-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more +hl.config({ + master = { + new_status = "master", + }, +}) + +-- https://wiki.hypr.land/Configuring/Basics/Variables/#misc +hl.config({ + misc = { + force_default_wallpaper = 0, -- Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true, -- If true disables the random hyprland logo / anime girl background. :( + }, +}) + + +--------------- +---- INPUT ---- +--------------- + +-- https://wiki.hypr.land/Configuring/Basics/Variables/#input +hl.config({ + input = { + kb_layout = "us", + kb_variant = "", + kb_model = "", + -- caps:ctrl_modifier - Caps Lock acts as Ctrl + kb_options = "caps:ctrl_modifier", + kb_rules = "", + + follow_mouse = 1, + + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = false, + }, + }, +}) + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/ +hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) + +-- Example per-device config +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ for more +hl.device({ + name = "epic-mouse-v1", + sensitivity = -0.5, +}) + + +--------------------- +---- KEYBINDINGS ---- +--------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Binds/ +local mainMod = "SUPER" -- Sets "Windows" key as main modifier + +hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal)) +hl.bind(mainMod .. " + C", hl.dsp.window.close()) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen" })) -- Fullscreen +hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu)) +-- hl.bind(mainMod .. " + A", hl.dsp.exec_cmd("qs ipc call shell toggleSidebarLeft")) -- Removed - use SUPER+R instead +hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("qs ipc call shell toggleSidebarRight")) -- Notifications/quick settings +hl.bind(mainMod .. " + Escape", hl.dsp.exec_cmd("qs ipc call shell closeAll")) -- Close all panels +hl.bind(mainMod .. " + P", hl.dsp.window.pseudo()) -- dwindle +hl.bind(mainMod .. " + S", hl.dsp.layout("togglesplit")) -- dwindle +hl.bind(mainMod .. " + CTRL + Escape", hl.dsp.exec_cmd("hyprlock")) -- Lock screen + +-- Move focus with mainMod + vim keys (h/j/k/l) +hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "down" })) + +-- Move focus with mainMod + arrow keys (alternative) +hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" })) + +-- Switch workspaces with mainMod + [0-9] +-- Move active window to a workspace with mainMod + SHIFT + [0-9] +for i = 1, 10 do + local key = i % 10 -- 10 maps to key 0 + hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i })) + hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +-- Move windows with vim keys (mainMod + SHIFT + h/j/k/l) +hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" })) +hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" })) +hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" })) +hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" })) + +-- Resize windows with vim keys (mainMod + CTRL + h/j/k/l) +hl.bind(mainMod .. " + CTRL + H", hl.dsp.window.resize({ x = -50, y = 0, relative = true })) +hl.bind(mainMod .. " + CTRL + L", hl.dsp.window.resize({ x = 50, y = 0, relative = true })) +hl.bind(mainMod .. " + CTRL + K", hl.dsp.window.resize({ x = 0, y = -50, relative = true })) +hl.bind(mainMod .. " + CTRL + J", hl.dsp.window.resize({ x = 0, y = 50, relative = true })) + +-- Example special workspace (scratchpad) +hl.bind(mainMod .. " + T", hl.dsp.workspace.toggle_special("magic")) +hl.bind(mainMod .. " + SHIFT + T", hl.dsp.window.move({ workspace = "special:magic" })) + +-- Scroll through existing workspaces with mainMod + scroll +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Move/resize windows with mainMod + LMB/RMB and dragging +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- Laptop multimedia keys for volume and LCD brightness +-- Volume control with OSD +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd([[wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ && qs ipc call shell showOsdVolume "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')"]]), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd([[wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%- && qs ipc call shell showOsdVolume "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')"]]), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd([[wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && qs ipc call shell showOsdVolume "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')"]]), { locked = true, repeating = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd([[wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && qs ipc call shell showOsdMic "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED && echo true || echo false)"]]), { locked = true, repeating = true }) + +-- Brightness control with OSD +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd([[brightnessctl set 5%+ && qs ipc call shell showOsdBrightness "$(brightnessctl -m | cut -d, -f4 | tr -d '%' | awk '{print $1/100}')"]]), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd([[brightnessctl set 5%- && qs ipc call shell showOsdBrightness "$(brightnessctl -m | cut -d, -f4 | tr -d '%' | awk '{print $1/100}')"]]), { locked = true, repeating = true }) + +-- Requires playerctl +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + +-- Screenshot with Gradia (Print Screen key) +hl.bind("Print", hl.dsp.exec_cmd("flatpak run be.alexandervanhee.gradia --screenshot=INTERACTIVE")) + +-- App Switcher (Super+Tab to switch between windows across all workspaces) +hl.bind(mainMod .. " + Tab", hl.dsp.exec_cmd("qs ipc call shell nextWindow")) +hl.bind(mainMod .. " + SHIFT + Tab", hl.dsp.exec_cmd("qs ipc call shell prevWindow")) + + +-------------------------------- +---- WINDOWS AND WORKSPACES ---- +-------------------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/ for more +-- See https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ for workspace rules + +-- Example windowrule +-- hl.window_rule({ match = { class = "^(kitty)$", title = "^(kitty)$" }, float = true }) + +-- Ignore maximize requests from apps. You'll probably like this. +hl.window_rule({ + name = "suppress-maximize-events", + match = { class = ".*" }, + suppress_event = "maximize", +}) + +-- Fix some dragging issues with XWayland +hl.window_rule({ + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + no_focus = true, +}) + +-- Quickshell launcher layer rules +hl.layer_rule({ match = { namespace = "quickshell" }, blur = true }) +hl.layer_rule({ match = { namespace = "quickshell" }, ignore_alpha = 0 }) +hl.layer_rule({ match = { namespace = "quickshell" }, animation = "slide" }) + +-- App switcher layer rules +hl.layer_rule({ match = { namespace = "appswitcher" }, animation = "fade" }) diff --git a/iso_files/hook-post-rootfs.sh b/iso_files/hook-post-rootfs.sh index fc1bbc06..900d3cd9 100644 --- a/iso_files/hook-post-rootfs.sh +++ b/iso_files/hook-post-rootfs.sh @@ -86,24 +86,27 @@ if [[ -d /usr/share/hypercube/config/hypr ]]; then cp /usr/share/hypercube/config/hypr/* /usr/share/hypr/config.live.d/ # Add live environment configuration - cat >> /usr/share/hypr/config.live.d/hyprland.conf << 'EOF' - -# Live ISO - Environment variables for XDG config discovery -# These are normally set by systemd user session but greetd skips that -env = XDG_CONFIG_DIRS,/etc/xdg:/usr/share/hypercube/config -env = XDG_DATA_DIRS,/usr/local/share:/usr/share:/usr/share/hypercube/data -env = GTK_THEME,Tokyonight-Dark -env = QT_QPA_PLATFORMTHEME,qt6ct - -# Live ISO - Window rules for Anaconda installer -# Prevent fullscreen, keep as tiled window so user can access terminal -windowrule = tile, class:^(anaconda)$ -windowrule = tile, class:^(liveinst)$ -windowrule = noinitialfocus, class:^(anaconda)$ -windowrule = noinitialfocus, class:^(liveinst)$ - -# Live ISO - Auto-launch installer -exec-once = liveinst + # Since Hyprland 0.55 the config is Lua, so append Lua to hyprland.lua. + cat >> /usr/share/hypr/config.live.d/hyprland.lua << 'EOF' + +-- Live ISO - Environment variables for XDG config discovery +-- These are normally set by systemd user session but greetd skips that +hl.env("XDG_CONFIG_DIRS", "/etc/xdg:/usr/share/hypercube/config") +hl.env("XDG_DATA_DIRS", "/usr/local/share:/usr/share:/usr/share/hypercube/data") +hl.env("GTK_THEME", "Tokyonight-Dark") +hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") + +-- Live ISO - Window rules for Anaconda installer +-- Prevent fullscreen, keep as tiled window so user can access terminal +hl.window_rule({ match = { class = "^(anaconda)$" }, tile = true }) +hl.window_rule({ match = { class = "^(liveinst)$" }, tile = true }) +hl.window_rule({ match = { class = "^(anaconda)$" }, no_initial_focus = true }) +hl.window_rule({ match = { class = "^(liveinst)$" }, no_initial_focus = true }) + +-- Live ISO - Auto-launch installer +hl.on("hyprland.start", function() + hl.exec_cmd("liveinst") +end) EOF fi diff --git a/system_files/shared/etc/dconf/db/local.d/01-hypercube-dark-mode b/system_files/shared/etc/dconf/db/local.d/01-hypercube-dark-mode index 23216692..8ec47cf3 100644 --- a/system_files/shared/etc/dconf/db/local.d/01-hypercube-dark-mode +++ b/system_files/shared/etc/dconf/db/local.d/01-hypercube-dark-mode @@ -7,4 +7,4 @@ gtk-theme='Tokyonight-Dark' icon-theme='Tokyonight-Dark' cursor-theme='Adwaita' -# Note: XKB options are now configured in Hyprland (hyprland.conf) +# Note: XKB options are now configured in Hyprland (hyprland.lua)