aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2017-04-01 11:48:39 -0700
committerJakob Odersky <jakob@odersky.com>2017-04-01 11:48:39 -0700
commitb391f1ba7347501707cf7056cba95a8b56b19055 (patch)
treec81eb4a305e0476b7bfe53c1fc2b6be7f043c332
parentcbfdbe795021a02a955aee741cec736293e4ac02 (diff)
downloaddotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.tar.gz
dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.tar.bz2
dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.zip
some style tweaks
-rw-r--r--home/.config/i3/config10
-rw-r--r--home/.config/i3/i3blocks.conf33
-rwxr-xr-xhome/.config/i3/status/brightness10
-rwxr-xr-xhome/.config/i3/status/repo_status7
4 files changed, 35 insertions, 25 deletions
diff --git a/home/.config/i3/config b/home/.config/i3/config
index faf95d0..6b05d00 100644
--- a/home/.config/i3/config
+++ b/home/.config/i3/config
@@ -183,6 +183,16 @@ exec --no-startup-id redshift
for_window [class="Spotify"] move to workspace $workspace10
exec --no-startup-id spotify
+assign [instance="gitter.im"] $workspace8
+assign [instance="slack"] $workspace8
+exec --no-startup-id chromium --app=https://gitter.im
+exec --no-startup-id slack
+
+assign [instance="mail.google.com"] $workspace9
+assign [instance="mail.notes.na.collabserv.com"] $workspace9
+exec --no-startup-id chromium --app=https://mail.google.com
+exec --no-startup-id chromium --app=https://mail.notes.na.collabserv.com
+
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Ubuntu, FontAwesome 11
diff --git a/home/.config/i3/i3blocks.conf b/home/.config/i3/i3blocks.conf
index 7ae3f37..be11f4f 100644
--- a/home/.config/i3/i3blocks.conf
+++ b/home/.config/i3/i3blocks.conf
@@ -25,7 +25,7 @@
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
command=/usr/share/i3blocks/$BLOCK_NAME
-separator_block_width=15
+separator_block_width=30
markup=none
# Volume indicator
@@ -39,7 +39,6 @@ instance=Master
interval=2
signal=10
separator=false
-
[spotify]
command=~/.config/i3/status/spotify
interval=2
@@ -49,52 +48,36 @@ signal=10
label=
interval=2
signal=10
-command=cat /sys/class/backlight/intel_backlight/brightness
+instance=backlight/intel_backlight
+command=~/.config/i3/status/brightness
separator=false
-
[brightness]
label=
interval=2
signal=10
-command=cat /sys/class/leds/smc\:\:kbd_backlight/brightness
+instance=leds/smc::kbd_backlight
+command=~/.config/i3/status/brightness
-# Disk usage
-#
-# The directory defaults to $HOME if the instance is not specified.
-# The script may be called with a optional argument to set the alert
-# (defaults to 10 for 10%).
[disk]
label=
-#instance=/mnt/data
separator=false
interval=30
-
-# Memory usage
-#
-# The type defaults to "mem" if the instance is not specified.
[memory]
label=
separator=false
interval=10
-
[load]
command=~/.config/i3/status/load
label=
interval=10
-# Battery indicator
-#
-# The battery instance defaults to 0.
[battery]
-#label=BAT
label=⚡
-#instance=1
interval=30
-# Date Time
-#
[time]
-command=date '+%a, %e %B %H:%M'
+#command=date '+%a, %e %B %H:%M'
+command=date '+%Y-%m-%d %H:%M'
interval=5
# Generic media player support
@@ -110,7 +93,7 @@ interval=5
#
# Support multiple VPN, with colors.
#[openvpn]
-#interval=20
+#interval=10
# Temperature
#
diff --git a/home/.config/i3/status/brightness b/home/.config/i3/status/brightness
new file mode 100755
index 0000000..8e4bf06
--- /dev/null
+++ b/home/.config/i3/status/brightness
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+device="/sys/class/$BLOCK_INSTANCE"
+
+brightness=$(cat "$device/brightness")
+max_brightness=$(cat "$device/max_brightness")
+
+percent=$(( $brightness*100/$max_brightness ))
+
+echo "$percent%"
diff --git a/home/.config/i3/status/repo_status b/home/.config/i3/status/repo_status
new file mode 100755
index 0000000..16fce9e
--- /dev/null
+++ b/home/.config/i3/status/repo_status
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+find ~/src -name .git -type d -prune -printf "%h\n" | \
+ xargs -I "{}" sh -c 'echo $(git -C {} status --porcelain | wc -l) {}' | sort -n
+
+#find ~/src -name .git -type d -prune | \
+# xargs -I '{}' git -C '{}' ls-files -m -d