feat: remove actions and use swaync instead

This commit is contained in:
matt1432 2023-07-05 21:57:17 -04:00
parent d3f7daae92
commit 77aad00d4b
19 changed files with 474 additions and 755 deletions

View file

@ -1,157 +0,0 @@
.actions {
background-color: $bg;
color: $fg;
font-family: Product Sans;
border-radius: 30px;
border: 5px solid $contrastbg;
padding: 10px 18px;
}
.controlsbox {
background-color: $contrastbg;
border-radius: 15px;
padding: 7px 12px;
.vol-slider {
.vol-label {
min-width: 25px; /* Set the width according to your icons */
font-size: 26px;
font-family: Iosevka Nerd Font;
margin-right: 15px;
color: $blue;
}
& scale trough {
all: unset;
border-radius: 10px;
background-color: $black;
border: none;
min-height: 16px;
min-width: 250px;
margin-left: 3px;
& highlight {
all: unset;
background: linear-gradient(to right, $blue, $cyan);
color: #000000;
border-radius: 10px;
}
}
}
.br-slider {
.br-label {
min-width: 25px; /* Set the width according to your icons */
font-size: 26px;
font-family: Iosevka Nerd Font;
margin-right: 15px;
color: $yellow;
}
& scale trough {
all: unset;
border-radius: 10px;
background-color: $black;
border: none;
min-height: 16px;
min-width: 250px;
margin-left: 3px;
& highlight {
all: unset;
background: linear-gradient(to right, $red, $yellow);
color: #000000;
border-radius: 10px;
}
}
}
}
.userinfobox {
.time {
font-size: 42px;
}
.pfp {
background-position: center;
background-size: cover;
background-repeat: no-repeat;
border-radius: 50px;
min-width: 30px;
min-height: 30px;
}
.daybox {
margin-top: 8px;
font-size: 14px;
}
.username {
font-family: Product Sans;
}
.useractions {
.logout {
background-color: $black;
font-family: Iosevka Nerd Font;
font-size: 18px;
padding: 6px 12px 6px 6px;
border-radius: 4px;
transition: all ease .2s;
&:hover { background-color: $dimblack; }
&:active { background-color: $black; }
}
}
}
.sysbuttonsbox {
.block-container {
.block {
background-color: $contrastbg;
padding: 0px 6px;
border-radius: 50px;
transition: all ease .2s;
color: $fg;
&:hover { background-color: $bgSecondary; }
&:active { background-color: $contrastbg; }
&.active {
background-color: $black;
&:hover { background-color: $dimblack; }
&:active { background-color: $black; }
.sepbox .sep {
background-color: $lightblack;
}
}
.iconbox .icon {
font-family: MesloLGS NF;
padding: 7px 14px 7px 14px;
font-size: 20px;
min-width: 20px;
}
.sepbox .sep {
background-color: $black;
margin: 0px 4px;
padding: 0px 1px;
}
.chevronbox {
font-family: Iosevka Nerd Font;
padding: 0px 12px;
}
}
.label {
font-family: Product Sans;
font-size: 14px;
}
}
}
.poweractionsbox {
.info {
font-size: 26px;
}
.buttons {
font-family: Iosevka Nerd Font;
font-size: 22px;
button {
padding: 1px 9px 1px 9px;
background-color: $bgSecondary;
border-radius: 5px;
transition: all ease .2s;
&:hover { background-color: $black; }
&:active { background-color: $bg; }
&.do-logout { color: $yellow; }
}
}
}

View file

@ -1,207 +0,0 @@
(defwidget sysblock [icon onclick active label]
(box :class "block-container"
:orientation "v"
:space-evenly false
:spacing 5
(button :class "block ${active ? 'active' : ''}" :onclick "${onclick}"
(box :orientation "h"
:space-evenly false
(box :class "iconbox"
:halign "start"
:space-evenly true
:orientation "h"
(label :text "${icon}" :class "icon")
)
(box :class "sepbox"
:halign "center"
:space-evenly true
:orientation "h"
(box :class "sep")
)
(box :class "chevronbox"
:halign "end"
:space-evenly true
:orientation "h"
(label :text "")
)
)
)
(label :halign "center" :text "${label}" :class "label")
)
)
(defwidget sysbuttons []
(box :class "sysbuttonsbox"
:orientation "v"
:space-evenly false
:spacing 20
(box :class "firstrow"
:orientation "h"
:space-evenly true
(box :halign "start"
:orientation "h"
:space-evenly true
(sysblock :icon "${network_icon}"
:onclick "$EWW_PATH/network.sh toggle"
:active "${network_status == 'Connected' ? true : false}"
:label "${network_ssid}"
)
)
(box :halign "center"
:orientation "h"
:space-evenly true
(sysblock :icon "${bluetooth_state == 'on' ? '' : ''}"
:onclick "$EWW_PATH/bluetooth toggle"
:active "${bluetooth_state == 'on' ? true : false}"
:label "Bluetooth"
)
)
(box :halign "end"
:orientation "h"
:space-evenly true
(sysblock :icon "${network_radio == 'on' ? '' : ''}"
:onclick "$EWW_PATH/network.sh toggle-radio"
:active "${network_radio == 'on' ? false : true}"
:label "Airplane"
)
)
)
(box :class "lastrow"
:orientation "h"
:space-evenly true
(box :halign "start"
:orientation "h"
:space-evenly true
(sysblock :icon "${redshift_state == 'on' ? '' : ''}"
:onclick "$EWW_PATH/redshift toggle"
:active "${redshift_state == 'on' ? true : false}"
:label "Night Light"
)
)
(box :halign "center"
:orientation "h"
:space-evenly true
(sysblock :icon "${volume_icon}"
:onclick "$EWW_PATH/volume.sh toggle-muted"
:active "${is_muted == 'yes' ? false : true}"
:label "Volume"
)
)
(box :halign "end"
:orientation "h"
:space-evenly true
(sysblock :icon "${mic_status == 'yes' ? '' : ''}"
:onclick "$EWW_PATH/mic toggle"
:active "${mic_status == 'yes' ? true : false}"
:label "Micro"
)
)
)
)
)
(defwidget controls []
(box :class "controlsbox"
:orientation "v"
:space-evenly false
:spacing 10
(box :orientation "h"
:space-evenly "false"
:class "vol-slider"
(box :class "vol-label"
volume_icon
)
(scale :value volume_value
:onchange "$EWW_PATH/volume.sh set {}"
:min 0
:max 101
)
)
(box :orientation "h"
:space-evenly "false"
:class "br-slider"
(box :class "br-label"
br_icon
)
(scale :value br
:onchange "$EWW_PATH/brightness.sh set {}"
:min 0
:max 101
)
)
)
)
(defwidget user []
(box :class "userinfobox"
:orientation "h"
:space-evenly false
(box :class "info"
:space-evenly false
:orientation "h"
:halign "start"
:valign "center"
:spacing 10
(label :text "${lithour}:${litmin}" :class "time")
(box :class "daybox"
:orientation "v"
:space-evenly false
(label :text "${shortday}" :halign "start")
(label :text "${weekday}" :halign "start")
)
)
)
)
(defwidget poweractions []
(box :class "poweractionsbox"
:orientation "h"
:space-evenly true
(box :class "buttons-container"
:space-evenly true
:halign "end"
:orientation "h"
(box :class "buttons"
:orientation "h"
:space-evenly true
:spacing 10
(button :class "do-logout"
:onclick "eww close closer && $EWW_PATH/open.sh powermenu && eww open closer"
:tooltip "Logout"
:halign "end"
""
)
)
)
)
)
(defwidget actions []
(box :class "actions"
:orientation "v"
:space-evenly false
:spacing 20
(user)
(sysbuttons)
(controls)
(poweractions)
)
)
(defvar actions-visible false)
(defwindow actions-reveal
:monitor "0"
:stacking "overlay"
:geometry (geometry :x "10px"
:y "4px"
:width "320px" ; this isn't respected btw, so it's auto-adjusted by eww lol.
:height "10px" ; automatically generated by eww.
:anchor "top right")
(revealer :transition "crossfade"
:reveal actions-visible
:duration "550ms"
(actions)
)
)

View file

@ -4,6 +4,5 @@
@import "colors.scss"; @import "colors.scss";
@import "date/date.scss"; @import "date/date.scss";
@import "actions/actions.scss";
@import "powermenu/powermenu.scss"; @import "powermenu/powermenu.scss";
@import "traybuttons/traybuttons.scss"; @import "traybuttons/traybuttons.scss";

View file

@ -1,6 +1,5 @@
(include "variables.yuck") (include "variables.yuck")
(include "date/date.yuck") (include "date/date.yuck")
(include "actions/actions.yuck")
(include "powermenu/powermenu.yuck") (include "powermenu/powermenu.yuck")
(include "closer/closer.yuck") (include "closer/closer.yuck")
(include "traybuttons/traybuttons.yuck") (include "traybuttons/traybuttons.yuck")

View file

@ -1,35 +0,0 @@
#!/usr/bin/env bash
get_state () {
state=$(bluetoothctl show | grep 'Powered' | awk '{print $2}')
if [[ $state == "yes" ]]; then
echo on
else
echo off
fi
}
turn_off () {
bluetoothctl power off 2>&1 > /dev/null
}
turn_on () {
bluetoothctl power on 2>&1 > /dev/null
}
toggle () {
state=$(get_state)
if [[ $state == "on" ]]; then
turn_off
else
turn_on
fi
}
if [[ $1 == "state" ]]; then
get_state
fi
if [[ $1 == "toggle" ]]; then
toggle
fi

View file

@ -1,2 +0,0 @@
#!/usr/bin/env bash
grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' | tr '.' ' ' | awk '{print $1}'

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
df --output=pcent / | tail -n 1 | sed 's/%//g' | awk '{print $1}'

View file

@ -1,64 +0,0 @@
#!/usr/bin/env bash
# @requires: pactl
SINK=$(pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1)
status () {
status=$(pactl get-source-mute $SINK | awk '{print $2}')
if [[ $status == 'yes' ]]; then
echo no
else
echo yes
fi
}
set_volume () {
local max_db=65536
local percent=$1
# getting the $percent% of $max_db
local value=$(jq -n ${percent}/100*${max_db} | sed 's/\./ /g' | awk '{print $1}')
# set volume
pacmd set-source-volume $SINK $value
}
get () {
local enabled=$(status)
if [[ $enabled == 'no' ]]; then
echo '0'
else
pacmd list short sinks | grep volume:\ front | tail -n 1 | awk '{print $5}' | sed 's/%//g'
fi
}
percentage () {
local val=$(get)
echo "${val}%"
}
_ () {
${@}
exit 0
}
if [[ $1 == "status" ]]; then
_ status
fi
if [[ $1 == "toggle" ]]; then
_ pactl set-source-mute $SINK toggle
fi
if [[ $1 == "set" ]]; then
_ set_volume ${2}
fi
if [[ $1 == "get" ]]; then
_ get
fi
if [[ $1 == "percent" ]]; then
_ percentage
fi

View file

@ -1,101 +0,0 @@
#!/usr/bin/env bash
symbol() {
[ $(cat /sys/class/net/w*/operstate) = down ] && echo&& exit
echo
}
name() {
iwgetid -r
}
cut () {
toshow="$1"
maxlen="$2"
sufix=""
if test $(echo $toshow | wc -c) -ge $maxlen ; then
sufix=" ..."
fi
echo "${toshow:0:$maxlen}$sufix"
}
[ "$1" = "icon" ] && symbol
if [[ $1 == "ssid" ]]; then
ssid=$(name)
if [[ "$ssid" == "" ]]; then
cut "Disconnected" 10
else
cut "$ssid" 10
fi
fi
if [[ $1 == "name" || $1 == "class" ]]; then
wifiname=$(name)
if [[ $wifiname == "" ]]; then
if [[ $1 == "name" ]]; then
echo "Disconnected"
elif [[ $1 == "class" ]]; then
echo "disconnected"
fi
else
if [[ $1 == "name" ]]; then
echo "Connected to $wifiname"
elif [[ $1 == "class" ]]; then
echo "connected"
fi
fi
fi
if [[ $1 == "status" ]]; then
name=$(name)
if [[ $name != "" ]]; then
echo "Connected"
else
echo "Disconnected"
fi
fi
if [[ $1 == "disconnect" ]]; then
wifiname=$(nmcli d | grep wifi | sed 's/^.*wifi.*connected//g' | xargs)
nmcli con down id "${wifiname}"
fi
if [[ $1 == "connect" ]]; then
nmcli con up ifname "$(/usr/bin/ls /sys/class/ieee80211/*/device/net/)"
fi
if [[ $1 == "toggle" ]]; then
name=$(name)
if [[ "$name" == "" ]]; then
nmcli con up ifname "$(/usr/bin/ls /sys/class/ieee80211/*/device/net/)"
else
wifiname=$(nmcli d | grep wifi | sed 's/^.*wifi.*connected//g' | xargs)
nmcli con down id "${wifiname}"
fi
fi
radio_status () {
radio_status=$(nmcli radio wifi)
if [[ $radio_status == "enabled" ]]; then
echo "on"
else
echo "off"
fi
}
if [[ $1 == "radio-status" ]]; then
radio_status
fi
if [[ $1 == "toggle-radio" ]]; then
stat=$(radio_status)
if [[ $stat == "on" ]]; then
nmcli radio wifi off
else
nmcli radio wifi on
fi
fi

View file

@ -2,7 +2,10 @@
state () { state () {
if [[ $(hyprctl layers | grep swaync-control-center) == "" ]]; then if [[ $(hyprctl layers | grep swaync-control-center) == "" ]]; then
eww update notif-panel-state=false if [[ $(eww get notif-panel-state) == "true" ]]; then
eww update notif-panel-state=false
eww reload
fi
fi fi
} }
@ -20,6 +23,9 @@ icon () {
} }
if [[ $1 == "icon" ]]; then if [[ $1 == "icon" ]]; then
icon while true; do
sleep 0.2
icon
done
fi fi

View file

@ -1,42 +0,0 @@
#!/usr/bin/env bash
percentage () {
local val=$(echo $1 | tr '%' ' ' | awk '{print $1}')
local icon1=$2
local icon2=$3
local icon3=$4
local icon4=$5
if [ "$val" -le 15 ]; then
echo $icon1
elif [ "$val" -le 30 ]; then
echo $icon2
elif [ "$val" -le 60 ]; then
echo $icon3
else
echo $icon4
fi
}
get_ram () {
free -m | grep Mem | awk '{print ($3/$2)*100}' | tr '.' ' ' | awk '{print $1}'
}
get_percent () {
echo $(get_ram)%
}
get_class () {
local percent=$(get_percent)
echo $(percentage "$percent" "yellow" "magenta" "purple" "red")
}
if [[ $1 == "ram" ]]; then
get_ram
fi
if [[ $1 == "percent" ]]; then
get_percent
fi
if [[ $1 == "class" ]]; then
get_class
fi

View file

@ -1,70 +0,0 @@
#!/usr/bin/env bash
cache_file=$HOME/.cache/eww/services/redshift_state
initial_hook () {
if [ ! -d $(dirname $cache_file) ]; then
mkdir -p $(dirname $cache_file)
fi
if [ ! -f $cache_file ]; then
echo off > $cache_file
fi
}
get_state () {
# check if redshift is running
cat $cache_file
}
restore () {
local state=$(get_state)
if [[ $state == "on" ]]; then
enable_redshift
else
disable_redshift
fi
}
disable_redshift () {
redshift -x 2>&1 > /dev/null
# saving state
echo off > $cache_file
}
enable_redshift () {
redshift -x 2>&1 > /dev/null
redshift -O 5000 2>&1 > /dev/null
# saving new state
echo on > $cache_file
}
toggle () {
local state=$(get_state)
if [[ $state == "on" ]]; then
disable_redshift
else
enable_redshift
fi
}
initial_hook
if [[ $1 == "state" ]]; then
get_state
fi
if [[ $1 == "enable" ]]; then
enable_redshift
fi
if [[ $1 == "disable" ]]; then
disable_redshift
fi
if [[ $1 == "toggle" ]]; then
toggle
fi
if [[ $1 == "restore" ]]; then
restore
fi

View file

@ -1,39 +0,0 @@
#!/usr/bin/env bash
# thanks to rxyhn
path () {
local temp_path=null
for i in /sys/class/hwmon/hwmon*/temp*_input;
do
temp_path="$(echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null ||
echo $(basename ${i%_*})) $(readlink -f $i)");"
label="$(echo $temp_path | awk '{print $2}')"
if [ "$label" = "Package" ];
then
echo ${temp_path} | awk '{print $5}' | tr -d ';\n'
exit;
fi
done
}
get () {
local path=$(path)
if [[ $path == "" ]]; then
path="/sys/class/thermal/thermal_zone0/temp"
fi
local max_temp=100
local temp=$(cat $path)
jq -n $(jq -n $temp/1000)/$max_temp*100
}
_ () {
${@}
exit 0
}
if [[ $1 == "get" ]]; then
_ get
fi

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
name () {
username=$(whoami)
echo ${username^}
}
name

View file

@ -1,6 +1,6 @@
.notif-panel { .notif-panel {
/* min-width: 110px; min-width: 50px;
min-height: 34px; */ min-height: 16px;
font-size: 20px; font-size: 20px;
padding: 2px 25px 2px 35px; padding: 2px 25px 2px 35px;
} }
@ -30,3 +30,8 @@
border-radius: 80px; border-radius: 80px;
border: 3px solid #CBA6F7; border: 3px solid #CBA6F7;
} }
.toggle-on:hover {
background-color: rgba(127, 132, 156, 0.4);
transition: background-color 0.5s ease-in-out;
}

View file

@ -1,23 +1,10 @@
(defpoll network_status :interval "1s" "$EWW_PATH/network.sh status") (deflisten notif_icon "$EWW_PATH/notif.sh icon")
(defpoll network_icon :interval "1s" "$EWW_PATH/network.sh icon")
(defpoll network_radio :interval "1s" "$EWW_PATH/network.sh radio-status")
(defpoll network_ssid :interval "1s" "$EWW_PATH/network.sh ssid")
(defpoll volume_icon :interval "1s" "$EWW_PATH/volume.sh icon") (defpoll volume_icon :interval "1s" "$EWW_PATH/volume.sh icon")
(defpoll volume :interval "1s" "$EWW_PATH/volume.sh percentage") (defpoll volume :interval "1s" "$EWW_PATH/volume.sh percentage")
(defpoll volume_value :interval "1s" "$EWW_PATH/volume.sh vol") (defpoll volume_value :interval "1s" "$EWW_PATH/volume.sh vol")
(defpoll is_muted :interval "1s" "$EWW_PATH/volume.sh muted") (defpoll is_muted :interval "1s" "$EWW_PATH/volume.sh muted")
(defpoll mic :interval "1s" "$EWW_PATH/mic get")
(defpoll mic_status :interval "1s" "$EWW_PATH/mic status")
(defpoll bluetooth_state :interval "1s" "$EWW_PATH/bluetooth state")
(defpoll redshift_state :interval "1s" "$EWW_PATH/redshift state")
(defpoll rawuser :interval "30s" "whoami")
(defpoll hostname :interval "30s" "cat /etc/hostname")
(defpoll uptime :interval "30s" "uptime -p")
(defpoll br_icon :interval "1s" "$EWW_PATH/brightness.sh icon") (defpoll br_icon :interval "1s" "$EWW_PATH/brightness.sh icon")
(defpoll br :interval "1s" "$EWW_PATH/brightness.sh br") (defpoll br :interval "1s" "$EWW_PATH/brightness.sh br")
@ -30,10 +17,3 @@
(defpoll date :interval "30s" "date '+%d %b, %I:%M %p'") (defpoll date :interval "30s" "date '+%d %b, %I:%M %p'")
(defpoll shortday :interval "1h" "date '+%d %b %y'") (defpoll shortday :interval "1h" "date '+%d %b %y'")
(defpoll weekday :interval "24h" "date +%A") (defpoll weekday :interval "24h" "date +%A")
(defpoll cpu :interval "3s" "$EWW_PATH/cpu.sh")
(defpoll ram :interval "3s" "$EWW_PATH/ram.sh ram")
(defpoll temp :interval "3s" "$EWW_PATH/temp.sh get")
(defpoll disk :interval "3s" "$EWW_PATH/disk.sh")
(defpoll notif_icon :interval "1s" "$EWW_PATH/notif.sh icon")

104
configs/swaync/config.json Normal file
View file

@ -0,0 +1,104 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"control-center-positionX": "none",
"control-center-positionY": "none",
"control-center-margin-top": 8,
"control-center-margin-bottom": 8,
"control-center-margin-right": 8,
"control-center-margin-left": 8,
"control-center-width": 500,
"control-center-height": 900,
"fit-to-screen": false,
"layer": "top",
"control-center-layer": "top",
"cssPriority": "user",
"notification-icon-size": 64,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"notification-inline-replies": true,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 200,
"hide-on-clear": true,
"hide-on-action": true,
"script-fail-notify": true,
"widgets": [
"label",
"buttons-grid",
"backlight",
"volume",
"mpris",
"title",
"inhibitors",
"dnd",
"notifications"
],
"widget-config": {
"backlight": {
"label": "󰃟 ",
"device": "amdgpu_bl0",
"min": 10
},
"volume": {
"label": "󰕾 "
},
"inhibitors": {
"text": "Inhibitors",
"button-text": "Clear All",
"clear-all-button": true
},
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 5,
"text": "Control Center"
},
"mpris": {
"image-size": 96,
"image-radius": 12
},
"buttons-grid": {
"actions": [
{
"label": "󰖩 ",
"command": "nm-connection-editor &"
},
{
"label": "󰂯",
"command": "blueberry &"
},
{
"label": "󰌾",
"command": "$HOME/.config/gtklock/scripts/lock.sh"
},
{
"label": "󰕾",
"command": "pavucontrol"
},
{
"label": "󰍬",
"command": "swayosd --input-volume mute-toggle"
},
{
"label": "󰍃",
"command": "swaync-client -cp; sleep 1; eww open closer; $EWW_PATH/open.sh powermenu"
}
]
}
}
}

349
configs/swaync/style.css Normal file
View file

@ -0,0 +1,349 @@
/* Dracula Theme */
/* https://gist.github.com/MrRoy/3a4a0b1462921e78bf667e1b36697268 */
@define-color foreground rgb(248, 248, 242);
@define-color background rgb(40, 42, 54);
@define-color background-alpha rgba(40, 42, 54, 0.8);
@define-color accent rgba(189, 147, 249, 0.8);
@define-color current-line rgb(68, 71, 90);
@define-color comment rgb(98, 114, 164);
.notification-row {
transition: all 200ms ease;
outline: none;
margin-bottom: 4px;
margin-right: 13px;
margin-top: 8px;
border-radius: 30px;
}
.control-center .notification-row:focus,
.control-center .notification-row:hover {
opacity: 1;
background: transparent;
}
.notification-row:focus .notification,
.notification-row:hover .notification {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
border: 0px solid @accent;
background: @current-line;
}
.control-center .notification {
box-shadow: none;
}
.control-center .notification-row {
opacity: 0.5;
margin: -5px;
}
.notification {
transition: all 200ms ease;
border-radius: 8px;
margin: 12px 7px 0px 7px;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
padding: 0;
}
/* Uncomment to enable specific urgency colors
.low {
background: yellow;
padding: 6px;
border-radius: 12px;
}
.normal {
background: green;
padding: 6px;
border-radius: 12px;
}
.critical {
background: red;
padding: 6px;
border-radius: 12px;
}
*/
.notification-content {
background: transparent;
padding: 6px;
border-radius: 30px;
}
.close-button {
background: @current-line;
color: @foreground;
text-shadow: none;
padding: 0;
border-radius: 100%;
margin-top: 17px;
margin-right: 10px;
box-shadow: none;
border: none;
min-width: 24px;
min-height: 24px;
}
.close-button:hover {
box-shadow: none;
background: @comment;
transition: all 0.15s ease-in-out;
border: none;
}
.notification-default-action,
.notification-action {
padding: 4px;
margin: 0;
box-shadow: none;
background: @current-line;
border: 2px solid @accent;
color: @foreground;
}
.notification-default-action:hover,
.notification-action:hover {
-gtk-icon-effect: none;
background: @current-line;
}
.notification-default-action {
border-radius: 8px;
}
/* When alternative actions are visible */
.notification-default-action:not(:only-child) {
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.notification-action {
border-radius: 0px;
border-top: none;
border-right: none;
}
/* add bottom border radius to eliminate clipping */
.notification-action:first-child {
border-bottom-left-radius: 8px;
}
.notification-action:last-child {
border-bottom-right-radius: 8px;
border-right: 1px solid @accent;
}
.image {
}
.body-image {
margin-top: 6px;
background-color: @foreground;
border-radius: 30px;
}
.summary {
font-size: 16px;
font-weight: bold;
background: transparent;
color: @foreground;
text-shadow: none;
}
.time {
font-size: 16px;
font-weight: bold;
background: transparent;
color: @foreground;
text-shadow: none;
margin-right: 18px;
}
.body {
font-size: 15px;
font-weight: normal;
background: transparent;
color: @foreground;
text-shadow: none;
}
/* The "Notifications" and "Do Not Disturb" text widget */
.top-action-title {
color: @foreground;
text-shadow: none;
}
.control-center-clear-all {
color: @foreground;
text-shadow: none;
background: @background;
border: 2px solid @accent;
box-shadow: none;
border-radius: 30px;
}
.control-center-clear-all:hover {
background: @background;
}
.control-center-dnd {
border-radius: 30px;
background: @background;
border: 1px solid @accent;
box-shadow: none;
}
.control-center-dnd:checked {
background: @accent;
}
.control-center-dnd slider {
background: @background;
border-radius: 30px;
}
.control-center {
background: @background-alpha;
border-radius: 35px;
background-clip: border-box;
padding: 4px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
0 2px 6px 2px rgba(0, 0, 0, 0.3);
color: @foreground;
border: 2px solid @accent;
}
.control-center-list {
background: transparent;
}
.floating-notifications {
background: transparent;
}
/* Window behind control center and on all other monitors */
.blank-window {
background: transparent;
}
/*** Widgets ***/
/* Title widget */
.widget-title {
margin: 8px;
font-size: 1.5rem;
padding: 16px 0px 0px 0px;
}
.widget-title > button {
font-size: initial;
color: @foreground;
text-shadow: none;
background: @background;
border: 2px solid @accent;
box-shadow: none;
border-radius: 30px;
}
.widget-title > button:hover {
background: @current-line;
}
/* DND widget */
.widget-dnd {
margin: 8px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 30px;
background: @background;
border: 1px solid @accent;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: @accent;
}
.widget-dnd > switch slider {
background: @background;
border-radius: 30px;
border: 1px solid @foreground;
}
/* Label widget */
.widget-label {
margin: 8px;
padding: 16px 0px 0px 0px;
}
.widget-label > label {
font-size: 1.5rem;
}
/* Mpris widget */
.widget-mpris {
/* The parent to all players */
}
.widget-mpris-player {
padding: 8px;
margin: 8px;
background-color: @background;
border-radius: 30px;
border-top: 2px solid @accent;
border-bottom: 2px solid @accent;
color: @foreground;
}
.widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
}
/* Buttons widget */
.widget-buttons-grid {
font-size: 30px;
padding: 8px;
margin: 20px 10px 10px 10px;
border-radius: 12px;
border-bottom: 2px solid @accent;
border-top: 2px solid @accent;
background-color: @background;
}
.widget-buttons-grid>flowbox>flowboxchild>button {
margin: 10px;
min-width: 80px;
background: #1b1b2b;
border-radius: 12px;
color: @foreground;
border: 2px solid @accent;
}
.widget-buttons-grid>flowbox>flowboxchild>button:hover {
background: @current-line;
color: @accent;
}
.widget-volume {
background-color: @background;
padding: 4px 8px 8px 8px;
margin: 0px 8px 8px 8px;
font-size: x-large;
border-bottom: 2px solid @accent;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}
.widget-backlight {
background-color: @background;
padding: 8px 8px 4px 8px;
margin: 8px 8px 0px 8px;
font-size: x-large;
border-top: 2px solid @accent;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}

View file

@ -5,6 +5,11 @@ let
in in
{ {
xdg.configFile = {
"swaync/config.json".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swaync/config.json";
"swaync/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swaync/style.css";
};
programs = { programs = {
fzf = { fzf = {
enable = true; enable = true;