From c3c4f6d93c3a9b3341af47bd3e0ff24c09179ba5 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 4 Mar 2024 12:11:55 +0200 Subject: [PATCH] bash/usr-local-bin/superproductivity snap wrapper --- bash/usr-local-bin/superproductivity | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bash/usr-local-bin/superproductivity diff --git a/bash/usr-local-bin/superproductivity b/bash/usr-local-bin/superproductivity new file mode 100755 index 0000000..e122793 --- /dev/null +++ b/bash/usr-local-bin/superproductivity @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -x +if [ -f /snap/bin/superproductivity ]; then + # https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1951491/comments/105 + export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus + snap run superproductivity --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations $@ +else + /usr/bin/superproductivity --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations +fi +set +x