mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
users/kat/sway: Rice Overhaul
This commit is contained in:
parent
e6f111ed27
commit
c1bd5af3a2
6 changed files with 121 additions and 55 deletions
|
|
@ -10,7 +10,7 @@
|
|||
hexToInt = str:
|
||||
lib.foldl (value: chr: value * 16 + hexCharToInt chr) 0
|
||||
(lib.stringToCharacters str);
|
||||
hextorgba = hex:
|
||||
hextorgba = hex: alpha:
|
||||
(
|
||||
let
|
||||
r_hex = lib.substring 1 2 hex;
|
||||
|
|
@ -20,6 +20,6 @@
|
|||
g_dec = hexToInt g_hex;
|
||||
b_dec = hexToInt b_hex;
|
||||
in
|
||||
"rgba(${toString r_dec}, ${toString g_dec}, ${toString b_dec}, 0.75)"
|
||||
"rgba(${toString r_dec}, ${toString g_dec}, ${toString b_dec}, ${toString alpha})"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ set -eu
|
|||
set -o pipefail
|
||||
|
||||
if gpg --card-status &> /dev/null; then
|
||||
user=" $(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
|
||||
user="PGP $(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
|
||||
else
|
||||
user=" Disconnected"
|
||||
user="PGP DC"
|
||||
fi
|
||||
|
||||
echo $user
|
||||
|
|
|
|||
|
|
@ -13,9 +13,18 @@ in {
|
|||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "FantasqueSansMono Nerd Font:size=10";
|
||||
font = "Iosevka Term:size=9, Twitter Color Emoji:size=8";
|
||||
font-bold = "Iosevka Term:size=9:style=Bold";
|
||||
font-italic = "Iosevka Term:size=9:style=Italic";
|
||||
font-bold-italic = "Iosevka Term:size=9:style=Bold Italic";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
colors = {
|
||||
alpha = "0.9";
|
||||
};
|
||||
key-bindings = {
|
||||
show-urls-copy = "Control+Shift+i";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ let
|
|||
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
font = {
|
||||
name = "Iosevka";
|
||||
name = "Iosevka Term";
|
||||
size = 9.0;
|
||||
size_css = "14px";
|
||||
};
|
||||
|
|
@ -97,7 +97,7 @@ in
|
|||
style = "Medium";
|
||||
size = font.size;
|
||||
};
|
||||
terminal = "${pkgs.wezterm}/bin/wezterm";
|
||||
terminal = "${pkgs.foot}/bin/foot";
|
||||
# TODO: replace with wofi
|
||||
menu =
|
||||
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
|
||||
|
|
@ -118,7 +118,12 @@ in
|
|||
|
||||
window = {
|
||||
border = 1;
|
||||
titlebar = true;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
floating = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
|
|
@ -187,7 +192,7 @@ in
|
|||
|
||||
"${cfg.modifier}+r" = "mode resize";
|
||||
"${cfg.modifier}+Delete" = ''
|
||||
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
|
||||
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
|
||||
};
|
||||
|
||||
colors = {
|
||||
|
|
@ -195,36 +200,76 @@ in
|
|||
border = base16.base08;
|
||||
background = base16.base0A;
|
||||
text = base16.base00;
|
||||
indicator = base16.base0B;
|
||||
childBorder = base16.base08;
|
||||
indicator = base16.base0F;
|
||||
childBorder = base16.base0A;
|
||||
};
|
||||
focusedInactive = {
|
||||
border = base16.base00;
|
||||
background = base16.base07;
|
||||
text = base16.base0A;
|
||||
indicator = base16.base0B;
|
||||
childBorder = base16.base03;
|
||||
indicator = base16.base07;
|
||||
childBorder = base16.base07;
|
||||
};
|
||||
unfocused = {
|
||||
border = base16.base00;
|
||||
background = base16.base01;
|
||||
text = base16.base04;
|
||||
indicator = base16.base08;
|
||||
childBorder = base16.base08;
|
||||
childBorder = base16.base01;
|
||||
};
|
||||
urgent = {
|
||||
border = base16.base00;
|
||||
background = base16.base09;
|
||||
text = base16.base00;
|
||||
indicator = base16.base01;
|
||||
childBorder = base16.base08;
|
||||
indicator = base16.base09;
|
||||
childBorder = base16.base09;
|
||||
};
|
||||
};
|
||||
};
|
||||
wrapperFeatures.gtk = true;
|
||||
extraConfig = ''
|
||||
hide_edge_borders smart_no_gaps
|
||||
smart_borders no_gaps
|
||||
title_align center
|
||||
seat seat0 xcursor_theme breeze_cursors 20
|
||||
workspace_auto_back_and_forth yes
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym equal gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym equal gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
${workspaceBindingsStr}
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ in
|
|||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ ]; # "clock" "custom/weather"
|
||||
modules-center = ["clock" ]; # "clock" "custom/weather"
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
|
|
@ -29,15 +29,18 @@ in
|
|||
"battery"
|
||||
#"mpd"
|
||||
"network"
|
||||
"custom/gpg-status"
|
||||
#"custom/weather"
|
||||
"clock"
|
||||
"idle_inhibitor"
|
||||
"custom/gpg-status"
|
||||
"tray"
|
||||
];
|
||||
|
||||
modules = {
|
||||
"sway/workspaces" = { format = "{name}"; };
|
||||
"sway/window" = {
|
||||
format = "{}";
|
||||
max-length = 50;
|
||||
};
|
||||
#"custom/weather" = {
|
||||
# format = "{}";
|
||||
# interval = 3600;
|
||||
|
|
@ -50,24 +53,24 @@ in
|
|||
interval = 300;
|
||||
exec = "${pkgs.kat-gpg-status}/bin/kat-gpg-status";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
cpu = { format = "CPU {usage}%"; };
|
||||
#mpd = {
|
||||
# format = " {albumArtist} - {title}";
|
||||
# format-stopped = "ﱙ";
|
||||
# format-paused = " Paused";
|
||||
# title-len = 16;
|
||||
#};
|
||||
memory = { format = " {percentage}%"; };
|
||||
temperature = { format = "﨎{temperatureC}°C"; };
|
||||
memory = { format = "MEM {percentage}%"; };
|
||||
temperature = { format = "TMP {temperatureC}°C"; };
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
activated = "CAF";
|
||||
deactivated = "SLP";
|
||||
};
|
||||
};
|
||||
backlight = {
|
||||
format = "{icon} {percent}%";
|
||||
format = "BL {percent}%";
|
||||
format-icons = [ "" "" ];
|
||||
on-scroll-up = "${pkgs.light}/bin/light -A 1";
|
||||
on-scroll-down = "${pkgs.light}/bin/light -U 1";
|
||||
|
|
@ -79,25 +82,25 @@ in
|
|||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-charging = "CHRG {capacity}%";
|
||||
format-plugged = "PI {capacity}%";
|
||||
format-alt = "{icon} {time}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
pulseaudio = {
|
||||
format = " {volume}%";
|
||||
format = "VOL {volume}%";
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
network = {
|
||||
format-wifi = "";
|
||||
format-ethernet = "";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = " Disconnected ";
|
||||
format-alt = " {ifname}: {ipaddr}/{cidr}";
|
||||
format-wifi = "WIFI";
|
||||
format-ethernet = "NET {ifname}";
|
||||
format-linked = "NET {ifname} (NO IP)";
|
||||
format-disconnected = "NET DC";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%)";
|
||||
};
|
||||
clock = {
|
||||
format = " {:%T %z}";
|
||||
format = "{:%a, %F %T %Z}";
|
||||
tooltip = true;
|
||||
tooltip-format = "{:%A, %F %T %z (%Z)}";
|
||||
timezones = [
|
||||
|
|
|
|||
|
|
@ -9,17 +9,27 @@
|
|||
min-height: 14px
|
||||
}
|
||||
|
||||
#mode {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-gpg-status, #idle_inhibitor {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
transition: none;
|
||||
border-bottom: 2px solid ${base16.base00};
|
||||
background: ${base16.base02};
|
||||
border-left: 1px solid ${base16.base06};
|
||||
border-right: 1px solid ${base16.base06};
|
||||
color: ${base16.base05}
|
||||
}
|
||||
|
||||
window#waybar { background: ${hextorgba base16.base00} }
|
||||
window#waybar {
|
||||
background: ${hextorgba base16.base00 0.9};
|
||||
border-bottom: 1px solid ${base16.base06};
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin-left: 8px;
|
||||
|
|
@ -35,39 +45,38 @@
|
|||
|
||||
#workspaces button {
|
||||
color: ${base16.base04};
|
||||
background: ${hextorgba base16.base02};
|
||||
background: ${base16.base02};
|
||||
font-size: 16px;
|
||||
margin: 0px 4px 0px 4px;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-left: 1px solid ${base16.base07};
|
||||
border-right: 1px solid ${base16.base07}
|
||||
border-left: 1px solid ${base16.base06};
|
||||
border-right: 1px solid ${base16.base06}
|
||||
}
|
||||
|
||||
#workspaces button:last-child { margin-right: 0px }
|
||||
|
||||
#workspaces button.focused {
|
||||
color: ${base16.base0A};
|
||||
border-bottom-color: ${base16.base0A}
|
||||
border-color: ${base16.base0A}
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: ${base16.base0F};
|
||||
border-bottom-color: ${base16.base0F}
|
||||
color: ${base16.base08};
|
||||
border-color: ${base16.base08}
|
||||
}
|
||||
|
||||
#mpd, #idle_inhibitor { border-color: #5af78e }
|
||||
#mpd.disconnected, #mpd.stopped { border-color: #282a36 }
|
||||
#network { border-color: ${base16.base08} }
|
||||
#custom-weather { border-color: ${base16.base00} }
|
||||
#custom-gpg-status { border-color: ${base16.base09} }
|
||||
#pulseaudio { border-color: ${base16.base0A} }
|
||||
#temperature { border-color: ${base16.base0B} }
|
||||
#battery { border-color: ${base16.base0C} }
|
||||
#backlight { border-color: ${base16.base0D} }
|
||||
#cpu { border-color: ${base16.base0E} }
|
||||
#memory { border-color: ${base16.base0F} }
|
||||
#clock { border-color: ${base16.base06} }
|
||||
#mpd, #idle_inhibitor { color: #5af78e }
|
||||
#mpd.disconnected, #mpd.stopped { color: #282a36 }
|
||||
#network { color: ${base16.base06} }
|
||||
#custom-weather { color: ${base16.base00} }
|
||||
#custom-gpg-status { color: ${base16.base09} }
|
||||
#pulseaudio { color: ${base16.base0A} }
|
||||
#temperature { color: ${base16.base0B} }
|
||||
#battery { color: ${base16.base0C} }
|
||||
#backlight { color: ${base16.base0D} }
|
||||
#cpu { color: ${base16.base0E} }
|
||||
#memory { color: ${base16.base0F} }
|
||||
#clock { color: ${base16.base05} }
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue