From 9362b3cd2aae995485a64d4421a76089f5ed72d6 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 21 Jul 2020 10:44:23 +0100 Subject: [PATCH 01/16] Set env variable to allow java guis to function on wayland --- states/zsh/files/zshenv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/states/zsh/files/zshenv b/states/zsh/files/zshenv index 5d60e58..eabcb4f 100644 --- a/states/zsh/files/zshenv +++ b/states/zsh/files/zshenv @@ -25,3 +25,5 @@ export GIT_PS1_SHOWCOLORHINTS="color" eval $(dircolors ~/.dir_colors) export GPG_TTY=$(tty) + +export _JAVA_AWT_WM_NONREPARENTING=1 -- 2.45.2 From 772d02d82c24876d0f6dae866feb69103251cbc7 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 21 Jul 2020 13:45:18 +0100 Subject: [PATCH 02/16] Use pydocstring to generate docstrings --- states/vim/files/vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/states/vim/files/vimrc b/states/vim/files/vimrc index c4f435a..b5c394c 100644 --- a/states/vim/files/vimrc +++ b/states/vim/files/vimrc @@ -39,6 +39,7 @@ Plugin 'aklt/plantuml-syntax' Plugin 'vim-python/python-syntax' Plugin 'luochen1990/rainbow' Plugin 'majutsushi/tagbar' +Plugin 'heavenshell/vim-pydocstring' " All of your Plugins must be added before the following line call vundle#end() " required @@ -158,3 +159,6 @@ let g:rainbow_active = 1 " Activate tagbar with F8 nmap :TagbarToggle + +" Set path to doq +let g:pydocstring_doq_path= "/home/max/.local/bin/doq" -- 2.45.2 From 14ca028e103a3078551a63888912afe332625cdc Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 23 Jul 2020 16:08:58 +0100 Subject: [PATCH 03/16] Add basic xfce config --- states/xfce/arch.sls | 17 ++++++++++++++++ states/xfce/files/xinitrc | 24 ++++++++++++++++++++++ states/xfce/files/xprofile | 41 ++++++++++++++++++++++++++++++++++++++ states/xfce/init.sls | 21 +++++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 states/xfce/arch.sls create mode 100644 states/xfce/files/xinitrc create mode 100644 states/xfce/files/xprofile create mode 100644 states/xfce/init.sls diff --git a/states/xfce/arch.sls b/states/xfce/arch.sls new file mode 100644 index 0000000..6e66e01 --- /dev/null +++ b/states/xfce/arch.sls @@ -0,0 +1,17 @@ +install xfce: + pkg.installed: + - pkgs: + - thunar + - thunar-volman + - xfce4-appfinder + - xfce4-panel + - xfce4-power-manager + - xfce4-session + - xfce4-settings + - xfce4-terminal + - xfconf + - xfdesktop + - xfwm4 + - xfwm4-themes + - dunst + - feh diff --git a/states/xfce/files/xinitrc b/states/xfce/files/xinitrc new file mode 100644 index 0000000..50daba1 --- /dev/null +++ b/states/xfce/files/xinitrc @@ -0,0 +1,24 @@ +#!/bin/sh +# +# ~/.xinitrc +# +# Executed by startx (run your window manager from here) + + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +# Source ~/.xprofile +[ -f /etc/xprofile ] && . /etc/xprofile +[ -f ~/.xprofile ] && . ~/.xprofile +case $HOSTNAME in + *) + exec startxfce4 + ;; +esac + +# vim: set expandtab tabstop=2 smarttab: diff --git a/states/xfce/files/xprofile b/states/xfce/files/xprofile new file mode 100644 index 0000000..86c965d --- /dev/null +++ b/states/xfce/files/xprofile @@ -0,0 +1,41 @@ +#!/bin/sh +# Load .Xresources +xrdb -merge ~/.Xresources &> /dev/null +if [ -f ~/.Xresources.$HOSTNAME ]; then + xrdb -merge ~/.Xresources.$HOSTNAME &> /dev/null +fi + +# Set keyboard layout +case $HOSTNAME in + barium) + setxkbmap -variant colemak us + xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L" + xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R" + xmodmap -e "add Control = Control_L Control_R" + ;; + *) + setxkbmap -variant colemak gb + xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L" + xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R" + xmodmap -e "add Control = Control_L Control_R" + ;; +esac + +# Set screen layout +case $HOSTNAME in + barium) + ;; + *) + ;; +esac + +# Set java font option +export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on" + +feh --bg-scale ~/Pictures/background_1080_1.png& + +exec dunst& + +xset -b + +# vim: set expandtab tabstop=2 smarttab: diff --git a/states/xfce/init.sls b/states/xfce/init.sls new file mode 100644 index 0000000..b85e1c3 --- /dev/null +++ b/states/xfce/init.sls @@ -0,0 +1,21 @@ +include: + - xfce.{{ grains['os']| lower }} + - conky + - font.pango-liberation-mono + - local.bin + +xprofile: + file.managed: + - name: {{ grains['homedir'] }}/.xprofile + - source: salt://xfce/files/xprofile + - user: {{ grains['user'] }} + - group: {{ grains['user'] }} + - mode: 750 + +xinitrc: + file.managed: + - name: {{ grains['homedir'] }}/.xinitrc + - source: salt://xfce/files/xinitrc + - user: {{ grains['user'] }} + - group: {{ grains['user'] }} + - mode: 750 -- 2.45.2 From d214955d8b2d4143b32cf9695b4b66071dea0ea4 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 5 Aug 2020 09:05:37 +0100 Subject: [PATCH 04/16] Make conky output more space efficient --- states/conky/files/conkyrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/states/conky/files/conkyrc b/states/conky/files/conkyrc index 1d20e7a..2606323 100644 --- a/states/conky/files/conkyrc +++ b/states/conky/files/conkyrc @@ -35,14 +35,15 @@ conky.text = [[ {% if grains['host'] == 'barium' %} {"full_text": "Last Tea: ${execi 120 tail -n 1 ~/.local/share/teatimer.log}s", "color": "\#ffffff"}, {% endif %} - {"full_text": "Home ${fs_free /home} Free", "color": "\#ffffff"}, - {"full_text": "Root ${fs_free /root} Free", "color": "\#ffffff"}, + {"full_text": "Home ${fs_free /home}", "color": "\#ffffff"}, + {"full_text": "Root ${fs_free /root}", "color": "\#ffffff"}, {"full_text": "Disk r:${diskio_read} w:${diskio_write}", "color": "\#ffffff"}, {"full_text": "CPU ${cpu cpu0}%", "color": "\#ffffff"}, {% for dev in ifdev %} + ${if_match "${addr {{ dev }}}"!="No Address"} { "full_text": - "d:${downspeed {{ dev }}} u:${upspeed {{ dev }}} ${addr {{ dev }}}", + "{{ dev }} d:${downspeed {{ dev }}} u:${upspeed {{ dev }}} ${addr {{ dev }}}", "color": ${if_match "${addr {{ dev }}}"=="No Address"} "\#ff0000" @@ -50,6 +51,7 @@ conky.text = [[ "\#00ff00" ${endif} }, + ${endif} {% endfor %} ${if_match "${addr tun0}"!="No Address"} {"full_text": "VPN", "color": "\#00ff00"}, @@ -74,7 +76,7 @@ conky.text = [[ ${endif} }, {% endif %} - {"full_text": "${time}", "color": "\#ffffff"} + {"full_text": "${time %Y-%m-%d %H:%M}", "color": "\#ffffff"} ], ]]; -- 2.45.2 From e1931ea253463cc7a9391351f4baf00c5d816dac Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 5 Aug 2020 09:05:48 +0100 Subject: [PATCH 05/16] Use lighter colour as separator on i3 bar --- states/sway/files/barium | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/states/sway/files/barium b/states/sway/files/barium index dce5e5f..8a59b8e 100644 --- a/states/sway/files/barium +++ b/states/sway/files/barium @@ -12,11 +12,12 @@ bar { active_workspace $black_super $blue_super $black inactive_workspace $black_super $black_super $white_super urgent_workspace $black $red_super $white + separator $white } } bar { - id bar_external + id bar_internal status_command ~/.local/bin/conky-i3bar position top output "eDP-1" @@ -28,6 +29,7 @@ bar { active_workspace $black_super $blue_super $black inactive_workspace $black_super $black_super $white_super urgent_workspace $black $red_super $white + separator $white } } @@ -44,6 +46,7 @@ bar { active_workspace $black_super $blue_super $black inactive_workspace $black_super $black_super $white_super urgent_workspace $black $red_super $white + separator $white } } -- 2.45.2 From 1d21e6d38d84140e014b7b9b04361a041b77482a Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 5 Aug 2020 09:39:57 +0100 Subject: [PATCH 06/16] Integrate pomodoro timer into conkyrc --- states/conky/files/conkyrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/states/conky/files/conkyrc b/states/conky/files/conkyrc index 2606323..8e8fcc1 100644 --- a/states/conky/files/conkyrc +++ b/states/conky/files/conkyrc @@ -32,6 +32,9 @@ conky.config = { conky.text = [[ [ + ${if_match "${exec cat ~/.local/share/pomodoro}"!="done"} + {"full_text": "Pomodoro: ${exec cat ~/.local/share/pomodoro}", "color": "\#ea0501"}, + ${endif} {% if grains['host'] == 'barium' %} {"full_text": "Last Tea: ${execi 120 tail -n 1 ~/.local/share/teatimer.log}s", "color": "\#ffffff"}, {% endif %} -- 2.45.2 From 9bc38463ab4986ae3ddc5e557750cc8888ac27ad Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 11 Aug 2020 10:33:26 +0100 Subject: [PATCH 07/16] Reduce width of tab bar --- states/qutebrowser/files/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/states/qutebrowser/files/config.py b/states/qutebrowser/files/config.py index 0d32030..e767710 100644 --- a/states/qutebrowser/files/config.py +++ b/states/qutebrowser/files/config.py @@ -8,6 +8,7 @@ c.tabs.position = 'left' c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}'} c.messages.timeout = 5000 c.tabs.background = True +c.tabs.width = "15%" {% if grains['host'] != 'barium' %} c.content.javascript.enabled = False -- 2.45.2 From 7fb45aa7dd7ce34b9877dd915fc8eede6934d149 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 30 Aug 2020 13:36:39 +0100 Subject: [PATCH 08/16] Dont bother with glocker for now --- states/setup.sls | 1 - 1 file changed, 1 deletion(-) diff --git a/states/setup.sls b/states/setup.sls index 137cda9..364d569 100644 --- a/states/setup.sls +++ b/states/setup.sls @@ -3,5 +3,4 @@ include: - ntp - pass - firefox - - glocker - utils -- 2.45.2 From b88e9af24d4f2ce36f4a9dc3b7c18d0eb60c432f Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 30 Aug 2020 13:37:04 +0100 Subject: [PATCH 09/16] Use conky non git --- states/conky/arch.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/conky/arch.sls b/states/conky/arch.sls index d5da829..7c2f408 100644 --- a/states/conky/arch.sls +++ b/states/conky/arch.sls @@ -1,3 +1,3 @@ install conky: pkg.installed: - - name: conky-git + - name: conky -- 2.45.2 From b19e18868fe5456e1fd6f0f1346b2692cf0230a0 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 9 Sep 2020 15:05:25 +0100 Subject: [PATCH 10/16] Set vim to use expandtab and such by default --- states/vim/files/vimrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/states/vim/files/vimrc b/states/vim/files/vimrc index b5c394c..53d4657 100644 --- a/states/vim/files/vimrc +++ b/states/vim/files/vimrc @@ -52,9 +52,9 @@ set backupdir=$HOME/.vim/backup// syntax on set background=dark colorscheme molokai -" set expandtab -" set shiftwidth=2 -" set softtabstop=2 +set expandtab +set shiftwidth=4 +set softtabstop=4 set relativenumber set number -- 2.45.2 From abaea3751d4de28f0cbfaa5c26ed4593d89905cd Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sat, 26 Sep 2020 12:21:59 +0100 Subject: [PATCH 11/16] Add keyboard layout for Jess's keyboard --- states/sway/files/config.jinja | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/states/sway/files/config.jinja b/states/sway/files/config.jinja index ab4019e..e53526a 100644 --- a/states/sway/files/config.jinja +++ b/states/sway/files/config.jinja @@ -228,6 +228,12 @@ input 1:1:AT_Translated_Set_2_keyboard { xkb_options ctrl:nocaps } +input 9610:4102:Gaming_KB__Gaming_KB { + xkb_layout gb + xkb_variant colemak + xkb_options ctrl:nocaps +} + # host specific section {%- do salt.log.error('sway/files/' + host) -%} {% include 'sway/files/' + host %} -- 2.45.2 From 4ec2c6b77f19dc7171072daf19dbda37844b0643 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 27 Sep 2020 15:07:56 +0100 Subject: [PATCH 12/16] Use correct personal password store location --- states/aerc/files/accounts.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/aerc/files/accounts.jinja b/states/aerc/files/accounts.jinja index 685843a..c842276 100644 --- a/states/aerc/files/accounts.jinja +++ b/states/aerc/files/accounts.jinja @@ -1,5 +1,5 @@ {% if grains['host'] == "barium" %} - {% set pword_cmd = "PASSWORD_STORE_DIR=~/.password-store-personal pass mail.friedersdorff.com/max@friedersdorff.com | head -n 1" %} + {% set pword_cmd = "pass personal/mail.friedersdorff.com/max@friedersdorff.com | head -n 1" %} {% else %} {% set pword_cmd = "pass mail.friedersdorff.com/max@friedersdorff.com | head -n 1" %} {% endif %} -- 2.45.2 From e593aa963c000268bbf3d0d134f9975761bab3a3 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 7 Oct 2020 16:53:03 +0100 Subject: [PATCH 13/16] Install mako instead of dunst --- states/sway/arch.sls | 2 ++ states/sway/files/barium | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/states/sway/arch.sls b/states/sway/arch.sls index 0879813..d816b9e 100644 --- a/states/sway/arch.sls +++ b/states/sway/arch.sls @@ -5,6 +5,8 @@ install sway: - swaylock - swayidle - dmenu-wayland-git + - mako + - libnotify ensure dmenu-wl wrapper: file.managed: diff --git a/states/sway/files/barium b/states/sway/files/barium index 8a59b8e..65d168b 100644 --- a/states/sway/files/barium +++ b/states/sway/files/barium @@ -97,5 +97,5 @@ input 1:1:AT_Translated_Set_2_keyboard { xkb_options ctrl:nocaps } -exec dunst& exec ~/.local/bin/monitor_switch& +exec mako& -- 2.45.2 From d7dabb75012a6bf3bc49f8abbf04ef9b18999b19 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 21 Oct 2020 11:07:03 +0100 Subject: [PATCH 14/16] Pin workspace 3 and 4 to specific outputs --- states/sway/files/barium | 2 ++ 1 file changed, 2 insertions(+) diff --git a/states/sway/files/barium b/states/sway/files/barium index 65d168b..b618079 100644 --- a/states/sway/files/barium +++ b/states/sway/files/barium @@ -70,7 +70,9 @@ output eDP-1 { workspace 2 output HDMI-A-1 +workspace 4 output HDMI-A-1 workspace 1 output DP-1 +workspace 3 output DP-1 workspace $music output DP-1 workspace $chat output DP-1 -- 2.45.2 From ec3225325799b70423908cffe3ab84fb9a4e0f51 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Fri, 20 Nov 2020 16:02:53 +0000 Subject: [PATCH 15/16] Use the python -m pylint for pylint --- states/vim/files/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/vim/files/vimrc b/states/vim/files/vimrc index 53d4657..2cb9aa8 100644 --- a/states/vim/files/vimrc +++ b/states/vim/files/vimrc @@ -72,7 +72,7 @@ let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 1 let g:syntastic_javascript_checkers = ['eslint'] let g:syntastic_python_python_exec = '/usr/bin/python3' -let g:syntastic_python_checkers = ['flake8', 'pylint'] +let g:syntastic_python_checkers = ['flake8', 'python3 -m pylint'] let g:syntastic_aggregate_errors = 1 " Syntastic C++11 -- 2.45.2 From 6bd4126d779dbc1782769a1a84c8222c3ca5a467 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 24 Nov 2020 08:52:37 +0000 Subject: [PATCH 16/16] Use app id instead of class for window assignment --- states/sway/files/barium | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/states/sway/files/barium b/states/sway/files/barium index b618079..06ee5ea 100644 --- a/states/sway/files/barium +++ b/states/sway/files/barium @@ -81,9 +81,10 @@ assign [class="music"] workspace $music assign [app_id="music"] workspace $music for_window [class="music"] move workspace number $music for_window [app_id="music"] move workspace number $music -assign [class="zoom"] workspace $chat -for_window [class="zoom"] move workspace number $chat +assign [app_id="zoom"] workspace $chat +for_window [app_id="zoom"] move workspace number $chat assign [app_id="org.qutebrowser.qutebrowser"] workspace number $ws1 +for_window [app_id="org.qutebrowser.qutebrowser"] move workspace number $ws1 exec "termite --name 'music' -e 'tmux'" exec "zoom" -- 2.45.2