Skip to content

Commit bcf634e

Browse files
Merge pull request #14540 from batocera-linux/fix-wayland-screenshot
fix wayland screenshot hotkey
2 parents 7cdc1ee + 9a8bb6c commit bcf634e

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

package/batocera/core/batocera-resolution/scripts/screenshot/batocera-screenshot.wayland-sway

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/sh
22

3+
. /etc/profile.d/xdg.sh
4+
. /etc/profile.d/wayland.sh
5+
36
FILE=$1
47
if [ -z ${FILE} ]; then
58
FILE="/userdata/screenshots/screenshot-$(date +%Y.%m.%d-%Hh%M.%S).png"

package/batocera/core/batocera-scripts/batocera-scripts.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ define BATOCERA_SCRIPTS_INSTALL_TARGET_CMDS
8484
install -m 0755 $(BATOCERA_SCRIPTS_PATH)/scripts/batocera-xtract $(TARGET_DIR)/usr/bin/
8585
ln -sf /usr/bin/batocera-xtract $(TARGET_DIR)/usr/bin/file-roller
8686
install -m 0755 $(BATOCERA_SCRIPTS_PATH)/scripts/getLocalXDisplay $(TARGET_DIR)/usr/bin/
87+
install -m 0755 $(BATOCERA_SCRIPTS_PATH)/scripts/getLocalWaylandDisplay $(TARGET_DIR)/usr/bin/
8788
endef
8889

8990
define BATOCERA_SCRIPTS_INSTALL_MOUSE
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
find /run -name "wayland-*.lock" 2>/dev/null | head -1 | sed -e s+"^.*/\([^/]*\)\.lock$"+"\1"+
4+
exit ${PIPESTATUS[0]}

package/batocera/core/batocera-system/batocera-system.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ define BATOCERA_SYSTEM_INSTALL_TARGET_CMDS
125125
cp $(BR2_EXTERNAL_BATOCERA_PATH)/package/batocera/core/batocera-system/dbus.sh \
126126
$(TARGET_DIR)/etc/profile.d/dbus.sh
127127

128+
# not really needed for xorg
129+
cp $(BR2_EXTERNAL_BATOCERA_PATH)/package/batocera/core/batocera-system/wayland.sh \
130+
$(TARGET_DIR)/etc/profile.d/wayland.sh
131+
128132
# list of modules that doesnt like suspend
129133
mkdir -p $(TARGET_DIR)/etc/pm/config.d
130134
echo 'SUSPEND_MODULES="rtw88_8822ce snd_pci_acp5x"' > $(TARGET_DIR)/etc/pm/config.d/config
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
# SWAYSOCK=<XDG_RUNTIME_DIR>/sway-ipc.<uid>.sock
4+
export SWAYSOCK=${XDG_RUNTIME_DIR}/sway-ipc.0.sock
5+
export WAYLAND_DISPLAY=$(getLocalWaylandDisplay)

0 commit comments

Comments
 (0)