aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2016-11-23 21:36:19 +0100
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2016-11-23 21:36:37 +0100
commit1746ea2749f651da0423bfe637cddf0c22df831a (patch)
treeebe016acf5b1e641878efac41a750255071bdab3
parent1c99670e651c642ae2b5a15c464ce7810653e18c (diff)
downloaddotfiles-1746ea2749f651da0423bfe637cddf0c22df831a.tar.gz
dotfiles-1746ea2749f651da0423bfe637cddf0c22df831a.tar.bz2
dotfiles-1746ea2749f651da0423bfe637cddf0c22df831a.zip
Updated dotfiles
-rwxr-xr-xbash/.bashrc6
-rw-r--r--vim/.vim/.netrwhist3
-rw-r--r--vim/.vim/vimrc9
-rw-r--r--xorg/.local/share/systemd/user/xbacklightmon.service8
-rwxr-xr-xxorg/.local/usr/bin/xbacklightmon17
5 files changed, 40 insertions, 3 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index d9f3a6c..c86b8cb 100755
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -44,7 +44,7 @@ man() {
44 44
45# Helpfull functions 45# Helpfull functions
46exists() { 46exists() {
47 hash $@ 2> /dev/null 47 type $@ &> /dev/null
48} 48}
49 49
50is_function() { 50is_function() {
@@ -157,6 +157,10 @@ if exists gnome-keyring-daemon; then
157 fi 157 fi
158fi 158fi
159 159
160if exists sensible.bash; then
161 source sensible.bash
162fi
163
160# Fancy bash prompt 164# Fancy bash prompt
161if exists liquidprompt; then 165if exists liquidprompt; then
162 source $(which liquidprompt) 2> /dev/null 166 source $(which liquidprompt) 2> /dev/null
diff --git a/vim/.vim/.netrwhist b/vim/.vim/.netrwhist
index 0f58e40..7771a52 100644
--- a/vim/.vim/.netrwhist
+++ b/vim/.vim/.netrwhist
@@ -1,3 +1,2 @@
1let g:netrw_dirhistmax =10 1let g:netrw_dirhistmax =10
2let g:netrw_dirhist_cnt =1 2let g:netrw_dirhist_cnt =0
3let g:netrw_dirhist_1='/home/tom/programming/aquatracker/site'
diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc
index 3c83b4d..1a5a659 100644
--- a/vim/.vim/vimrc
+++ b/vim/.vim/vimrc
@@ -94,6 +94,15 @@ if exists("g:loaded_pathogen")
94 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif 94 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
95 autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif 95 autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
96 96
97 " NERDCommenter:
98 " Pretty comments
99 let g:NERDSpaceDelims = 1
100 let g:NERDCompactSexyComs = 1
101 let g:NERDDefaultAlign = 'left'
102 let g:NERDCommentEmptyLines = 1
103 let g:NERDTrimTrailingWhitespace = 1
104
105
97 " Airline: 106 " Airline:
98 " On arch linux install the following: 107 " On arch linux install the following:
99 " otf-powerline-symbols-git 108 " otf-powerline-symbols-git
diff --git a/xorg/.local/share/systemd/user/xbacklightmon.service b/xorg/.local/share/systemd/user/xbacklightmon.service
new file mode 100644
index 0000000..c603974
--- /dev/null
+++ b/xorg/.local/share/systemd/user/xbacklightmon.service
@@ -0,0 +1,8 @@
1[Unit]
2Description=Watches /sys/class/backlight/brightness and applies it to xorg-backlight
3After=graphical.target
4Wants=graphical.target
5
6[Service]
7Type=simple
8ExecStart=/home/tom/.local/usr/bin/xbacklightmon
diff --git a/xorg/.local/usr/bin/xbacklightmon b/xorg/.local/usr/bin/xbacklightmon
new file mode 100755
index 0000000..39f6b48
--- /dev/null
+++ b/xorg/.local/usr/bin/xbacklightmon
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3path=/sys/class/backlight/acpi_video0
4
5luminance() {
6 read -r level < "$path"/actual_brightness
7 factor=$((max / 100))
8 printf '%d\n' "$((level / factor))"
9}
10
11read -r max < "$path"/max_brightness
12
13xbacklight -set "$(luminance)"
14
15inotifywait -me modify --format '' "$path"/actual_brightness | while read; do
16 xbacklight -set "$(luminance)"
17done