mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-07-16 22:21:55 +08:00
feat: write, import weather module, correct volume text
This commit is contained in:
parent
ddd38a4810
commit
390fd26037
2 changed files with 18 additions and 19 deletions
|
|
@ -28,6 +28,7 @@
|
|||
"sway/workspaces",
|
||||
"hyprland/workspaces",
|
||||
"sway/mode",
|
||||
"custom/weather",
|
||||
"tray",
|
||||
],
|
||||
|
||||
|
|
@ -60,6 +61,13 @@
|
|||
"separate-outputs": true
|
||||
},
|
||||
|
||||
"custom/weather": {
|
||||
"format": "{text}",
|
||||
"return-type": "text",
|
||||
"exec": "~/.local/bin/waybar-weather",
|
||||
"interval": 1800
|
||||
},
|
||||
|
||||
"sway/workspaces": {
|
||||
"all-outputs": true,
|
||||
"disable-scroll": true,
|
||||
|
|
@ -263,11 +271,9 @@
|
|||
},
|
||||
|
||||
"wireplumber": {
|
||||
"format": "{icon} {node_name}/{volume}",
|
||||
"format-muted": "",
|
||||
"format": "<span color='#aaaaaa'>VOL:</span> {node_name}/{volume}",
|
||||
"on-click": "pavucontrol-qt",
|
||||
"on-click-right": "helvum",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
|
||||
"custom/audio-internal": {
|
||||
|
|
@ -365,10 +371,6 @@
|
|||
"clock#time": {
|
||||
"interval": 60,
|
||||
"format": "<span color='#aaaaaa'>CEST:</span> {:%I:%M %p}",
|
||||
"actions": {
|
||||
"on-scroll-up": "tz_up",
|
||||
"on-scroll-down": "tz_down"
|
||||
}
|
||||
},
|
||||
|
||||
"custom/clock#minutes": {
|
||||
|
|
|
|||
|
|
@ -218,18 +218,7 @@
|
|||
text = ''
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ -f /sys/class/power_supply/BAT1/status && "$(cat /sys/class/power_supply/BAT1/status)" == "Discharging" ]]; then; cat /sys/class/power_supply/BAT1/current_now /sys/class/power_supply/BAT1/voltage_now | xargs | awk '{print $1*$2/1e12 " W"}'; fi
|
||||
'';
|
||||
};
|
||||
"/home/${username}/.local/bin/waybar-vpn" = {
|
||||
# unused nowadays
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ip route | grep -q '10.7.0.0' \
|
||||
&& echo '{"text":"Connected","class":"connected","percentage":100}' \
|
||||
|| echo '{"text":"Disconnected","class":"disconnected","percentage":0}'
|
||||
cat /sys/class/power_supply/*/current_now /sys/class/power_supply/*/voltage_now | xargs | awk '{print $1*$2/1e12 " W"}'
|
||||
'';
|
||||
};
|
||||
"/home/${username}/.local/bin/waybar-mullvad" = {
|
||||
|
|
@ -249,6 +238,14 @@
|
|||
echo "$TEXT"
|
||||
'';
|
||||
};
|
||||
"/home/${username}/.local/bin/waybar-weather" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env sh
|
||||
|
||||
mullvad-exclude curl 'wttr.is?format=%c+(%p)+%t+(%f)+%w+(%S,+%s)\n'
|
||||
'';
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
wf-recorder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue