Last active
August 1, 2018 20:32
-
-
Save Kunsi/c618711889da76353bf21715979b45de to your computer and use it in GitHub Desktop.
i3pystatus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from i3pystatus import Status | |
from i3pystatus.updates import pacman, cower | |
status = Status() | |
status.register("pulseaudio", | |
format="♪ {db}dB", | |
format_muted="♪ muted", | |
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="~/.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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment