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/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: #