dotfiles/.config/i3pystatus/config.py

138 lines
4.2 KiB
Python
Raw Normal View History

2018-08-24 09:26:15 +00:00
from i3pystatus import Status
2020-08-23 15:21:27 +00:00
status = Status(
logfile='/tmp/i3pystatus.log',
2020-08-23 15:21:27 +00:00
)
2018-08-24 09:26:15 +00:00
status.register("pulseaudio",
2018-10-31 12:53:51 +00:00
format="♪I {volume}%",
format_muted="♪I -∞dB",
2018-08-24 09:26:15 +00:00
step="2",
2022-02-13 07:47:44 +00:00
sink="alsa_output.pci-0000_07_00.6.HiFi__hw_Generic_1__sink")
2018-10-31 12:53:51 +00:00
status.register("pulseaudio",
format="♪D {volume}%",
format_muted="♪D -∞dB",
step="2",
sink="@DEFAULT_SINK@")
status.register("shell",
format="{output}",
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/microphone-status.sh",
on_rightclick="pactl set-source-mute alsa_input.pci-0000_07_00.6.HiFi__hw_acp__source toggle",
interval=1)
2018-08-24 09:26:15 +00:00
status.register("backlight",
format="{percentage}%",
2022-02-13 07:47:44 +00:00
backlight="amdgpu_bl0",
on_leftclick="sudo light -S 10",
on_rightclick="sudo light -S 50",
2018-08-24 09:26:15 +00:00
interval=1)
status.register("shell",
format="L: {output}",
2018-08-24 09:26:15 +00:00
command="/home/kunsi/.config/i3pystatus/screensaver-status.sh",
interval=1,
on_leftclick="xset s 90 10",
on_rightclick="xset s off")
status.register("clock",
2021-02-09 06:28:08 +00:00
format="%a, %Y-%m-%d %H:%M:%S (W%V)",)
2018-08-24 09:26:15 +00:00
status.register("battery",
2018-10-31 12:53:51 +00:00
battery_ident="BAT0",
format="B0: {status}{percentage:.2f}% {remaining:%E%h:%M}",
2018-10-31 12:53:51 +00:00
alert=True,
alert_percentage=5,
status={
"DIS": "",
"CHR": "",
"FULL": "",
})
2018-08-24 09:26:15 +00:00
status.register("load",
2018-12-21 16:34:49 +00:00
format="{avg1}")
status.register("amdgpu",
format="G: {temp}°C {gpu_usage}%")
2019-03-23 15:09:15 +00:00
status.register("temp",
format="C: {temp:.0f}°C",
2019-03-23 15:09:15 +00:00
hints={"markup": "pango"},
# lm_sensors_enable=True,
dynamic_color=True)
2018-08-24 09:26:15 +00:00
2018-10-31 12:53:51 +00:00
status.register("shell",
format="{output}",
2018-12-21 16:34:49 +00:00
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/rfkill-wifi.py",
interval=1)
status.register("shell",
format="{output}",
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/rfkill-bt.py",
2021-02-09 06:28:08 +00:00
on_leftclick='sudo rfkill block bluetooth',
on_rightclick='sudo rfkill unblock bluetooth',
2018-10-31 12:53:51 +00:00
interval=1)
2020-06-21 11:20:58 +00:00
status.register("shell",
format="{output}",
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/redshift.py",
2020-08-23 14:32:31 +00:00
on_leftclick='systemctl --user start redshift.service',
on_rightclick='systemctl --user stop redshift.service',
2020-06-21 11:20:58 +00:00
interval=1)
2020-08-23 15:24:06 +00:00
status.register("shell",
format="{output}",
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/trackpad.sh",
interval=1,
on_leftclick="xinput enable 'SynPS/2 Synaptics TouchPad'",
on_rightclick="xinput disable 'SynPS/2 Synaptics TouchPad'")
2018-10-31 12:53:51 +00:00
#status.register("wifionice", wifi_adapters=['wlp3s0'])
status.register("wifionice",
hints = {"markup": "pango"},
travelynx_url='travelynx.franzi.business',
wifi_adapters=['wlp3s0'],
format_offtrain='Wann wieder Zug?',
format_ontrain='[<span color="#999999">{speed}km/h</span> ]> {next_station}[ '
'<span color="#999999">\[{next_platform}\]</span> {arrival_time} '
'({arrival_in}[ | <span color="#FF0000">{delay}</span>])][ '
'<span color="#999999">(Net: {net_current} > \[{net_duration}\] '
'{net_expected})</span>]')
#status.register("shell",
# format="{output}",
# hints = {"markup": "pango"},
# command="/home/kunsi/.config/i3pystatus/ice-status.py",
# on_leftclick="/home/kunsi/.config/i3pystatus/ice-status.py --link",
# ignore_empty_stdout=True,
# interval=2)
2021-10-10 16:23:28 +00:00
2018-08-24 09:26:15 +00:00
status.register("network",
2018-10-31 12:53:51 +00:00
interface="wlp4s0",
2019-10-23 09:04:01 +00:00
format_up="{interface}:[ {essid} ({freq:01.3f}GHz {quality}%)][ {v6cidr}][ {v4cidr}]",
2018-08-24 09:26:15 +00:00
format_down="{interface}: down",
detect_active=True,
2019-06-20 14:24:12 +00:00
freq_divisor=1000000000,
divisor=1024,
2022-02-13 07:47:44 +00:00
on_leftclick="kitty --class terminal-floating -e sudo wifi-menu",
2019-06-20 14:24:12 +00:00
hints={"markup":"pango"})
2018-08-24 09:26:15 +00:00
2020-06-21 11:20:58 +00:00
#status.register("mpd",
# format="{status} [{pos}/{len}: ][{artist} - ]{title}{filename}[ ({song_elapsed}/{song_length})]",
# status={
# "pause": "▷",
# "play": "▶",
# "stop": "◾",
# },
# host="172.19.138.20",
# color="#666666",
# on_rightclick="stop",
# on_upscroll="previous_song",
# on_downscroll="next_song",
# hide_inactive=True,
# max_field_len=200)
2018-08-24 09:26:15 +00:00
status.register("disk",
path="/home/kunsi",
2018-08-24 09:26:15 +00:00
format="{used}/{total}G",)
status.run()