summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-18 16:52:36 -0400
committerDavid Robillard <d@drobilla.net>2015-10-18 16:52:36 -0400
commit9c82d0f03e169b2e97de536ad175d485b8640cc5 (patch)
tree63a5f0645a7ae99d80831a4143b3c8dcba343581
parente18e870865892d6b3c556bdde69a68b7c190941a (diff)
downloaddotfiles-9c82d0f03e169b2e97de536ad175d485b8640cc5.tar.gz
dotfiles-9c82d0f03e169b2e97de536ad175d485b8640cc5.tar.bz2
dotfiles-9c82d0f03e169b2e97de536ad175d485b8640cc5.zip
Add BSPWM configuration
-rwxr-xr-xbspwm/bspwmrc21
-rw-r--r--conkyrc125
-rwxr-xr-xdeploy.sh5
-rw-r--r--sxhkd/sxhkdrc133
4 files changed, 233 insertions, 51 deletions
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc
new file mode 100755
index 0000000..dad610d
--- /dev/null
+++ b/bspwm/bspwmrc
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+bspc config border_width 2
+bspc config window_gap 12
+
+bspc config split_ratio 0.50
+bspc config borderless_monocle true
+bspc config gapless_monocle true
+bspc config focus_by_distance true
+
+bspc config focused_border_color "#6F7372"
+bspc config top_padding 26
+bspc config focus_follows_pointer true
+
+bspc monitor -d 1 2 3 4 5 6 7 8 9
+
+xsetroot -solid "#222"
+sxhkd &
+conky &
+stalonetray -bg "#202020" --geometry "1x1+2570+6" --grow-gravity E &
+xdotool search --classname stalonetray windowraise
diff --git a/conkyrc b/conkyrc
index 133dbf4..5414f11 100644
--- a/conkyrc
+++ b/conkyrc
@@ -1,54 +1,77 @@
conky.config = {
- alignment = 'top_left',
- background = false,
- border_width = 1,
- cpu_avg_samples = 2,
- default_color = 'white',
- default_outline_color = 'white',
- default_shade_color = 'white',
- draw_borders = false,
- draw_graph_borders = true,
- draw_outline = false,
- draw_shades = false,
- use_xft = true,
- font = 'DejaVu Sans Mono:size=12',
- gap_x = 5,
- gap_y = 60,
- minimum_height = 5,
- minimum_width = 5,
- net_avg_samples = 2,
- no_buffers = true,
- extra_newline = false,
- own_window = true,
- own_window_class = 'Conky',
- own_window_type = 'desktop',
- stippled_borders = 0,
- update_interval = 1.0,
- uppercase = false,
- show_graph_scale = false,
- show_graph_range = false,
- out_to_x = false,
- out_to_console = true,
- out_to_stderr = false,
- pad_percents = 2,
- use_spacer = 'left',
- short_units = true,
- console_graph_ticks = ' ,▁,▂,▃,▄,▅,▆,▇,█',
- update_interval = 2
-}
+ -- conkyrc
+
+ alignment = 'top_left',
+ border_inner_margin = 1,
+ border_outer_margin = 0,
+ border_width = 0,
+
+ -- color of active workspace
+ color1 = '#4E9A40',
+
+ -- inactive workspaces and divider color
+ color2 = '#808080',
+
+ -- workspaces which have windows but aren't focused
+ color3 = '#808020',
+
+ -- urgency hinting color
+ color4 = '#f9d72d',
+
+ -- color of temps and percentages
+ color5 = '#8F8F00',
+
+ -- Graph outlines
+ color6 = '#3F3B3B',
+
+ default_color = '#3F3B3B',
+ double_buffer = false,
+ draw_borders = true,
+ draw_graph_borders = true,
+ draw_shades = false,
+ gap_x = 13,
+ gap_y = 6,
+
+ -- adjust to the width of your screen
+ maximum_width = 2854,
+ minimum_width = 2854,
+ minimum_height = 0,
+
+ own_window = true,
+ own_window_argb_visual = false,
+
+ -- bar background color
+ own_window_colour = '#202020',
+
+ own_window_type = 'panel',
+ own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
+ pad_percents = 2,
+ update_interval = 1,
+ use_spacer = 'right',
+ use_xft = true,
+ --xftalpha = .2,
+
+ -- choose font and size
+ font = 'Monospace:size=8',
+
+};
conky.text = [[
-CPU ${acpitemp}° ${color darkgray}$cpu% [${cpugraph cpu0 8,8 CB4B16 CB4B16 -t -l}] │ \
-Mem ${color darkgray}$memperc% [${memgraph 8,8 596600 596600 -t -l}] │ \
-Drive ${fs_free} ${diskio_read /dev/sda}↓ [${diskiograph_read /dev/sda 8,8 663300 996633 -t -l}] \
-${diskio_write}↑ [${diskiograph_write /dev/sda 8,8 663300 996633 -t -l}] │ \
-${if_existing /sys/class/net/eth0/operstate up}\
-Eth ${addr eth0} ${downspeed eth0}↓ [${downspeedgraph eth0 8,8 CCCC00 FFFF00 -t -l}] \
-${upspeed eth0}↑ [${upspeedgraph eth0 8,8 CCCC00 FFFF00 -t -l}] │ \
-${else}\
-Wlan ${addr wlan0} [${downspeedgraph wlan0 8,8 AA7700 FFDD00 -t -l}] ${downspeed wlan0}↓ \
-[${upspeedgraph wlan0 8,8 AA7700 FFDD00 -t -l}] ${upspeed wlan0}↑ │ \
-${endif}\
-⚡${battery_percent}% │ \
-${time %F %R}\
-]]
+${execp bspc control --get-status | cut -d ":" -f 2 | xargs ~/bin/workspaces.sh}\
+\
+${color2}${alignc}CPU $color6${voffset 3}${cpugraph 20,34 859900 DC322F -t}${voffset -3}${offset 7}$color2\
+${execp echo $(cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon1/temp1_input) / 1000 | bc}°\
+\
+ Mem $color6${voffset 2}${memgraph 22,34 859900 DC322F -t}${voffset -2}${offset 7}$color2${memperc}%\
+\
+ Disk ↓${offset 2}${voffset 2}$color6${diskiograph_read /dev/sda 22,34 859900 DC322F -t}${offset 7}$color2${voffset -2}${diskio_read /dev/sda}\
+ ↑${offset 2}${voffset 2}$color6${diskiograph_write /dev/sda 22,34 859900 DC322F -t}${offset 7}$color2${voffset -2}${diskio_write /dev/sda}\
+ Net ↓${offset 2}${voffset 2}$color6${downspeedgraph wlan0 22,34 859900 DC322F -t}${voffset -2}${offset 7}$color2${downspeed wlan0}\
+ ↑${offset 2}${voffset 2}$color6${upspeedgraph wlan0 22,34 859900 DC322F -t}${voffset -2}${offset 8}$color2${upspeed wlan0}\
+\
+ ${execp if [ "$(cat /sys/bus/acpi/drivers/ac/ACPI0003\:00/power_supply/ADP1/online)" -eq "1" ]; then echo '+'; else echo '-'; fi}${battery_percent}%\
+\
+$alignr${time %a %Y-%m-%d %H:%M}\
+]];
+
+--#${execp udisks --show-info /dev/sda | grep temperature | sed 's/.* \([0-9]*\)C.*/\1/'}°\
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..3190e56
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+ln -is $(realpath bspwm) ~/.config/bspwm
+ln -is $(realpath sxhkd) ~/.config/sxhkd
+ln -is $(realpath conkyrc) ~/.config/conkyrc
diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc
new file mode 100644
index 0000000..70d8842
--- /dev/null
+++ b/sxhkd/sxhkdrc
@@ -0,0 +1,133 @@
+#
+# bspwm hotkeys
+#
+
+super + p
+ bspc config top_padding 26; \
+ xdotool search --classname Conky windowmap; \
+ xdotool search --classname stalonetray windowmap; \
+ xdotool search --classname stalonetray windowraise
+
+super + shift + p
+ xdotool search --classname stalonetray windowunmap; \
+ xdotool search --classname Conky windowunmap; \
+ bspc config top_padding 0
+
+super + alt + Escape
+ bspc quit
+
+super + w
+ bspc window -c
+
+super + t
+ bspc desktop -l next
+
+super + b
+ bspc desktop -B
+
+super + {s,f}
+ bspc window -t {floating,fullscreen}
+
+super + Tab
+ bspc window -f last
+
+super + Prior
+ bspc window -f prev
+
+super + Next
+ bspc window -f next
+
+super + apostrophe
+ bspc window -s last
+
+super + {o,i}
+ bspc control --record-history off; \
+ bspc window {older,newer} -f; \
+ bspc control --record-history on
+
+super + y
+ bspc window -w last.manual
+
+super + m
+ bspc window -s biggest
+
+super + {_,shift + }{Left,Down,Up,Right}
+ bspc window -{f,s} {left,down,up,right}
+
+super + {_,shift + }c
+ bspc window -f {next,prev}
+
+super + {comma,period}
+ bspc desktop -C {backward,forward}
+
+super + bracket{left,right}
+ bspc desktop -f {prev,next}
+
+super + ctrl + {Left,Down,Up,Right}
+ bspc window -p {left,down,up,right}
+
+super + ctrl + {_,shift + }space
+ bspc {window -p cancel,desktop -c}
+
+super + alt + {Left,Down,Up,Right}
+ bspc window -e {left -10,down +10,up -10,right +10}
+
+super + alt + shift + {Left,Down,Up,Right}
+ bspc window -e {right -10,up +10,down -10,left +10}
+
+super + ctrl + {1-9}
+ bspc window -r 0.{1-9}
+
+super + {_,shift + }{1-9,0}
+ bspc {desktop -f,window -d} ^{1-9,10}
+
+~button1
+ bspc pointer -g focus
+
+super + button{1-3}
+ bspc pointer -g {move,resize_side,resize_corner}
+
+super + !button{1-3}
+ bspc pointer -t %i %i
+
+super + @button{1-3}
+ bspc pointer -u
+
+#
+# wm independent hotkeys
+#
+
+super + Return
+ gnome-terminal
+
+super + space
+ dmenu_run
+
+# make sxhkd reload its configuration files:
+super + Escape
+ pkill -USR1 -x sxhkd
+
+#
+# multimedia keys
+#
+
+XF86MonBrightnessDown
+ xbacklight -dec 15
+
+XF86MonBrightnessUp
+ xbacklight -inc 15
+
+XF86KbdBrightnessDown
+ /home/drobilla/bin/kbdled.sh down
+
+XF86KbdBrightnessUp
+ /home/drobilla/bin/kbdled.sh up
+
+XF86AudioRaiseVolume
+ amixer sset Master 5%+
+
+XF86AudioLowerVolume
+ amixer sset Master 5%-
+
+XF86AudioMute
+ amixer set Master toggle