Skip to content

Commit

Permalink
Wayland X11 dual desktop
Browse files Browse the repository at this point in the history
Yes...
  • Loading branch information
Cam authored Mar 2, 2024
1 parent f7f3ebf commit 20f40a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ printf "Installing requirements...\n"

printf 'KERNEL=="event[0-9]*",SUBSYSTEM=="input",GROUP="razerInputGroup",MODE="640"' | sudo tee /etc/udev/rules.d/80-naga.rules >/dev/null

LOGINTYPE=$(loginctl show-session "$(loginctl | grep "$(whoami)" | awk '{print $1}')" -p Type)
if [ "$LOGINTYPE" = "Type=wayland" ]; then
# shellcheck disable=SC2046
if [ "$(loginctl show-session $(loginctl | grep "$(whoami)" | awk '{print $1}') | grep -c "Type=wayland")" -ne 0 ]; then
WAYLANDTYPE=true
if ! nc -z 8.8.8.8 53 >/dev/null 2>&1; then
printf "\033[0;31mNO INTERNET CONNECTION\033[0m\n"
exit 1
Expand Down Expand Up @@ -97,8 +98,8 @@ printf "\033[0;35mhttps://github.com/lostallmymoney/Razer_Mouse_Linux\033[0m\n\n

xdg-open https://github.com/lostallmymoney/Razer_Mouse_Linux >/dev/null 2>&1

if [ "$LOGINTYPE" = "Type=wayland" ]; then
if [ "$WAYLANDTYPE" = "Type=wayland" ]; then
printf "\033[0;31mRELOGGING NECESSARY\033[0m\n"
bash -c 'read -sp "Press ENTER to log out..."'
sudo pkill -HUP -u $USER
sudo pkill -HUP -u "$USER"
fi
3 changes: 2 additions & 1 deletion src/nagaServerCatcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
while [ "$(who | wc -l)" -lt 2 ]; do
sleep 1
done
if [ "$(loginctl show-session "$(loginctl | grep "$(whoami)" | awk '{print $1}')" -p Type)" = "Type=wayland" ]; then
# shellcheck disable=SC2046
if [ "$(loginctl show-session $(loginctl | grep "$(whoami)" | awk '{print $1}') | grep -c "Type=wayland")" -ne 0 ]; then
echo "Starting Wayland"
gnome-extensions enable [email protected]
killall dotoold >/dev/null 2>&1
Expand Down

0 comments on commit 20f40a5

Please sign in to comment.