From 5dbad776a94500ac29b0135a6921c7cd81506caf Mon Sep 17 00:00:00 2001 From: Joachim Nielandt Date: Tue, 8 Mar 2022 15:51:52 +0100 Subject: [PATCH] Forgot what I did, but it surely needs committing! --- dot_Xresources.tmpl | 2 +- dot_dotfiles/i3/config | 11 ++++++----- dot_dotfiles/oh-my-zsh/custom/09_alias.zsh | 2 ++ dot_dotfiles/polybar/config.tmpl | 8 ++++---- scripts/executable_battery_notification.sh | 13 +++++++++++++ 5 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 scripts/executable_battery_notification.sh diff --git a/dot_Xresources.tmpl b/dot_Xresources.tmpl index 6144624..cc47f5e 100644 --- a/dot_Xresources.tmpl +++ b/dot_Xresources.tmpl @@ -35,7 +35,7 @@ URxvt.boldfont: xft:Fura Code Nerd Font Mono:bold:size=8 {{- end }} ! Give us a nice cursor then -Xcursor.theme: Breeze +Xcursor.theme: Breeze_Obsidian Xcursor.size: 16 ! ----------------------------------------------------------------------------- diff --git a/dot_dotfiles/i3/config b/dot_dotfiles/i3/config index 4091e90..2d76db8 100644 --- a/dot_dotfiles/i3/config +++ b/dot_dotfiles/i3/config @@ -59,8 +59,10 @@ assign [class="Wfica_Seamless"] $ws10 #exec --no-startup-id "i3-msg 'workspace 9:9; append_layout /home/joachim/.config/i3/workspace-9.json'" # i3-gaps -gaps inner 10 -gaps outer 5 +# 10 +gaps inner 0 +# 5 +gaps outer 0 # Disallow endless looping of focus: extreme right is extreme right, don't flip to extreme left whenever you want... focus_wrapping no @@ -449,10 +451,9 @@ exec --no-startup-id greenclip daemon>/dev/null # GAPS i3-gaps specific things... # smart gaps: only one window? no gaps! -# smart_gaps on +smart_gaps on # this removes borders when there's no gaps, nice! -# smart_borders on|no_gaps -smart_borders no_gaps +#smart_borders no_gaps # gruvbox colors set $dark0_hard #1d2021 diff --git a/dot_dotfiles/oh-my-zsh/custom/09_alias.zsh b/dot_dotfiles/oh-my-zsh/custom/09_alias.zsh index 75b98bd..5f1846a 100644 --- a/dot_dotfiles/oh-my-zsh/custom/09_alias.zsh +++ b/dot_dotfiles/oh-my-zsh/custom/09_alias.zsh @@ -22,3 +22,5 @@ alias dddu="docker-compose down && docker-compose up -d" # yank the last command from history into the clipboard alias yk="cat ~/.zsh_history | tail -n 2 | head -n 1 | cut -d ';' -f 2- | xclip -selection clipboard" + + diff --git a/dot_dotfiles/polybar/config.tmpl b/dot_dotfiles/polybar/config.tmpl index d2a4bd9..9c0c879 100644 --- a/dot_dotfiles/polybar/config.tmpl +++ b/dot_dotfiles/polybar/config.tmpl @@ -72,9 +72,9 @@ background = ${colors.bar-background} foreground = ${colors.light0_hard} ;border-color = ${colors.bright_blue} border-color = #00FFFFFF -border-left-size = 15 -border-right-size = 15 -border-top-size = 5 +border-left-size = 0 +border-right-size = 0 +border-top-size = 0 ; spaces on begin/end of bar padding-left = 5 padding-right = 5 @@ -115,7 +115,7 @@ tray-maxsize = 16 ;tray-background = ${colors.background-alt} ;this makes sure that the tray doesn't run off to the right of the monitor - only enable this when the bar's width is a bit off tray-offset-x = 0 -tray-offset-y = 32 +tray-offset-y = 27 tray-padding = 2 tray-scale = 1.0 padding-left = 2 diff --git a/scripts/executable_battery_notification.sh b/scripts/executable_battery_notification.sh new file mode 100644 index 0000000..c422050 --- /dev/null +++ b/scripts/executable_battery_notification.sh @@ -0,0 +1,13 @@ +#!/usr/bin/bash +export DISPLAY=:0 +CAPACITY=$(cat /sys/class/power_supply/BAT0/capacity) + +if [[ $CAPACITY -lt 20 ]] +then + MSG="Battery low: $CAPACITY%"; +else + MSG="Battery high: $CAPACITY%"; +fi + +/usr/bin/notify-send "$MSG" +