Compare commits
10 Commits
c62d5df036
...
8d82429025
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d82429025 | |||
| 9983a94421 | |||
| d5abefe15e | |||
| 4dfaabc569 | |||
| 86d32eb0c8 | |||
| 119b250bcc | |||
| 63e5d1636d | |||
| ba9cc6b811 | |||
| c448b1d106 | |||
| 8ca8492b3b |
210
docs/hyprland-lua-migration-checklist.md
Normal file
210
docs/hyprland-lua-migration-checklist.md
Normal file
@@ -0,0 +1,210 @@
|
||||
# Hyprland Lua Migration Checklist
|
||||
|
||||
This checklist tracks the migration described in `docs/tiling-wm-experience.md`.
|
||||
|
||||
Guiding rule for shelling out:
|
||||
|
||||
- Prefer Lua for compositor/window/workspace state changes.
|
||||
- Avoid `hyprctl` for window manipulation unless there is no usable Lua API.
|
||||
- `hyprctl` remains acceptable for non-window-control escape hatches such as
|
||||
`hyprctl reload`.
|
||||
- External utilities remain acceptable where they are the real tool being
|
||||
launched, for example rofi, cliphist, grim/slurp/swappy, playerctl, hyprlock,
|
||||
and systemd commands.
|
||||
|
||||
## 0. Version And Build Base
|
||||
|
||||
- [x] Update/confirm Hyprland Lua input at latest usable upstream target.
|
||||
- [x] Keep stable Hyprland path intact until Lua path is proven.
|
||||
- [x] Keep hy3 out of the Lua branch.
|
||||
- [x] Keep hyprNStack following the Lua Hyprland input.
|
||||
- [x] Rebuild hyprNStack against the Lua Hyprland branch.
|
||||
- [x] Add a forked hyprexpo input for the Lua Hyprland branch.
|
||||
- [x] Keep a cheap Lua check: parse config, execute against stub, reject
|
||||
`hyprctl` in the Lua config's window/workspace manipulation path.
|
||||
- [x] Add a real Hyprland Lua verifier check for the config parser path.
|
||||
|
||||
Current upstream note: latest Hyprland release observed during this migration is
|
||||
`v0.54.3`; the Lua config input tracks PR 13817 and was already at the current
|
||||
PR head `c35a8a5` dated 2026-04-26. The non-Lua fallback remains pinned to the older
|
||||
hy3/hyprexpo-compatible stack; the Lua branch uses forked hyprexpo branch
|
||||
`colonelpanic8/hyprland-plugins:hyprexpo-lua-hyprland`.
|
||||
|
||||
## 1. Core Layout
|
||||
|
||||
- [x] Primary layout is equal-width columns.
|
||||
- [x] No scrolling layout.
|
||||
- [x] No hy3 in Lua path.
|
||||
- [x] Dynamic redistribution on open/close via Lua-managed nStack count.
|
||||
- [x] Monocle/tabbed-style layout available.
|
||||
- [x] Direct jump to columns layout.
|
||||
- [x] Direct jump to monocle layout.
|
||||
- [x] Directional focus cycles in monocle.
|
||||
- [x] Visual indication of hidden monocle windows, currently notification.
|
||||
- [x] Make layout state per workspace instead of one global current layout.
|
||||
- [x] Preserve one-window smart gaps in the live config path.
|
||||
- [x] Use a persistent monocle indicator instead of a transient notification.
|
||||
|
||||
Smart-gaps note: nStack uses `no_gaps_when_only = true`; Hyprland workspace
|
||||
rules are still applied at runtime for broader parity, but skipped during
|
||||
`--verify-config` because the current Lua PR segfaults when rule bindings run in
|
||||
verifier mode.
|
||||
|
||||
## 2. Workspace Behavior
|
||||
|
||||
- [x] `Super+1..9` focuses bounded workspaces.
|
||||
- [x] `Super+Shift+1..9` sends window without following.
|
||||
- [x] `Super+Ctrl+1..9` sends and follows.
|
||||
- [x] Previous workspace per monitor uses Lua-tracked history.
|
||||
- [x] Implement next empty workspace focus in Lua.
|
||||
- [x] Implement move focused window to next empty workspace without following.
|
||||
- [x] Implement move focused window to next empty workspace and follow.
|
||||
- [x] Implement bounded workspace cycling `1..9` in Lua, replacing
|
||||
`workspace-scroll.sh`.
|
||||
- [x] Implement workspace swap or decide whether native dispatcher is enough.
|
||||
- [x] Track current monitor workspace history explicitly, with native
|
||||
`previous_per_monitor` as fallback.
|
||||
|
||||
## 3. Directional Navigation
|
||||
|
||||
- [x] `Super+w/a/s/d` focuses windows.
|
||||
- [x] `Super+Shift+w/a/s/d` swaps windows.
|
||||
- [x] `Hyper+w/a/s/d` focuses monitors.
|
||||
- [x] `Hyper+Shift+w/a/s/d` moves windows to monitors.
|
||||
- [x] `Super+z` next monitor.
|
||||
- [x] `Super+Shift+z` move to next monitor.
|
||||
- [x] Replace any old cursor-follow/move scripts fully.
|
||||
- [x] Add required `Super+Ctrl+w/a/s/d` move-to-monitor behavior preserving
|
||||
useful focus.
|
||||
- [x] Add "move to empty workspace on monitor in direction" without requiring
|
||||
`Hyper+Ctrl`.
|
||||
- [ ] Verify directional focus in monocle behaves predictably.
|
||||
|
||||
## 4. Script Elimination Priority
|
||||
|
||||
- [x] Core layout switching no longer uses scripts.
|
||||
- [x] Core column count logic no longer uses scripts or `hyprctl`.
|
||||
- [x] Replace `find-empty-workspace.sh`.
|
||||
- [x] Replace `workspace-goto-empty.sh`.
|
||||
- [x] Replace `workspace-move-to-empty.sh`.
|
||||
- [x] Replace `workspace-scroll.sh`.
|
||||
- [x] Replace `cycle-layout.sh`.
|
||||
- [x] Replace `movewindow-follow-cursor.sh`.
|
||||
- [x] Replace `gather-class.sh`.
|
||||
- [x] Replace `focus-next-class.sh`.
|
||||
- [x] Replace `raise-or-run.sh`.
|
||||
- [x] Replace minimize scripts if Lua can maintain hidden workspace state.
|
||||
- [x] Replace `swap-workspaces.sh`.
|
||||
- [x] Decide whether rofi-backed pickers remain scripts or become
|
||||
Lua-generated command pipes. Rofi itself remains external.
|
||||
|
||||
## 5. Overview And Window Discovery
|
||||
|
||||
- [x] Restore visual hyprexpo for `Super+Tab` overview.
|
||||
- [x] Restore visual hyprexpo `bring` mode for `Super+Shift+Tab`.
|
||||
- [x] Keep first-pass Lua numbered window picker on secondary bindings.
|
||||
- [x] Implement first-pass Lua-native go-to-window picker.
|
||||
- [x] Implement first-pass Lua-native bring-window picker.
|
||||
- [x] Implement first-pass Lua-native replace-window picker.
|
||||
- [ ] Picker entries include icons.
|
||||
- [x] Picker entries include title/workspace.
|
||||
- [x] Hide scratchpad/minimized/internal windows from normal pickers.
|
||||
- [x] Decide whether picker data generation can be Lua-native with rofi as only
|
||||
external process.
|
||||
|
||||
Picker decision: current Lua API can query and manipulate windows directly, but
|
||||
does not expose a synchronous way to run rofi and consume its selected output.
|
||||
The first pass therefore uses Lua-native numbered submaps and notifications.
|
||||
A final rofi/icon picker would need either a small IPC bridge or an upstream Lua
|
||||
process-output/callback primitive.
|
||||
|
||||
Hyprexpo decision: hyprexpo is kept as the visual overview. The forked Lua
|
||||
branch exposes `hl.plugin.hyprexpo.expo(...)`, so the Lua config can invoke
|
||||
`toggle` and `bring` directly without shelling out to `hyprctl`.
|
||||
|
||||
## 6. Scratchpads
|
||||
|
||||
- [x] Preserve named scratchpads: element, gmail, htop, messages, slack,
|
||||
spotify, transmission, volume.
|
||||
- [x] Preserve dropdown terminal scratchpad.
|
||||
- [x] Scratchpads near-fullscreen and centered.
|
||||
- [x] Scratchpads hidden from normal listings/status bar.
|
||||
- [x] Toggling scratchpad exits fullscreen/monocle state first.
|
||||
- [x] Decide hyprscratch daemon is not needed in the Lua branch.
|
||||
- [x] Replace `hyprscratch toggle` with Lua-managed scratchpad toggles.
|
||||
- [x] Disable hyprscratch service on the Lua branch.
|
||||
- [x] Handle delayed class/title assignment with window class/title event adoption.
|
||||
- [x] Handle already-running app.
|
||||
- [x] Handle minimized app.
|
||||
- [x] Handle app on another workspace.
|
||||
|
||||
## 7. Minimization
|
||||
|
||||
- [x] Implement minimize active window.
|
||||
- [x] Implement restore last minimized window.
|
||||
- [x] Exclude minimized windows from layout.
|
||||
- [x] Exclude minimized windows from normal go/bring lists.
|
||||
- [x] Implement minimized picker.
|
||||
- [x] Implement restore all minimized.
|
||||
- [x] Implement minimize other windows of current workspace class.
|
||||
- [x] Implement restore windows of focused class.
|
||||
- [x] Decide hidden workspace naming/state model for minimized windows.
|
||||
|
||||
## 8. Class-Aware Workflows
|
||||
|
||||
- [x] Gather all windows of focused class onto current workspace.
|
||||
- [x] Focus next window of different/same class as desired parity.
|
||||
- [x] Browser raise-or-spawn.
|
||||
- [x] Window info command exposes class/title/workspace/address/pid.
|
||||
- [ ] Window menus expose real window icons.
|
||||
- [x] Prefer Lua window queries over `hyprctl clients`.
|
||||
|
||||
## 9. Status Bar Contract
|
||||
|
||||
- [ ] Confirm taffybar can still list normal workspaces.
|
||||
- [ ] Confirm special scratchpad/minimize workspaces are filtered.
|
||||
- [ ] Confirm active workspace per monitor remains visible.
|
||||
- [ ] Confirm class/title/active/minimized/urgent metadata is available.
|
||||
- [x] Expose layout name/state if practical.
|
||||
- [ ] Confirm workspace/window positioning remains enough for icon strips.
|
||||
|
||||
Layout state note: Lua writes `$XDG_RUNTIME_DIR/hyprland-layout-state` with the
|
||||
active workspace, active layout, and per-workspace layout map. Taffybar still
|
||||
needs a live readback check.
|
||||
|
||||
## 10. Session And Utilities
|
||||
|
||||
- [x] Terminal binding preserved.
|
||||
- [x] Launcher/run menu preserved.
|
||||
- [x] Media keys preserved.
|
||||
- [x] Clipboard history binding preserved.
|
||||
- [x] Screenshot binding preserved.
|
||||
- [x] Lock binding preserved.
|
||||
- [x] Session startup target integration preserved.
|
||||
- [x] `hyprctl reload` may remain available as a non-window-manipulation escape
|
||||
hatch.
|
||||
- [x] Resolve `Hyper+w` conflict: monitor focus must win; wallpaper picker
|
||||
needs another key.
|
||||
- [x] Keep rofi utility commands as external commands unless there is a
|
||||
meaningful Lua replacement.
|
||||
- [x] Decide which shell utilities are acceptable because they are not Hyprland
|
||||
control scripts.
|
||||
|
||||
## 11. Validation
|
||||
|
||||
- [x] Lua syntax check.
|
||||
- [x] Lua stub execution check.
|
||||
- [x] `hyprctl` rejection in Lua config for window/workspace manipulation.
|
||||
- [x] Real `Hyprland --verify-config` check.
|
||||
- [x] hyprNStack flake build check.
|
||||
- [x] hyprexpo Lua-branch flake build check.
|
||||
- [x] `ryzen-shine` system dry-run.
|
||||
- [x] Re-run checks after Hyprland/Lua input confirmation.
|
||||
- [ ] Try live compositor smoke test again after version bump.
|
||||
- [x] Document `--verify-config` caveats for Lua rule/plugin-specific config.
|
||||
- [ ] Eventually run `just switch` only when the branch is coherent enough for a
|
||||
live test.
|
||||
|
||||
Live-smoke note: this Hyprland binary exposes `--verify-config` but no
|
||||
`--headless` CLI flag. A true compositor smoke test still needs either a nested
|
||||
Wayland session that avoids startup side effects or an intentional `just switch`.
|
||||
@@ -74,6 +74,14 @@ Required behavior:
|
||||
- Moving the focused window to an empty workspace on the monitor in a direction
|
||||
remains required behavior, but it should not require an extra `Hyper`
|
||||
modifier beyond `Shift`.
|
||||
- `Super+w/a/s/d` focuses windows directionally.
|
||||
- `Super+Shift+w/a/s/d` swaps or moves the focused window directionally.
|
||||
- `Super+Ctrl+w/a/s/d` moves the focused window to the monitor in that
|
||||
direction while preserving useful focus.
|
||||
- `Super+Ctrl+Shift+w/a/s/d` moves the focused window to an empty workspace on
|
||||
the monitor in that direction.
|
||||
- `Hyper+w/a/s/d` focuses monitors directionally.
|
||||
- `Hyper+Shift+w/a/s/d` swaps or moves windows between monitors directionally.
|
||||
- Directional focus in tabbed/fullscreen mode should cycle predictably through
|
||||
windows even though their screen geometry overlaps.
|
||||
|
||||
@@ -88,6 +96,7 @@ Required behavior:
|
||||
|
||||
- Tiling is dynamic.
|
||||
- Primary layout is equal-width vertical columns.
|
||||
- Scrolling layouts are not acceptable.
|
||||
- All ordinary splits are vertical.
|
||||
- Adding windows dynamically redistributes all tiled windows evenly.
|
||||
- Removing windows dynamically redistributes all tiled windows evenly.
|
||||
@@ -235,6 +244,8 @@ Important behavior:
|
||||
Nice behavior:
|
||||
|
||||
- Wallpaper behavior remains consistent.
|
||||
- Wallpaper selection uses `Hyper+comma`; `Hyper+w/a/s/d` are reserved for
|
||||
directional monitor focus.
|
||||
- Idle behavior remains consistent.
|
||||
- Lock behavior remains consistent.
|
||||
- Clipboard history behavior remains consistent.
|
||||
|
||||
@@ -134,6 +134,9 @@ trust_level = "trusted"
|
||||
[projects."/home/imalison/Pictures/ai/2026/celeb"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/.local/share/keepbook"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[notice]
|
||||
hide_gpt5_1_migration_prompt = true
|
||||
"hide_gpt-5.1-codex-max_migration_prompt" = true
|
||||
|
||||
@@ -315,12 +315,12 @@ bind = $hyper SHIFT, S, movewindow, mon:d
|
||||
bind = $hyper SHIFT, A, movewindow, mon:l
|
||||
bind = $hyper SHIFT, D, movewindow, mon:r
|
||||
|
||||
# Shift to empty workspace on screen direction (Hyper + Ctrl + WASD)
|
||||
# Shift to empty workspace on screen direction (Super + Ctrl + Shift + WASD)
|
||||
# Like XMonad's shiftToEmptyOnScreen
|
||||
bind = $hyper CTRL, W, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh u
|
||||
bind = $hyper CTRL, S, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh d
|
||||
bind = $hyper CTRL, A, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh l
|
||||
bind = $hyper CTRL, D, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh r
|
||||
bind = $mainMod CTRL SHIFT, W, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh u
|
||||
bind = $mainMod CTRL SHIFT, S, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh d
|
||||
bind = $mainMod CTRL SHIFT, A, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh l
|
||||
bind = $mainMod CTRL SHIFT, D, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh r
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# LAYOUT CONTROL (XMonad-like with hy3)
|
||||
@@ -527,7 +527,7 @@ bind = $hyper, 9, exec, start_synergy.sh
|
||||
bind = $hyper, I, exec, rofi_select_input.hs
|
||||
bind = $hyper, backslash, exec, /home/imalison/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle
|
||||
bind = $hyper, O, exec, rofi_paswitch
|
||||
bind = $hyper, W, exec, rofi_wallpaper.sh
|
||||
bind = $hyper, comma, exec, rofi_wallpaper.sh
|
||||
bind = $hyper, Y, exec, rofi_agentic_skill
|
||||
|
||||
# Reload config
|
||||
|
||||
1418
dotfiles/config/hypr/hyprland.lua
Normal file
1418
dotfiles/config/hypr/hyprland.lua
Normal file
File diff suppressed because it is too large
Load Diff
Submodule dotfiles/config/taffybar/taffybar updated: 6a00dbfe07...59e3c75990
@@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeApplications #-}
|
||||
|
||||
module Main (main) where
|
||||
|
||||
@@ -9,6 +8,7 @@ import Control.Monad (void, when)
|
||||
import Control.Monad.IO.Class (MonadIO, liftIO)
|
||||
import Control.Monad.Trans.Reader (asks)
|
||||
import Data.Char (toLower)
|
||||
import Data.Foldable (for_)
|
||||
import Data.GI.Base (castTo)
|
||||
import Data.Int (Int32)
|
||||
import Data.List (nub)
|
||||
@@ -39,13 +39,14 @@ import System.Taffybar.DBus
|
||||
import System.Taffybar.DBus.Toggle
|
||||
import System.Taffybar.Hooks (withLogLevels)
|
||||
import System.Taffybar.Information.EWMHDesktopInfo (WorkspaceId (..))
|
||||
import qualified System.Taffybar.Information.Workspaces.Model as WorkspaceModel
|
||||
import System.Taffybar.Information.Memory (MemoryInfo (..), parseMeminfo)
|
||||
import qualified System.Taffybar.Information.Workspaces.Model as WorkspaceModel
|
||||
import System.Taffybar.Information.X11DesktopInfo
|
||||
import System.Taffybar.SimpleConfig
|
||||
import System.Taffybar.Util (getPixbufFromFilePath, maybeTCombine, postGUIASync, (<|||>))
|
||||
import System.Taffybar.Widget
|
||||
import qualified System.Taffybar.Widget.ASUS as ASUS
|
||||
import System.Taffybar.Widget.AnthropicUsage (anthropicUsageStackNew)
|
||||
import System.Taffybar.Widget.CPUMonitor (cpuMonitorNew)
|
||||
import System.Taffybar.Widget.Generic.Graph (GraphConfig (..), GraphDirection (..), GraphStyle (..), defaultGraphConfig)
|
||||
import qualified System.Taffybar.Widget.NetworkManager as NetworkManager
|
||||
@@ -84,9 +85,7 @@ decorateWithClassAndBoxM klass builder =
|
||||
forEachLabelRecursively :: Gtk.Widget -> (Gtk.Label -> IO ()) -> IO ()
|
||||
forEachLabelRecursively widget action = do
|
||||
maybeLabel <- castTo Gtk.Label widget
|
||||
case maybeLabel of
|
||||
Just label -> action label
|
||||
Nothing -> pure ()
|
||||
for_ maybeLabel action
|
||||
|
||||
maybeContainer <- castTo Gtk.Container widget
|
||||
case maybeContainer of
|
||||
@@ -346,7 +345,7 @@ mprisWidget =
|
||||
simplePlayerWidget
|
||||
defaultPlayerConfig
|
||||
{ setNowPlayingLabel =
|
||||
\np -> stackedMprisLabel <$> playingText 20 20 np,
|
||||
fmap stackedMprisLabel . playingText 20 20,
|
||||
setupPlayerLabel = setFixedLabelWidth 20
|
||||
}
|
||||
}
|
||||
@@ -556,6 +555,10 @@ openAIUsageWidget :: TaffyIO Gtk.Widget
|
||||
openAIUsageWidget =
|
||||
decorateWithClassAndBoxM "openai-usage" openAIUsageStackNew
|
||||
|
||||
anthropicUsageWidget :: TaffyIO Gtk.Widget
|
||||
anthropicUsageWidget =
|
||||
decorateWithClassAndBoxM "anthropic-usage" anthropicUsageStackNew
|
||||
|
||||
sniPriorityVisibilityThresholdDefault :: Int
|
||||
sniPriorityVisibilityThresholdDefault = 0
|
||||
|
||||
@@ -614,6 +617,7 @@ endWidgetsForHost hostName =
|
||||
let baseEndWidgets =
|
||||
[ sniTrayWidget,
|
||||
audioWidget,
|
||||
anthropicUsageWidget,
|
||||
openAIUsageWidget,
|
||||
cpuWidget,
|
||||
ramSwapWidget,
|
||||
@@ -628,6 +632,7 @@ endWidgetsForHost hostName =
|
||||
sniTrayWidget,
|
||||
asusDiskUsageWidget,
|
||||
audioBacklightWidget,
|
||||
anthropicUsageWidget,
|
||||
openAIUsageWidget,
|
||||
cpuWidget,
|
||||
ramSwapWidget,
|
||||
|
||||
@@ -1012,11 +1012,11 @@ addKeys conf@XConfig { modMask = modm } =
|
||||
(modm .|. shiftMask) (`windowSwap` True) ++
|
||||
buildDirectionalBindings
|
||||
(modm .|. controlMask) (followingWindow . (`windowToScreen` True)) ++
|
||||
buildDirectionalBindings
|
||||
(modm .|. controlMask .|. shiftMask) shiftToEmptyOnScreen ++
|
||||
buildDirectionalBindings hyper (`screenGo` True) ++
|
||||
buildDirectionalBindings
|
||||
(hyper .|. shiftMask) (followingWindow . (`screenSwap` True)) ++
|
||||
buildDirectionalBindings
|
||||
(hyper .|. controlMask) shiftToEmptyOnScreen ++
|
||||
|
||||
-- Specific program spawning
|
||||
bindBringAndRaiseMany
|
||||
@@ -1101,7 +1101,7 @@ addKeys conf@XConfig { modMask = modm } =
|
||||
, ((hyper, xK_space), spawn "skippy-xd")
|
||||
, ((hyper, xK_i), spawn "rofi_select_input.hs")
|
||||
, ((hyper, xK_o), spawn "rofi_paswitch")
|
||||
, ((hyper, xK_w), spawn "rofi_wallpaper.sh")
|
||||
, ((hyper, xK_comma), spawn "rofi_wallpaper.sh")
|
||||
, ((hyper, xK_y), spawn "rofi_agentic_skill")
|
||||
, ((modm, xK_e), spawn "emacsclient --eval '(emacs-everywhere)'")
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ cabal.project.local
|
||||
.direnv
|
||||
/dotfiles/config/gtk-3.0/settings.ini
|
||||
/dotfiles/config/gtk-3.0/gtk.css
|
||||
*.hm-backup
|
||||
|
||||
/untracked
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ makeEnable config "myModules.code" true {
|
||||
antigravity
|
||||
claude-code
|
||||
codex
|
||||
codex-desktop
|
||||
gemini-cli
|
||||
happy-coder
|
||||
opencode
|
||||
|
||||
87
nixos/flake.lock
generated
87
nixos/flake.lock
generated
@@ -186,6 +186,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"codex-desktop-linux": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777351752,
|
||||
"narHash": "sha256-kwdZPCidd9kPYASk6fUPcDfg2uDQ9NzwtYqLlwwzFVk=",
|
||||
"owner": "ilysenko",
|
||||
"repo": "codex-desktop-linux",
|
||||
"rev": "40fd7a8bd6f229e23194881b972fddb2dc42c4c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ilysenko",
|
||||
"repo": "codex-desktop-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"coqui-tts-streamer": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
@@ -770,6 +793,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprNStack": {
|
||||
"inputs": {
|
||||
"hyprland": [
|
||||
"hyprland-lua-config"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777317717,
|
||||
"narHash": "sha256-Rj4vx0RvEWtnpnizggWRtrGe092bXiGLLt0WijwYWtI=",
|
||||
"owner": "colonelpanic8",
|
||||
"repo": "hyprNStack",
|
||||
"rev": "94607cd53f2ddac88f6b26261393275e7dd590ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "colonelpanic8",
|
||||
"repo": "hyprNStack",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprcursor": {
|
||||
"inputs": {
|
||||
"hyprlang": [
|
||||
@@ -1075,6 +1121,37 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-plugins-lua": {
|
||||
"inputs": {
|
||||
"hyprland": [
|
||||
"hyprland-lua-config"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland-plugins-lua",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland-plugins-lua",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777412965,
|
||||
"narHash": "sha256-lVGYGUWf9ynV5lR8QAygAfmYRkko1btIe26UcQ1bGXw=",
|
||||
"owner": "colonelpanic8",
|
||||
"repo": "hyprland-plugins",
|
||||
"rev": "fd5a23b732d881233941402984cbc4903e6ed927",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "colonelpanic8",
|
||||
"ref": "hyprexpo-lua-hyprland",
|
||||
"repo": "hyprland-plugins",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -2074,6 +2151,7 @@
|
||||
"caelestia-shell": "caelestia-shell",
|
||||
"claude-code-nix": "claude-code-nix",
|
||||
"codex-cli-nix": "codex-cli-nix",
|
||||
"codex-desktop-linux": "codex-desktop-linux",
|
||||
"coqui-tts-streamer": "coqui-tts-streamer",
|
||||
"flake-utils": "flake-utils",
|
||||
"git-blame-rank": "git-blame-rank",
|
||||
@@ -2081,9 +2159,11 @@
|
||||
"git-sync-rs": "git-sync-rs",
|
||||
"home-manager": "home-manager",
|
||||
"hy3": "hy3",
|
||||
"hyprNStack": "hyprNStack",
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-lua-config": "hyprland-lua-config",
|
||||
"hyprland-plugins": "hyprland-plugins",
|
||||
"hyprland-plugins-lua": "hyprland-plugins-lua",
|
||||
"hyprscratch": "hyprscratch",
|
||||
"imalison-taffybar": "imalison-taffybar",
|
||||
"kanshi-sni": "kanshi-sni",
|
||||
@@ -2220,16 +2300,15 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777319252,
|
||||
"narHash": "sha256-mPft6i8ReJAvW2LdylFI6FF6NFGa1HMa3RNbisfAsbc=",
|
||||
"lastModified": 1777401169,
|
||||
"narHash": "sha256-bciN/qFjXYm8ZIKXSc/OssUsLt9GoNs/cU9xT/pw7QY=",
|
||||
"owner": "taffybar",
|
||||
"repo": "taffybar",
|
||||
"rev": "c2cee23fc57384cd322d589944129e6c31d4f0fd",
|
||||
"rev": "59e3c75990156dcd4353ad9fad5823303e751f0f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taffybar",
|
||||
"ref": "codex/fix-gdk-backend-strut-detection",
|
||||
"repo": "taffybar",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
167
nixos/flake.nix
167
nixos/flake.nix
@@ -101,6 +101,14 @@
|
||||
url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=refs/pull/13817/head";
|
||||
};
|
||||
|
||||
hyprNStack = {
|
||||
url = "github:colonelpanic8/hyprNStack";
|
||||
inputs = {
|
||||
hyprland.follows = "hyprland-lua-config";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
hy3 = {
|
||||
url = "github:outfoxxed/hy3?ref=hl0.53.0";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
@@ -111,6 +119,11 @@
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
|
||||
hyprland-plugins-lua = {
|
||||
url = "github:colonelpanic8/hyprland-plugins?ref=hyprexpo-lua-hyprland";
|
||||
inputs.hyprland.follows = "hyprland-lua-config";
|
||||
};
|
||||
|
||||
hyprscratch = {
|
||||
url = "github:colonelpanic8/hyprscratch/reapply-rules-on-toggle";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -151,7 +164,7 @@
|
||||
taffybar = {
|
||||
# Use a remote, lockfile-pinned input so rebuilds are reproducible across
|
||||
# machines. For local development, use `nixos-rebuild --override-input taffybar path:...`.
|
||||
url = "github:taffybar/taffybar?ref=codex/fix-gdk-backend-strut-detection";
|
||||
url = "github:taffybar/taffybar";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
@@ -205,6 +218,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
codex-desktop-linux = {
|
||||
url = "github:ilysenko/codex-desktop-linux";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
claude-code-nix = {
|
||||
url = "github:sadjow/claude-code-nix";
|
||||
inputs = {
|
||||
@@ -467,6 +488,7 @@
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
lib = pkgs.lib;
|
||||
|
||||
# Get short revs for tagging
|
||||
orgApiRev = builtins.substring 0 7 (org-agenda-api.rev or "unknown");
|
||||
@@ -487,6 +509,149 @@
|
||||
packages = {
|
||||
colonelpanic-org-agenda-api = containerLib.containers.colonelpanic;
|
||||
kat-org-agenda-api = containerLib.containers.kat;
|
||||
} // lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack;
|
||||
hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo;
|
||||
};
|
||||
|
||||
checks = lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack;
|
||||
hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo;
|
||||
hyprland-lua-config-syntax = pkgs.runCommand "hyprland-lua-config-syntax" {
|
||||
nativeBuildInputs = [ pkgs.lua5_4 ];
|
||||
} ''
|
||||
luac -p ${../dotfiles/config/hypr/hyprland.lua}
|
||||
if grep -n 'hyprctl' ${../dotfiles/config/hypr/hyprland.lua} | grep -v 'hyprctl reload'; then
|
||||
echo "hyprland.lua should not shell out to hyprctl for window/workspace manipulation" >&2
|
||||
exit 1
|
||||
fi
|
||||
lua <<'LUA'
|
||||
local callbacks = {}
|
||||
|
||||
local function noop() end
|
||||
|
||||
local function dispatcher_proxy()
|
||||
local proxy = {}
|
||||
return setmetatable(proxy, {
|
||||
__index = function()
|
||||
return dispatcher_proxy()
|
||||
end,
|
||||
__call = function()
|
||||
return noop
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local notification = {
|
||||
is_alive = function()
|
||||
return true
|
||||
end,
|
||||
set_text = noop,
|
||||
set_timeout = noop,
|
||||
pause = noop,
|
||||
resume = noop,
|
||||
set_paused = noop,
|
||||
dismiss = noop,
|
||||
}
|
||||
|
||||
local monitor = {
|
||||
id = 1,
|
||||
name = "stub-monitor",
|
||||
focused = true,
|
||||
}
|
||||
|
||||
local workspace = {
|
||||
id = 1,
|
||||
name = "1",
|
||||
windows = 0,
|
||||
special = false,
|
||||
monitor = monitor,
|
||||
}
|
||||
|
||||
monitor.active_workspace = workspace
|
||||
|
||||
hl = {
|
||||
animation = noop,
|
||||
bind = noop,
|
||||
config = noop,
|
||||
curve = noop,
|
||||
env = noop,
|
||||
exec_cmd = noop,
|
||||
define_submap = function(_, reset_or_callback, callback)
|
||||
local cb = type(reset_or_callback) == "function" and reset_or_callback or callback
|
||||
if cb then
|
||||
cb()
|
||||
end
|
||||
end,
|
||||
monitor = noop,
|
||||
workspace_rule = noop,
|
||||
window_rule = noop,
|
||||
dsp = dispatcher_proxy(),
|
||||
notification = {
|
||||
create = function()
|
||||
return notification
|
||||
end,
|
||||
},
|
||||
plugin = {
|
||||
load = noop,
|
||||
},
|
||||
get_active_workspace = function()
|
||||
return workspace
|
||||
end,
|
||||
get_active_monitor = function()
|
||||
return monitor
|
||||
end,
|
||||
get_active_window = function()
|
||||
return nil
|
||||
end,
|
||||
get_monitor = function()
|
||||
return monitor
|
||||
end,
|
||||
get_workspace = function(id)
|
||||
if tostring(id) == "1" then
|
||||
return workspace
|
||||
end
|
||||
return nil
|
||||
end,
|
||||
get_windows = function()
|
||||
return {}
|
||||
end,
|
||||
get_workspace_windows = function()
|
||||
return {}
|
||||
end,
|
||||
on = function(_, callback)
|
||||
callbacks[#callbacks + 1] = callback
|
||||
end,
|
||||
timer = function(callback)
|
||||
callback()
|
||||
return {
|
||||
set_enabled = noop,
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
dofile("${../dotfiles/config/hypr/hyprland.lua}")
|
||||
|
||||
for _, callback in ipairs(callbacks) do
|
||||
callback()
|
||||
end
|
||||
LUA
|
||||
touch "$out"
|
||||
'';
|
||||
hyprland-lua-verify-config = let
|
||||
hyprlandPackage = inputs.hyprland-lua-config.packages.${system}.hyprland;
|
||||
hyprNStackPackage = inputs.hyprNStack.packages.${system}.hyprNStack;
|
||||
in pkgs.runCommand "hyprland-lua-verify-config" {} ''
|
||||
cp ${../dotfiles/config/hypr/hyprland.lua} hyprland.lua
|
||||
substituteInPlace hyprland.lua \
|
||||
--replace-fail /run/current-system/sw/lib/libhyprNStack.so \
|
||||
${hyprNStackPackage}/lib/libhyprNStack.so
|
||||
export XDG_RUNTIME_DIR="$TMPDIR/runtime"
|
||||
mkdir -p "$XDG_RUNTIME_DIR"
|
||||
HYPRLAND_NO_CRASHREPORTER=1 ${pkgs.coreutils}/bin/timeout 20s \
|
||||
${hyprlandPackage}/bin/Hyprland --verify-config --config "$PWD/hyprland.lua"
|
||||
touch "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
# Dev shell for org-agenda-api deployment
|
||||
|
||||
@@ -7,6 +7,10 @@ let
|
||||
if cfg.useLuaConfigBranch
|
||||
then inputs.hyprland-lua-config
|
||||
else inputs.hyprland;
|
||||
luaPluginPackages = lib.optionals cfg.useLuaConfigBranch [
|
||||
inputs.hyprNStack.packages.${system}.hyprNStack
|
||||
inputs.hyprland-plugins-lua.packages.${system}.hyprexpo
|
||||
];
|
||||
hyprexpoPatched = inputs.hyprland-plugins.packages.${system}.hyprexpo.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [
|
||||
./patches/hyprexpo-pr-612-workspace-numbers.patch
|
||||
@@ -79,7 +83,7 @@ let
|
||||
};
|
||||
|
||||
programs.hyprscratch = {
|
||||
enable = true;
|
||||
enable = !cfg.useLuaConfigBranch;
|
||||
settings = {
|
||||
daemon_options = "clean";
|
||||
global_options = "";
|
||||
@@ -157,10 +161,10 @@ let
|
||||
|
||||
# For scripts
|
||||
jq
|
||||
] ++ lib.optionals enableExternalPluginPackages [
|
||||
] ++ luaPluginPackages ++ lib.optionals enableExternalPluginPackages [
|
||||
# External plugin packages are pinned to the stable 0.53 stack.
|
||||
# PR 13817's Hyprland branch builds, but hy3 / hyprexpo do not yet build
|
||||
# against it, so keep them out of the experimental Lua branch for now.
|
||||
# Keep hy3 on the stable stack; the Lua branch uses hyprNStack and the
|
||||
# forked Lua-compatible hyprexpo input instead.
|
||||
inputs.hy3.packages.${system}.hy3
|
||||
hyprexpoPatched
|
||||
];
|
||||
@@ -173,11 +177,10 @@ enabledModule // {
|
||||
default = false;
|
||||
description = ''
|
||||
Use the experimental Hyprland PR 13817 Lua-config branch for the
|
||||
Hyprland package itself. Third-party plugins are left on the stable
|
||||
stack and are excluded from the experimental package set because current
|
||||
`hy3` and `hyprexpo` sources do not build against PR 13817 yet. The
|
||||
existing `hyprland.conf` remains active until a sibling `hyprland.lua`
|
||||
file is added.
|
||||
Hyprland package itself. The experimental package set excludes hy3, and
|
||||
includes the Lua-branch builds of hyprNStack and hyprexpo instead. When
|
||||
a sibling `hyprland.lua` is present, the Lua config manager picks it
|
||||
before `hyprland.conf`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
features.full.enable = true;
|
||||
myModules.kubelet.enable = false;
|
||||
myModules.nvidia.enable = true;
|
||||
myModules.hyprland.useLuaConfigBranch = true;
|
||||
# Needed for now because monitors have different refresh rates
|
||||
myModules.xmonad.picom.vSync.enable = false;
|
||||
myModules.cache-server = {
|
||||
|
||||
122
nixos/nix.nix
122
nixos/nix.nix
@@ -109,8 +109,126 @@
|
||||
(import ./emacs-overlay.nix)
|
||||
(import ../nix-shared/overlays)
|
||||
# Use codex and claude-code from dedicated flakes with cachix
|
||||
(final: prev: {
|
||||
codex = inputs.codex-cli-nix.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
(final: prev: let
|
||||
system = prev.stdenv.hostPlatform.system;
|
||||
codexDmg = final.fetchurl {
|
||||
url = "https://persistent.oaistatic.com/codex-app-prod/Codex.dmg";
|
||||
hash = "sha256-hxuafsEAmx1OQvjh8riI7Y4QxvZXemBrjpRHT8Bh034=";
|
||||
};
|
||||
codexDesktopLibPath = final.lib.makeLibraryPath (with final; [
|
||||
alsa-lib
|
||||
atk
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libX11
|
||||
libxcb
|
||||
libXcomposite
|
||||
libxcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libxi
|
||||
libxkbcommon
|
||||
libXrandr
|
||||
libxscrnsaver
|
||||
libxtst
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
systemd
|
||||
wayland
|
||||
]);
|
||||
codexDesktopInstaller = final.writeShellApplication {
|
||||
name = "codex-desktop-installer";
|
||||
runtimeInputs = with final; [
|
||||
bash
|
||||
curl
|
||||
gcc
|
||||
gnumake
|
||||
nodejs
|
||||
p7zip
|
||||
patchelf
|
||||
python3
|
||||
unzip
|
||||
];
|
||||
text = ''
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(pwd)"
|
||||
workdir="$(mktemp -d)"
|
||||
source_dir="$workdir/source"
|
||||
cleanup() {
|
||||
rm -rf "$workdir"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
mkdir -p "$source_dir"
|
||||
cp -R ${inputs.codex-desktop-linux.outPath}/. "$source_dir"
|
||||
chmod -R u+w "$source_dir"
|
||||
cp ${codexDmg} "$source_dir/Codex.dmg"
|
||||
chmod +x "$source_dir/install.sh"
|
||||
|
||||
cd "$source_dir"
|
||||
export CODEX_INSTALL_DIR="''${CODEX_INSTALL_DIR:-$root_dir/codex-app}"
|
||||
bash "$source_dir/install.sh" "$source_dir/Codex.dmg" "$@"
|
||||
|
||||
install_dir="''${CODEX_INSTALL_DIR:-$root_dir/codex-app}"
|
||||
if [ -f "$install_dir/electron" ]; then
|
||||
patchelf --set-interpreter "$(cat ${final.stdenv.cc}/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$install_dir:${codexDesktopLibPath}" \
|
||||
"$install_dir/electron"
|
||||
|
||||
if [ -f "$install_dir/chrome_crashpad_handler" ]; then
|
||||
patchelf --set-interpreter "$(cat ${final.stdenv.cc}/nix-support/dynamic-linker)" \
|
||||
"$install_dir/chrome_crashpad_handler" || true
|
||||
fi
|
||||
|
||||
if [ -f "$install_dir/chrome-sandbox" ]; then
|
||||
patchelf --set-interpreter "$(cat ${final.stdenv.cc}/nix-support/dynamic-linker)" \
|
||||
"$install_dir/chrome-sandbox" || true
|
||||
fi
|
||||
|
||||
find "$install_dir" -maxdepth 1 -name "*.so*" -type f | while read -r so; do
|
||||
patchelf --set-rpath "${codexDesktopLibPath}" "$so" 2>/dev/null || true
|
||||
done
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in {
|
||||
codex = inputs.codex-cli-nix.packages.${system}.default;
|
||||
codex-desktop-installer = codexDesktopInstaller;
|
||||
codex-desktop = final.writeShellApplication {
|
||||
name = "codex-desktop";
|
||||
runtimeInputs = [
|
||||
final.codex
|
||||
final.codex-desktop-installer
|
||||
final.coreutils
|
||||
final.python3
|
||||
];
|
||||
text = ''
|
||||
install_root="''${CODEX_DESKTOP_HOME:-''${XDG_DATA_HOME:-$HOME/.local/share}/codex-desktop-linux}"
|
||||
install_dir="''${CODEX_INSTALL_DIR:-$install_root/codex-app}"
|
||||
|
||||
if [ ! -x "$install_dir/start.sh" ]; then
|
||||
mkdir -p "$install_root"
|
||||
CODEX_INSTALL_DIR="$install_dir" codex-desktop-installer
|
||||
fi
|
||||
|
||||
export CODEX_CLI_PATH="''${CODEX_CLI_PATH:-$(command -v codex)}"
|
||||
exec "$install_dir/start.sh" "$@"
|
||||
'';
|
||||
};
|
||||
claude-code = inputs.claude-code-nix.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
git-sync-rs = inputs.git-sync-rs.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, inputs, pkgs, makeEnable, ... }:
|
||||
{ config, inputs, lib, pkgs, makeEnable, ... }:
|
||||
let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
kanshiSniPackage =
|
||||
@@ -10,6 +10,11 @@ let
|
||||
});
|
||||
in
|
||||
makeEnable config "myModules.sni" true {
|
||||
systemd.user.services.blueman-applet.serviceConfig.ExecStart = lib.mkForce [
|
||||
""
|
||||
"${pkgs.blueman}/bin/blueman-applet"
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
({ lib, ... }: {
|
||||
systemd.user.services.kanshi-sni = {
|
||||
|
||||
@@ -1,5 +1,61 @@
|
||||
{ config, inputs, lib, pkgs, makeEnable, ... }:
|
||||
let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
taffybarPackage = inputs.imalison-taffybar.defaultPackage.${system};
|
||||
taffybarStart = pkgs.writeShellScript "taffybar-start" ''
|
||||
runtime_dir="''${XDG_RUNTIME_DIR:-/run/user/$(${pkgs.coreutils}/bin/id -u)}"
|
||||
|
||||
if [ -n "''${DISPLAY:-}" ] && [ "''${XDG_SESSION_TYPE:-}" != "wayland" ]; then
|
||||
unset WAYLAND_DISPLAY
|
||||
unset HYPRLAND_INSTANCE_SIGNATURE
|
||||
exec ${taffybarPackage}/bin/taffybar "$@"
|
||||
fi
|
||||
|
||||
if [ "''${XDG_SESSION_TYPE:-}" = "wayland" ] || [ -n "''${WAYLAND_DISPLAY:-}" ]; then
|
||||
if [ -z "''${WAYLAND_DISPLAY:-}" ] || [ ! -S "$runtime_dir/$WAYLAND_DISPLAY" ]; then
|
||||
for socket in "$runtime_dir"/wayland-*; do
|
||||
case "$socket" in
|
||||
*.lock) continue ;;
|
||||
esac
|
||||
|
||||
if [ -S "$socket" ]; then
|
||||
socket_name="''${socket##*/}"
|
||||
echo "taffybar-start: correcting WAYLAND_DISPLAY=''${WAYLAND_DISPLAY:-<unset>} to $socket_name" >&2
|
||||
export WAYLAND_DISPLAY="$socket_name"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
current_desktop="''${XDG_CURRENT_DESKTOP:-}"
|
||||
desktop_session="''${DESKTOP_SESSION:-}"
|
||||
is_hyprland=0
|
||||
case "''${current_desktop}:''${desktop_session}" in
|
||||
*Hyprland*|*hyprland*) is_hyprland=1 ;;
|
||||
esac
|
||||
|
||||
if [ -n "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ] && [ ! -S "$runtime_dir/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket.sock" ]; then
|
||||
echo "taffybar-start: unsetting stale HYPRLAND_INSTANCE_SIGNATURE=$HYPRLAND_INSTANCE_SIGNATURE" >&2
|
||||
unset HYPRLAND_INSTANCE_SIGNATURE
|
||||
fi
|
||||
|
||||
if [ "$is_hyprland" = 1 ]; then
|
||||
if [ -z "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then
|
||||
for socket in "$runtime_dir"/hypr/*/.socket.sock; do
|
||||
if [ -S "$socket" ]; then
|
||||
socket_dir="''${socket%/.socket.sock}"
|
||||
signature="''${socket_dir##*/}"
|
||||
echo "taffybar-start: correcting HYPRLAND_INSTANCE_SIGNATURE=''${HYPRLAND_INSTANCE_SIGNATURE:-<unset>} to $signature" >&2
|
||||
export HYPRLAND_INSTANCE_SIGNATURE="$signature"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
exec ${taffybarPackage}/bin/taffybar "$@"
|
||||
'';
|
||||
skipTaffybarInKde = pkgs.writeShellScript "skip-taffybar-in-kde" ''
|
||||
current_desktop="''${XDG_CURRENT_DESKTOP:-}"
|
||||
desktop_session="''${DESKTOP_SESSION:-}"
|
||||
@@ -36,7 +92,7 @@ makeEnable config "myModules.taffybar" false {
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.imalison-taffybar.defaultPackage.${pkgs.stdenv.hostPlatform.system}
|
||||
taffybarPackage
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
@@ -45,7 +101,7 @@ makeEnable config "myModules.taffybar" false {
|
||||
# home-manager's module defaults to nixpkgs' status-notifier-item, which can lag.
|
||||
# Point it at the pinned flake version instead.
|
||||
services."status-notifier-watcher".package = pkgs.lib.mkForce
|
||||
inputs.imalison-taffybar.packages.${pkgs.stdenv.hostPlatform.system}.status-notifier-item;
|
||||
inputs.imalison-taffybar.packages.${system}.status-notifier-item;
|
||||
|
||||
# Disable kded6's statusnotifierwatcher module so it doesn't race with
|
||||
# the Haskell status-notifier-watcher for the org.kde.StatusNotifierWatcher bus name.
|
||||
@@ -56,7 +112,7 @@ makeEnable config "myModules.taffybar" false {
|
||||
|
||||
services.taffybar = {
|
||||
enable = true;
|
||||
package = inputs.imalison-taffybar.defaultPackage.${pkgs.stdenv.hostPlatform.system};
|
||||
package = taffybarPackage;
|
||||
};
|
||||
xdg.configFile."systemd/user/taffybar.service".force = true;
|
||||
home.activation.removeStaleTaffybarOverride =
|
||||
@@ -66,6 +122,7 @@ makeEnable config "myModules.taffybar" false {
|
||||
'';
|
||||
systemd.user.services.taffybar.Service = {
|
||||
ExecCondition = "${skipTaffybarInKde}";
|
||||
ExecStart = lib.mkForce "${taffybarStart}";
|
||||
# Temporary startup debugging: keep a plain-text log outside journald so
|
||||
# the next login/startup leaves easy-to-inspect tray traces behind.
|
||||
StandardOutput = "append:/tmp/taffybar-service.log";
|
||||
|
||||
Reference in New Issue
Block a user