Switch to qtile.
This commit is contained in:
parent
afdf3d4bcd
commit
e06cbc44a9
4
_desktop/_scripts/sb-emerge
Executable file
4
_desktop/_scripts/sb-emerge
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
icon='\ue20f '
|
||||
[ $(pgrep -x emerge) ] && printf "$icon <span foreground='#ffffff'background='#9a37ff'>emerge</span>" || printf ""
|
10
_desktop/_scripts/sb-network
Executable file
10
_desktop/_scripts/sb-network
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
icon='\uf1eb '
|
||||
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
||||
down) printf "$icon <span background='#770000'>no wifi</span>" ;;
|
||||
up)
|
||||
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] \
|
||||
&& printf "$icon $(iw dev wlan0 info | grep 'ssid ' | cut -d' ' -f2-)" \
|
||||
|| printf "$icon <span background='#770000'>no ip</span>"
|
||||
esac
|
5
_desktop/_scripts/sb-volume
Executable file
5
_desktop/_scripts/sb-volume
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
icon='\uf028 '
|
||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "$icon <span foreground='#ffffff' background='#770000'>mute</span>" || printf "$icon ${vol}%%"
|
@ -1,4 +1,5 @@
|
||||
import psutil
|
||||
import subprocess
|
||||
from libqtile import bar, extension, hook, layout, widget
|
||||
from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen
|
||||
from libqtile.dgroups import simple_key_binder
|
||||
@ -20,7 +21,7 @@ groups = [
|
||||
"spterm", "sh -c 'BROWSER=firefox st'",
|
||||
on_focus_lost_hide=False,
|
||||
width=0.40,
|
||||
height=0.50,
|
||||
height=0.20,
|
||||
x=0.30,
|
||||
y=0.25,
|
||||
),
|
||||
@ -28,7 +29,7 @@ groups = [
|
||||
"spwork", "sh -c 'BROWSER=workfx st -n work'",
|
||||
on_focus_lost_hide=False,
|
||||
width=0.40,
|
||||
height=0.50,
|
||||
height=0.20,
|
||||
x=0.30,
|
||||
y=0.25,
|
||||
),
|
||||
@ -119,42 +120,22 @@ screens = [
|
||||
record_history=False,
|
||||
),
|
||||
widget.Spacer(),
|
||||
widget.Maildir(
|
||||
hide_when_empty=True,
|
||||
maildir_path='~/.local/share/mail/priv',
|
||||
nonempty_color="#fff27f",
|
||||
sub_folders=[{'label': 'priv', 'path': 'INBOX'}, {'label': 'sites', 'path': 'sites'}],
|
||||
update_interval=5,
|
||||
widget.GenPollText(
|
||||
update_interval=0.2,
|
||||
func=lambda: subprocess.check_output("sb-emerge").decode(),
|
||||
),
|
||||
widget.Maildir(
|
||||
hide_when_empty=True,
|
||||
maildir_path='~/.local/share/mail/klub',
|
||||
nonempty_color="#fff27f",
|
||||
total=True,
|
||||
sub_folders=[{'label': 'klub', 'path': 'INBOX'}],
|
||||
update_interval=5,
|
||||
widget.GenPollText(
|
||||
update_interval=0.2,
|
||||
func=lambda: subprocess.check_output("sb-mail").decode(),
|
||||
),
|
||||
widget.Maildir(
|
||||
hide_when_empty=True,
|
||||
maildir_path='~/.local/share/mail/info',
|
||||
nonempty_color="#fff27f",
|
||||
total=True,
|
||||
sub_folders=[{'label': 'info', 'path': 'INBOX'}],
|
||||
update_interval=5,
|
||||
widget.GenPollText(
|
||||
update_interval=0.2,
|
||||
func=lambda: subprocess.check_output("sb-volume").decode(),
|
||||
),
|
||||
widget.Maildir(
|
||||
hide_when_empty=True,
|
||||
maildir_path='~/.local/share/mail/work',
|
||||
nonempty_color="#fff27f",
|
||||
total=True,
|
||||
sub_folders=[{'label': 'work', 'path': 'INBOX'}],
|
||||
update_interval=5,
|
||||
widget.GenPollText(
|
||||
update_interval=0.2,
|
||||
func=lambda: subprocess.check_output("sb-network").decode(),
|
||||
),
|
||||
widget.Wlan(
|
||||
format='\uf1eb {essid}',
|
||||
disconnected_message=' NO WIFI ',
|
||||
),
|
||||
widget.Sep(padding=15, size_percent=60),
|
||||
widget.Battery(
|
||||
format='\uf241 {char} {percent:2.0%}',
|
||||
charge_char="\uf077",
|
||||
@ -162,16 +143,10 @@ screens = [
|
||||
full_char="\uf102",
|
||||
unknown_char="\uf444",
|
||||
),
|
||||
widget.Sep(padding=15, size_percent=60),
|
||||
widget.Clock(
|
||||
format='\uf073 [%d] %I:%M:%S %p'
|
||||
),
|
||||
widget.Sep(padding=15, size_percent=60),
|
||||
widget.PulseVolume(
|
||||
emoji=True,
|
||||
step=5,
|
||||
update_interval=0.1,
|
||||
),
|
||||
widget.Systray(),
|
||||
],
|
||||
24,
|
||||
|
Loading…
Reference in New Issue
Block a user