mirror of https://github.com/ericonr/dotfiles.git
Add battery hearts to tmux, enable gaps for everything.
This commit is contained in:
parent
0ec82ee43b
commit
b05f7ddab2
|
@ -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
|
|
@ -1,6 +1,7 @@
|
||||||
new-session -A -s standard
|
new-session -A -s standard
|
||||||
kill-session -tstandard -a
|
kill-session -tstandard -a
|
||||||
|
|
||||||
|
# windows
|
||||||
new-window -tstandard -n text-editor emacsclient -c -nw
|
new-window -tstandard -n text-editor emacsclient -c -nw
|
||||||
split-window -h -p 35 -P
|
split-window -h -p 35 -P
|
||||||
split-window -v -P
|
split-window -v -P
|
||||||
|
@ -15,6 +16,7 @@ split-window -v
|
||||||
|
|
||||||
select-pane -tstandard:multishell.0
|
select-pane -tstandard:multishell.0
|
||||||
|
|
||||||
|
# bindings
|
||||||
unbind-key C-b
|
unbind-key C-b
|
||||||
set -g prefix "C-a"
|
set -g prefix "C-a"
|
||||||
bind-key C-a send-prefix
|
bind-key C-a send-prefix
|
||||||
|
@ -27,4 +29,21 @@ bind-key j select-pane -D
|
||||||
bind-key k select-pane -U
|
bind-key k select-pane -U
|
||||||
bind-key l select-pane -R
|
bind-key l select-pane -R
|
||||||
|
|
||||||
|
bind r source-file ~/.tmux.conf
|
||||||
|
|
||||||
set -sg escape-time 0
|
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] "
|
||||||
|
|
|
@ -30,7 +30,7 @@ font pango:monospace 8
|
||||||
for_window [class=".*"] border pixel 0
|
for_window [class=".*"] border pixel 0
|
||||||
gaps outer 2
|
gaps outer 2
|
||||||
gaps inner 4
|
gaps inner 4
|
||||||
smart_gaps on
|
#smart_gaps on
|
||||||
|
|
||||||
# init environment
|
# init environment
|
||||||
exec i3_init
|
exec i3_init
|
||||||
|
|
Loading…
Reference in New Issue