forked from kunsi/dotfiles
Add i3pystatus
This commit is contained in:
commit
df3e22eb70
2 changed files with 87 additions and 0 deletions
75
.config/i3pystatus/config.py
Normal file
75
.config/i3pystatus/config.py
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
from i3pystatus import Status
|
||||||
|
from i3pystatus.updates import pacman, cower
|
||||||
|
#import sensors
|
||||||
|
|
||||||
|
status = Status()
|
||||||
|
|
||||||
|
status.register("pulseaudio",
|
||||||
|
format="♪ {db}dB",
|
||||||
|
format_muted="♪ -∞dB",
|
||||||
|
step="2",
|
||||||
|
sink="alsa_output.pci-0000_00_1b.0.analog-stereo")
|
||||||
|
|
||||||
|
status.register("backlight",
|
||||||
|
format="{percentage}%",
|
||||||
|
backlight="intel_backlight",
|
||||||
|
on_leftclick="xbacklight =10",
|
||||||
|
on_rightclick="xbacklight =50",
|
||||||
|
interval=1)
|
||||||
|
|
||||||
|
status.register("shell",
|
||||||
|
format="Autolock: {output}",
|
||||||
|
command="/home/kunsi/.config/i3pystatus/screensaver-status.sh",
|
||||||
|
interval=1,
|
||||||
|
on_leftclick="xset s 90 10",
|
||||||
|
on_rightclick="xset s off")
|
||||||
|
|
||||||
|
status.register("clock",
|
||||||
|
format="%a, %Y-%m-%d %H:%M:%S",)
|
||||||
|
|
||||||
|
status.register("battery",
|
||||||
|
format="{status}{percentage:.2f}% {remaining:%E%h:%M}",
|
||||||
|
alert=True,
|
||||||
|
alert_percentage=5,
|
||||||
|
status={
|
||||||
|
"DIS": "↓",
|
||||||
|
"CHR": "↑",
|
||||||
|
"FULL": "",
|
||||||
|
})
|
||||||
|
|
||||||
|
status.register("load",
|
||||||
|
format="{avg1} {avg5} {tasks}")
|
||||||
|
|
||||||
|
#status.register("temp",
|
||||||
|
# format="{TC0P:.0f}°C {Right_Side:.0f}rpm",
|
||||||
|
# lm_sensors_enabled=True,
|
||||||
|
# dynamic_color=True)
|
||||||
|
|
||||||
|
status.register("network",
|
||||||
|
interface="wlp3s0",
|
||||||
|
format_up="{interface}:[ {essid} @ {freq:01.3f}GHz][ {v4cidr}][ {v6cidr}]",
|
||||||
|
format_down="{interface}: down",
|
||||||
|
on_leftclick="i3-sensible-terminal -- sudo wifi-menu",
|
||||||
|
detect_active=True,
|
||||||
|
freq_divisor=1000000000)
|
||||||
|
|
||||||
|
status.register("disk",
|
||||||
|
path="/home",
|
||||||
|
format="{used}/{total}G",)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
status.run()
|
12
.config/i3pystatus/screensaver-status.sh
Executable file
12
.config/i3pystatus/screensaver-status.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
OUT=$(xset q | grep timeout | awk '{print $2}')
|
||||||
|
|
||||||
|
if [ $OUT -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "OFF"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "${OUT}s"
|
||||||
|
exit 0
|
||||||
|
fi
|
Loading…
Reference in a new issue