From 2813a43bda44a4ade58a6b95f4d16935a96b0f66 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sat, 4 Apr 2020 19:04:28 +0530 Subject: less bloat --- bin/.local/bin/bat_check.sh | 13 +++++++++++++ bin/.local/bin/shut | 8 ++++---- bspwm/.config/bspwm/bspwmrc | 4 ++-- compton/.config/compton.conf | 2 +- sxhkd/.config/sxhkd/sxhkdrc | 4 ++-- x/.Xresources | 10 +++++----- 6 files changed, 27 insertions(+), 14 deletions(-) create mode 100755 bin/.local/bin/bat_check.sh diff --git a/bin/.local/bin/bat_check.sh b/bin/.local/bin/bat_check.sh new file mode 100755 index 0000000..b54ce7b --- /dev/null +++ b/bin/.local/bin/bat_check.sh @@ -0,0 +1,13 @@ +#!/bin/bash +while true +do + battery_level=$(cat /sys/class/power_supply/BAT0/capacity) + if [ $battery_level -ge 95 ]; then + notify-send 'Pull the plug!' $battery_level% + elif [ $battery_level -le 30 -a $battery_level -ge 20 ]; then + notify-send 'Plug me!' $battery_level% + elif [ $battery_level -le 20 ]; then + notify-send -u critical 'Plug me NOW!' $battery_level% + fi + sleep 300 # 300 seconds or 5 minutes +done diff --git a/bin/.local/bin/shut b/bin/.local/bin/shut index 88711d1..527dfb1 100755 --- a/bin/.local/bin/shut +++ b/bin/.local/bin/shut @@ -3,9 +3,9 @@ RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara") case $RET in - shutdown) doas poweroff ;; - reboot) doas reboot ;; - sleep) /home/fd0e/.local/bin/lock & doas sh -c "echo -n mem > /sys/power/state" ;; - lock) /home/fd0e/.local/bin/lock ;; + shutdown) sudo poweroff ;; + reboot) sudo reboot ;; + sleep) /home/fd0e/.local/bin/lock & sudo sh -c "echo -n mem > /sys/power/state" ;; + lock) /home/fd0e/.local/bin/lock ;; *) ;; esac diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index a586ed2..00c97d1 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -4,7 +4,7 @@ sxhkd & dunst & unclutter & compton &> /dev/null & -~/scrypts/bat_check.sh & +~/.local/bin/bat_check.sh & redshift -l 13.082680:80.270718 & ~/.fehbg & urxvtd & @@ -18,7 +18,7 @@ bspc config split_ratio 0.52 bspc config borderless_monocle true bspc config gapless_monocle true -bspc rule -a Nightly desktop='^2' +bspc rule -a firefox desktop='^2' bspc rule -a Spacefm desktop='^4' $HOME/.config/polybar/launch.sh & diff --git a/compton/.config/compton.conf b/compton/.config/compton.conf index cc0e8fa..09e44e6 100644 --- a/compton/.config/compton.conf +++ b/compton/.config/compton.conf @@ -15,7 +15,7 @@ shadow-exclude = [ "name = 'Polybar tray window'", "class_g ?= 'Rofi'", "class_g ?= 'dwm'", - "class_g = 'Firefox' && argb", + "class_g = 'firefox' && argb", "_GTK_FRAME_EXTENTS@:c" ]; diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index a2739c9..0e75a4d 100644 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -162,6 +162,6 @@ XF86Audio{Play,Next,Prev} #light XF86MonBrightnessDown - doas sh -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; done' + sudo sh -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; done' XF86MonBrightnessUp - doas sh -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; done' + sudo sh -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; done' diff --git a/x/.Xresources b/x/.Xresources index aefcb91..ae32493 100644 --- a/x/.Xresources +++ b/x/.Xresources @@ -13,10 +13,10 @@ URxvt.scrollTtyOutput: false URxvt.scrollWithBuffer: true URxvt.scrollTtyKeypress: true -URxvt.font: xft:Hermit:pixelsize=12:style=medium:antialias=true:hinting=true:hintstyle=hintfull -URxvt.boldFont: xft:Hermit:pixelsize=12:style=bold:autohint=true:antialias=true -URxvt.italicFont: xft:Hermit:pixelsize=12:style=italic:autohint=true:antialias=true -URxvt.letterSpace: 1 +URxvt.font: xft:Hermit:pixelsize=12:style=medium:antialias=true +URxvt.boldFont: xft:Hermit:pixelsize=12:style=bold:antialias=true +URxvt.italicFont: xft:Hermit:pixelsize=12:style=italic:antialias=true +!URxvt.letterSpace: 1 urxvt*termName: rxvt urxvt*scrollBar: false urxvt*matcher.button: 1 @@ -73,7 +73,7 @@ URxvt*inheritPixmap: False *.color15: #d2d4de ! Perls -URxvt.perl-ext-common : default,matcher,keyboard-select,url-select,resize-font +URxvt.perl-ext-common : default,matcher,keyboard-select,resize-font URxvt.resize-font.step: 1 URxvt.keysym.M-Escape : perl:keyboard-select:activate URxvt.keysym.M-u : perl:url-select:select_next -- cgit v1.2.3