-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevshell
More file actions
executable file
·40 lines (32 loc) · 1.1 KB
/
devshell
File metadata and controls
executable file
·40 lines (32 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
# Isolated config and extensions for dev shell
export XDG_DATA_HOME="/tmp/gnome-dev-$USER"
export GSETTINGS_BACKEND=memory
export GTK_A11Y=none
export GTK_USE_PORTAL=0
# Minimal monitor config for a larger virtual screen
MONITOR_CFG="$XDG_DATA_HOME/mutter-devkit-monitor.ini"
mkdir -p "$(dirname "$MONITOR_CFG")"
cat > "$MONITOR_CFG" <<EOF
[monitor-0]
width=2560
height=1600
refresh-rate=60000
EOF
export MUTTER_DEBUG_DUMMY_MONITOR_CONFIG="$MONITOR_CFG"
# Optional: satisfy org.freedesktop.secrets so portals stop timing out
if command -v gnome-keyring-daemon >/dev/null 2>&1; then
eval "$(gnome-keyring-daemon --start --components=secrets)" || true
export SSH_AUTH_SOCK
fi
EXT_ID="${DEVSHELL_EXT_ID:-wayland-effects@daoneill.github.com}"
EXT_SRC="${DEVSHELL_EXT_SRC:-$HOME/src/wayland-effects}"
EXT_DIR="$XDG_DATA_HOME/gnome-shell/extensions"
mkdir -p "$EXT_DIR"
rm -rf "$EXT_DIR/$EXT_ID"
ln -s "$EXT_SRC" "$EXT_DIR/$EXT_ID"
# Kill any old devkit session
pkill -f "gnome-shell --devkit" 2>/dev/null || true
# Start nested GNOME Shell devkit
exec dbus-run-session gnome-shell --devkit --wayland