Connect the generated theme files to btop, Neovim, and kitty
This commit is contained in:
@@ -78,7 +78,7 @@ It runs these steps, in this order, and every one of them is idempotent:
|
|||||||
| 2. `BLOB_PATH` | symlinks `~/.local/share/blob` to this checkout |
|
| 2. `BLOB_PATH` | symlinks `~/.local/share/blob` to this checkout |
|
||||||
| 3. Packages | installs what is missing from `packages/`, bootstrapping `yay` first on a machine that has no AUR helper |
|
| 3. Packages | installs what is missing from `packages/`, bootstrapping `yay` first on a machine that has no AUR helper |
|
||||||
| 4. Config | copies `hypr/`, the themed app configs, `blob/shell.json`, the uwsm environment, and the icon font into `~/.config` |
|
| 4. Config | copies `hypr/`, the themed app configs, `blob/shell.json`, the uwsm environment, and the icon font into `~/.config` |
|
||||||
| 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, and picks a background, so the first login is not a blank desktop |
|
| 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, picks a background, and links the btop and Neovim theme files, so the first login is not a blank desktop |
|
||||||
| 6. User units | installs the session services into `~/.config/systemd/user` and enables them |
|
| 6. User units | installs the session services into `~/.config/systemd/user` and enables them |
|
||||||
| 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` |
|
| 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` |
|
||||||
| 8. System services | enables NetworkManager, resolved, bluetooth, cups, avahi, docker, power-profiles-daemon, and oomd, and masks `NetworkManager-wait-online` |
|
| 8. System services | enables NetworkManager, resolved, bluetooth, cups, avahi, docker, power-profiles-daemon, and oomd, and masks `NetworkManager-wait-online` |
|
||||||
|
|||||||
@@ -1,83 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
## name: Flats
|
|
||||||
## upstream: themes/flats/colors.toml
|
|
||||||
## blurb: Dark theme with a soft blue accent. Hand-translated from the
|
|
||||||
## Omarchy colors.toml, since macOS has no omarchy-theme-set.
|
|
||||||
|
|
||||||
|
|
||||||
# The basic colors
|
|
||||||
foreground #cbd2d9
|
|
||||||
background #0f1012
|
|
||||||
selection_foreground #0f1012
|
|
||||||
selection_background #7babe3
|
|
||||||
|
|
||||||
# Cursor colors
|
|
||||||
cursor #cbd2d9
|
|
||||||
cursor_text_color #0f1012
|
|
||||||
|
|
||||||
# URL underline color when hovering with mouse
|
|
||||||
url_color #7babe3
|
|
||||||
|
|
||||||
# Kitty window border colors
|
|
||||||
active_border_color #7babe3
|
|
||||||
inactive_border_color #949494
|
|
||||||
bell_border_color #d58638
|
|
||||||
|
|
||||||
# OS Window titlebar colors
|
|
||||||
wayland_titlebar_color system
|
|
||||||
macos_titlebar_color system
|
|
||||||
|
|
||||||
# Tab bar colors
|
|
||||||
active_tab_foreground #0f1012
|
|
||||||
active_tab_background #7babe3
|
|
||||||
inactive_tab_foreground #cbd2d9
|
|
||||||
inactive_tab_background #0f1012
|
|
||||||
tab_bar_background #000000
|
|
||||||
|
|
||||||
# Colors for marks (marked text in the terminal)
|
|
||||||
mark1_foreground #0f1012
|
|
||||||
mark1_background #7babe3
|
|
||||||
mark2_foreground #0f1012
|
|
||||||
mark2_background #38d586
|
|
||||||
mark3_foreground #0f1012
|
|
||||||
mark3_background #d58638
|
|
||||||
|
|
||||||
# The 16 terminal colors
|
|
||||||
#
|
|
||||||
# Note: flats maps the ANSI slots unconventionally — color4 (blue) holds a
|
|
||||||
# magenta and color6 (cyan) holds the blue, among others. Kept faithful to
|
|
||||||
# colors.toml so both machines render identically; the comments below name
|
|
||||||
# the ANSI slot, not the resulting hue.
|
|
||||||
|
|
||||||
# black
|
|
||||||
color0 #000000
|
|
||||||
color8 #949494
|
|
||||||
|
|
||||||
# red
|
|
||||||
color1 #d53838
|
|
||||||
color9 #d53838
|
|
||||||
|
|
||||||
# green
|
|
||||||
color2 #38d4d5
|
|
||||||
color10 #38d4d5
|
|
||||||
|
|
||||||
# yellow
|
|
||||||
color3 #d58638
|
|
||||||
color11 #d58638
|
|
||||||
|
|
||||||
# blue
|
|
||||||
color4 #d53886
|
|
||||||
color12 #d53886
|
|
||||||
|
|
||||||
# magenta
|
|
||||||
color5 #38d586
|
|
||||||
color13 #38d586
|
|
||||||
|
|
||||||
# cyan
|
|
||||||
color6 #3886d5
|
|
||||||
color14 #3886d5
|
|
||||||
|
|
||||||
# white
|
|
||||||
color7 #d4d4d4
|
|
||||||
color15 #d4d4d4
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
# vim:ft=kitty
|
# vim:ft=kitty
|
||||||
#
|
#
|
||||||
# kitty config for macOS. The Arch side of these dotfiles gets its terminal
|
# Colors come from the active theme, the same way foot.ini takes them: the
|
||||||
# colors from omarchy-theme-set rewriting the active theme; there is no
|
# theme pipeline renders default/themed/kitty.conf.tpl into the current-theme
|
||||||
# omarchy here, so current-theme.conf is checked in alongside this file and
|
# directory, and blob-restart-terminal signals kitty to reload it.
|
||||||
# generated by hand from themes/<name>/colors.toml.
|
|
||||||
|
|
||||||
include current-theme.conf
|
include ~/.local/state/blob/current/theme/kitty.conf
|
||||||
|
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
|
|||||||
+6
-2
@@ -37,8 +37,12 @@ with `--check`.
|
|||||||
`wallpapers/`, `flats` is applied with `BLOB_THEME_HEADLESS=1` (no shell or
|
`wallpapers/`, `flats` is applied with `BLOB_THEME_HEADLESS=1` (no shell or
|
||||||
session bus exists yet), and the background symlink is pointed at the first
|
session bus exists yet), and the background symlink is pointed at the first
|
||||||
image in `~/wallpapers`. Without this the first login has no palette and no
|
image in `~/wallpapers`. Without this the first login has no palette and no
|
||||||
wallpaper, which draws as a black desktop. All three steps are skipped when a
|
wallpaper, which draws as a black desktop. It then links the per-app theme
|
||||||
theme, a background or a wallpaper directory of your own is already there.
|
files the pipeline renders but no app would otherwise find:
|
||||||
|
`~/.config/btop/themes/current.theme` (btop's `color_theme = "current"`) and,
|
||||||
|
only when `~/.config/nvim/lua/plugins` already exists, `theme.lua` there.
|
||||||
|
Every step is skipped when a theme, a background, a wallpaper directory or a
|
||||||
|
theme file of your own is already in place.
|
||||||
6. **User units** land in `~/.config/systemd/user` and are enabled, not started:
|
6. **User units** land in `~/.config/systemd/user` and are enabled, not started:
|
||||||
they are all `WantedBy=graphical-session.target`, so they come up with the
|
they are all `WantedBy=graphical-session.target`, so they come up with the
|
||||||
session. `blob-speaker-tuning.service` is left out, because
|
session. `blob-speaker-tuning.service` is left out, because
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ the shell and the CLI never disagree about what a slot means.
|
|||||||
|
|
||||||
## Templates
|
## Templates
|
||||||
|
|
||||||
|
Each rendered file is picked up differently: `foot.ini` and `kitty.conf` by an
|
||||||
|
`include` in the shipped terminal config, `hyprland.lua` through Hyprland's Lua
|
||||||
|
module path, `shell.toml` and `chromium.theme` read straight from the state
|
||||||
|
directory, and `btop.theme` and `neovim.lua` through symlinks the installer
|
||||||
|
makes into those apps' own config trees.
|
||||||
|
|
||||||
`default/themed/*.tpl` are rendered per theme into
|
`default/themed/*.tpl` are rendered per theme into
|
||||||
`~/.local/state/blob/current/theme/`. Nine ship: foot, kitty, btop, chromium,
|
`~/.local/state/blob/current/theme/`. Nine ship: foot, kitty, btop, chromium,
|
||||||
hyprland, the screenshare picker, neovim, `shell.toml`, and zen.
|
hyprland, the screenshare picker, neovim, `shell.toml`, and zen.
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ install_zen_config
|
|||||||
link_wallpapers
|
link_wallpapers
|
||||||
install_default_theme
|
install_default_theme
|
||||||
install_default_background
|
install_default_background
|
||||||
|
link_app_themes
|
||||||
|
|
||||||
enable_system_services
|
enable_system_services
|
||||||
mask_system_services
|
mask_system_services
|
||||||
|
|||||||
@@ -90,3 +90,47 @@ install_default_background() {
|
|||||||
ln -nsf "$first" "$link"
|
ln -nsf "$first" "$link"
|
||||||
say "bg $(basename "$first")"
|
say "bg $(basename "$first")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The theme pipeline renders one file per app into the current-theme directory,
|
||||||
|
# but each app only ever reads its own config tree. These links are what join
|
||||||
|
# the two. Without them a theme switch silently leaves the app on stock colors,
|
||||||
|
# because nothing errors: the app just never sees the generated file.
|
||||||
|
link_theme_file() {
|
||||||
|
local theme_file="$1" dest="$2" label="$3"
|
||||||
|
local target="$current_state_dir/theme/$theme_file"
|
||||||
|
|
||||||
|
if [[ -L $dest ]] && [[ "$(readlink "$dest")" == "$target" ]]; then
|
||||||
|
say "ok $label"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -e $dest && ! -L $dest ]] && [[ $force == false ]]; then
|
||||||
|
note_change
|
||||||
|
say "DIFF $label (own file kept; --force to replace)"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
note_change
|
||||||
|
if [[ $check == true ]]; then
|
||||||
|
say "would link $label"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$dest")"
|
||||||
|
ln -nsf "$target" "$dest"
|
||||||
|
say "link $label"
|
||||||
|
}
|
||||||
|
|
||||||
|
# btop reads color_theme = "current" out of its own themes directory, and
|
||||||
|
# Neovim loads whatever theme.lua its plugin directory holds. Neovim is only
|
||||||
|
# linked when that directory already exists: Blob ships no Neovim config, so
|
||||||
|
# creating the tree would be inventing a layout the user has not chosen.
|
||||||
|
link_app_themes() {
|
||||||
|
link_theme_file btop.theme "$config_dir/btop/themes/current.theme" "btop theme"
|
||||||
|
|
||||||
|
if [[ -d $config_dir/nvim/lua/plugins ]]; then
|
||||||
|
link_theme_file neovim.lua "$config_dir/nvim/lua/plugins/theme.lua" "neovim theme"
|
||||||
|
else
|
||||||
|
say "SKIP neovim theme (no ~/.config/nvim/lua/plugins)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user