From 7938bab1a0b3d90492a0f82706569f2f7f9eeb23 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 16 Sep 2020 15:56:24 +0200 Subject: Draft system for wayland --- scripts/Scripts/passmenu | 0 scripts/Scripts/setwall | 8 ++++- scripts/Scripts/xrotate | 76 ------------------------------------------------ 3 files changed, 7 insertions(+), 77 deletions(-) mode change 100644 => 100755 scripts/Scripts/passmenu delete mode 100755 scripts/Scripts/xrotate (limited to 'scripts') diff --git a/scripts/Scripts/passmenu b/scripts/Scripts/passmenu old mode 100644 new mode 100755 diff --git a/scripts/Scripts/setwall b/scripts/Scripts/setwall index f385623..2a99564 100755 --- a/scripts/Scripts/setwall +++ b/scripts/Scripts/setwall @@ -32,10 +32,16 @@ function setwalls() { } function applywall() { + set -x echo applying wallpaper $1 rm $WALLLINK ln -s $(pwd)/$1 $WALLLINK - feh --bg-fill $1 + if [ -z "${WAYLAND_DISPLAY}" ]; then + feh --bg-fill $1 + else + killall swaybg + swaybg -m fill -i $1 & + fi } function help() { diff --git a/scripts/Scripts/xrotate b/scripts/Scripts/xrotate deleted file mode 100755 index fabe98b..0000000 --- a/scripts/Scripts/xrotate +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash -set -e - -function help() { - echo "Rotate the screen and mouse input" - echo - echo "Syntax: ${BINNAME} [] " - echo "Orientation: normal,inverted,left,right" - echo "Options:" - echo " -d, --disp set for xrandr DISPLAY" - echo " -h, --help this help message" -} - -# Fix hardcode -DISP=LVDS1 - -BINNAME="xrotate" - -# Parse some args -while [[ $# -gt 0 ]]; do - case $1 in - -d|--disp) - shift - DISP=$1 - shift - ;; - -h|--help) - help - exit 0 - ;; - *) - if [[ $1 == '-'* ]]; then - echo unknown option $1 - help - exit 1 - fi - break - ;; - esac -done - -O=$1 - -MOUSE=$(xinput list | grep "slave pointer" | awk '{print $6}' | awk -F '=' '{print $2}') - -case $O in - normal) - echo "Normal" - MATRIX="1 0 0 0 1 0 0 0 1" - ;; - inverted) - echo "Inverted" - MATRIX="-1 0 0 0 -1 0 0 0 1" - ;; - left) - echo "Left" - MATRIX="0 -1 0 1 0 0 0 0 1" - ;; - right) - echo "Right" - MATRIX="0 1 0 -1 0 0 0 0 1" - ;; - *) - echo "Not an supported orientation" - help - exit 1; - ;; -esac - - -set -x - -xrandr --output $DISP --rotate $O -for M in $MOUSE; do - xinput set-prop $M "Coordinate Transformation Matrix" $MATRIX -done -- cgit v1.2.3