diff --git a/script/.local/bin/battmux b/script/.local/bin/battmux new file mode 100755 index 0000000..3efa786 --- /dev/null +++ b/script/.local/bin/battmux @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# from https://github.com/NerdyPepper/dotfiles + +red="\e[31m" +grn="\e[32m" +ylw="\e[33m" +cyn="\e[36m" +blu="\e[34m" +prp="\e[35m" +bprp="\e[35;1m" +rst="\e[0m" + +icon="$( ~/scripts/get_xres color2 )" +fg="$( ~/scripts/get_xres color7 )" + +bat_status="" +bat_status=$( cat /sys/class/power_supply/BAT1/capacity ) +charging_status=$( cat /sys/class/power_supply/BAT1/status ) + +health() { + for i in {0..4} + do + if [[ $i -le $(( $bat_status/20 )) ]]; then + echo -ne "#[fg=colour1]♥ " + else + echo -ne "#[fg=colour8]♥ " + fi + done + echo +} + +while getopts qi options +do + case $options in + i) + echo "$bat_status $charging_status" + ;; + q) + if [[ "$charging_status" = *Charging* ]]; then + echo -ne "+ $(health)" + else + health + fi + esac +done diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index faecfeb..a0f59ab 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,6 +1,7 @@ new-session -A -s standard kill-session -tstandard -a +# windows new-window -tstandard -n text-editor emacsclient -c -nw split-window -h -p 35 -P split-window -v -P @@ -15,6 +16,7 @@ split-window -v select-pane -tstandard:multishell.0 +# bindings unbind-key C-b set -g prefix "C-a" bind-key C-a send-prefix @@ -27,4 +29,21 @@ bind-key j select-pane -D bind-key k select-pane -U bind-key l select-pane -R +bind r source-file ~/.tmux.conf + set -sg escape-time 0 +set -g mouse on + +# appearance +set -g status-justify right +set -g status-style "bg=colour0" +set -ag status-style "fg=colour7" + +# ░ ▒ ▓ █ +set -g window-status-current-format "#[fg=colour15, italics] #W " +set -g window-status-format "#[fg=colour8, italics] #W " + +set -g status-left-length 100 +set -g status-left "#[fg=colour15]#(date +"%H:%M") #[fg=colour8]hrs " +set -ag status-left "#[fg=colour15]#(date +"%d/%m")#[fg=colour8] #(date +"%Y") " +set -ag status-left "#[fg=colour7]#(battmux -q)#[fg=colour12] " diff --git a/wm/.config/i3/config b/wm/.config/i3/config index 346cd34..ce75736 100644 --- a/wm/.config/i3/config +++ b/wm/.config/i3/config @@ -30,7 +30,7 @@ font pango:monospace 8 for_window [class=".*"] border pixel 0 gaps outer 2 gaps inner 4 -smart_gaps on +#smart_gaps on # init environment exec i3_init