mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
update xmobar
This commit is contained in:
parent
f8311de65e
commit
da715f6e73
8
.bashrc
8
.bashrc
@ -19,11 +19,3 @@ alias tl='trash-list'
|
|||||||
alias tre='trash-restore'
|
alias tre='trash-restore'
|
||||||
alias tpm='trash-rm'
|
alias tpm='trash-rm'
|
||||||
alias mpv='mpv --title="mpv"'
|
alias mpv='mpv --title="mpv"'
|
||||||
alias dot='/usr/bin/git --git-dir=$HOME/.dots --work-tree=$HOME'
|
|
||||||
dot config --local status.showUntrackedFiles no
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# added by Anaconda3 2.5.0 installer
|
|
||||||
#export PATH="/home/tstarr/anaconda3/bin:$PATH"
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
|
||||||
, bgColor = "#282828"
|
|
||||||
, fgColor = "#ebdbb2"
|
|
||||||
, position = Static {xpos = 0, ypos = 0, width = 2560, height = 20}
|
|
||||||
, iconRoot = "X"
|
|
||||||
, allDesktops = False
|
|
||||||
, commands = [ Run Cpu ["-t", " <fc=#fb4934><total></fc>%","-H", "2"] 10
|
|
||||||
, Run Memory ["-t", "<fc=#fb4934><usedratio></fc>%"] 10
|
|
||||||
, Run Network "enp4s0" [ "-t", "<fc=#fb4934><tx></fc>kb/<fc=#fb4934><rx></fc>kb" ] 10
|
|
||||||
, Run Com "/home/tstarr/.config/xmobar/volume" [] "volume" 10
|
|
||||||
, Run Com "/home/tstarr/.config/xmobar/gamemode" [] "gamemode" 10
|
|
||||||
, Run Com "/home/tstarr/.config/xmobar/mouse_battery" [] "mouse_battery" 1
|
|
||||||
, Run Date " %a %d/%m/%y %H:%M:%S" "date" 10
|
|
||||||
, Run StdinReader
|
|
||||||
]
|
|
||||||
, sepChar = "%"
|
|
||||||
, alignSep = "}{"
|
|
||||||
, template = " <fc=#fb4934>%StdinReader%</fc>}%date%{%enp4s0% | %mouse_battery% | %volume% | 閭%cpu% | %memory% |%gamemode% "
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
CPU_USAGE=$(top -b -n2 -p 1 | fgrep "Cpu(s)" | tail -1 | awk -F'id,' -v prefix="$prefix" '{ split($1, vs, ","); v=vs[length(vs)]; sub("%", "", v); printf "%s%.1f%%\n", prefix, 100 - v }')
|
|
||||||
echo "$CPU_USAGE"
|
|
1
.config/xmobar/cpu
Symbolic link
1
.config/xmobar/cpu
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../.dotfiles/.config/xmobar/cpu
|
@ -1,10 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
status=$(gamemoded -s)
|
|
||||||
if [ "$status" == "gamemode is inactive" ]; then
|
|
||||||
color="#b8bb26"
|
|
||||||
else
|
|
||||||
color="#fb4934"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "<fc=$color> </fc>"
|
|
1
.config/xmobar/gamemode
Symbolic link
1
.config/xmobar/gamemode
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../.dotfiles/.config/xmobar/gamemode
|
@ -1,18 +0,0 @@
|
|||||||
|
|
||||||
status=$(cat /sys/class/power_supply/hidpp_battery_*/uevent | grep POWER_SUPPLY_VOLTAGE)
|
|
||||||
voltage=$(echo $status | cut -c26-29)
|
|
||||||
if [ "$voltage" -ge 3700 ]; then
|
|
||||||
color="#b8bb26"
|
|
||||||
else
|
|
||||||
color="#fb4934"
|
|
||||||
fi
|
|
||||||
|
|
||||||
status1=$(cat /sys/class/power_supply/hidpp_battery_*/uevent | grep POWER_SUPPLY_STATUS | tail -n1)
|
|
||||||
charge=$(echo $status1 | cut -c21-)
|
|
||||||
if [ "$charge" = "Discharging" ]; then
|
|
||||||
color1="#fb4934"
|
|
||||||
else
|
|
||||||
color1="#b8bb26"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "<fc=$color1> </fc><fc=$color>${voltage}mV</fc>"
|
|
1
.config/xmobar/mouse_battery
Symbolic link
1
.config/xmobar/mouse_battery
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../.dotfiles/.config/xmobar/mouse_battery
|
@ -1,11 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
volume=$(pactl list sinks | grep -A 7 'Name: alsa_output.usb-AudioQuest_inc._AudioQuest_DragonFly-00.analog-stereo' | tail -n 1 | sed 's/%.*//' | tail -c3)
|
|
||||||
mute=$(pactl list sinks | grep -A 6 'Name: alsa_output.usb-AudioQuest_inc._AudioQuest_DragonFly-00.analog-stereo' | tail -n 1 -c4 | sed 's/ //g')
|
|
||||||
if [ "$mute" == "yes" ]; then
|
|
||||||
color="#fb4934"
|
|
||||||
else
|
|
||||||
color="#b8bb26"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "<fc=$color> $volume%</fc>"
|
|
1
.config/xmobar/volume
Symbolic link
1
.config/xmobar/volume
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../.dotfiles/.config/xmobar/volume
|
10
.config/xmobar/wireguard
Executable file
10
.config/xmobar/wireguard
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
if ip address | grep -q "wg0"
|
||||||
|
then
|
||||||
|
color="#fb4934"
|
||||||
|
else
|
||||||
|
color="#b8bb26"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "<fc=$color> </fc>"
|
23
.config/xmobar/xmobar-tags
Executable file
23
.config/xmobar/xmobar-tags
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
## HLWM Xmobar Tag Status ######
|
||||||
|
# Version 0.1 by Scott Garrett #
|
||||||
|
# Wintervenom [(at)] gmail.com #
|
||||||
|
################################
|
||||||
|
|
||||||
|
hc () {
|
||||||
|
herbstclient "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
tags () {
|
||||||
|
printf '[%s] ' $(hc tag_status)
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
set -f
|
||||||
|
IFS=$'\t'
|
||||||
|
tags
|
||||||
|
hc -i tag_changed |
|
||||||
|
while read hook tag mon; do
|
||||||
|
tags
|
||||||
|
done
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
|
||||||
, bgColor = "#282828"
|
|
||||||
, fgColor = "#ebdbb2"
|
|
||||||
, position = Static {xpos = 2560, ypos = 0, width = 2560, height = 20}
|
|
||||||
, iconRoot = "X"
|
|
||||||
, allDesktops = True
|
|
||||||
, commands = [ Run Cpu ["-t", " <fc=#fb4934><total></fc>%","-H", "2"] 10
|
|
||||||
, Run Memory ["-t", "<fc=#fb4934><usedratio></fc>%"] 10
|
|
||||||
, Run Network "enp4s0" [ "-t", "<fc=#fb4934><tx></fc>kb/<fc=#fb4934><rx></fc>kb" ] 10
|
|
||||||
, Run Com "/home/tstarr/.config/xmobar/volume" [] "volume" 10
|
|
||||||
, Run Com "/home/tstarr/.config/xmobar/gamemode" [] "gamemode" 10
|
|
||||||
, Run Com "/home/tstarr/.config/xmobar/mouse_battery" [] "mouse_battery" 30
|
|
||||||
, Run Date " %a %d/%m/%y %H:%M:%S" "date" 10
|
|
||||||
, Run StdinReader
|
|
||||||
]
|
|
||||||
, sepChar = "%"
|
|
||||||
, alignSep = "}{"
|
|
||||||
, template = " <fc=#fb4934>%StdinReader%</fc>}%date%{%enp4s0% | %mouse_battery% | %volume% | 閭%cpu% | %memory% |%gamemode% "
|
|
||||||
}
|
|
1
.config/xmobar/xmobarrc
Symbolic link
1
.config/xmobar/xmobarrc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../.dotfiles/.config/xmobar/xmobarrc
|
Loading…
x
Reference in New Issue
Block a user