--- /dev/null
+install conky:
+ pkg.installed:
+ - name: conky
--- /dev/null
+install conky:
+ pkg.installed:
+ - name: conky
{% set ifdev = 'br0' %}
{% elif grains['host'] == 'platinum' %}
{% set ifdev = 'wlp2s0' %}
+{% elif grains['host'] == 'barium' %}
+ {% set ifdev = 'enp3s0f1' %}
{% else %}
{% set ifdev = 'eth0' %}
{% endif %}
--- /dev/null
+install conky:
+ pkg.installed:
+ - name: conky
+ensure dircolor file:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.dir_colors
+ - source: salt://dircolors/files/dir_colors
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 660
+ - template: jinja
--- /dev/null
+install firefox:
+ pkg.installed:
+ - name: firefox
--- /dev/null
+install firefox:
+ pkg.installed:
+ - name: firefox
--- /dev/null
+install firefox:
+ pkg.installed:
+ - name: firefox
pkg.installed:
- name: media-fonts/liberation-fonts
- refresh: False
+{% elif grains['os'] | lower == 'arch' %}
+install libration mono:
+ pkg.installed:
+ - name: ttf-liberation
{% endif %}
--- /dev/null
+install git:
+ pkg.installed:
+ - name: git
--- /dev/null
+install git:
+ pkg.installed:
+ - name: git
--- /dev/null
+install git:
+ pkg.installed:
+ - name: git
--- /dev/null
+install mutt:
+ pkg.installed:
+ - name: mutt
--- /dev/null
+install mutt:
+ pkg.installed:
+ - name: mutt
--- /dev/null
+install mutt:
+ pkg.installed:
+ - name: mutt
--- /dev/null
+install ntp:
+ pkg.installed:
+ - name: ntp
+
+run ntp service:
+ service.running:
+ - name: ntpd
+ - enable: True
+ - require:
+ - pkg: install ntp
--- /dev/null
+install ntp:
+ pkg.installed:
+ - name: ntp
+
+run ntp service:
+ service.running:
+ - name: ntpd
+ - enable: True
+ - require:
+ - pkg: install ntp
--- /dev/null
+install ntp:
+ pkg.installed:
+ - name: ntp
+
+run ntp service:
+ service.running:
+ - name: ntpd
+ - enable: True
+ - require:
+ - pkg: install ntp
--- /dev/null
+install pass:
+ pkg.installed:
+ - pkgs:
+ - pass
+ - pass-otp
--- /dev/null
+install pass:
+ pkg.installed:
+ - pkgs:
+ - pass
+ - pass-otp
--- /dev/null
+install pass:
+ pkg.installed:
+ - pkgs:
+ - pass
+ - pass-otp
--- /dev/null
+install qutebrowser:
+ pkg.installed:
+ - pkgs:
+ - qutebrowser
+ - qt5-wayland
+ - python-tldextract
--- /dev/null
+install qutebrowser:
+ pkg.installed:
+ - pkgs:
+ - qutebrowser
+ - qt5-wayland
+ - python-tldextract
c.auto_save.session = True
c.content.cookies.accept = 'no-3rdparty'
-c.content.cookies.store = False
-c.content.javascript.enabled = False
c.content.images = True
c.editor.command = ['urxvt', '-e', 'vim', '{file}']
c.tabs.position = 'left'
c.messages.timeout = 5000
c.tabs.background = True
+{% if grains['host'] != 'barium' %}
+c.content.javascript.enabled = False
config.bind(',ej', 'spawn --userscript noscript_enable')
config.bind(',dj', 'spawn --userscript noscript_disable')
+c.content.cookies.store = False
+
+# Allow JS and cookies on own domain
+config.set('content.javascript.enabled', True, '*.friedersdorff.com')
+{% endif %}
+
config.bind(',zl', 'spawn --userscript qute-pass --dmenu-invocation bemenu')
config.bind(',zul', 'spawn --userscript qute-pass --dmenu-invocation bemenu --username-only')
config.bind(',zpl', 'spawn --userscript qute-pass --dmenu-invocation bemenu --password-only')
config.bind(',zol', 'spawn --userscript qute-pass --dmenu-invocation bemenu --otp-only')
-# Allow JS and cookies on own domain
-config.set('content.javascript.enabled', True, '*.friedersdorff.com')
# Fingerprinting protection
c.content.headers.accept_language = 'en-US,en;q=0.5'
- qutebrowser.{{ grains['os'] | lower}}
- local.bin
+qute config dir:
+ file.directory:
+ - name: {{ grains['homedir'] }}/.config/qutebrowser
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 750
+ - makedirs: True
userscripts dir:
file.directory:
- source: salt://qutebrowser/files/config.py
- user: {{ grains['user'] }}
- group: {{ grains['user'] }}
+ - template: jinja
- mode: 640
+ - require:
+ - file: qute config dir
--- /dev/null
+install qutebrowser:
+ pkg.installed:
+ - pkgs:
+ - qutebrowser
+ - qt5-wayland
+ - python-tldextract
--- /dev/null
+salt repo:
+ pkgrepo.managed:
+ - humanname: saltstack
+ - name: deb http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main
+ - dist: bionic
+ - file: /etc/apt/sources.list.d/saltstack.list
+ - key_url: https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub
+
+install salt:
+ pkg.latest:
+ - name: salt-master
+ - require:
+ - pkgrepo: salt repo
+
+disable salt:
+ service.dead:
+ - name: salt-master
+ - enable: False
+ - require:
+ - pkg: install salt
+
--- /dev/null
+install sway:
+ pkg.installed:
+ - pkgs:
+ - sway
+ - swaylock
+ - swayidle
--- /dev/null
+install sway:
+ pkg.installed:
+ - pkgs:
+ - sway
+ - swaylock
+ - swayidle
--- /dev/null
+# Start i3bar to display a workspace bar (plus the system information i3status
+# finds out, if available)
+bar {
+ id bar_left
+ position top
+ output "HDMI-A-1"
+ font pango:Liberation Mono 12
+ colors {
+ background $black_super
+ focused_background $black
+ focused_workspace $black_super $yellow_super $black
+ active_workspace $black_super $blue_super $black
+ inactive_workspace $black_super $black_super $white_super
+ urgent_workspace $black $red_super $white
+ }
+}
+
+bar {
+ id bar_center
+ status_command ~/.local/bin/conky-i3bar
+ position top
+ output "eDP-1"
+ font pango:Liberation Mono 12
+ colors {
+ background $black_super
+ focused_background $black
+ focused_workspace $black_super $yellow_super $black
+ active_workspace $black_super $blue_super $black
+ inactive_workspace $black_super $black_super $white_super
+ urgent_workspace $black $red_super $white
+ }
+}
+
+bar {
+ id bar_right
+ position top
+ output "DP-1"
+ font pango:Liberation Mono 12
+ colors {
+ background $black_super
+ focused_background $black
+ focused_workspace $black_super $yellow_super $black
+ active_workspace $black_super $blue_super $black
+ inactive_workspace $black_super $black_super $white_super
+ urgent_workspace $black $red_super $white
+ }
+}
+
+
+output HDMI-A-1 {
+ position 0 0
+ background ~/Pictures/background_1080_1.png fit
+}
+
+output eDP-1 {
+ position 1920 530
+ background ~/Pictures/background_1080_1.png fit
+ scale 1.15
+}
+output DP-1 {
+ position 3590 0
+ background ~/Pictures/background_1080_1.png fit
+}
+
+workspace 1 output HDMI-A-1
+workspace 2 output eDP-1
+workspace 3 output DP-1
+
+
+font pango:Liberation Mono 10
+
+input type:keyboard {
+ xkb_layout gb
+ xkb_variant colemak
+ xkb_options ctrl:nocaps
+}
+
+exec dunst&
for_window [class="Pinentry"] floating enable
exec swayidle \
- timeout 300 "lock.{{ host }}" \
+ timeout 300 "lock.nosmartcard" \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on" \
- before-sleep "lock.{{ host }}"
+ before-sleep "lock.nosmartcard"
# host specific section
{%- do salt.log.error('sway/files/' + host) -%}
NOLOCK_MSG="Smartcard was not removed, did not lock!"
LOCK_CMD="swaylock "
+SLEEP_CMD=":"
+{% if grains['host'] == 'magnesium' %}
LOCK_CMD+=" -i HDMI-A-2:~/Pictures/lockscreen_1080_1.png"
LOCK_CMD+=" -i HDMI-A-3:~/Pictures/lockscreen_1080_2.png"
+{% elif grains['host'] == 'barium' %}
+LOCK_CMD+=" -i DP-1:~/Pictures/lockscreen_1080_1.png"
+LOCK_CMD+=" -i eDP-1:~/Pictures/lockscreen_1080_1.png"
+LOCK_CMD+=" -i HDMI-A-1:~/Pictures/lockscreen_1080_1.png"
+SLEEP_CMD="systemctl suspend"
+{% endif %}
+
if [ $(pgrep -c lock.magnesium) -gt 1 ]; then
exit
done
pkill -f "$NAG_MSG"
fi
- $LOCK_CMD
+ $LOCK_CMD &
+ sleep 10
+ $SLEEP_CMD
fi
xkb_variant colemak
xkb_options ctrl:nocaps
}
+
+# Disable tap-to-click on touchpad to prevent jerkyness
+input type:touch tap disable
sway config:
file.managed:
- name: {{ grains['homedir'] }}/.config/sway/config
- - source: {{ grains['stateroot'] }}/sway/files/config.jinja
+ - source: salt://sway/files/config.jinja
- template: jinja
- user: {{ grains['user']}}
- group: {{ grains['user']}}
lock script:
file.managed:
- name: {{ grains['homedir'] }}/.local/bin/lock.nosmartcard
- - source: {{ grains['stateroot'] }}/sway/files/lock
+ - source: salt://sway/files/lock
- template: jinja
- user: {{ grains['user'] }}
- group: {{ grains['user'] }}
conky launch script:
file.managed:
- name: {{ grains['homedir'] }}/.local/bin/conky-i3bar
- - source: {{ grains['stateroot'] }}/sway/files/conky-i3bar
+ - source: salt://sway/files/conky-i3bar
- user: {{ grains['user'] }}
- group: {{ grains['user'] }}
- mode: 750
--- /dev/null
+install sway:
+ pkg.installed:
+ - pkgs:
+ - sway
+ - swaylock
+ - swayidle
--- /dev/null
+install termite:
+ pkg.installed:
+ - name: termite
--- /dev/null
+install termite:
+ pkg.installed:
+ - name: termite
{% if grains['host'] == 'magnesium' %}
{% set font_size = 12 %}
+{% elif grains['host'] == 'barium' %}
+ {% set font_size = 12 %}
{% else %}
{% set font_size = 11 %}
{% endif %}
+{% if grains['host'] == 'barium' %}
+ {% set font_family = 'Source Code Pro' %}
+{% else %}
+ {% set font_family = 'Source Code Pro for Powerline' %}
+{% endif %}
+
[options]
#allow_bold = true
#audible_bell = false
#clickable_url = true
#dynamic_title = true
-font = Source Code Pro for Powerline {{ font_size }}
+font = {{ font_family }} {{ font_size }}
#fullscreen = true
#geometry = 640x480
#icon_name = terminal
--- /dev/null
+install termite:
+ pkg.installed:
+ - name: termite
--- /dev/null
+install tmux:
+ pkg.installed:
+ - name: tmux
--- /dev/null
+install tmux:
+ pkg.installed:
+ - name: tmux
--- /dev/null
+install tmux:
+ pkg.installed:
+ - name: tmux
--- /dev/null
+install vim:
+ pkg.installed:
+ - pkgs:
+ - vim
+ - vim-molokai
--- /dev/null
+install vim:
+ pkg.installed:
+ - pkgs:
+ - vim
+ - vim-molokai
vimrc:
file.managed:
- name: {{ grains['homedir'] }}/.vimrc
- - source: {{ grains['stateroot'] }}/vim/files/vimrc
+ - source: salt:///vim/files/vimrc
- user: {{ grains['user'] }}
- group: {{ grains['user'] }}
- mode: 640
plugins update:
cmd.run:
- name: vim +PluginUpdate +qall
+
+packup dir:
+ file.directory:
+ - name: {{ grains['homedir'] }}/.vim/backup
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 750
+ - makedirs: True
--- /dev/null
+install vim:
+ pkg.installed:
+ - pkgs:
+ - vim
+ - vim-molokai
--- /dev/null
+install zsh:
+ pkg.installed:
+ - pkgs:
+ - zsh
+ - zsh-completions
--- /dev/null
+install zsh:
+ pkg.installed:
+ - pkgs:
+ - zsh
+ - zsh-completions
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' list-suffixes true
-zstyle ':completion:*' max-errors 2
+zstyle ':completion:*' max-errors 1
zstyle ':completion:*' menu select=1
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' prompt 'Corrections with %e differences:'
include:
+ - user.{{ grains['user'] }}
- aliases
- dircolors
- zsh.{{ grains['os'] | lower }}
--- /dev/null
+install zsh:
+ pkg.installed:
+ - pkgs:
+ - zsh
+
+ensure git-prompt exists:
+ file.symlink:
+ - name: {{ grains['homedir'] }}/.git-prompt.sh
+ - target: /usr/lib/git-core/git-sh-prompt
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 444