some changes
This commit is contained in:
parent
2d25c605b7
commit
825f05c50a
45 changed files with 1826 additions and 1586 deletions
|
|
@ -15,362 +15,101 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
style = lib.mkForce ''
|
||||
* {
|
||||
all: unset;
|
||||
font-size: 14px;
|
||||
font-family: "Adwaita Sans", "JetBrains Mono Nerd Font";
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
trough highlight {
|
||||
background: #cad3f5;
|
||||
}
|
||||
|
||||
scale trough {
|
||||
margin: 0rem 1rem;
|
||||
background-color: #363a4f;
|
||||
min-height: 8px;
|
||||
min-width: 70px;
|
||||
}
|
||||
|
||||
slider {
|
||||
background-color: #8aadf4;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background {
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f;
|
||||
border-radius: 12.6px;
|
||||
margin: 18px;
|
||||
background-color: #24273a;
|
||||
color: #cad3f5;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification {
|
||||
padding: 7px;
|
||||
border-radius: 12.6px;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification.critical {
|
||||
box-shadow: inset 0 0 7px 0 #ed8796;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification .notification-content {
|
||||
margin: 7px;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary {
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time {
|
||||
color: #a5adcb;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body {
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * {
|
||||
min-height: 3.4em;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action {
|
||||
border-radius: 7px;
|
||||
color: #cad3f5;
|
||||
background-color: #363a4f;
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
margin: 7px;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #363a4f;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #7dc4e4;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .close-button {
|
||||
margin: 7px;
|
||||
padding: 2px;
|
||||
border-radius: 6.3px;
|
||||
color: #24273a;
|
||||
background-color: #ed8796;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .close-button:hover {
|
||||
background-color: #ee99a0;
|
||||
color: #24273a;
|
||||
}
|
||||
|
||||
.floating-notifications.background .notification-row .notification-background .close-button:active {
|
||||
background-color: #ed8796;
|
||||
color: #24273a;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f;
|
||||
border-radius: 12.6px;
|
||||
margin: 18px;
|
||||
background-color: #24273a;
|
||||
color: #cad3f5;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.control-center .widget-title > label {
|
||||
color: #cad3f5;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.control-center .widget-title button {
|
||||
border-radius: 7px;
|
||||
color: #cad3f5;
|
||||
background-color: #363a4f;
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.control-center .widget-title button:hover {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #5b6078;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.control-center .widget-title button:active {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #7dc4e4;
|
||||
color: #24273a;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background {
|
||||
border-radius: 7px;
|
||||
color: #cad3f5;
|
||||
background-color: #363a4f;
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification {
|
||||
padding: 7px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification.critical {
|
||||
box-shadow: inset 0 0 7px 0 #ed8796;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content {
|
||||
margin: 7px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content .summary {
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content .time {
|
||||
color: #a5adcb;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content .body {
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification > *:last-child > * {
|
||||
min-height: 3.4em;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
|
||||
border-radius: 7px;
|
||||
color: #cad3f5;
|
||||
background-color: #181926;
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
margin: 7px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #363a4f;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #7dc4e4;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .close-button {
|
||||
margin: 7px;
|
||||
padding: 2px;
|
||||
border-radius: 6.3px;
|
||||
color: #24273a;
|
||||
background-color: #ee99a0;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
border-radius: 6.3px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .close-button:hover {
|
||||
background-color: #ed8796;
|
||||
color: #24273a;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .close-button:active {
|
||||
background-color: #ed8796;
|
||||
color: #24273a;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background:hover {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #8087a2;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background:active {
|
||||
box-shadow: inset 0 0 0 1px #494d64;
|
||||
background-color: #7dc4e4;
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
.notification.critical progress {
|
||||
background-color: #ed8796;
|
||||
}
|
||||
|
||||
.notification.low progress,
|
||||
.notification.normal progress {
|
||||
background-color: #8aadf4;
|
||||
}
|
||||
|
||||
.control-center-dnd {
|
||||
margin-top: 5px;
|
||||
border-radius: 8px;
|
||||
background: #363a4f;
|
||||
border: 1px solid #494d64;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.control-center-dnd:checked {
|
||||
background: #363a4f;
|
||||
}
|
||||
|
||||
.control-center-dnd slider {
|
||||
background: #494d64;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.widget-dnd {
|
||||
margin: 0px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.widget-dnd > switch {
|
||||
font-size: initial;
|
||||
border-radius: 8px;
|
||||
background: #363a4f;
|
||||
border: 1px solid #494d64;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-dnd > switch:checked {
|
||||
background: #363a4f;
|
||||
}
|
||||
|
||||
.widget-dnd > switch slider {
|
||||
background: #494d64;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #6e738d;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player .widget-mpd {
|
||||
background: #363a4f;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-title .widget-mpd .widget-mpd-title {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-subtitle .widget-mpd .widget-mpd-subtitle {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.widget-menubar > box > .menu-button-bar > button > label {
|
||||
font-size: 3rem;
|
||||
padding: 0.5rem 2rem;
|
||||
}
|
||||
|
||||
.widget-menubar > box > .menu-button-bar > :last-child {
|
||||
color: #ed8796;
|
||||
}
|
||||
|
||||
.power-buttons button:hover,
|
||||
.powermode-buttons button:hover,
|
||||
.screenshot-buttons button:hover {
|
||||
background: #363a4f;
|
||||
}
|
||||
|
||||
.control-center .widget-label > label {
|
||||
color: #cad3f5;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.widget-buttons-grid {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button label {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.widget-volume {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.widget-volume label {
|
||||
font-size: 1.5rem;
|
||||
color: #7dc4e4;
|
||||
}
|
||||
|
||||
.widget-volume trough highlight {
|
||||
background: #7dc4e4;
|
||||
}
|
||||
|
||||
.widget-backlight trough highlight {
|
||||
background: #eed49f;
|
||||
}
|
||||
|
||||
.widget-backlight label {
|
||||
font-size: 1.5rem;
|
||||
color: #eed49f;
|
||||
}
|
||||
|
||||
.widget-backlight .KB {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.image {
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.target = "graphical-session.target";
|
||||
style = ''
|
||||
/* Custom colors from lib/theme/default.nix */
|
||||
@define-color rosewater ${colors.rosewater.hex};
|
||||
@define-color flamingo ${colors.flamingo.hex};
|
||||
@define-color pink ${colors.pink.hex};
|
||||
@define-color mauve ${colors.mauve.hex};
|
||||
@define-color red ${colors.red.hex};
|
||||
@define-color maroon ${colors.maroon.hex};
|
||||
@define-color peach ${colors.peach.hex};
|
||||
@define-color yellow ${colors.yellow.hex};
|
||||
@define-color green ${colors.green.hex};
|
||||
@define-color teal ${colors.teal.hex};
|
||||
@define-color sky ${colors.sky.hex};
|
||||
@define-color sapphire ${colors.sapphire.hex};
|
||||
@define-color blue ${colors.blue.hex};
|
||||
@define-color lavender ${colors.lavender.hex};
|
||||
@define-color text ${colors.text.hex};
|
||||
@define-color subtext1 ${colors.subtext1.hex};
|
||||
@define-color subtext0 ${colors.subtext0.hex};
|
||||
@define-color overlay2 ${colors.overlay2.hex};
|
||||
@define-color overlay1 ${colors.overlay1.hex};
|
||||
@define-color overlay0 ${colors.overlay0.hex};
|
||||
@define-color surface2 ${colors.surface2.hex};
|
||||
@define-color surface1 ${colors.surface1.hex};
|
||||
@define-color surface0 ${colors.surface0.hex};
|
||||
@define-color base ${colors.base.hex};
|
||||
@define-color mantle ${colors.mantle.hex};
|
||||
@define-color crust ${colors.crust.hex};
|
||||
|
||||
/* Mullvad specific styles */
|
||||
#custom-mullvad.connected {
|
||||
color: @green;
|
||||
}
|
||||
#custom-mullvad.disconnected {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
${builtins.readFile ./style.css}
|
||||
'';
|
||||
settings = let
|
||||
# Script to get Mullvad status for Waybar
|
||||
mullvad-status = pkgs.writeShellScriptBin "mullvad-status-waybar" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
set -euo pipefail
|
||||
# Run mullvad status, capture output, handle potential errors
|
||||
STATUS=$(mullvad status || echo "Disconnected")
|
||||
|
||||
if echo "$STATUS" | grep -q "Connected"; then
|
||||
# Extract Relay using sed: find line starting with Relay:, remove prefix
|
||||
SERVER=$(echo "$STATUS" | sed -n 's/^\s*Relay:\s*//p')
|
||||
# Extract Location using sed: find line starting with Visible location:,
|
||||
# remove prefix, keep text up to the first comma
|
||||
LOCATION=$(echo "$STATUS" | sed -n 's/^\s*Visible location:\s*\([^,]*\).*/\1/p')
|
||||
|
||||
# Trim potential leading/trailing whitespace just in case sed leaves some
|
||||
SERVER=$(echo "$SERVER" | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||
LOCATION=$(echo "$LOCATION" | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||
|
||||
# Construct tooltip based on extracted info
|
||||
if [ -n "$SERVER" ] && [ -n "$LOCATION" ]; then
|
||||
TOOLTIP="Mullvad: Connected via $SERVER ($LOCATION)"
|
||||
elif [ -n "$SERVER" ]; then
|
||||
# Fallback if location parsing failed but server was found
|
||||
TOOLTIP="Mullvad: Connected via $SERVER"
|
||||
else
|
||||
# Generic fallback if parsing failed
|
||||
TOOLTIP="Mullvad: Connected"
|
||||
fi
|
||||
|
||||
# Output JSON for Waybar
|
||||
# Using nerd font icons: nf-fa-lock (connected), nf-fa-unlock (disconnected)
|
||||
# Ensure your font supports these glyphs: (U+F023), (U+F09C)
|
||||
echo '{"text": "", "tooltip": "'"$TOOLTIP"'", "class": "connected"}'
|
||||
else
|
||||
# Output disconnected status
|
||||
echo '{"text": "", "tooltip": "Mullvad: Disconnected", "class": "disconnected"}'
|
||||
fi
|
||||
'';
|
||||
|
||||
# Script to toggle Mullvad connection
|
||||
mullvad-toggle = pkgs.writeShellScriptBin "mullvad-toggle" ''
|
||||
set -euo pipefail
|
||||
if mullvad status | grep -q "Connected"; then
|
||||
mullvad disconnect
|
||||
else
|
||||
mullvad connect
|
||||
fi
|
||||
# Optional: trigger a Waybar refresh if needed, though interval should handle it
|
||||
# pkill -SIGRTMIN+8 waybar
|
||||
'';
|
||||
|
||||
cava = pkgs.writeShellScriptBin "cava" "${builtins.readFile ./bar.sh}";
|
||||
in {
|
||||
mainBar = {
|
||||
|
|
@ -392,6 +131,7 @@ in {
|
|||
"custom/gpu-mem"
|
||||
"custom/gpu-temp"
|
||||
"pulseaudio"
|
||||
"custom/mullvad"
|
||||
"custom/weather"
|
||||
"clock"
|
||||
"clock#simpleclock"
|
||||
|
|
@ -409,6 +149,15 @@ in {
|
|||
exec = "spotifatius monitor";
|
||||
};
|
||||
|
||||
"custom/mullvad" = {
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
interval = 1;
|
||||
exec = "${mullvad-status}/bin/mullvad-status-waybar";
|
||||
"on-click" = "${mullvad-toggle}/bin/mullvad-toggle";
|
||||
tooltip = true;
|
||||
};
|
||||
|
||||
mpd = {
|
||||
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {title}";
|
||||
"format-disconnected" = "Disconnected ";
|
||||
|
|
@ -516,7 +265,7 @@ in {
|
|||
|
||||
tray = {
|
||||
"show-passive-items" = true;
|
||||
spacing = 10;
|
||||
spacing = 2;
|
||||
};
|
||||
|
||||
"clock#simpleclock" = {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ window#waybar {
|
|||
}
|
||||
|
||||
#custom-cava-system, #custom-cava-tt {
|
||||
color: #cba6f7;
|
||||
color: @mauve;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
padding: 6px;
|
||||
|
|
@ -94,7 +94,9 @@ menu,
|
|||
#bluetooth,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-power, #custom-notification,
|
||||
#custom-power,
|
||||
#custom-notification,
|
||||
#custom-mullvad,
|
||||
#custom-weather {
|
||||
background: @base;
|
||||
padding: 8px 8px;
|
||||
|
|
@ -103,6 +105,7 @@ menu,
|
|||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#custom-mullvad,
|
||||
#custom-notification {
|
||||
padding-left: 12px;
|
||||
padding-right: 18px;
|
||||
|
|
@ -123,7 +126,7 @@ menu,
|
|||
font-style: normal;
|
||||
opacity: 1;
|
||||
font-size: 16px;
|
||||
color: #1e1;
|
||||
color: @surface0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
|
|
@ -132,22 +135,20 @@ menu,
|
|||
margin: 3px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
color: #f5e0dc;
|
||||
/* background-color: #1e1e2e; */
|
||||
transition: all 0.3s ease-in-out;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #1e1e2e;
|
||||
background: #cba6f7;
|
||||
color: @base;
|
||||
background: @mauve;
|
||||
min-width: 20px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #c3dee5;
|
||||
background: #1e1e2e;
|
||||
color: @text;
|
||||
background: @mantle;
|
||||
opacity: 1;
|
||||
animation: none;
|
||||
}
|
||||
|
|
@ -164,20 +165,20 @@ menu,
|
|||
padding: 0px 10px;
|
||||
margin-right: 2px;
|
||||
background: @base;
|
||||
color: rgba(137, 220, 235, 1);
|
||||
color: @sky;
|
||||
border-radius: 0 6px 6px 0;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
padding: 0 8px;
|
||||
margin-right: 1px;
|
||||
color: @beige;
|
||||
color: @yellow;
|
||||
border-radius: 6px 6px;
|
||||
}
|
||||
|
||||
#bluetooth,
|
||||
#network {
|
||||
color: #cba6f7;
|
||||
color: @mauve;
|
||||
border-radius: 6px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
|
@ -193,8 +194,6 @@ menu,
|
|||
#network {
|
||||
min-width: 30px;
|
||||
padding: 0 7px 0 2px;
|
||||
/* margin: 0 2px; */
|
||||
border-radius: 6px;
|
||||
/* border-radius: 0 6px 6px 0; */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue