mirror of
https://github.com/linuxserver/docker-webtop.git
synced 2026-03-16 00:00:48 +08:00
clipboard support fedora kde wayland
This commit is contained in:
parent
c574dc1cf6
commit
8405c50693
20
Dockerfile
20
Dockerfile
@ -8,8 +8,7 @@ LABEL maintainer="thelamer"
|
||||
|
||||
# title
|
||||
ENV TITLE="Fedora KDE" \
|
||||
NO_GAMEPAD=true \
|
||||
SELKIES_WAYLAND_SOCKET_INDEX=1
|
||||
NO_GAMEPAD=true
|
||||
|
||||
RUN \
|
||||
echo "**** add icon ****" && \
|
||||
@ -19,6 +18,7 @@ RUN \
|
||||
echo "**** install packages ****" && \
|
||||
dnf install -y --setopt=install_weak_deps=False --best \
|
||||
breeze-icon-theme \
|
||||
cargo \
|
||||
chromium \
|
||||
dolphin \
|
||||
firefox \
|
||||
@ -35,21 +35,18 @@ RUN \
|
||||
plasma-systemmonitor \
|
||||
plasma-workspace-xorg \
|
||||
qt5-qtscript && \
|
||||
cargo install \
|
||||
wl-clipboard-rs-tools && \
|
||||
echo "**** replace wl-clipboard with rust ****" && \
|
||||
mv \
|
||||
/config/.cargo/bin/wl-* \
|
||||
/usr/bin/ && \
|
||||
echo "**** application tweaks ****" && \
|
||||
sed -i \
|
||||
's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \
|
||||
/usr/share/applications/chromium-browser.desktop && \
|
||||
setcap -r \
|
||||
/usr/sbin/kwin_wayland && \
|
||||
rm -f \
|
||||
/usr/bin/wl-paste \
|
||||
/usr/bin/wl-copy && \
|
||||
echo "#! /bin/bash" > \
|
||||
/tmp/wl-paste && \
|
||||
echo "#! /bin/bash" > \
|
||||
/tmp/wl-copy && \
|
||||
chmod +x /tmp/wl-* && \
|
||||
cp /tmp/wl-* /usr/bin/ && \
|
||||
echo "**** kde tweaks ****" && \
|
||||
sed -i \
|
||||
's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \
|
||||
@ -63,6 +60,7 @@ RUN \
|
||||
dnf autoremove -y && \
|
||||
dnf clean all && \
|
||||
rm -rf \
|
||||
/config/.cargo \
|
||||
/config/.cache \
|
||||
/tmp/*
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ LABEL maintainer="thelamer"
|
||||
|
||||
# title
|
||||
ENV TITLE="Fedora KDE" \
|
||||
NO_GAMEPAD=true \
|
||||
SELKIES_WAYLAND_SOCKET_INDEX=1
|
||||
NO_GAMEPAD=true
|
||||
|
||||
RUN \
|
||||
echo "**** add icon ****" && \
|
||||
@ -19,6 +18,7 @@ RUN \
|
||||
echo "**** install packages ****" && \
|
||||
dnf install -y --setopt=install_weak_deps=False --best \
|
||||
breeze-icon-theme \
|
||||
cargo \
|
||||
chromium \
|
||||
dolphin \
|
||||
firefox \
|
||||
@ -35,21 +35,18 @@ RUN \
|
||||
plasma-systemmonitor \
|
||||
plasma-workspace-xorg \
|
||||
qt5-qtscript && \
|
||||
cargo install \
|
||||
wl-clipboard-rs-tools && \
|
||||
echo "**** replace wl-clipboard with rust ****" && \
|
||||
mv \
|
||||
/config/.cargo/bin/wl-* \
|
||||
/usr/bin/ && \
|
||||
echo "**** application tweaks ****" && \
|
||||
sed -i \
|
||||
's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \
|
||||
/usr/share/applications/chromium-browser.desktop && \
|
||||
setcap -r \
|
||||
/usr/sbin/kwin_wayland && \
|
||||
rm -f \
|
||||
/usr/bin/wl-paste \
|
||||
/usr/bin/wl-copy && \
|
||||
echo "#! /bin/bash" > \
|
||||
/tmp/wl-paste && \
|
||||
echo "#! /bin/bash" > \
|
||||
/tmp/wl-copy && \
|
||||
chmod +x /tmp/wl-* && \
|
||||
cp /tmp/wl-* /usr/bin/ && \
|
||||
echo "**** kde tweaks ****" && \
|
||||
sed -i \
|
||||
's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \
|
||||
@ -63,6 +60,7 @@ RUN \
|
||||
dnf autoremove -y && \
|
||||
dnf clean all && \
|
||||
rm -rf \
|
||||
/config/.cargo \
|
||||
/config/.cache \
|
||||
/tmp/*
|
||||
|
||||
|
||||
@ -11,6 +11,38 @@ if [ ! -f $HOME/.config/kdeglobals ]; then
|
||||
kwriteconfig6 --file $HOME/.config/kdeglobals --group KDE --key LookAndFeelPackage org.fedoraproject.fedora.desktop
|
||||
fi
|
||||
|
||||
# Setup permissive clipboard rules
|
||||
KWIN_RULES_FILE="$HOME/.config/kwinrulesrc"
|
||||
RULE_DESC="wl-clipboard support"
|
||||
if ! grep -q "$RULE_DESC" "$KWIN_RULES_FILE" 2>/dev/null; then
|
||||
echo "Applying KWin clipboard rule..."
|
||||
if command -v uuidgen &> /dev/null; then
|
||||
RULE_ID=$(uuidgen)
|
||||
else
|
||||
RULE_ID=$(cat /proc/sys/kernel/random/uuid)
|
||||
fi
|
||||
count=$(kreadconfig6 --file "$KWIN_RULES_FILE" --group General --key count --default 0)
|
||||
new_count=$((count + 1))
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key count "$new_count"
|
||||
existing_rules=$(kreadconfig6 --file "$KWIN_RULES_FILE" --group General --key rules)
|
||||
if [ -z "$existing_rules" ]; then
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key rules "$RULE_ID"
|
||||
else
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key rules "$existing_rules,$RULE_ID"
|
||||
fi
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key Description "$RULE_DESC"
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key wmclass "wl-(copy|paste)"
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key wmclassmatch 3
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skiptaskbar --type bool "true"
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skiptaskbarrule 2
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skipswitcher --type bool "true"
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skipswitcherrule 2
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key fsplevel 3
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key fsplevelrule 2
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key noborder --type bool "true"
|
||||
kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key noborderrule 2
|
||||
fi
|
||||
|
||||
# Power related
|
||||
setterm blank 0
|
||||
setterm powerdown 0
|
||||
@ -46,9 +78,11 @@ if [ ! -f "${STARTUP_FILE}" ]; then
|
||||
fi
|
||||
|
||||
# Setup application DB
|
||||
sudo mv \
|
||||
/etc/xdg/menus/plasma-applications.menu \
|
||||
/etc/xdg/menus/applications.menu
|
||||
if [ ! -f "/etc/xdg/menus/applications.menu" ]; then
|
||||
sudo mv \
|
||||
/etc/xdg/menus/plasma-applications.menu \
|
||||
/etc/xdg/menus/applications.menu
|
||||
fi
|
||||
kbuildsycoca6
|
||||
|
||||
# Wayland Hacks
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user