Files
dotfiles/dot_config/hypr/hyprland.d.lua/workspaces.lua.tmpl
T
mpuchstein d53bc5dadb hypr: migrate to Lua config (v0.55) with custom scroll layouts
Replace hyprlang hyprland.d/ with Lua-based hyprland.d.lua/ modules:
- theme.lua.tmpl: apex-neon + apex-aeon color tables, col.* bracket keys
- general.lua: config, bezier curves, animations (bezier=/spring= fixed)
- monitors.lua.tmpl, workspaces.lua.tmpl, input.lua.tmpl, rules.lua.tmpl
- keybinds.lua.tmpl: +/SHIFT/CTRL format, monitor focus (Super+I/O),
  scroll binds for custom layouts
- layout.lua: master-scroll, slave-master-scroll, center-master-scroll
  (peek-hint scrolling slave columns, focus-triggered auto-scroll)

Entry point uses package.path + require() for per-file error isolation.
Old hyprlang configs preserved under hyprland.conf.bak/.
Add .luarc.json for hyprland stub autocompletion in editors.
2026-05-12 01:00:42 +02:00

42 lines
1.8 KiB
Cheetah

{{- $tags := .chezmoi.config.data.tags -}}
-- Special Workspaces
hl.workspace_rule({ workspace = "special:passwordmgr", on_created_empty = "uwsm app -- bitwarden-desktop" })
-- Named Workspaces (IDs 1-6, sorted before numbered)
hl.workspace_rule({ workspace = "1", default_name = "mail" })
hl.workspace_rule({ workspace = "2", default_name = "comms", monitor = "DP-2", layout = "scrolling", layout_opts = { direction = "down" } })
hl.workspace_rule({ workspace = "3", default_name = "element", monitor = "DP-2", layout = "scrolling", layout_opts = { direction = "down" } })
hl.workspace_rule({ workspace = "4", default_name = "joplin" })
{{- if index $tags "cs2" }}
hl.workspace_rule({ workspace = "5", default_name = "steam", layout = "scrolling" })
{{- end }}
{{- if index $tags "entertainment" }}
hl.workspace_rule({ workspace = "6", default_name = "spotify", monitor = "DP-2", layout = "monocle", on_created_empty = "uwsm app -- spotify-launcher" })
{{- end }}
-- Monitor Workspaces
{{- range $monitor := .monitors }}
{{- range $index, $ws := $monitor.workspaces }}
{{- if kindIs "map" $ws }}
hl.workspace_rule({
workspace = "{{ $ws.id }}",
monitor = "{{ $monitor.name }}",
default = {{ if eq $index 0 }}true{{ else }}false{{ end }}
{{- if index $ws "name" }}, default_name = "{{ $ws.name }}"{{ end }}
{{- if index $ws "layout" }}, layout = "{{ $ws.layout }}"{{ end }}
{{- if index $ws "layoutopts" }}, layout_opts = {
{{- range $i, $opt := index $ws "layoutopts" }}
{{- $parts := splitList ":" $opt }}
{{ if $i }}, {{ end }}{{ index $parts 0 }} = "{{ index $parts 1 }}"
{{- end }}
}{{ end }}
})
{{- else }}
hl.workspace_rule({ workspace = "{{ $ws }}", monitor = "{{ $monitor.name }}", default = {{ if eq $index 0 }}true{{ else }}false{{ end }} })
{{- end }}
{{- end }}
{{- end }}