\"$@\"
ssh -O exit -S \"$control_file\" \"$1\""
}
+
+function search() {
+ quoted=$(python -c "import urllib.parse, sys; print(urllib.parse.quote_plus(' '.join(sys.argv[1:])))" "${@}")
+ w3m "https://duckduckgo.com/?q=${quoted}"
+}
{% set ifdev = 'wlp2s0' %}
{% elif grains['host'] == 'barium' %}
{% set ifdev = 'enp3s0f1' %}
+{% elif grains['host'] == 'dubnium' %}
+ {% set ifdev = 'enp4s0' %}
{% elif grains['host'] == 'rhenium' %}
{% set ifdev = 'wlp2s0' %}
{% else %}
"\#ff0000"
${endif}
},
-{% if grains['host'] == 'platinum' or grains['host'] == 'rhenium' %}
+{% if grains['host'] == 'platinum' or grains['host'] == 'rhenium' or grains['host'] == 'barium' %}
{
"full_text": "BAT ${battery_short} ${battery_time}",
"color":
'alias.hist': 'log --graph --full-history --all --pretty=format:\'%Cred%h%Creset %G? %ad %s %C(bold blue)<%an>%Creset %C(yellow)%d%Creset\' --date=short',
'alias.struct': 'log --graph --full-history --all --pretty=format:\'%ad %s %Creset %C(yellow)%d%Creset\' --date=short --simplify-by-decoration',
'alias.co': 'checkout',
- 'alias.ci': 'commit -S',
- 'alias.commit': 'commit -S',
+ 'alias.ci': 'commit',
'alias.st': 'status',
'alias.vh': 'verify-commit HEAD',
'alias.vc': 'verify-commit',
'alias.tag': 'tag -s',
'alias.t': 'tag -s',
'alias.alias': '!req=$\'\\033[0;31m=\\033[0m\'; git config --get-regexp ^alias\. | sed -e s/^alias\.// -e "s/\ /\t$req\ /"',
- 'alias.r': 'rebase -S',
- 'alias.m': 'merge -S',
+ 'alias.r': 'rebase',
+ 'alias.m': 'merge',
'alias.pa': '!git remote | xargs -L1 git push --all',
}
%}
c.auto_save.session = True
c.content.cookies.accept = 'no-3rdparty'
c.content.images = True
-c.editor.command = ['urxvt', '-e', 'vim', '{file}']
+c.editor.command = ['termite', '-e', 'vim {file}']
c.tabs.position = 'left'
c.url.auto_search = 'dns'
c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}'}
# wayland
c.window.hide_decoration = True
+
+# Spell checking
+c.spellcheck.languages = ["en-GB", "de-DE", "en-US"]
- pass
- firefox
- glocker
+ - utils
font pango:Liberation Mono 10
-input type:keyboard {
+# The built in keyboard of barium
+input 1:1:AT_Translated_Set_2_keyboard {
xkb_layout gb
xkb_variant colemak
xkb_options ctrl:nocaps
set $ws9 "9"
set $ws10 "10"
+set $music "Music"
+set $chat "Chat"
+
mode "$ratpoison" {
# All/most commands in this mode should revert to the default mode on comleption.
# We are emulating ratpoison (kinda) here
bindsym 8 exec 'swaymsg mode "default"; swaymsg workspace $ws8'
bindsym 9 exec 'swaymsg mode "default"; swaymsg workspace $ws9'
bindsym 0 exec 'swaymsg mode "default"; swaymsg workspace $ws10'
+ bindsym m exec 'swaymsg mode "default"; swaymsg workspace $music'
+ bindsym a exec 'swaymsg mode "default"; swaymsg workspace $chat'
+
bindsym Shift+1 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws1'
bindsym Shift+2 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws2'
bindsym Shift+8 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws8'
bindsym Shift+9 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws9'
bindsym Shift+0 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws10'
+ bindsym Shift+m exec 'swaymsg mode "default"; swaymsg move container to workspace $music'
+ bindsym Shift+a exec 'swaymsg mode "default"; swaymsg move container to workspace $chat'
# Moving focus
# bindsym Tab focus right mode "default"
for_window [class="^rdesktop"] move workspace number 9; floating disable
for_window [class="Pinentry"] floating enable
+{% set lockcmd = "swaylock -i {DP-1,eDP-1,HDMI-A-1}:~/Pictures/lockscreen_1080_1.png" %}
+
exec swayidle \
- timeout 300 "lock.nosmartcard" \
+timeout 300 "{{lockcmd}}" \
timeout 600 'swaymsg "output * dpms off"' \
- resume 'swaymsg "output * dpms on" \
- before-sleep "lock.nosmartcard"
+ resume 'swaymsg "output * dpms on"' \
+ before-sleep "{{lockcmd}}"
+
+# This keyboard has this layout on all machines:
+input 1241:36:HOLDCHIP_USB_Keyboard {
+ xkb_layout us
+ xkb_variant colemak
+ xkb_options ctrl:nocaps
+}
+input 16700:8455:DELL_Dell_USB_Entry_Keyboard {
+ xkb_layout gb
+ xkb_variant colemak
+ xkb_options ctrl:nocaps
+}
+
+input 7504:24616:unspecified_ErgoDox_ergonomic_keyboard {
+ xkb_layout gb
+}
# host specific section
{%- do salt.log.error('sway/files/' + host) -%}
{% include 'sway/files/' + host %}
{% set font_size = 11 %}
{% endif %}
-{% if grains['host'] == 'barium' or grains['host'] == 'rhenium' %}
+{% if grains['host'] in ['barium', 'dubnium', 'rhenium'] %}
{% set font_family = 'Source Code Pro' %}
{% else %}
{% set font_family = 'Source Code Pro for Powerline' %}
--- /dev/null
+install inotify tools:
+ pkg.installed:
+ - name: inotify-tools
--- /dev/null
+#!/bin/bash
+#
+# Watch current directory (recursively) for file changes, and execute
+# a command when a file or directory is created, modified or deleted.
+#
+# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
+#
+# Requires Linux, bash and inotifywait (from inotify-tools package).
+#
+# To avoid executing the command multiple times when a sequence of
+# events happen, the script waits one second after the change - if
+# more changes happen, the timeout is extended by a second again.
+#
+# Installation:
+# chmod a+rx onchange.sh
+# sudo cp onchange.sh /usr/local/bin
+#
+# Example use - rsync local changes to the remote server:
+#
+# onchange.sh rsync -avt . host:/remote/dir
+#
+# Released to Public Domain. Use it as you like.
+#
+
+EVENTS="CREATE,CLOSE_WRITE,DELETE,MODIFY,MOVED_FROM,MOVED_TO"
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 cmd ..."
+ exit -1;
+fi
+
+inotifywait -e "$EVENTS" -m -r --format '%:e %f' . | (
+ WAITING="";
+ while true; do
+ LINE="";
+ read -t 1 LINE;
+ if test -z "$LINE"; then
+ if test ! -z "$WAITING"; then
+ echo "CHANGE";
+ WAITING="";
+ fi;
+ else
+ WAITING=1;
+ fi;
+ done) | (
+ while true; do
+ read TMP;
+ echo $@
+ eval $@
+ done
+)
--- /dev/null
+include:
+ - utils.{{ grains['os'] | lower }}
+
+install on changes:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.local/bin/onchanges
+ - source: salt://utils/files/onchanges.bash
+ - mode: 750
+ - owner: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+
- vim-molokai
- powerline
- powerline-fonts
+ - vim_bridge-git
+ - ctags
Plugin 'psf/black'
Plugin 'vim-python/python-syntax'
Plugin 'luochen1990/rainbow'
+Plugin 'majutsushi/tagbar'
" All of your Plugins must be added before the following line
call vundle#end() " required
" Rainbow parens
let g:rainbow_active = 1
+
+" Activate tagbar with F8
+nmap <F8> :TagbarToggle<CR>