Moved to tomorrow night eighties. Redone theme.

Redone a number of modules, now they speak JSON. Added a konawall
toggler module. Removed mkchromecast from autostart. Moved from
pavucontrol to pulsemixer.
This commit is contained in:
kat witch 2021-07-24 05:55:30 +01:00
parent 4656a7c9c8
commit 2034846e0a
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
10 changed files with 169 additions and 59 deletions

View file

@ -8,7 +8,7 @@
'';
};
environment.systemPackages = with pkgs; [ pavucontrol ];
environment.systemPackages = with pkgs; [ pulsemixer ];
security.rtkit.enable = true;

View file

@ -3,7 +3,7 @@
{
base16 = {
shell.enable = true;
schemes = [ "rebecca.rebecca" ];
schemes = [ "tomorrow.tomorrow-night-eighties" ];
};
# home.base16-shell = {
# enable = true;

View file

@ -6,16 +6,59 @@ let
font = {
name = "Iosevka Term";
size = 9.0;
size_css = "14px";
size_css = "12px";
};
footwrap = pkgs.writeShellScriptBin "footwrap" ''
exec foot "$2"
'';
in
{
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
WLR_DRM_DEVICES="/dev/dri/card0";
};
home.packages = with pkgs; [ grim slurp wl-clipboard jq ];
xdg.configFile."wofi/wofi.css".text = ''
#scroll, #input {
background: ${base16.base01};
}
window {
font-family: ${font.name};
background: ${lib.hextorgba base16.base00 0.75};
border-radius: 1em;
font-size: ${font.size_css};
color: ${base16.base07};
}
#outer-box {
margin: 1em;
}
#scroll {
border: 1px solid ${base16.base03};
}
#input {
border: 1px solid ${base16.base0C};
margin: 1em;
background: ${base16.base02};
color: ${base16.base04};
}
#entry {
border-bottom: 1px dashed ${base16.base04};
padding: .75em;
}
#entry:selected {
background-color: ${base16.base0D};
}
'';
home.packages = with pkgs; [ grim slurp wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi ];
services.i3gopher = { enable = true; };
@ -78,8 +121,7 @@ in
enable = true;
config =
let
dmenu =
"${pkgs.bemenu}/bin/bemenu --fn '${font.name} ${toString font.size}' --nb '${base16.base00}' --nf '${base16.base07}' --sb '${base16.base01}' --sf '${base16.base07}' -l 5 -m -1 -i";
dmenu = "${pkgs.wofi}/bin/wofi -idbt ${footwrap}/bin/footwrap -s ~/.config/wofi/wofi.css -p '' -W 25%";
in
{
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
@ -90,8 +132,7 @@ in
xkb_options = "compose:rctrl,ctrl:nocaps";
};
};
fonts = {
fonts = {
names = [ font.name ];
style = "Medium";
size = font.size;
@ -99,16 +140,18 @@ in
terminal = "${pkgs.foot}/bin/foot";
# TODO: replace with wofi
menu =
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'";
modifier = "Mod4";
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [
{
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
}
{
command = "systemctl --user restart mako";
always = true;
}
{ command = "mkchromecast -t"; }
{
command = "systemctl --user restart konawall.service";
always = true;
@ -196,32 +239,32 @@ in
colors = {
focused = {
border = base16.base08;
background = base16.base0A;
text = base16.base00;
indicator = base16.base0F;
childBorder = base16.base0A;
border = base16.base0D;
background = base16.base0D;
text = base16.base07;
indicator = base16.base0D;
childBorder = base16.base0D;
};
focusedInactive = {
border = base16.base00;
background = base16.base07;
text = base16.base0A;
indicator = base16.base07;
childBorder = base16.base07;
border = base16.base04;
background = base16.base04;
text = base16.base00;
indicator = base16.base04;
childBorder = base16.base04;
};
unfocused = {
border = base16.base00;
background = base16.base01;
text = base16.base04;
indicator = base16.base08;
childBorder = base16.base01;
border = base16.base02;
background = base16.base02;
text = base16.base06;
indicator = base16.base02;
childBorder = base16.base02;
};
urgent = {
border = base16.base00;
background = base16.base09;
border = base16.base08;
background = base16.base08;
text = base16.base00;
indicator = base16.base09;
childBorder = base16.base09;
indicator = base16.base08;
childBorder = base16.base08;
};
};
};
@ -230,7 +273,7 @@ in
hide_edge_borders smart_no_gaps
smart_borders no_gaps
title_align center
seat seat0 xcursor_theme breeze_cursors 20
seat seat0 xcursor_theme Quintom_Snow 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)

View file

@ -31,6 +31,7 @@ in
"network"
#"custom/weather"
"idle_inhibitor"
"custom/konawall"
"custom/gpg-status"
"tray"
];
@ -51,8 +52,17 @@ in
"custom/gpg-status" = {
format = "{}";
interval = 300;
return-type = "json";
exec = "${pkgs.kat-gpg-status}/bin/kat-gpg-status";
};
"custom/konawall" = {
format = "{}";
interval = "once";
return-type = "json";
exec = "${pkgs.konawall-toggle}/bin/konawall-status";
exec-on-event = true;
on-click = "${pkgs.konawall-toggle}/bin/konawall-toggle";
};
cpu = { format = "CPU {usage}%"; };
#mpd = {
# format = " {albumArtist} - {title}";
@ -61,7 +71,10 @@ in
# title-len = 16;
#};
memory = { format = "MEM {percentage}%"; };
temperature = { format = "TMP {temperatureC}°C"; };
temperature = {
format = "TMP {temperatureC}°C";
hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
@ -89,7 +102,7 @@ in
};
pulseaudio = {
format = "VOL {volume}%";
on-click = "pavucontrol";
on-click = "foot pulsemixer";
};
network = {
format-wifi = "WIFI";
@ -106,7 +119,6 @@ in
timezones = [
"Europe/London"
"America/Vancouver"
"America/Chicago"
"Europe/Berlin"
"Pacific/Auckland"
];

View file

@ -6,7 +6,9 @@
border-radius: 0;
font-family: "${font.name}";
font-size: ${font.size_css};
min-height: 14px
min-height: 14px;
text-shadow: none;
box-shadow: none;
}
#mode {
@ -14,7 +16,7 @@
padding-right: 4px;
}
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-gpg-status, #idle_inhibitor {
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-konawall, #custom-gpg-status, #idle_inhibitor {
margin-left: 8px;
margin-right: 8px;
padding-left: 8px;
@ -23,11 +25,12 @@
background: ${base16.base02};
border-left: 1px solid ${base16.base06};
border-right: 1px solid ${base16.base06};
color: ${base16.base05}
color: ${base16.base07};
border-bottom: 1px solid ${base16.base06};
}
window#waybar {
background: ${hextorgba base16.base00 0.9};
background: ${hextorgba base16.base00 0.75};
border-bottom: 1px solid ${base16.base06};
}
@ -37,46 +40,56 @@
#window {
color: ${base16.base06};
padding-left: 16px;
padding-right: 16px
padding: 0 8px;
margin: 0 8px;
}
#workspaces { padding: 0px 4px 0px 4px }
#workspaces {
margin: 0 8px;
}
#workspaces button {
color: ${base16.base04};
color: ${base16.base06};
background: ${base16.base02};
font-size: 16px;
margin: 0px 4px 0px 4px;
border-left: 1px solid ${base16.base06};
border-right: 1px solid ${base16.base06}
border-right: 1px dashed ${base16.base06};
border-bottom: 1px solid ${base16.base06};
}
#workspaces button:last-child { margin-right: 0px }
#workspaces button:first-child {
border-left: 1px solid ${base16.base05};
}
#workspaces button:last-child {
border-right: 1px solid ${base16.base05};
}
#workspaces button.focused {
color: ${base16.base0A};
border-color: ${base16.base0A}
color: ${base16.base07};
background: ${base16.base0D}
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: ${base16.base08};
border-color: ${base16.base08}
background: ${base16.base07};
color: ${base16.base0D};
}
#mpd, #idle_inhibitor { color: #5af78e }
#mpd.disconnected, #mpd.stopped { color: #282a36 }
#network { color: ${base16.base06} }
#custom-konawall.enabled { color: ${base16.base0E} }
#custom-konawall.disabled { color: ${base16.base0D} }
#idle_inhibitor.activated { color: ${base16.base0E} }
#idle_inhibitor.deactivated { color: ${base16.base0D} }
#custom-gpg-status.enabled { color: ${base16.base0B} }
#custom-gpg-status.disabled { color: ${base16.base08} }
#network { color: ${base16.base0C} }
#custom-weather { color: ${base16.base00} }
#custom-gpg-status { color: ${base16.base09} }
#pulseaudio { color: ${base16.base0A} }
#pulseaudio { color: ${base16.base06} }
#temperature { color: ${base16.base0B} }
#battery { color: ${base16.base0C} }
#backlight { color: ${base16.base0D} }
#cpu { color: ${base16.base0E} }
#memory { color: ${base16.base0F} }
#cpu { color: ${base16.base08} }
#memory { color: ${base16.base09} }
#clock { color: ${base16.base05} }
''

View file

@ -58,6 +58,9 @@ let
zfsUnstable = ksuper.zfsUnstable.overrideAttrs (old: { meta = old.meta // { broken = false; }; });
});
konawall-toggle = self.callPackage ./konawall-toggle { };
yggdrasil = self.callPackage ./yggdrasil { };
obs-studio = super.obs-studio.override { pipewireSupport = true; };

View file

@ -3,9 +3,10 @@ set -eu
set -o pipefail
if gpg --card-status &> /dev/null; then
user="PGP $(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
user="$(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
status='{"text": "PGP +", "alt": "User: '"$user"'", "class": "enabled"}'
else
user="PGP DC"
status='{"text": "PGP -", "alt": "No card is connected.", "class": "disabled"}'
fi
echo $user
echo $status

View file

@ -0,0 +1,15 @@
{ stdenv, wrapShellScriptBin, pkgs }:
let toggle = wrapShellScriptBin "konawall-toggle" ./toggle.sh { };
status = wrapShellScriptBin "konawall-status" ./status.sh { };
in stdenv.mkDerivation {
pname = "konawall-toggle";
version = "0.0.1";
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp ${status}/bin/konawall-status $out/bin/konawall-status
cp ${toggle}/bin/konawall-toggle $out/bin/konawall-toggle
chmod +x $out/bin/konawall-{status,toggle}
'';
}

View file

@ -0,0 +1,13 @@
#!/bin/bash
set -eu
set -o pipefail
sleep 0.5s
if systemctl --user is-active konawall-rotation.timer --quiet; then
status='{"text": "ROT", "alt": "Konawall is enabled.", "class": "enabled"}'
else
status='{"text": "STA", "alt": "Konawall is disabled.", "class": "disable"}'
fi
echo $status

View file

@ -0,0 +1,10 @@
#!/bin/bash
set -eu
set -o pipefail
if systemctl --user is-active konawall-rotation.timer --quiet; then
systemctl --user stop konawall-rotation.timer
else
systemctl --user start konawall-rotation.timer
fi