diff --git a/playbooks/apt.yaml b/playbooks/apt.yaml index ff547d1..0810222 100644 --- a/playbooks/apt.yaml +++ b/playbooks/apt.yaml @@ -19,6 +19,7 @@ - curl - dia - fcitx5 + - flameshot - foot - git - grimshot diff --git a/playbooks/env.yaml b/playbooks/env.yaml index 5b72e08..9700827 100644 --- a/playbooks/env.yaml +++ b/playbooks/env.yaml @@ -18,6 +18,10 @@ value: /usr/local/share/:/usr/share/ - key: _JAVA_AWT_WM_NONREPARENTING value: 1 + - key: MOZ_ENABLE_WAYLAND + value: 1 + - key: SAL_USE_VCLPLUGIN + value: gtk3 hosts: localhost connection: local become: false diff --git a/playbooks/sunet.yaml b/playbooks/sunet.yaml index 605e17b..e526402 100644 --- a/playbooks/sunet.yaml +++ b/playbooks/sunet.yaml @@ -4,7 +4,8 @@ vars: uid: "{{ lookup('env','USER') }}" gitops: git+ssh://git@gitops.sunet.se - github: git+ssh://git@github.com/SUNET + github: git+ssh://git@github.com/SUNET + helm_version: 3.13.3 platform: git+ssh://git@platform.sunet.se:22022/Drive commands: - get_drive_customers @@ -71,3 +72,32 @@ src: ../templates/tsocks.conf.j2 dest: /etc/tsocks.conf become: true + - name: Have helm allready installed + stat: + path: /usr/local/bin/helm + register: have_helm + - name: Get helm + ansible.builtin.command: + chdir: /tmp + cmd: wget https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz + creates: /tmp/helm-v{{ helm_version }}-linux-amd64.tar.gz + when: not have_helm.stat.exists + - name: Unpack helm + ansible.builtin.command: + chdir: /tmp + cmd: tar xfv helm-v{{ helm_version }}-linux-amd64.tar.gz + creates: /tmp/linux-amd64/helm + when: not have_helm.stat.exists + - name: Install helm + ansible.builtin.command: + chdir: /tmp + cmd: mv /tmp/linux-amd64/helm /usr/local/bin + creates: /usr/local/bin/helm + become: true + when: not have_helm.stat.exists + - name: cleanup helm + ansible.builtin.command: + chdir: /tmp + cmd: rm -rf /tmp/helm-v{{ helm_version }}-linux-amd64.tar.gz /tmp/linux-amd64 + when: not have_helm.stat.exists + diff --git a/playbooks/sway.yaml b/playbooks/sway.yaml index dbe08ce..464524c 100644 --- a/playbooks/sway.yaml +++ b/playbooks/sway.yaml @@ -16,6 +16,10 @@ ansible.builtin.file: dest: /home/{{ uid }}/.config/sway state: directory + - name: Create xdg dir + ansible.builtin.file: + dest: /home/{{ uid }}/.config/xdg-desktop-portal + state: directory - name: Install sway config ansible.builtin.template: src: ../templates/sway_config.j2 @@ -24,6 +28,14 @@ group: '{{ uid }}' mode: '0640' notify: Reload sway + - name: Install sway config + ansible.builtin.template: + src: ../templates/sway-portals.conf.j2 + dest: /home/{{ uid }}/.config/xdg-desktop-portal/sway-portals.conf + owner: '{{ uid }}' + group: '{{ uid }}' + mode: '0640' + notify: Reload sway - name: Create waybar dir ansible.builtin.file: dest: /home/{{ uid }}/.config/waybar diff --git a/templates/sway-portals.conf.j2 b/templates/sway-portals.conf.j2 new file mode 100644 index 0000000..75a76ac --- /dev/null +++ b/templates/sway-portals.conf.j2 @@ -0,0 +1,6 @@ +[preferred] +# use xdg-desktop-portal-gtk for every portal interface +default=gtk +# except for the xdg-desktop-portal-wlr supplied interfaces +org.freedesktop.impl.portal.Screencast=wlr +org.freedesktop.impl.portal.Screenshot=wlr diff --git a/templates/sway_config.j2 b/templates/sway_config.j2 index 30f19d7..00c85b1 100644 --- a/templates/sway_config.j2 +++ b/templates/sway_config.j2 @@ -14,6 +14,11 @@ set $term footclient # on the original workspace that the command was run on. set $menu wofi -S drun | xargs swaymsg exec -- +# Dbus stuff +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK + # Autostart exec --no-startup-id nm-applet exec --no-startup-id autotiling @@ -174,6 +179,9 @@ input type:keyboard { # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+minus scratchpad show + +# Flameshot +for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0 # # Resizing containers: # diff --git a/templates/zshrc.j2 b/templates/zshrc.j2 index 4c2599f..54227b8 100644 --- a/templates/zshrc.j2 +++ b/templates/zshrc.j2 @@ -117,6 +117,8 @@ unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" fi +# Completions +source <(kubectl completion zsh) h=( $(get_drive_servers) ) 2>/dev/null if [[ $#h -gt 0 ]]; then zstyle ':completion:*:ssh:*' hosts $h