no border for termite

This commit is contained in:
2019-01-15 21:56:16 +01:00
parent 6b730ce230
commit 4d731c3564
6 changed files with 132 additions and 3 deletions

View File

@@ -205,6 +205,7 @@ bindsym $mod+r mode "resize"
# Set the shortcuts and what they do
for_window [class="Yad"] floating enable
for_window [class="Termite"] border pixel 1
set $mode_display ext1->int->tv (3), ext1->int (2), External (x), Internal (i)
mode "$mode_display" {
@@ -267,6 +268,7 @@ exec i3-msg workspace $ws1
# Start default applications
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec_always --no-startup-id $HOME/Pictures/Wallpapers/Annapurna.jpg
exec_always --no-startup-id numlockx on
exec_always --no-startup-id sudo tlp start
exec --no-startup-id greenclip daemon

View File

@@ -0,0 +1 @@
7545

View File

@@ -0,0 +1,99 @@
#!/bin/sh
battery_print() {
path_ac="/sys/class/power_supply/AC"
path_battery_0="/sys/class/power_supply/BAT0"
path_battery_1="/sys/class/power_supply/BAT1"
ac=0
battery_level_0=0
battery_level_1=0
battery_max_0=0
battery_max_1=0
if [ -f "$path_ac/online" ]; then
ac=$(cat "$path_ac/online")
fi
if [ -f "$path_battery_0/energy_now" ]; then
battery_level_0=$(cat "$path_battery_0/energy_now")
fi
if [ -f "$path_battery_0/energy_full" ]; then
battery_max_0=$(cat "$path_battery_0/energy_full")
fi
if [ -f "$path_battery_1/energy_now" ]; then
battery_level_1=$(cat "$path_battery_1/energy_now")
fi
if [ -f "$path_battery_1/energy_full" ]; then
battery_max_1=$(cat "$path_battery_1/energy_full")
fi
battery_level=$(("$battery_level_0 + $battery_level_1"))
battery_max=$(("$battery_max_0 + $battery_max_1"))
battery_percent=$(("$battery_level * 100"))
battery_percent=$(("$battery_percent / $battery_max"))
if [ "$ac" -eq 1 ]; then
icon=""
if [ "$battery_percent" -gt 97 ]; then
echo "$icon"
else
if [ "$battery_percent" -gt 85 ]; then
load=""
elif [ "$battery_percent" -gt 60 ]; then
load=""
elif [ "$battery_percent" -gt 35 ]; then
load=""
elif [ "$battery_percent" -gt 10 ]; then
load=""
else
load=""
fi
echo "$icon $load $battery_percent%"
fi
else
if [ "$battery_percent" -gt 85 ]; then
icon=""
elif [ "$battery_percent" -gt 60 ]; then
icon=""
elif [ "$battery_percent" -gt 35 ]; then
icon=""
elif [ "$battery_percent" -gt 10 ]; then
icon=""
else
icon=""
fi
echo "$icon $battery_percent%"
fi
}
path_pid="$HOME/.config/polybar/battery-combined-udev.pid"
case "$1" in
--update)
pid=$(cat $path_pid)
if [ "$pid" != "" ]; then
kill -10 "$pid"
fi
;;
*)
echo $$ > $path_pid
trap exit INT
trap "echo" USR1
while true; do
battery_print
sleep 30 &
wait
done
;;
esac

View File

@@ -49,9 +49,6 @@ modules-right = cpu system-cpu-temppercore memory
tray-position = left
tray-padding = 2
tray-transparent = true
tray-background = #0063ff
;tray-detached = false
[module/pulseaudio]
type = internal/pulseaudio

View File

@@ -0,0 +1,27 @@
#!/bin/sh
YAD_WIDTH=200
YAD_HEIGHT=200
BOTTOM=false
DATE="$(date +"%a %d.%m.%y")$(date +"%H:%M")"
case "$1" in
--popup)
eval "$(xdotool getmouselocation --shell)"
if [ $BOTTOM = true ]; then
: $(( pos_y = Y - YAD_HEIGHT - 20 ))
: $(( pos_x = X - (YAD_WIDTH / 2) ))
else
: $(( pos_y = Y + 20 ))
: $(( pos_x = X - (YAD_WIDTH / 2) ))
fi
yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \
--width=$YAD_WIDTH --height=$YAD_HEIGHT --posx=$pos_x --posy=$pos_y \
> /dev/null
;;
*)
echo "$DATE"
;;
esac

View File

@@ -0,0 +1,3 @@
#!/bin/sh
sensors | grep Core | awk '{print substr($3, 2, length($3)-5)}' | tr "\\n" " " | sed 's/ /°C /g' | sed 's/ $//'