.config/waybar
This commit is contained in:
parent
5063eb8cd6
commit
c0bb760662
@ -2,7 +2,7 @@
|
||||
"position": "top", // Waybar position (top|bottom|left|right)
|
||||
"height": 28, // Waybar height (to be removed for auto height)
|
||||
"modules-left": ["custom/desktop-icon", "sway/workspaces"],
|
||||
"modules-right": ["custom/checkupdates", "custom/kernel", "custom/cpu", "custom/memory", "custom/getvolume", "sway/language", "custom/currentdate", "tray"],
|
||||
"modules-right": ["custom/checkupdates", "custom/kernel", "custom/cpu", "custom/memory", "custom/getvolume", "custom/language", "custom/currentdate", "tray"],
|
||||
|
||||
"sway/workspaces": {
|
||||
"all-outputs": false,
|
||||
@ -51,6 +51,12 @@
|
||||
"exec": "~/.config/waybar/scripts/get_volume.sh",
|
||||
},
|
||||
|
||||
"custom/language": {
|
||||
"format": "{}",
|
||||
"interval": 10,
|
||||
"exec": "~/.config/waybar/scripts/get_lang.sh",
|
||||
},
|
||||
|
||||
"custom/checkupdates": {
|
||||
"format": "{}",
|
||||
"interval": 1800,
|
||||
|
@ -4,17 +4,17 @@ check_sensor=$(sensors | grep "Tdie:" 2> /dev/null)
|
||||
if [ -z "${check_sensor}" ] ; then
|
||||
check_sensor=$(sensors | grep "Tctl:" 2> /dev/null)
|
||||
if [ -z "${check_sensor}" ] ; then
|
||||
CPU_USAGE=$(~/.config/sway/scripts/cpu_load.sh -p)
|
||||
CPU_USAGE=$(~/.config/waybar/scripts/cpu_load.sh -p)
|
||||
echo "$CPU_USAGE" | awk '{ printf("%6s \n"), $1, $2 }'
|
||||
else
|
||||
TEMP=$(sensors | grep 'Package id 0:\|Tctl' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
||||
#CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
|
||||
CPU_USAGE=$(~/.config/sway/scripts/cpu_load.sh -p)
|
||||
CPU_USAGE=$(~/.config/waybar/scripts/cpu_load.sh -p)
|
||||
echo "$CPU_USAGE $TEMP" | awk '{ printf("%6s @ %s \n"), $1, $2 }'
|
||||
fi
|
||||
else
|
||||
TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
||||
#CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
|
||||
CPU_USAGE=$(~/.config/sway/scripts/cpu_load.sh -p)
|
||||
CPU_USAGE=$(~/.config/waybar/scripts/cpu_load.sh -p)
|
||||
echo "$CPU_USAGE $TEMP" | awk '{ printf("%6s @ %s \n"), $1, $2 }'
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
current_date=$(date "+%d/%m/%Y %H:%M")
|
||||
echo " ${current_date}"
|
||||
echo " ${current_date}"
|
||||
|
14
.config/waybar/scripts/get_lang.sh
Executable file
14
.config/waybar/scripts/get_lang.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
sway_config="${HOME}/.config/sway/config"
|
||||
|
||||
if [ -f ${sway_config} ] ; then
|
||||
get_lang=$(cat ${sway_config} | grep xkb_layout | grep -v "#" | head -1 | sed 's/xkb_layout//g' | cut -d '"' -f 2)
|
||||
if [ -z ${get_lang} ] ; then
|
||||
echo " us "
|
||||
else
|
||||
echo " ${get_lang} "
|
||||
fi
|
||||
else
|
||||
echo " us "
|
||||
fi
|
@ -1,6 +1,7 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: UbuntuMono Nerd Font, Noto Sans, sans-serif;
|
||||
font-size: 15px;
|
||||
min-height: 0;
|
||||
@ -111,6 +112,11 @@ window#waybar.chromium {
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#custom-language {
|
||||
color: #26ec6d;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#custom-clock {
|
||||
color: #51A6E3;
|
||||
margin: 0 1px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user