live run of hypr on fwdesk
This commit is contained in:
1 parent
787b785582
commit
8dae12d16b
21 files changed
+454
-11
No files matched your search
@@ -16,6 +16,7 @@ these cases where the source subdir and `~/.config` target differ.
|
||||
|---|---|
|
||||
| `niri/` | Niri Wayland compositor config |
|
||||
| `fwbook/hypr/` | Hyprland config for `fwbook` (scrolling layout + noctalia); linked to `~/.config/hypr` |
|
||||
| `hl-fwdesk/hypr/` | Hyprland config for `hl-fwdesk` (Steam console); **baked into the build** via `mountAsSource`, linked to `~/.config/hypr` |
|
||||
| `fwbook/quickshell/` | Quickshell configs for `fwbook` (scrolling overview); linked to `~/.config/quickshell` |
|
||||
| `extra.nu` | Extra NuShell config sourced at shell startup |
|
||||
| `fwbook.knsv` | fwbook-specific Kanshi display profile |
|
||||
@@ -26,3 +27,7 @@ these cases where the source subdir and `~/.config` target differ.
|
||||
- Changes here take effect on next login or when the activation script runs
|
||||
- These are **not** NixOS options — they are plain config files managed as repo content
|
||||
- The symlink mechanism is defined in `modules/skyg-utils.nix`
|
||||
- Hosts can embed their config in the build by setting
|
||||
`configLink.mountAsSource = true`; the dir is then read from the flake's
|
||||
store path (`skyg.rootDir`) instead of the live `~/nixos-setup/configs`
|
||||
checkout. See `modules/nixos/desktop/tiler/hyprland.nix`.
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
|
||||
"workspace.library": ["types"],
|
||||
"diagnostics.globals": ["hl"],
|
||||
"runtime.version": "Lua 5.4"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# hl-fwdesk/hypr
|
||||
|
||||
Steam-console Hyprland config for `hl-fwdesk` (a lounge box attached to a single
|
||||
1080p HDMI TV). Modeled on `configs/fwbook/hypr` but scoped down for the console
|
||||
use case — no DMS/noctalia/qs shell, no laptop panel or multi-monitor setup.
|
||||
|
||||
It is **baked into the build** (`skyg.nixos.desktop.tiler.hyprland.configLink.mountAsSource`)
|
||||
and symlinked to `~/.config/hypr` by the skyg hyprland module.
|
||||
|
||||
## Files
|
||||
|
||||
| Path | Description |
|
||||
|---|---|
|
||||
| `hyprland.lua` | Entry point; `require`s the `conf/*.lua` files |
|
||||
| `conf/env.lua` | Wayland/portal env vars |
|
||||
| `conf/general.lua` | Scrolling-layout general settings |
|
||||
| `conf/animations.lua` | Workspace/window animations |
|
||||
| `conf/monitors.lua` | Single-display (fallback) monitor config |
|
||||
| `conf/inputs.lua` | Keyboard layout |
|
||||
| `conf/window-rules.lua` | Float rules for control dialogs |
|
||||
| `conf/keybindings.lua` | Keyboard/mouse binds |
|
||||
| `conf/autostart.lua` | Auto-launches Steam Big Picture (`steam -tenfoot`) on start |
|
||||
| `types/hl.lua` | Lua-language-server type stubs for the `hl` global |
|
||||
@@ -0,0 +1,26 @@
|
||||
-- =========================
|
||||
-- Animations
|
||||
-- =========================
|
||||
hl.animation({
|
||||
leaf = "workspaces",
|
||||
enabled = true,
|
||||
speed = 2,
|
||||
bezier = "default",
|
||||
style = "slidevert",
|
||||
})
|
||||
|
||||
hl.animation({
|
||||
leaf = "windows",
|
||||
enabled = true,
|
||||
speed = 5,
|
||||
bezier = "default",
|
||||
style = "slidefade 60%",
|
||||
})
|
||||
|
||||
hl.animation({
|
||||
leaf = "windowsMove",
|
||||
enabled = true,
|
||||
speed = 5,
|
||||
bezier = "default",
|
||||
style = "slidefade 80%",
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
-- =========================
|
||||
-- Autostart
|
||||
-- =========================
|
||||
hl.on("hyprland.start", function()
|
||||
-- Lounge console: drop straight into Steam Big Picture.
|
||||
hl.exec_cmd("steam -tenfoot")
|
||||
end)
|
||||
@@ -0,0 +1,11 @@
|
||||
-- =========================
|
||||
-- Environment
|
||||
-- =========================
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("XCURSOR_THEME", "Adwaita")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_THEME", "")
|
||||
hl.env("NIXOS_OZONE_WL", "1")
|
||||
hl.env("QT_QPA_PLATFORM", "wayland")
|
||||
hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1")
|
||||
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
|
||||
@@ -0,0 +1,37 @@
|
||||
-- =========================
|
||||
-- General / Layout
|
||||
-- =========================
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 4,
|
||||
gaps_out = 4,
|
||||
border_size = 2,
|
||||
layout = "scrolling",
|
||||
resize_on_border = true,
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 12,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.9,
|
||||
},
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/
|
||||
scrolling = {
|
||||
column_width = 0.5,
|
||||
fullscreen_on_one_column = true,
|
||||
focus_fit_method = 0,
|
||||
follow_focus = true,
|
||||
explicit_column_widths = "0.333, 0.5, 0.667, 1.0",
|
||||
},
|
||||
|
||||
cursor = {
|
||||
sync_gsettings_theme = true,
|
||||
enable_hyprcursor = false,
|
||||
},
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true,
|
||||
focus_on_activate = true,
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
-- =========================
|
||||
-- Input
|
||||
-- =========================
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us",
|
||||
follow_mouse = 1,
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,51 @@
|
||||
-- =========================
|
||||
-- Keybindings
|
||||
-- =========================
|
||||
local mod = "SUPER"
|
||||
|
||||
-- =========================
|
||||
-- Apps
|
||||
-- =========================
|
||||
hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty"))
|
||||
hl.bind(mod .. " + Q", hl.dsp.window.close())
|
||||
|
||||
-- =========================
|
||||
-- Navigation
|
||||
-- =========================
|
||||
hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" }))
|
||||
hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }))
|
||||
hl.bind(mod .. " + up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
hl.bind(mod .. " + down", hl.dsp.focus({ workspace = "e+1" }))
|
||||
|
||||
-- =========================
|
||||
-- Window Management
|
||||
-- =========================
|
||||
hl.bind(mod .. " + CTRL + right", hl.dsp.layout("swapcol r"))
|
||||
hl.bind(mod .. " + CTRL + left", hl.dsp.layout("swapcol l"))
|
||||
hl.bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "maximized", action = "toggle" }))
|
||||
hl.bind(mod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
|
||||
hl.bind(mod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
||||
|
||||
-- =========================
|
||||
-- Resizing
|
||||
-- =========================
|
||||
hl.bind(mod .. " + minus", hl.dsp.layout("colresize -0.1"))
|
||||
hl.bind(mod .. " + equal", hl.dsp.layout("colresize +0.1"))
|
||||
|
||||
-- =========================
|
||||
-- Screenshots
|
||||
-- =========================
|
||||
hl.bind("Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | satty -f -'))
|
||||
hl.bind(mod .. " + P", hl.dsp.exec_cmd('grim -g "$(slurp)" - | satty -f -'))
|
||||
|
||||
-- =========================
|
||||
-- Session
|
||||
-- =========================
|
||||
-- UWSM: use `uwsm stop` instead of the `exit` dispatcher (ordered shutdown).
|
||||
hl.bind("CTRL + ALT + Delete", hl.dsp.exec_cmd("uwsm stop"))
|
||||
|
||||
-- =========================
|
||||
-- Mouse drag (move / resize windows)
|
||||
-- =========================
|
||||
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
@@ -0,0 +1,11 @@
|
||||
-- =========================
|
||||
-- Monitors
|
||||
-- =========================
|
||||
-- hl-fwdesk is a lounge console box on a single 1080p HDMI TV.
|
||||
-- Fallback catches anything not matched above.
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
-- =========================
|
||||
-- Window Rules
|
||||
-- =========================
|
||||
-- Float small control/dialog utilities so they don't tile in the console layout.
|
||||
hl.window_rule({ name = "float-pavucontrol", match = { class = "^(pavucontrol)$" }, float = true })
|
||||
hl.window_rule({ name = "float-blueman", match = { class = "^(blueman-manager)$" }, float = true })
|
||||
hl.window_rule({ name = "float-open-file", match = { title = "^(Open File)$" }, float = true })
|
||||
hl.window_rule({ name = "float-save-file", match = { title = "^(Save File)$" }, float = true })
|
||||
@@ -0,0 +1,15 @@
|
||||
-- =========================
|
||||
-- Hyprland (hl-fwdesk)
|
||||
-- =========================
|
||||
-- Steam-console desktop for the hl-fwdesk lounge box.
|
||||
-- Config is baked into the build (skyg rootDir) and symlinked to
|
||||
-- ~/.config/hypr by the skyg hyprland module.
|
||||
|
||||
require("conf/env")
|
||||
require("conf/general")
|
||||
require("conf/animations")
|
||||
require("conf/monitors")
|
||||
require("conf/inputs")
|
||||
require("conf/window-rules")
|
||||
require("conf/keybindings")
|
||||
require("conf/autostart")
|
||||
@@ -0,0 +1,6 @@
|
||||
column_width = 100
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 4
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "Always"
|
||||
@@ -0,0 +1,181 @@
|
||||
-- =============================================================================
|
||||
-- Hyprland Lua API — EmmyLua type stubs (hl-fwdesk copy)
|
||||
-- =============================================================================
|
||||
-- This file is never executed by Hyprland. It exists solely to give
|
||||
-- lua-language-server type information for the `hl` global that Hyprland
|
||||
-- injects at runtime (0.55+).
|
||||
--
|
||||
-- Coverage is based on the API surface used in conf/*.lua. Extend as needed
|
||||
-- when new hl.* calls are added.
|
||||
-- =============================================================================
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- Shared primitive types
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---@class hl.ConfigTable
|
||||
---@class hl.DispatcherValue
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- hl.dsp — dispatcher factories
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---@class hl.dsp.FocusOpts
|
||||
---@field direction? "left"|"right"|"up"|"down"
|
||||
---@field workspace? string|integer
|
||||
---@field monitor? string
|
||||
---@field on_current_monitor? boolean
|
||||
|
||||
---@class hl.dsp.MoveOpts
|
||||
---@field direction? "left"|"right"|"up"|"down"
|
||||
---@field workspace? string
|
||||
---@field monitor? "l"|"r"|"u"|"d"|string
|
||||
---@field follow? boolean
|
||||
|
||||
---@class hl.dsp.FullscreenOpts
|
||||
---@field mode? "fullscreen"|"maximize"|"float"
|
||||
---@field action? "toggle"|"on"|"off"
|
||||
|
||||
---@class hl.dsp.FloatOpts
|
||||
---@field action? "toggle"|"on"|"off"
|
||||
|
||||
---@class hl.dsp
|
||||
local dsp = {}
|
||||
|
||||
---Execute a shell command.
|
||||
---@param cmd string
|
||||
---@return hl.DispatcherValue
|
||||
function dsp.exec_cmd(cmd) end
|
||||
|
||||
---Invoke a named scrolling-layout dispatcher.
|
||||
---@param action string
|
||||
---@return hl.DispatcherValue
|
||||
function dsp.layout(action) end
|
||||
|
||||
---Focus a window or workspace.
|
||||
---@param opts hl.dsp.FocusOpts
|
||||
---@return hl.DispatcherValue
|
||||
function dsp.focus(opts) end
|
||||
|
||||
---@class hl.dsp.window
|
||||
local dsp_window = {}
|
||||
|
||||
---Close the focused window.
|
||||
---@return hl.DispatcherValue
|
||||
function dsp_window.close() end
|
||||
|
||||
---Toggle/set fullscreen on the focused window.
|
||||
---@param opts? hl.dsp.FullscreenOpts
|
||||
---@return hl.DispatcherValue
|
||||
function dsp_window.fullscreen(opts) end
|
||||
|
||||
---Toggle/set floating on the focused window.
|
||||
---@param opts? hl.dsp.FloatOpts
|
||||
---@return hl.DispatcherValue
|
||||
function dsp_window.float(opts) end
|
||||
|
||||
---Begin an interactive mouse drag (move) on the focused window.
|
||||
---@return hl.DispatcherValue
|
||||
function dsp_window.drag() end
|
||||
|
||||
---Resize the focused window by a pixel delta.
|
||||
---@param opts? hl.dsp.ResizeOpts
|
||||
---@return hl.DispatcherValue
|
||||
function dsp_window.resize(opts) end
|
||||
|
||||
dsp.window = dsp_window
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- hl.bind
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---@class hl.BindOpts
|
||||
---@field mouse? boolean
|
||||
---@field locked? boolean
|
||||
---@field repeating? boolean
|
||||
|
||||
---@param keys string
|
||||
---@param action hl.DispatcherValue | fun()
|
||||
---@param opts? hl.BindOpts
|
||||
function hl.bind(keys, action, opts) end
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- hl.config / hl.env / hl.monitor
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---Apply a hyprlang config table.
|
||||
---@param cfg hl.ConfigTable
|
||||
function hl.config(cfg) end
|
||||
|
||||
---Set a Wayland/compositor environment variable.
|
||||
---@param name string
|
||||
---@param value string
|
||||
function hl.env(name, value) end
|
||||
|
||||
---@class hl.MonitorOpts
|
||||
---@field output string
|
||||
---@field mode string
|
||||
---@field position string
|
||||
---@field scale number|string
|
||||
---@field transform? number
|
||||
|
||||
---Configure a monitor/output.
|
||||
---@param opts hl.MonitorOpts
|
||||
function hl.monitor(opts) end
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- hl.animation
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---@class hl.AnimationOpts
|
||||
---@field leaf string
|
||||
---@field enabled boolean
|
||||
---@field speed number
|
||||
---@field bezier? string
|
||||
---@field spring? string
|
||||
---@field style? string
|
||||
|
||||
---Configure an animation leaf.
|
||||
---@param opts hl.AnimationOpts
|
||||
function hl.animation(opts) end
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- hl.window_rule
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---@class hl.WindowRuleMatchOpts
|
||||
---@field class? string
|
||||
---@field title? string
|
||||
---@field float? boolean
|
||||
---@field fullscreen? boolean
|
||||
---@field pin? boolean
|
||||
---@field xwayland? boolean
|
||||
---@field workspace? string
|
||||
|
||||
---@class hl.WindowRuleOpts
|
||||
---@field name string
|
||||
---@field match hl.WindowRuleMatchOpts
|
||||
---@field float? boolean
|
||||
---@field tile? boolean
|
||||
---@field pin? boolean
|
||||
---@field opacity? number
|
||||
---@field border_size? number
|
||||
---@field rounding? number
|
||||
---@field move? string
|
||||
|
||||
---Add a window rule.
|
||||
---@param opts hl.WindowRuleOpts
|
||||
function hl.window_rule(opts) end
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- hl.on / hl.exec_cmd
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
---Register a callback for a Hyprland event.
|
||||
---@param event string
|
||||
---@param callback fun()
|
||||
function hl.on(event, callback) end
|
||||
|
||||
---Execute a shell command immediately (not as a dispatcher).
|
||||
---@param cmd string
|
||||
function hl.exec_cmd(cmd) end
|
||||
Reference in new issue
Block a user