1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-22 16:31:26 +00:00

configure statusbar

This commit is contained in:
horhik 2020-10-07 20:45:54 +03:00
parent 9be3b0d078
commit 7a466f891a
3 changed files with 106 additions and 44 deletions

View file

@ -41,9 +41,9 @@
# #
# Blank space added around the window in pixels. This padding is scaled # Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides. # by DPI and the specified value is always added at both opposing sides.
#padding: padding:
# x: 0 x: 20
# y: 0 y: 20
# Spread additional padding evenly around the terminal content. # Spread additional padding evenly around the terminal content.
#dynamic_padding: false #dynamic_padding: false
@ -57,7 +57,7 @@
# Values for `decorations` (macOS only): # Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons # - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background, but no title bar buttons # - buttonless: Title bar, transparent background, but no title bar buttons
#decorations: full decorations: full
# Startup Mode (changes require restart) # Startup Mode (changes require restart)
# #

View file

@ -1,3 +1,4 @@
corner-radius = 10; corner-radius = 10;
rounded-corners-exclude = [ rounded-corners-exclude = [
# "class_g = 'awesome'", # "class_g = 'awesome'",
@ -8,13 +9,13 @@ rounded-corners-rule = [
"5:class_g = 'Dunst'", "5:class_g = 'Dunst'",
]; ];
round-borders = 10; round-borders = 3;
round-borders-exclude = []; round-borders-exclude = [];
round-borders-rule = [ round-borders-rule = [
"3:class_g = 'XTerm'", "3:class_g = 'XTerm'",
"3:class_g = 'URxvt'", "3:class_g = 'URxvt'",
"10:class_g = 'Alacritty'", "3:class_g = 'Alacritty'",
"5:class_g = 'Dunst'", "5:class_g = 'Dunst'",
"15:class_g = 'Signal'" "15:class_g = 'Signal'"
]; ];
@ -143,8 +144,7 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ];
opacity-rule = [ opacity-rule = [
"95:class_g = 'Emacs'", "95:class_g = 'Emacs'",
"95:class_g *= 'Alacritty'", "90:class_g *= 'Alacritty'",
"95:class_g *= 'st'",
"78:class_g *= 'Zathura'", "78:class_g *= 'Zathura'",
"80:class_g = 'dropdown'", "80:class_g = 'dropdown'",
"50:class_g = 'Firefox'", "50:class_g = 'Firefox'",
@ -154,25 +154,34 @@ opacity-rule = [
"90:name = 'emacs'", "90:name = 'emacs'",
"85:name *= 'xmobar'", "85:name *= 'xmobar'",
"95:class_g = 'Spotify'", "95:class_g = 'Spotify'",
"95:class_g = 'Polybar'" "95:class_g = 'Polybar'",
"85:name *= 'scratchpad'"
] ]
blur-background = true;
blur-method = "kawase"; blur:
blur-strength = 7; {
method = "kawase";
size = 20;
deviation = 2.0;
};
blur-kern = "3x3box";
blur-background-exclude = [ blur-background-exclude = [
"window_type = 'desktop'", "window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c", "_GTK_FRAME_EXTENTS@:c"
"class_g = 'Polybar'"
]; ];
backend = "glx"; backend = "glx";
vsync = true; vsync = true
mark-wmwin-focused = true; mark-wmwin-focused = true;
mark-ovredir-focused = true; mark-ovredir-focused = true;

View file

@ -1,19 +1,72 @@
#!/bin/bash #!/bin/bash
acpi | grep -oh "[[:digit:]]*%"
vol=$(awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) | head -1| grep -oh "[0-9]*") battery ()
RED='\033[0;31m' {
val=$(acpi | grep -oh "[[:digit:]]*%" | grep -oh "[0-9]*")
if [ $vol -ge 100 ] case $val in
then 100)
echo 墳$vol echo " $val"
elif [ $vol -ge 50 ] ;;
then [5-9][0-9])
echo 奔$vol echo " $val"
elif [ $vol -ge 1 ] ;;
then [1-4][0-9])
echo 奄$vol echo " $val"
else ;;
[1-9])
echo " $val"
;;
0)
echo 
;;
esac
}
volume ()
{
val=$(amixer sget Master | grep 'Right:' | awk -F'[][]' '{ print $2 }'| grep -oh "[0-9]*")
case $val in
100)
echo 墳 $val%
;;
[5-9][0-9])
echo 墳 $val%
;;
[1-4][0-9])
echo 奔 $val%
;;
[1-9])
echo 奄 $val%
;;
0)
echo 婢 echo 婢
;;
esac
}
diskspace ()
{
echo  $(df -h | grep sda5 | grep -oh "[0-9]*%")
}
wifi ()
{
name=$(connmanctl services | grep "*AO" | grep -oh "^*AO [A-Za-z]*" | grep -oh "[[:space:]][A-Za-x]*")
if [ $name != " " ];
then
echo 直 $name
else
echo 睊 off
fi fi
}
layout ()
{
echo  $(xkblayout-state print %s)
}
echo "---------{$(wifi)}--{$(battery)}--{$(volume)}--{$(layout)}--{$(diskspace)}---------"