1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-25 17:41:32 +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
# by DPI and the specified value is always added at both opposing sides.
#padding:
# x: 0
# y: 0
padding:
x: 20
y: 20
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
@ -57,7 +57,7 @@
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background, but no title bar buttons
#decorations: full
decorations: full
# Startup Mode (changes require restart)
#
@ -201,9 +201,9 @@ colors:
#
# Allowed values are CellForeground and CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
# Selection colors
#

View file

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

View file

@ -1,19 +1,72 @@
#!/bin/bash
acpi | grep -oh "[[:digit:]]*%"
vol=$(awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) | head -1| grep -oh "[0-9]*")
RED='\033[0;31m'
battery ()
{
val=$(acpi | grep -oh "[[:digit:]]*%" | grep -oh "[0-9]*")
if [ $vol -ge 100 ]
then
echo 墳$vol
elif [ $vol -ge 50 ]
then
echo 奔$vol
elif [ $vol -ge 1 ]
then
echo 奄$vol
else
case $val in
100)
echo " $val"
;;
[5-9][0-9])
echo " $val"
;;
[1-4][0-9])
echo " $val"
;;
[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 婢
fi
;;
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
}
layout ()
{
echo  $(xkblayout-state print %s)
}
echo "---------{$(wifi)}--{$(battery)}--{$(volume)}--{$(layout)}--{$(diskspace)}---------"