home | sway - fix logic for sway config

This commit is contained in:
Don Harper 2023-12-02 22:05:49 -06:00
parent 588184d080
commit 4517857d08

View file

@ -1,11 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let with config;
lib.mkIf networking.hostName == "pocket2" then { source = files/sway/pocket2; }
lib.mkIf networking.hostName != "pocket2" then { source = files/sway/default; }
in
{ {
xdg.configFile."sway/config".source = source; xdg.configFile =
{
"sway/config".source =
if (builtins.getEnv "HOSTNAME_SHORT" == "pocket2")
then files/sway/pocket2
else files/sway/default;
};
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
settings = { settings = {
@ -47,7 +49,7 @@ in
}; };
style = style =
'' ''
* { * {
border: none; border-radius: 0; border: none; border-radius: 0;
font-family: "JetBrains Mono", FontAwesome6Free, SymbolsNerdFont, Roboto, Helvetica, Arial, sans-serif; font-family: "JetBrains Mono", FontAwesome6Free, SymbolsNerdFont, Roboto, Helvetica, Arial, sans-serif;
font-size: 10px; min-height: 0; font-size: 10px; min-height: 0;
@ -58,46 +60,46 @@ in
color: #ffffff; color: #ffffff;
} }
window#waybar.hidden { opacity: 0.0; } window#waybar.hidden { opacity: 0.0; }
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 5px;
background: transparent; background: transparent;
color: #ffffff; color: #ffffff;
border-bottom: 3px solid transparent; border-bottom: 3px solid transparent;
} }
#workspaces button.focused { background: #64727D; border-bottom: 3px solid #ffffff; } #workspaces button.focused { background: #64727D; border-bottom: 3px solid #ffffff; }
#workspaces button.urgent { background-color: #eb4d4b; } #workspaces button.urgent { background-color: #eb4d4b; }
#mode { background: #64727D; border-bottom: 3px solid #ffffff; } #mode { background: #64727D; border-bottom: 3px solid #ffffff; }
#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-mymusic, #tray, #mode, #idle_inhibitor, #bluetooth { #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-mymusic, #tray, #mode, #idle_inhibitor, #bluetooth {
padding: 0 5px; padding: 0 5px;
margin: 0 0px; margin: 0 0px;
} }
#clock { background-color: #64727D; color: #f1fa8c; } #clock { background-color: #64727D; color: #f1fa8c; }
#battery { color: #000000; background-color: #50fa7b; } #battery { color: #000000; background-color: #50fa7b; }
#battery.warning { color: #000000; background-color: #ff79c6; } #battery.warning { color: #000000; background-color: #ff79c6; }
#battery.critical { color: #ffffff; background-color: #ff5555; } #battery.critical { color: #ffffff; background-color: #ff5555; }
#battery.charging { color: #44475a; background-color: #50fa7b; } #battery.charging { color: #44475a; background-color: #50fa7b; }
@keyframes blink { to { background-color: #ffffff; color: #000000; } } @keyframes blink { to { background-color: #ffffff; color: #000000; } }
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
background: #f53c3c; color: #ffffff; background: #f53c3c; color: #ffffff;
animation-name: blink; animation-duration: 0.5s; animation-name: blink; animation-duration: 0.5s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
#cpu { background: #2ecc71; color: #000000; } #cpu { background: #2ecc71; color: #000000; }
#memory { background: #9b59b6; } #memory { background: #9b59b6; }
#backlight { color: #000000; background: #90b1b1; } #backlight { color: #000000; background: #90b1b1; }
#bluetooth { background: #ffb86c; color: #000000; } #bluetooth { background: #ffb86c; color: #000000; }
#network { background: #bd93f9; color: #000000; } #network { background: #bd93f9; color: #000000; }
#network.disconnected { background: #ff5555; } #network.disconnected { background: #ff5555; }
#pulseaudio { background: #ffb86c; color: #000000; } #pulseaudio { background: #ffb86c; color: #000000; }
#pulseaudio.muted { background: #90b1b1; color: #2a5c45; } #pulseaudio.muted { background: #90b1b1; color: #2a5c45; }
#custom-mytimew { background: #bd93f9; color: #000000; } #custom-mytimew { background: #bd93f9; color: #000000; }
#custom-mymusic { background: #8be9fd; color: #000000; } #custom-mymusic { background: #8be9fd; color: #000000; }
#custom-mycal { background: #cccc99; color: #2a5c45; } #custom-mycal { background: #cccc99; color: #2a5c45; }
#temperature { background: #f0932b; } #temperature { background: #f0932b; }
#temperature.critical { background: #eb4d4b; } #temperature.critical { background: #eb4d4b; }
#tray { background-color: #64727D; } idle_inhibitor { background-color: #2d3436; } idle_inhibitor.activated { background-color: #ecf0f1; color: #2d3436; } #tray { background-color: #64727D; } idle_inhibitor { background-color: #2d3436; } idle_inhibitor.activated { background-color: #ecf0f1; color: #2d3436; }
''; '';
}; };
} }