commit 20e494f8bdd668825fbe6deed7d2db769c53a341
parent c760810aea94e24d6418dbcd5a75d2ccf7a52a9f
Author: oscarbenedito <oscar@oscarbenedito.com>
Date: Sat, 25 Apr 2020 01:13:40 +0200
Added scripts and vim automated shortcuts
Diffstat:
4 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dot_config/nvim/init.vim b/dot_config/nvim/init.vim
@@ -142,3 +142,5 @@ nnoremap <Leader>texg :-1read $XDG_CONFIG_HOME/nvim/templates/tex.gitignore<CR>
nnoremap <Leader>texm :-1read $XDG_CONFIG_HOME/nvim/templates/tex.Makefile<CR>
" /templates }}}
+
+runtime shortcuts.vim
diff --git a/dot_local/bin/executable_,appimage b/dot_local/bin/executable_,appimage
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+[ -z "$1" ] && echo "At least one parameter must be specified." && exit
+
+FILE=$1
+shift
+eval $(grep '^Exec' $FILE | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | \
+ sed 's/^"//g' | sed 's/" *$//g') "$@"
diff --git a/dot_local/bin/executable_,configure-monitors b/dot_local/bin/executable_,configure-monitors
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+if [ -n "$(xrandr --query | grep "DP2 connected")" ]; then
+ xrandr --output eDP1 --off --output DP2 --auto
+ echo "! Xft.dpi: 192" > $HOME/.Xresources
+else
+ xrandr --output eDP1 --auto --output DP2 --off
+ echo "Xft.dpi: 192" > $HOME/.Xresources
+fi
diff --git a/dot_local/bin/executable_,toggle-kbmap b/dot_local/bin/executable_,toggle-kbmap
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+if (setxkbmap -query | grep -q 'layout:\s\+us'); then
+ setxkbmap es
+ notify-send "Keyboard map: es"
+else
+ setxkbmap us
+ notify-send "Keyboard map: us"
+fi