aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-10 22:54:26 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-10 22:54:26 +0200
commit7b0c15c647b82baa8f2ed55d2abbc6869172afc9 (patch)
tree442390c799e15dfb50131c00e0366f8f31b2582c
parent7e1ae8bf92d08665a647422071e6d92a4aca3456 (diff)
downloaddotfiles-7b0c15c647b82baa8f2ed55d2abbc6869172afc9.tar.gz
dotfiles-7b0c15c647b82baa8f2ed55d2abbc6869172afc9.tar.bz2
dotfiles-7b0c15c647b82baa8f2ed55d2abbc6869172afc9.zip
Fixing backlight-ctl to be compatible with both machines
-rw-r--r--.pluggins.vim1
-rwxr-xr-xbin/backlight-ctl18
2 files changed, 16 insertions, 3 deletions
diff --git a/.pluggins.vim b/.pluggins.vim
index b49b906..ff0d158 100644
--- a/.pluggins.vim
+++ b/.pluggins.vim
@@ -11,6 +11,7 @@ call plug#begin()
Plug 'romainl/vim-cool' " disable highlight after search
Plug 'tpope/vim-fugitive' " git wrapper
Plug 'junegunn/vim-easy-align' " align
+ " Plug 'easymotion/vim-easymotion' " TODO very intresting
" markdown preview in browser
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
diff --git a/bin/backlight-ctl b/bin/backlight-ctl
index 7153276..2963d83 100755
--- a/bin/backlight-ctl
+++ b/bin/backlight-ctl
@@ -2,10 +2,22 @@
[ "$#" -ne 1 ] && exit 1;
+
+if [ "$(hostname)" = manjaro ]
+then
+ cmd=light
+ up_opt=-A
+ down_opt=-U
+else
+ cmd=xbacklight
+ up_opt=-inc
+ down_opt=-dec
+fi
+
case "$1" in
- "up") xbacklight -inc 5 ;;
- "down") xbacklight -dec 5 ;;
+ "up") "$cmd" "$up_opt" 5 ;;
+ "down") "$cmd" "$down_opt" 5 ;;
*) exit 1 ;;
esac
-notify-send "backlight $(xbacklight | cut -d '.' -f 1)"
+notify-send "backlight $("$cmd" | cut -d '.' -f 1)"