Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions build_files/hypercube/03-hypercube-configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,25 @@ 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
# LuaLS config so editors pick up the hl API stubs in ~/.config/hypr
install -Dm644 "${CONFIG_DIR}/hypr/.luarc.json" /etc/skel/.config/hypr/.luarc.json

### Neovim - devcube sandbox overrides
# The editor config + AI agents ship baked into the devcube podman image
Expand Down
16 changes: 16 additions & 0 deletions dot_files/hypr/.luarc.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
6 changes: 3 additions & 3 deletions dot_files/hypr/hypridle.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances
before_sleep_cmd = loginctl lock-session # lock before suspend
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display
after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({ action = "on" })' # to avoid having to press a key twice to turn on the display
}

# Dim screen after 2.5 minutes of inactivity
Expand All @@ -30,8 +30,8 @@ listener {
# Turn off screen after 5.5 minutes of inactivity (30 seconds after lock)
listener {
timeout = 330 # 5.5 minutes
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "off" })' # screen off when timeout has passed
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "on" })' # screen on when activity is detected after timeout has fired
}

# Suspend system after 30 minutes of inactivity
Expand Down
106 changes: 0 additions & 106 deletions dot_files/hypr/hyprland-kiosk.conf

This file was deleted.

117 changes: 117 additions & 0 deletions dot_files/hypr/hyprland-kiosk.lua
Original file line number Diff line number Diff line change
@@ -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 })
Loading
Loading