mirror of
https://github.com/FAUSheppy/config
synced 2025-12-06 07:01:36 +01:00
fix ip
This commit is contained in:
BIN
herbstluftwm/hl_constants.pyc
Normal file
BIN
herbstluftwm/hl_constants.pyc
Normal file
Binary file not shown.
@@ -74,7 +74,7 @@ def battery():
|
|||||||
plain = int(bat.split('%')[0][-3:].rstrip('%').lstrip(','))
|
plain = int(bat.split('%')[0][-3:].rstrip('%').lstrip(','))
|
||||||
|
|
||||||
## imediatelly return if full and on supply ##
|
## imediatelly return if full and on supply ##
|
||||||
if bat.startswith("Full") or bat.startswith('Unknown'):
|
if bat.startswith("Full") or bat.startswith('Unknown') or "Charging, 100%" in bat:
|
||||||
return hl_utils.color_panel("On Supply and fully charged",GREEN)
|
return hl_utils.color_panel("On Supply and fully charged",GREEN)
|
||||||
|
|
||||||
## calculate average time remaining ##
|
## calculate average time remaining ##
|
||||||
@@ -180,6 +180,7 @@ def ip_status():
|
|||||||
last_ip = ip
|
last_ip = ip
|
||||||
tmp = hl_utils.color_panel(ip,GREEN)
|
tmp = hl_utils.color_panel(ip,GREEN)
|
||||||
except:
|
except:
|
||||||
|
last_ip = ""
|
||||||
tmp = hl_utils.color_panel("Offline",RED)
|
tmp = hl_utils.color_panel("Offline",RED)
|
||||||
with open(hl_utils.hlpath(IP_LOG),'w') as g:
|
with open(hl_utils.hlpath(IP_LOG),'w') as g:
|
||||||
g.write(tmp)
|
g.write(tmp)
|
||||||
|
|||||||
BIN
herbstluftwm/hl_utils.pyc
Normal file
BIN
herbstluftwm/hl_utils.pyc
Normal file
Binary file not shown.
1
herbstluftwm/panel_pid_atlantislaptop
Normal file
1
herbstluftwm/panel_pid_atlantislaptop
Normal file
@@ -0,0 +1 @@
|
|||||||
|
30403
|
||||||
20
herbstluftwm/panel_right_side.sh
Executable file
20
herbstluftwm/panel_right_side.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source uniq_linebuffered.sh
|
||||||
|
|
||||||
|
### Generates the output for the rightside of the panel ###
|
||||||
|
|
||||||
|
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
|
||||||
|
|
||||||
|
hc pad $monitor $panel_height
|
||||||
|
{
|
||||||
|
while true ; do
|
||||||
|
printf 'pystat\t%s\n' "$($HOME/.config/herbstluftwm/hl_panel_content.py)"
|
||||||
|
sleep 1 || break
|
||||||
|
done > >(uniq_linebuffered) &
|
||||||
|
|
||||||
|
## save pid and wait for signal ##
|
||||||
|
childpid=$!
|
||||||
|
hc --idle
|
||||||
|
kill $childpid
|
||||||
|
}
|
||||||
0
herbstluftwm/t
Normal file
0
herbstluftwm/t
Normal file
10
herbstluftwm/uniq_linebuffered.sh
Executable file
10
herbstluftwm/uniq_linebuffered.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then
|
||||||
|
uniq_linebuffered() {
|
||||||
|
awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
uniq_linebuffered() {
|
||||||
|
awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
|
||||||
|
}
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user