From c320af3593348d76eedec49afadf5064b0ea1b58 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Fri, 30 Sep 2022 09:36:51 +0100 Subject: [PATCH] Configure for baryte on ubuntu --- states/bash/ubuntu.sls | 3 ++ states/conky/files/conkyrc | 4 +- states/dotfiles.sls | 4 +- states/i3/files/config.jinja | 74 +++++++++++++++++++++++++++++- states/i3/files/xprofile.jinja | 5 ++ states/i3/ubuntu.sls | 12 +++++ states/pass/ubuntu.sls | 2 +- states/qutebrowser/files/config.py | 2 +- states/qutebrowser/ubuntu.sls | 5 +- states/setup-ubuntu.sls | 21 --------- states/utils/ubuntu.sls | 3 ++ states/vim/ubuntu.sls | 4 +- 12 files changed, 107 insertions(+), 32 deletions(-) create mode 100644 states/bash/ubuntu.sls create mode 100644 states/i3/ubuntu.sls create mode 100644 states/utils/ubuntu.sls diff --git a/states/bash/ubuntu.sls b/states/bash/ubuntu.sls new file mode 100644 index 0000000..a5451b5 --- /dev/null +++ b/states/bash/ubuntu.sls @@ -0,0 +1,3 @@ +bash installed: + pkg.installed: + - name: bash diff --git a/states/conky/files/conkyrc b/states/conky/files/conkyrc index 88b5931..ede13d7 100644 --- a/states/conky/files/conkyrc +++ b/states/conky/files/conkyrc @@ -10,6 +10,8 @@ {% set ifdev = ['enp4s0'] %} {% elif grains['host'] == 'rhenium' %} {% set ifdev = ['wlp2s0'] %} +{% elif grains['host'] == 'baryte' %} + {% set ifdev = ['enx00f001e00121'] %} {% else %} {% set ifdev = ['eth0'] %} {% endif %} @@ -68,7 +70,7 @@ conky.text = [[ "\#ff0000" ${endif} }, -{% if grains['host'] in ['platinum', 'rhenium'] %} +{% if grains['host'] in ['platinum', 'rhenium', 'barium', 'baryte'] %} { "full_text": "BAT ${battery_short} ${battery_time}", "color": diff --git a/states/dotfiles.sls b/states/dotfiles.sls index 77e6662..b2677f3 100644 --- a/states/dotfiles.sls +++ b/states/dotfiles.sls @@ -2,10 +2,8 @@ include: - bash - zsh - git - - sway - vim - mail - - termite - qutebrowser - tmux - - aerc + - i3 diff --git a/states/i3/files/config.jinja b/states/i3/files/config.jinja index aa31ec3..15a3bf2 100644 --- a/states/i3/files/config.jinja +++ b/states/i3/files/config.jinja @@ -63,7 +63,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU floating_modifier $mod # start a terminal -bindsym $mod+Return exec termite +bindsym $mod+Return exec i3-sensible-terminal # kill focused window bindsym $mod+Shift+q kill @@ -200,8 +200,10 @@ mode "resize" { bindsym $mod+p mode "resize" +{% if host != 'baryte' %} # Slight gaps around windows gaps inner 6 +{% endif %} {% if host == 'barium' %} bar { @@ -272,6 +274,76 @@ for_window [class="zoom"] move workspace $chat exec "zoom" +{% elif host == 'baryte' %} +bar { + id bar_left + status_command ~/.local/bin/conky-i3bar + position top + output "DP-3" + font pango:Liberation Mono 11 + 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 + separator $white + } +} + +bar { + id bar_internal + 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 + separator $white + } +} + +bar { + id bar_right + status_command ~/.local/bin/conky-i3bar + position top + output "DP-2" + font pango:Liberation Mono 13 + 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 + separator $white + } +} + +focus_on_window_activation urgent +no_focus [class="(!?.*pinentry.*)"] + +workspace 2 output HDMI-A-1 +workspace 4 output HDMI-A-1 +workspace 1 output DP-3 +workspace 3 output DP-3 + +workspace $chat output DP-3 + +assign [class="qutebrowser"] workspace number $ws1 +for_window [class="qutebrowser"] move workspace number $ws1 +assign [class="zoom"] workspace $chat +for_window [class="zoom"] move workspace $chat + +exec "zoom" + + {% elif host == 'dubnium' %} bar { id bar_left diff --git a/states/i3/files/xprofile.jinja b/states/i3/files/xprofile.jinja index e5aa42f..2b0b7c8 100755 --- a/states/i3/files/xprofile.jinja +++ b/states/i3/files/xprofile.jinja @@ -22,6 +22,11 @@ case $HOSTNAME in xrandr --output DP-1 --mode 2560x1440 --pos 0x360 #xrandr --output eDP-1 --off ;; + baryte) + #xrandr --output DP-3 --mode 3840x2160 --pos 2560x0 --rate 30 + xrandr --output DP-3 --mode 2560x1440 --pos 0x0 + #xrandr --output eDP-1 --off + ;; dubnium) xrandr --output DP-0 --mode 2560x1440 --pos 0x0 xrandr --output DP-2 --mode 3840x2160 --pos 2560x0 diff --git a/states/i3/ubuntu.sls b/states/i3/ubuntu.sls new file mode 100644 index 0000000..795afb4 --- /dev/null +++ b/states/i3/ubuntu.sls @@ -0,0 +1,12 @@ +install i3: + pkg.installed: + - pkgs: + - i3 + - i3blocks + - i3lock + - i3status + - libnotify-bin + - picom + - rofi + - dunst + - nitrogen diff --git a/states/pass/ubuntu.sls b/states/pass/ubuntu.sls index 26dce04..642b75f 100644 --- a/states/pass/ubuntu.sls +++ b/states/pass/ubuntu.sls @@ -2,4 +2,4 @@ install pass: pkg.installed: - pkgs: - pass - - pass-otp + - pass-extension-otp diff --git a/states/qutebrowser/files/config.py b/states/qutebrowser/files/config.py index 74f4d7e..c799e12 100644 --- a/states/qutebrowser/files/config.py +++ b/states/qutebrowser/files/config.py @@ -10,7 +10,7 @@ c.messages.timeout = 5000 c.tabs.background = True c.tabs.width = "15%" -{% if grains['host'] != 'barium' %} +{% if grains['host'] not in ['barium', 'baryte'] %} c.content.javascript.enabled = False config.bind(',ej', 'spawn --userscript noscript_enable') config.bind(',dj', 'spawn --userscript noscript_disable') diff --git a/states/qutebrowser/ubuntu.sls b/states/qutebrowser/ubuntu.sls index f7b280d..59f0dbf 100644 --- a/states/qutebrowser/ubuntu.sls +++ b/states/qutebrowser/ubuntu.sls @@ -1,6 +1,5 @@ install qutebrowser: pkg.installed: - - pkgs: + - pkgs: - qutebrowser - - qt5-wayland - - python-tldextract + - python3-tldextract diff --git a/states/setup-ubuntu.sls b/states/setup-ubuntu.sls index 9ddcaf4..e69de29 100644 --- a/states/setup-ubuntu.sls +++ b/states/setup-ubuntu.sls @@ -1,21 +0,0 @@ -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 - diff --git a/states/utils/ubuntu.sls b/states/utils/ubuntu.sls new file mode 100644 index 0000000..0a0225a --- /dev/null +++ b/states/utils/ubuntu.sls @@ -0,0 +1,3 @@ +install inotify tools: + pkg.installed: + - name: inotify-tools diff --git a/states/vim/ubuntu.sls b/states/vim/ubuntu.sls index c780618..9e164e8 100644 --- a/states/vim/ubuntu.sls +++ b/states/vim/ubuntu.sls @@ -2,4 +2,6 @@ install vim: pkg.installed: - pkgs: - vim - - vim-molokai + - pylint + - flake8 + - python3-pip -- 2.46.2