Add sway/wofi/foot Wayland desktop stack with per-host toggle
New opt-in feature for x86_64 desktops: sway + wofi + foot + swaybg +
swaylock + swayidle + grim + slurp + waybar + wl-clipboard. mako on
arch, dunst on debian (mako isn't packaged for debian).
Files:
- .chezmoi.yaml.tmpl: added data.sway flag (true on miche/byte/kaiser,
false on Pis). Override per host with ~/.config/chezmoi/features/sway
or ~/.config/chezmoi/features/no-sway marker files.
- run_once_40-install-sway.sh.tmpl: installs packages if .sway=true,
exits 0 otherwise. Sets up the marker file.
- dot_config/{sway,foot,wofi,waybar,mako}/: existing configs from miche.
Per-host toggle workflow:
# On any box, enable sway:
touch ~/.config/chezmoi/features/sway
chezmoi apply
# On a sway-enabled box, disable it:
touch ~/.config/chezmoi/features/no-sway
rm ~/.config/chezmoi/features/sway
chezmoi apply
Currently sway packages are already installed on miche (existed before
this commit). Byte will get them via the new run_once_40 script.
Pis (rye, crouton) are unaffected — install script early-returns.
This commit is contained in:
parent
fe73bbecba
commit
6bbaa8f2f5
21 changed files with 965 additions and 1 deletions
102
dot_config/waybar/config
Normal file
102
dot_config/waybar/config
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 32,
|
||||
"spacing": 0,
|
||||
"modules-left": [
|
||||
"sway/workspaces",
|
||||
"sway/mode"
|
||||
],
|
||||
"modules-center": [
|
||||
"clock",
|
||||
"custom/caffeine"
|
||||
],
|
||||
"modules-right": [
|
||||
"pulseaudio",
|
||||
"battery",
|
||||
"cpu",
|
||||
"memory",
|
||||
"tray",
|
||||
"network"
|
||||
],
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"format": "{name}",
|
||||
"format-icons": {
|
||||
"focused": "\u25cf",
|
||||
"default": "\u25cb"
|
||||
}
|
||||
},
|
||||
"clock": {
|
||||
"format": " {:%a %b %d %H:%M}",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format-alt": " {:%Y-%m-%d}"
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "\udb81\udd81 muted",
|
||||
"format-icons": {
|
||||
"default": [
|
||||
"\udb81\udd7f",
|
||||
"\udb81\udd80",
|
||||
"\udb81\udd7e"
|
||||
]
|
||||
},
|
||||
"scroll-step": 5,
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-click-right": "pavucontrol"
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"good": 80,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": "\udb80\udc84 {capacity}%",
|
||||
"format-plugged": "\udb80\udc84 {capacity}%",
|
||||
"format-icons": [
|
||||
"\udb80\udc8e",
|
||||
"\udb80\udc7a",
|
||||
"\udb80\udc7b",
|
||||
"\udb80\udc7c",
|
||||
"\udb80\udc7d",
|
||||
"\udb80\udc7e",
|
||||
"\udb80\udc7f",
|
||||
"\udb80\udc80",
|
||||
"\udb80\udc81",
|
||||
"\udb80\udc82",
|
||||
"\udb80\udc79"
|
||||
]
|
||||
},
|
||||
"cpu": {
|
||||
"format": "\udb83\udee0 {usage}%",
|
||||
"tooltip": true
|
||||
},
|
||||
"memory": {
|
||||
"format": "\udb80\udf5b {}%",
|
||||
"tooltip-format": "{used:0.1f}G / {total:0.1f}G"
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "\udb82\udd28 {essid}",
|
||||
"format-ethernet": "\udb80\ude00 {ipaddr}",
|
||||
"format-disconnected": "\udb82\udd2d disconnected",
|
||||
"format-linked": "\udb82\udd2a {ifname}",
|
||||
"tooltip-format": "{ifname} \u2014 {ipaddr}",
|
||||
"on-click": "$HOME/.config/sway/wifi-menu.sh"
|
||||
},
|
||||
"custom/caffeine": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"default": "\udb80\udd76",
|
||||
"active": "\u2615"
|
||||
},
|
||||
"exec": "if [ -f /tmp/caffeine-inhibit ]; then echo '{\"alt\":\"active\",\"text\":\"caffeine\"}'; else echo '{\"alt\":\"default\",\"text\":\"caffeine\"}'; fi",
|
||||
"exec-interval": 2,
|
||||
"return-type": "json",
|
||||
"on-click": "$HOME/.config/sway/caffeine.sh"
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 8
|
||||
}
|
||||
}
|
||||
92
dot_config/waybar/style.css
Normal file
92
dot_config/waybar/style.css
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/* === waybar — gruvbox-material-dark-hard, polished === */
|
||||
|
||||
* {
|
||||
font-family: "Maple Mono NF";
|
||||
font-size: 14px;
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* transparent bar so the desktop bleeds through at the edges */
|
||||
window#waybar {
|
||||
background-color: rgba(29, 32, 33, 0.92);
|
||||
color: #ebdbb2;
|
||||
border-bottom: 1px solid #3c3836;
|
||||
}
|
||||
|
||||
window#waybar.hidden { opacity: 0.2; }
|
||||
|
||||
/* workspaces */
|
||||
#workspaces button {
|
||||
padding: 0 12px;
|
||||
background: transparent;
|
||||
color: #a89984;
|
||||
box-shadow: inset 0 -2px transparent;
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: #3c3836;
|
||||
color: #ebdbb2;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
color: #fabd2f;
|
||||
box-shadow: inset 0 -2px #fabd2f;
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: #fb4934;
|
||||
animation: blink 1s linear infinite alternate;
|
||||
}
|
||||
|
||||
#mode {
|
||||
color: #fb4934;
|
||||
background: #282828;
|
||||
padding: 0 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #ebdbb2;
|
||||
font-weight: bold;
|
||||
padding: 0 16px;
|
||||
border-left: 1px solid #3c3836;
|
||||
border-right: 1px solid #3c3836;
|
||||
}
|
||||
#clock:hover { color: #fabd2f; }
|
||||
|
||||
/* right-side modules — shared layout, individual color */
|
||||
#pulseaudio, #battery, #cpu, #memory, #network, #tray, #custom-caffeine {
|
||||
padding: 0 12px;
|
||||
border-left: 1px solid #3c3836;
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
#pulseaudio:hover, #battery:hover, #cpu:hover, #memory:hover, #network:hover, #tray:hover, #custom-caffeine:hover {
|
||||
background: #3c3836;
|
||||
}
|
||||
|
||||
#pulseaudio { color: #b8bb26; }
|
||||
#pulseaudio.muted { color: #928374; }
|
||||
#battery { color: #d79921; }
|
||||
#battery.charging { color: #b8bb26; }
|
||||
#battery.good { color: #b8bb26; }
|
||||
#battery.warning { color: #fe8019; }
|
||||
#battery.critical {
|
||||
color: #fb4934;
|
||||
animation: blink 1s linear infinite alternate;
|
||||
}
|
||||
#cpu { color: #83a598; }
|
||||
#memory { color: #d3869b; }
|
||||
#network { color: #fabd2f; }
|
||||
#network.disconnected { color: #fb4934; }
|
||||
#tray { padding: 0 10px; }
|
||||
|
||||
#custom-caffeine { color: #a89984; }
|
||||
#custom-caffeine.active { color: #fabd2f; }
|
||||
#custom-caffeine.active:hover { background: #3c3836; }
|
||||
|
||||
#sway-workspaces { margin: 0 4px; }
|
||||
|
||||
@keyframes blink {
|
||||
to { opacity: 0.3; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue