aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2018-11-11 14:01:55 -0800
committerJakob Odersky <jakob@odersky.com>2018-11-11 14:01:55 -0800
commit475362d7625306facdbaec36f8143464c8734d74 (patch)
tree432e0e4e6b80819c4374b014aaeedff81cd69191
parent1edb20b22651718f9a1a82ec0284bd0e396679a6 (diff)
downloaddotfiles-475362d7625306facdbaec36f8143464c8734d74.tar.gz
dotfiles-475362d7625306facdbaec36f8143464c8734d74.tar.bz2
dotfiles-475362d7625306facdbaec36f8143464c8734d74.zip
Update i3 config
-rw-r--r--home/.bash_aliases1
-rw-r--r--home/.config/i3/config6
-rw-r--r--home/.config/i3/i3blocks.conf3
-rwxr-xr-xhome/.config/i3/status/battery13
-rwxr-xr-xhome/.config/i3/status/brightness4
-rwxr-xr-xhome/.config/i3/status/pwr11
6 files changed, 19 insertions, 19 deletions
diff --git a/home/.bash_aliases b/home/.bash_aliases
index 96d7b98..fe75d4a 100644
--- a/home/.bash_aliases
+++ b/home/.bash_aliases
@@ -8,3 +8,4 @@ alias i="idea . &"
alias explore="tree -P *.scala --prune -I target"
alias drv="cd ~/src/driver"
alias zulu="date --utc +%Y-%m-%dT%H:%M:%S.%3NZ"
+alias scu="systemctl --user"
diff --git a/home/.config/i3/config b/home/.config/i3/config
index b2c08b5..71a91ee 100644
--- a/home/.config/i3/config
+++ b/home/.config/i3/config
@@ -243,9 +243,9 @@ bindsym $mod+r mode "resize"
bindsym $mod+Enter exec $term
bindsym $mod+y exec ~/bin/passmenu --type, mode "default"
bindsym $mod+u exec emacsclient --alternate-editor='' --create-frame --no-wait , mode "default"
- bindsym $mod+i exec google-chrome
+ bindsym $mod+i exec firefox
bindsym $mod+p exec --no-startup-id ~/bin/open-project
- bindsym $mod+Shift+i exec google-chrome --incognito
+ bindsym $mod+Shift+i exec firefox --private-window
#
# Quick launch menu
#
@@ -293,7 +293,7 @@ bindsym $mod+r mode "resize"
# utility applications
# disable audible bell
-exec set -b
+exec xset -b
# enable tap to click on touchpad
exec_always --no-startup-id xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1
# increase pointer acceleration on touchpad
diff --git a/home/.config/i3/i3blocks.conf b/home/.config/i3/i3blocks.conf
index ca7e38e..7a14ac7 100644
--- a/home/.config/i3/i3blocks.conf
+++ b/home/.config/i3/i3blocks.conf
@@ -62,7 +62,7 @@ command=~/.config/i3/status/brightness
[backup]
label=
command=~/.config/i3/status/backup
-interval=10
+interval=30
[disk]
label=
@@ -90,6 +90,7 @@ label=BAT1
interval=30
separator=false
[pwr]
+label=
command=~/.config/i3/status/pwr
interval=30
diff --git a/home/.config/i3/status/battery b/home/.config/i3/status/battery
index 03bc740..d97fcb5 100755
--- a/home/.config/i3/status/battery
+++ b/home/.config/i3/status/battery
@@ -4,19 +4,24 @@ set -e
device="/sys/class/power_supply/BAT${BLOCK_INSTANCE:-0}"
status=$(cat "$device/status")
percent=$(cat "$device/capacity")
+energy=$(cat "$device/energy_now")
status_text=""
if [[ $status = "Discharging" ]]; then
- status_text=" (DIS)"
+ status_text=""
elif [[ $status = "Charging" ]]; then
- status_text=" (CHR)"
+ status_text=" "
fi
-echo "${percent}%${status_text}"
+printf '%i%% (%0.1fWh)%s\n' \
+ "$(( percent ))" \
+ "$(( energy ))e-6" \
+ "$status_text"
+
echo "${percent}%${status_text}"
# consider color and urgent flag only on discharge
-if [[ $status="Discharging" ]]; then
+if [[ $status = "Discharging" ]]; then
if [[ $percent -le 15 ]]; then
echo "#FF0000";
fi
diff --git a/home/.config/i3/status/brightness b/home/.config/i3/status/brightness
index 8e4bf06..1c887ad 100755
--- a/home/.config/i3/status/brightness
+++ b/home/.config/i3/status/brightness
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
device="/sys/class/$BLOCK_INSTANCE"
brightness=$(cat "$device/brightness")
max_brightness=$(cat "$device/max_brightness")
-percent=$(( $brightness*100/$max_brightness ))
+percent=$(( brightness*100/max_brightness ))
echo "$percent%"
diff --git a/home/.config/i3/status/pwr b/home/.config/i3/status/pwr
index 1744a78..9363c20 100755
--- a/home/.config/i3/status/pwr
+++ b/home/.config/i3/status/pwr
@@ -4,14 +4,7 @@ power0=$(cat "/sys/class/power_supply/BAT0/power_now")
power1=$(cat "/sys/class/power_supply/BAT1/power_now")
power=$(( power0 + power1 ))
-energy0=$(cat "/sys/class/power_supply/BAT0/energy_now")
-energy1=$(cat "/sys/class/power_supply/BAT1/energy_now")
-energy=$(( energy0 + energy1 ))
-
-# [W@Wh]
-printf '%0.1f @ %0.1f\n' "$(( power ))e-6" "$(( energy ))e-6"
-
-# [mW@mWh]
-printf '%0.0fmW @ %0.0fmWh\n' "$(( power ))e-3" "$(( energy ))e-3"
+printf '%0.1fW\n' "$(( power ))e-6"
+printf '%0.1fW\n' "$(( power ))e-6"
exit 0