simplified xmobar

This commit is contained in:
afonsofrancof 2022-11-08 17:10:50 +00:00
parent fc668b20a3
commit 2747cfcdc0
5 changed files with 54 additions and 75 deletions

View file

@ -13,10 +13,10 @@ else
fi fi
if [ "$temp" -ge "$temp2" ] ; then if [ "$temp" -ge "$temp2" ] ; then
echo "Cpu: <fc=#C1514E>$temp</fc>°C" echo "<fn=6></fn> <fc=#C1514E>$temp</fc>°C"
elif [ "$temp" -ge "$temp1" ] ; then elif [ "$temp" -ge "$temp1" ] ; then
echo "Cpu: <fc=#C1A24E>$temp</fc>°C" echo "<fn=6></fn> <fc=#C1A24E>$temp</fc>°C"
else else
echo "Cpu: <fc=#AAC0F0>$temp</fc>°C" echo "<fn=6></fn> <fc=#AAC0F0>$temp</fc>°C"
fi fi

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
freespace=$(btrfs fi usage / | grep -Po 'Free \(estimated\):.*' | awk '{print $3}') freespace=$(btrfs fi usage / | grep -Po 'Free \(estimated\):.*' | awk '{print $3}')
echo "Disk (Free): <fc=#AAC0F0> $freespace</fc>" echo "<fn=6></fn>: <fc=#AAC0F0> $freespace</fc>"

View file

@ -1,15 +0,0 @@
#!/bin/sh
temp1=50
temp2=90
temp=$(nvidia-smi | grep 'Default' | awk '{print $13}' | sed 's/%//')
if [ "$temp" -ge "$temp2" ] ; then
echo "Gpu: <fc=#C1514E>$temp</fc>%"
elif [ "$temp" -ge "$temp1" ] ; then
echo "Gpu: <fc=#C1A24E>$temp</fc>%"
else
echo "Gpu: <fc=#AAC0F0>$temp</fc>%"
fi

View file

@ -6,6 +6,7 @@ Config {font = "Ubuntu bold 10"
, "FiraCode Nerd Font Mono 17" , "FiraCode Nerd Font Mono 17"
, "FiraCode Nerd Font Mono 10" , "FiraCode Nerd Font Mono 10"
, "Font Awesome 6 Free Solid 17" , "Font Awesome 6 Free Solid 17"
, "Font Awesome 6 Free Solid 13"
] ]
, bgColor = "#2B2E37" , bgColor = "#2B2E37"
, fgColor = "#929AAD" , fgColor = "#929AAD"
@ -22,12 +23,11 @@ Config {font = "Ubuntu bold 10"
, iconRoot = "/home/afonso/.config/xmobar/xpm/" -- default: "." , iconRoot = "/home/afonso/.config/xmobar/xpm/" -- default: "."
, commands = [ , commands = [
Run UnsafeXPropertyLog "_XMONAD_LOG_0" Run UnsafeXPropertyLog "_XMONAD_LOG_0"
, Run Date "%a, %d %b <fn=1></fn> %H:%M:%S" "date" 10 , Run Date "%a, %d %b <fn=1></fn> %H:%M" "date" 10
, Run Mpris2 "playerctld" ["-t", "<fc=#AAC0F0><artist> - <title></fc>"] 10 , Run Mpris2 "playerctld" ["-t", "<fc=#AAC0F0><artist> - <title></fc>"] 10
, Run Memory ["-t","Mem: <fc=#AAC0F0><usedratio></fc>%"] 10 , Run Memory ["-t","<fn=6></fn> <fc=#AAC0F0><usedratio></fc>%"] 10
, Run Com "/home/afonso/.config/xmobar/scripts/disk.sh" [] "disk" 10 , Run Com "/home/afonso/.config/xmobar/scripts/disk.sh" [] "disk" 10
, Run Com "/home/afonso/.config/xmobar/scripts/cpu_temp.sh" [] "cpu" 10 , Run Com "/home/afonso/.config/xmobar/scripts/cpu_temp.sh" [] "cpu" 10
, Run Com "/home/afonso/.config/xmobar/scripts/gpu_util.sh" [] "gpu" 10
, Run Com "/home/afonso/.config/xmobar/scripts/volume.sh" [] "volume" 10 , Run Com "/home/afonso/.config/xmobar/scripts/volume.sh" [] "volume" 10
, Run Com "/home/afonso/.config/xmobar/scripts/bluetooth.sh" [] "bluetooth" 10 , Run Com "/home/afonso/.config/xmobar/scripts/bluetooth.sh" [] "bluetooth" 10
, Run Com "/home/afonso/.config/xmobar/scripts/network.sh" [] "network" 10 , Run Com "/home/afonso/.config/xmobar/scripts/network.sh" [] "network" 10
@ -49,16 +49,10 @@ Config {font = "Ubuntu bold 10"
\ \ \ \
\%memory%\ \%memory%\
\ \ \ \
\|\
\ \ \ \
\%cpu%\ \%cpu%\
\ \ \ \
\|\
\ \ \ \
\%gpu%\
\ \
\|\
\ \
\%disk%\ \%disk%\
\ \ \ \
\|\ \|\

View file

@ -1,52 +1,52 @@
#!/bin/sh #!/bin/sh
#userresources=$HOME/.Xresources userresources=$HOME/.Xresources
#usermodmap=$HOME/.Xmodmap usermodmap=$HOME/.Xmodmap
#sysresources=/etc/X11/xinit/.Xresources sysresources=/etc/X11/xinit/.Xresources
#sysmodmap=/etc/X11/xinit/.Xmodmap sysmodmap=/etc/X11/xinit/.Xmodmap
#
## merge in defaults and keymaps # merge in defaults and keymaps
#
#if [ -f $sysresources ]; then if [ -f $sysresources ]; then
#
#
#
#
#
#
#
# xrdb -merge $sysresources xrdb -merge $sysresources
#
#fi fi
#
#if [ -f $sysmodmap ]; then if [ -f $sysmodmap ]; then
# xmodmap $sysmodmap xmodmap $sysmodmap
#fi fi
#
#if [ -f "$userresources" ]; then if [ -f "$userresources" ]; then
#
#
#
#
#
#
#
# xrdb -merge "$userresources" xrdb -merge "$userresources"
#
#fi fi
#
#if [ -f "$usermodmap" ]; then if [ -f "$usermodmap" ]; then
# xmodmap "$usermodmap" xmodmap "$usermodmap"
#fi fi
#
## start some nice programs # start some nice programs
#
#if [ -d /etc/X11/xinit/xinitrc.d ] ; then if [ -d /etc/X11/xinit/xinitrc.d ] ; then
# for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
# [ -x "$f" ] && . "$f" [ -x "$f" ] && . "$f"
# done done
# unset f unset f
#fi fi
setxkbmap -layout us,pt setxkbmap -layout us,pt
setxkbmap -option grp:win_space_toggle setxkbmap -option grp:win_space_toggle