This commit is contained in:
2024-01-08 20:50:29 +01:00
commit 2fb62acda6
121 changed files with 16413 additions and 0 deletions
+384
View File
@@ -0,0 +1,384 @@
{
"layer": "top",
"margin-top": 0,
"spacing": 0,
"modules-left": ["group/sys", "tray", "hyprland/workspaces"],
"modules-center": ["mpris", "wlr/taskbar"],
"modules-right": ["group/stats", "group/net", "group/sound", "cava", "battery", "custom/updates","idle_inhibitor"],
"group/net": {
"orientation": "inherit",
"modules": [
"custom/vpn",
"network",
"bluetooth"
]
},
"group/stats": {
"orientation": "inherit",
"modules": [
"custom/cpugov",
"cpu",
"memory",
"custom/gpu-usage",
"gamemode"
],
"drawer": {
"transition-duration": 500,
"transition-left-to-right": false
}
},
"group/sound": {
"orientation": "inherit",
"modules": [
"pulseaudio", "pulseaudio/slider", "custom/audio_idle_inhibitor"
],
"drawer": {
"transition-duration": 500,
"transition-left-to-right": true
}
},
"group/sys": {
"orientation": "inherit",
"modules": [
"custom/power", "clock"
]
},
"network": {
"format-wifi": "{icon}",
"format-ethernet": " {ifname}",
"format-disconnected": "󰱟 Offline",
"tooltip-format": "󰊗 {ifname} via {gwaddr}",
"tooltip-format-wifi": " WiFi {essid} ({signalStrength}%)",
"tooltip-format-ethernet": "󰱔 {ifname}",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50,
"on-click": "nm-applet --indicator",
"format-icons": ["󱛅", "󱛂", "󱛃", "󱚽"],
"max-length": 5
},
"tray": {
"icon-size": 15,
"spacing": 10
},
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": " <b>{:%d.%m.%Y}</b>",
"format": " <b>{:%H:%M}</b>",
"calendar": {
"mode" : "month",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#b4befe'><b>{}</b></span>",
"days": "<span color='#bac2de'><b>{}</b></span>",
"weeks": "<span color='#f5e0dc'><b>W{}</b></span>",
"weekdays": "<span color='#f9e2af'><b>{}</b></span>",
"today": "<span color='#f38ba8'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down",
"on-click-middle": "alarm-clock-applet"
}
// "on-click": "evolution"
},
"user": {
"format": "{user}",
"interval": 240,
"height": 30,
"width": 30,
"icon": false,
"height": 16,
"width": 16,
"open-on-click": false
},
"pulseaudio": {
"format": "{format_source} | {icon} <b>{volume}</b>%",
"format-bluetooth": "{icon} {volume}% {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": "{icon} <b>0</b>%",
"format-source": "",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "$HOME/.config/rofi/audio/rofi-sink-switcher.sh &",
"on-click-right": "pavucontrol",
"scroll-step": 5.0,
"max-volume": 99
},
"pulseaudio/slider": {
"min": 0,
"max": 99,
"orientation": "horizontal"
},
"custom/audio_idle_inhibitor": {
"format": "{icon}",
"exec": "sway-audio-idle-inhibit --dry-print-both-waybar",
"exec-if": "which sway-audio-idle-inhibit",
"return-type": "json",
"format-icons": {
"output": "",
"input": "",
"output-input": "",
"none": ""
}
},
"mpris": {
"format": "⏸ {title:.10}",
"format-paused": "▶ {player}",
"player-icons": {
"default": "⏸",
"mpv": "🎵",
"spotify": "",
"firefox": "󰈹"
},
"status-icons": {
"paused": "⏸"
}
},
"custom/power": {
"format": "󰣇",
"on-click": "$HOME/.config/rofi/powermenu/powermenu.sh"
},
"gamemode": {
"format": "{glyph}<small>{count}</small>",
"format-alt": "{glyph}",
"glyph": "",
"hide-not-running": true,
"use-icon": true,
"icon-name": "input-gaming-symbolic",
"icon-spacing": 4,
"icon-size": 14,
"tooltip": true,
"tooltip-format": "Games running: {count}"
},
"wlr/taskbar": {
"markup": true,
"format": "{icon} {title:.10}",
"icon-size": 16,
"tooltip-format": "{title:.100}",
"sort-by-app-id": true,
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"Alacritty"
],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
},
"rewrite": {
"Firefox Web Browser": "Firefox",
"Visual Studio Code": "Code",
"Nemo": "Dateien"
}
},
"hyprland/workspaces": {
"format": "{name}{windows}",
"window-rewrite-default": " 󰘔",
"on-click": "activate",
"format-window-separator": " ",
"format-icons": {
"urgent": "",
"focused": "",
"active": "",
"default": ""
},
"window-rewrite": {
"firefox": " ",
"LibreWolf": " ",
"celluloid": " ",
"videostream": " ",
"mpv": " ",
"rust": " ",
"private browsing": " ",
"google": " ",
"foot": " ",
"chrome": " ",
"Chromium": " ",
"nemo": " ",
"libreoffice calc": " ",
"libreoffice writer": " 󰈙",
"libreoffice": " 󰈙",
"vim": " ",
"nvim": " ",
"viewnior": " ",
"transmission": " ",
"music": " ",
"audacious": " ",
"webcord": " 󰙯",
"armcord": " 󰙯",
"goofcord": " 󰙯",
"discord": " 󰙯",
"Steam": " 󰓓",
"Teams": " 󰊻",
"kitty": " ",
"code": " 󰨞"
},
"sort-by-number": true
},
"hyprland/window": {
"format": "{}",
"rewrite": {
"(.*) — firefox": "🌎 $1",
"(.*) - zsh": "> [$1]",
"(.*) - kitty": "> [$1]"
},
"separate-outputs": false
},
"custom/updates": {
"format": "{icon}",
"return-type": "json",
"format-icons": {
"has-updates": "󱍷",
"updated": "󰂪"
},
"exec-if": "which waybar-module-pacman-updates",
"exec": "waybar-module-pacman-updates"
},
"custom/pacman": {
"format": "{} ",
"interval": 3600, // every hour
"exec": "checkupdates | wc -l", // # of updates
"exec-if": "exit 0", // always run; consider advanced run conditions
"on-click": "kitty 'sudo pacman -Syu'; pkill -SIGRTMIN+8 waybar", // update system
"signal": 8
},
"custom/notification": {
"tooltip": false,
"format": "{icon} {}",
"format-icons": {
"notification": "<span foreground='red'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='red'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "sh -c 'sleep 0.1s; swaync-client -t -sw; sleep 0.1s'",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"cava": {
// "cava_config": "$XDG_CONFIG_HOME/cava/cava.conf",
"framerate": 30,
"autosens": 1,
//"sensitivity": 50,
"bars": 2,
"lower_cutoff_freq": 50,
"higher_cutoff_freq": 10000,
"method": "pipewire",
"source": "auto",
"stereo": true,
"reverse": false,
"bar_delimiter": 0,
"monstercat": true,
"hide_on_silence": true,
"waves": true,
"noise_reduction": 0.77,
"input_delay": 2,
"sleep_timer": 5,
"format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
"actions": {
"on-click-right": "mode"
}
},
"cpu": {
"interval": 10,
"format": "CPU {icon}",
"max-length": 10,
"format-icons": [
"<span color='#69ff94' size='8pt' rise='1.5pt'>▁</span>", // green
"<span color='#2aa9ff' size='8pt' rise='1.5pt'>▂</span>", // blue
"<span color='#f8f8f2' size='8pt' rise='1.5pt'>▃</span>", // white
"<span color='#f8f8f2' size='8pt' rise='1.5pt'>▄</span>", // white
"<span color='#ffffa5' size='8pt' rise='1.5pt'>▅</span>", // yellow
"<span color='#ffffa5' size='8pt' rise='1.5pt'>▆</span>", // yellow
"<span color='#ff9977' size='8pt' rise='1.5pt'>▇</span>", // orange
"<span color='#dd532e' size='8pt' rise='1.5pt'>█</span>" // red
]
},
"memory": {
"interval": 30,
"format": "MEM {icon}",
"max-length": 10,
"tooltip": true,
"format-icons": [
"<span color='#69ff94' size='8pt' rise='1.5pt'>▁</span>", // green
"<span color='#2aa9ff' size='8pt' rise='1.5pt'>▂</span>", // blue
"<span color='#f8f8f2' size='8pt' rise='1.5pt'>▃</span>", // white
"<span color='#f8f8f2' size='8pt' rise='1.5pt'>▄</span>", // white
"<span color='#ffffa5' size='8pt' rise='1.5pt'>▅</span>", // yellow
"<span color='#ffffa5' size='8pt' rise='1.5pt'>▆</span>", // yellow
"<span color='#ff9977' size='8pt' rise='1.5pt'>▇</span>", // orange
"<span color='#dd532e' size='8pt' rise='1.5pt'>█</span>" // red
]
},
"custom/cpugov": {
"exec": "$HOME/.config/waybar/waybar-cpugov",
"return-type": "json",
"restart-interval": 10,
"on-click": "$HOME/.config/rofi/cpugov/rofi-cpugov.sh",
"on-click-right": "resources"
},
"custom/gpu-usage": {
"exec": "$HOME/.config/waybar/waybar-gpustat",
"return-type": "json",
"restart-interval": 10
},
"battery": {
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25
},
"bluetooth": {
// "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
"format": " {status}",
"format-disabled": "󰂲", // an empty format will hide the module
"format-connected": " {num_connections}",
"tooltip-format": "{controller_alias}\t{controller_address}",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"on-click": "blueberry"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip-format-activated": " Idle Inhibitor activated",
"tooltip-format-deactivated": " Idle Inhibitor deactivated"
},
"custom/vpn": {
"format": "󰖂",
"exec": "echo '{\"class\": \"connected\", \"tooltip\": \"VPN Connected\"}'",
"exec-if": "test -d /proc/sys/net/ipv4/conf/tun0",
"return-type": "json",
"interval": 5
}
}
+228
View File
@@ -0,0 +1,228 @@
* {
border: none;
font-family: "Hack Nerd Font", sans-serif;
font-size: 13px;
color:alpha(@theme_text_color, 0.8);
}
window#waybar {
background: @theme_bg_color;
}
/*-----main groups----*/
.modules-right {
margin: 0 0 0 0;
}
.modules-center {
margin: 0 0 0 0;
}
.modules-left {
margin: 0 0 0 0;
}
/**
## ALL MODULES
**/
#clock,
#battery,
#backlight,
#cpu,
#memory,
#bluetooth,
#temperature,
#network,
#pulseaudio,
#tray,
#mode,
#idle_inhibitor,
#workspaces,
#custom-power,
#custom-menu,
#custom-media,
#custom-notification,
#custom-updates,
#custom-pacman,
#user,
#cava,
#custom-gpu-usage,
#custom-cpugov,
#custom-vpn.connected{
padding:0px 10px;
}
/**
* GROUPS
**/
#sys, #stats, #net, #sound {
margin: 0;
padding:2px 5px 1px 5px;
border-radius:0;
color:alpha(@theme_text_color, 0.5);
background-color:alpha(@theme_selected_fg_color, 0.3);
}
/**
* SYS
**/
#custom-power {
margin-left:0;
margin-right:0;
/*font-family: "MonarchOS", sans-serif;*/
}
#user {
padding-left:0;
font-weight:bold;
}
#stats .drawer-child {
padding-left: 10px;
padding-right: 10px;
}
/**
* SOUND
**/
#cava {
background-color:alpha(@theme_selected_fg_color, 0.3);
padding-left: 0;
}
#pulseaudio-slider {
padding-left: 10px;
padding-right: 10px;
}
#pulseaudio-slider slider {
min-height: 0px;
min-width: 0px;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
background-color: @insensitive_bg_color;
border:2px solid @theme_selected_bg_color;
}
#pulseaudio-slider trough {
min-height: 4px;
min-width: 80px;
border-radius: 5px;
background-color: #11111b;
}
#pulseaudio-slider highlight {
min-width: 5px;
border-radius: 5px;
background-color: #6c7086;
}
#custom-updates {
background-color:alpha(@theme_selected_fg_color, 0.3);
padding-right:12px
}
#tray {
background-color:alpha(@theme_selected_fg_color, 0.1);
}
/**
* MISC
**/
#mpris {
background-color: rgba(172,176,208, .3);
border-radius:20px;
margin: 8px 10px 8px 0px;
padding:0 10px;
}
/**
* WORKSPACES
**/
#workspaces {
background-color: transparent;
padding:0;
margin-left:10px
}
#workspaces button {
padding: 0px 10px;
background-color: transparent;
outline:none;
border-radius: 20px;
margin: 8px 5px 8px 0px;
}
#workspaces button:last-child {
margin-right: 0;
}
#workspaces button.empty {
color:inherit;
}
#workspaces button.active {
background-color: transparent;
}
#workspaces button.visible {
background-color:alpha(@theme_selected_bg_color, 0.3);
}
#workspaces button.urgent {
color: #cc3436;
}
#workspaces button:hover {
background-color:alpha(@theme_selected_bg_color, 0.4);
box-shadow: inherit;
text-shadow: inherit;
}
/**
## INDICATORS
**/
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}
#idle_inhibitor {
padding-right: 14px;
background-color:alpha(@theme_selected_fg_color, 0.3);
}
#idle_inhibitor.activated {
color:alpha(@theme_selected_bg_color, 0.9);
}
/**
* TASKBAR
**/
#taskbar {
font-size:8px;
background: transparent;
opacity: 1;
padding:0;
}
#taskbar button {
border-bottom: 2px solid alpha(@borders, 0.9);
padding:6px 10px 3px 10px;
background: transparent;
transition:100ms border ease-in-out;
margin-left:4px;
border-radius:0;
font-size:8px;
}
#taskbar button:first-child {
margin-left:0;
}
#taskbar button:hover {
background-color:alpha(@theme_selected_bg_color, 0.2);
}
#taskbar button.active {
background-color:alpha(@theme_selected_bg_color, 0.1);
border-bottom: 2px solid @borders;
opacity:1;
}
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/bash
while :
do
CPU_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
case $CPU_GOV in
performance)
CPU_GOV_SHORT=󰓅
;;
balanced)
CPU_GOV_SHORT=󰾅
;;
powersave)
CPU_GOV_SHORT=󰌪
;;
userspace)
CPU_GOV_SHORT=uspace
;;
ondemand)
CPU_GOV_SHORT=ondmnd
;;
conservative)
CPU_GOV_SHORT=cons
;;
schedutil)
CPU_GOV_SHORT=sutil
;;
*)
STATEMENTS
;;
esac
CPU_GOV_FULL="${CPU_GOV^}"
s="text|alt|tooltip|class
$CPU_GOV_SHORT|$CPU_GOV_FULL|CPU Mode: $CPU_GOV_FULL|cpugov"
jq --unbuffered --compact-output -Rn '
( input | split("|") ) as $keys |
( inputs | split("|") ) as $vals |
[[$keys, $vals] | transpose[] | {key:.[0],value:.[1]}] | from_entries
' <<<"$s"
sleep 5
done
#echo '{"text": "$(CPU_GOV)", "alt": "$CPU_GOV", "tooltip": "$CPU_GOV", "class": "$cpugov" }'
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/bash
while :
do
GPU_STAT=$(cat /sys/class/hwmon/hwmon5/device/gpu_busy_percent)
ICON="<span color='#69ff94' size='8pt' rise='1.5pt'>▁</span>"
if [ "$GPU_STAT" -lt 10 ]; then
ICON="<span color='#69ff94' size='8pt' rise='1.5pt'>▁</span>"
elif [ "$GPU_STAT" -lt 20 ]; then
ICON="<span color='#2aa9ff' size='8pt' rise='1.5pt'>▂</span>"
elif [ "$GPU_STAT" -lt 40 ]; then
ICON="<span color='#f8f8f2' size='8pt' rise='1.5pt'>▃</span>"
elif [ "$GPU_STAT" -lt 50 ]; then
ICON="<span color='#f8f8f2' size='8pt' rise='1.5pt'>▄</span>"
elif [ "$GPU_STAT" -lt 60 ]; then
ICON="<span color='#ffffa5' size='8pt' rise='1.5pt'>▅</span>"
elif [ "$GPU_STAT" -lt 70 ]; then
ICON="<span color='#ffffa5' size='8pt' rise='1.5pt'>▆</span>"
elif [ "$GPU_STAT" -lt 80 ]; then
ICON="<span color='#ff9977' size='8pt' rise='1.5pt'>▇</span>"
elif [ "$GPU_STAT" -lt 100 ]; then
ICON="<span color='#dd532e' size='8pt' rise='1.5pt'>█</span>"
fi
s="text|alt|tooltip|class|percentage
GPU $ICON|GPU $ICON $GPU_STAT%|GPU $ICON $GPU_STAT%|gpustat|$GPU_STAT"
jq --unbuffered --compact-output -Rn '
( input | split("|") ) as $keys |
( inputs | split("|") ) as $vals |
[[$keys, $vals] | transpose[] | {key:.[0],value:.[1]}] | from_entries
' <<<"$s"
sleep 5
done
#echo '{"text": "$(CPU_GOV)", "alt": "$CPU_GOV", "tooltip": "$CPU_GOV", "class": "$cpugov" }'
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/bash
set -e
# https://blog.dhampir.no/content/sleeping-without-a-subprocess-in-bash-and-how-to-sleep-forever
snore() {
local IFS
[[ -n "${_snore_fd:-}" ]] || exec {_snore_fd}<> <(:)
read -r ${1:+-t "$1"} -u $_snore_fd || :
}
getter() {
DELAY=0.2
while snore $DELAY; do
SINKS=$(pactl --format=json list sinks)
CURRENT_SINK=$(pactl get-default-sink)
CURRENT_SINK_OBJ=$(pactl --format=json list sinks | jq '.[] | select(.state="$(pactl get-default-sink)")')
echo $CURRENT_SINK_OBJ
exit 1
s="text|alt|tooltip|class
$CPU_GOV_SHORT|$CPU_GOV_FULL|CPU Mode: $CPU_GOV_FULL|cpugov"
jq --unbuffered --compact-output -Rn '
( input | split("|") ) as $keys |
( inputs | split("|") ) as $vals |
[[$keys, $vals] | transpose[] | {key:.[0],value:.[1]}] | from_entries
' <<<"$s"
done
}
if [[ $1 = "-g" ]] then
getter
fi
exit 0
#echo '{"text": "$(CPU_GOV)", "alt": "$CPU_GOV", "tooltip": "$CPU_GOV", "class": "$cpugov" }'