mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-17 13:41:04 +01:00
fix(tuios): keep sessions across reboots and split them by purpose (#416)
This commit is contained in:
1 parent
9ba2cf5229
commit
48ac4f76bf
4 files changed
+34
-5
No files matched your search
@@ -19,14 +19,17 @@ in
|
||||
config.lib.file.mkOutOfStoreSymlink "${configDir}/config.toml";
|
||||
|
||||
# auto-start tuios in interactive shells, except when already inside tuios.
|
||||
# Each terminal attaches to its own session (a bare `tuios` would attach to
|
||||
# the most recent one). tuios starts its daemon on demand, so no systemd unit
|
||||
# is needed.
|
||||
# `work` for the ~/work tree, `personal` for everything else (a host with no
|
||||
# ~/work gets `personal` everywhere).
|
||||
programs.nushell.extraConfig = ''
|
||||
# auto start tuios
|
||||
if $nu.is-interactive and (not ("TUIOS_SESSION" in $env)) {
|
||||
let session = if ("KITTY_WINDOW_ID" in $env) { "kitty" } else { "main" }
|
||||
^tuios attach $session -c
|
||||
let work_root = ($nu.home-dir | path join "work")
|
||||
if $env.PWD == $work_root or ($env.PWD | str starts-with $"($work_root)/") {
|
||||
^tuios attach work -c --cwd $work_root
|
||||
} else {
|
||||
^tuios attach personal -c --cwd $nu.home-dir
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
@@ -16,6 +16,7 @@ binds {
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+Return { spawn "ghostty"; }
|
||||
Mod+Shift+Return { spawn "kitty"; }
|
||||
Mod+Ctrl+Return { spawn "ghostty" "--working-directory=~/work"; }
|
||||
|
||||
// Launcher
|
||||
Mod+D { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
|
||||
|
||||
@@ -11,10 +11,16 @@ window-rule {
|
||||
}
|
||||
|
||||
// Terminal applications - open in workspace 1
|
||||
//
|
||||
// Both emulators are configured identically (font, size, opacity, theme), so
|
||||
// the focus ring colour is what names them: global cyan = ghostty, pink = kitty.
|
||||
window-rule {
|
||||
match app-id="kitty"
|
||||
open-on-workspace "1terminal"
|
||||
open-maximized true
|
||||
focus-ring {
|
||||
active-color "#f5c2e7" // catppuccin pink
|
||||
}
|
||||
}
|
||||
window-rule {
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
|
||||
@@ -188,6 +188,25 @@ in
|
||||
".local/share/nvim"
|
||||
".local/state/nvim"
|
||||
|
||||
# ======================================
|
||||
# TUIOS (terminal window manager)
|
||||
# ======================================
|
||||
# Without .local/state/tuios the daemon has no saved session state to
|
||||
# restore after a reboot, and every session is lost.
|
||||
|
||||
# session structure (resurrection), plus each pane's saved history
|
||||
{
|
||||
directory = ".local/state/tuios";
|
||||
mode = "0700";
|
||||
}
|
||||
# project-tape trust store and tape recordings
|
||||
{
|
||||
directory = ".local/share/tuios";
|
||||
mode = "0700";
|
||||
}
|
||||
# layout templates (config.toml is a Home Manager symlink into the repo)
|
||||
".config/tuios"
|
||||
|
||||
# Joplin
|
||||
".config/joplin" # tui client
|
||||
".config/Joplin" # joplin-desktop
|
||||
|
||||
Reference in new issue
Block a user