initial commit
This commit is contained in:
142
.config/waybar/config
Normal file
142
.config/waybar/config
Normal file
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"layer": "bottom",
|
||||
"position": "top",
|
||||
"spacing" : 6,
|
||||
"modules-left": [
|
||||
"backlight",
|
||||
"wireplumber",
|
||||
"custom/pomodoro",
|
||||
],
|
||||
|
||||
"modules-center": ["clock"],
|
||||
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"bluetooth",
|
||||
"temperature",
|
||||
"cpu",
|
||||
"memory",
|
||||
"battery"
|
||||
],
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"format": "{name}: {icon}",
|
||||
"format-icons": {
|
||||
"active": "",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
|
||||
"bluetooth": {
|
||||
"format": "",
|
||||
"format-on": "{icon}",
|
||||
"format-off": "{icon}",
|
||||
"format-connected":"{icon}",
|
||||
"format-icons":{
|
||||
"on":"",
|
||||
"off": "",
|
||||
"connected": "",
|
||||
},
|
||||
"on-click": "blueman-manager",
|
||||
"tooltip-format-connected":"{device_enumerate}"
|
||||
},
|
||||
|
||||
"custom/music": {
|
||||
"format": " {}",
|
||||
"escape": true,
|
||||
"interval": 5,
|
||||
"tooltip": false,
|
||||
"exec": "playerctl metadata --format='{{ artist }} - {{ title }}'",
|
||||
"on-click": "playerctl play-pause",
|
||||
"max-length": 50
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"tooltip": false,
|
||||
"format": "{:%H:%M - %a,%d}",
|
||||
"interval": 1
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ifname}",
|
||||
"format-disconnected": " ",
|
||||
"interval": 5,
|
||||
"tooltip-format": "{ipaddr}/{cidr}",
|
||||
"on-click": "nm-connection-editor",
|
||||
"max-length": 20
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 1,
|
||||
"format": " {usage}%",
|
||||
"on-click": "ghostty -e htop"
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 5,
|
||||
"format": " {percentage}%",
|
||||
"tooltip-format": "{used:0.1f}G/{total:0.1f}G"
|
||||
},
|
||||
|
||||
"temperature": {
|
||||
"interval": 5,
|
||||
"format": "{icon}{temperatureC}°C",
|
||||
"format-icons": ["", "", ""],
|
||||
"critical-threshold": 80
|
||||
},
|
||||
|
||||
"custom/uptime": {
|
||||
"format": "{}",
|
||||
"format-icon": [""],
|
||||
"tooltip": false,
|
||||
"interval": 1600,
|
||||
"exec": "$HOME/.config/waybar/scripts/uptime.sh"
|
||||
},
|
||||
|
||||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": ["","", "", "","","",""],
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"interval":2,
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-full": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
|
||||
"wireplumber": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "",
|
||||
"on-click": "pavucontrol",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
|
||||
"custom/lock": {
|
||||
"tooltip": false,
|
||||
"on-click": "sh -c '(sleep 0s; hyprlock)' & disown",
|
||||
"format" : ""
|
||||
},
|
||||
|
||||
"custom/pomodoro": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "waybar-module-pomodoro --no-work-icons",
|
||||
"on-click": "waybar-module-pomodoro toggle",
|
||||
"on-click-right": "$HOME/.config/waybar/scripts/pomodoro-preset.sh",
|
||||
"on-click-middle": "waybar-module-pomodoro reset",
|
||||
},
|
||||
|
||||
}
|
||||
33
.config/waybar/scripts/pomodoro-preset.sh
Executable file
33
.config/waybar/scripts/pomodoro-preset.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
STATE_FILE="/tmp/pomodoro-preset"
|
||||
|
||||
if ! command -v waybar-module-pomodoro >/dev/null 2>&1; then
|
||||
echo "Error: waybar-module-pomodoro is not installed or not in PATH." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
current="A"
|
||||
if [[ -f "$STATE_FILE" ]]; then
|
||||
read -r current < "$STATE_FILE" || current="A"
|
||||
fi
|
||||
|
||||
if [[ "$current" == "A" ]]; then
|
||||
next="B"
|
||||
work=50
|
||||
short=10
|
||||
long=20
|
||||
else
|
||||
next="A"
|
||||
work=25
|
||||
short=5
|
||||
long=15
|
||||
fi
|
||||
|
||||
waybar-module-pomodoro set-work "$work"
|
||||
waybar-module-pomodoro set-short "$short"
|
||||
waybar-module-pomodoro set-long "$long"
|
||||
|
||||
printf '%s\n' "$next" > "$STATE_FILE"
|
||||
183
.config/waybar/style.css
Normal file
183
.config/waybar/style.css
Normal file
@@ -0,0 +1,183 @@
|
||||
@define-color foreground #cdd6f4;
|
||||
@define-color foreground-inactive #6c7086;
|
||||
@define-color background #1e1e2e;
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color red #f38ba8;
|
||||
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#waybar {
|
||||
color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 4px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: @foreground;
|
||||
padding-left: 0.7em;
|
||||
border-radius: 4px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
#workspaces button.empty {
|
||||
color: @foreground-inactive;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @surface1;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
#workspaces button.active:hover {
|
||||
background-color: @surface0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: @foreground;
|
||||
padding: 0 4px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
#custom-platform-profile {
|
||||
padding-left: 4px;
|
||||
color: @peach;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#memory {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#custom-uptime {
|
||||
padding: 0 4px;
|
||||
color: @peach;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#custom-pomodoro {
|
||||
padding: 0 4px;
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#battery {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
padding-right: 1em;
|
||||
color: @lavender;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#language {
|
||||
padding-right: 1em;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#network {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#bluetooth.disabled {
|
||||
color: @foreground-inactive;
|
||||
}
|
||||
|
||||
#bluetooth.connected {
|
||||
color: @mauve;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#tray:hover {
|
||||
background-color: @surface0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background-color: @surface0;
|
||||
border: 1px solid @lavender;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
color: @foreground;
|
||||
}
|
||||
Reference in New Issue
Block a user