[Solved] Opening a 90º rotated Application (Mode PORTRAIT)?

Everything about X, Gnome, KDE, ... and everything running on it

[Solved] Opening a 90º rotated Application (Mode PORTRAIT)?

Postby bester69 » 2019-05-19 23:11

Hi,

My desktop is plasma, but I didnt find any windows rule to rotate the windows display 90º.. I dont want to rotate the whole desktop, I just want to be able to apply to some application that 90º rotation.. Is this even possible; how would you do it?

I think we could use something like wayland/weston for opening any app, rotating the whole emebbed weston desktop. Im trying to figure out this.. :?
Last edited by bester69 on 2019-10-26 07:20, edited 1 time in total.
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1498
Joined: 2015-04-02 13:15

Re: Opening a 90º rotated Application (Mode PORTRAIT)?

Postby bester69 » 2019-05-20 02:52

As a temporary workaround I could use touchpad rotation,, :x

xrandr -o left
xinput set-prop "SynPS/2 Synaptics TouchPad" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
xinput set-prop "SynPS/2 Synaptics TouchPad" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
sleep 40
xrandr -o normal
xinput set-prop "SynPS/2 Synaptics TouchPad" --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0
xinput set-prop "SynPS/2 Synaptics TouchPad" --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1498
Joined: 2015-04-02 13:15

Re: Opening a 90º rotated Application (Mode PORTRAIT)?

Postby bester69 » 2019-10-26 07:20

Ok, we can use weston and wailand.:
https://unix.stackexchange.com/question ... dow-in-x11

sudo apt install weston xwayland

weston.ini
Code: Select all
[core]
modules=xwayland.so
shell=desktop-shell.so
idle-time=0
[shell]
background-color=0xff002244
locking=false
# panel-location=none
panel-location=none   
[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
path=/usr/bin/weston-terminal
[launcher]
icon=/usr/share/icons/hicolor/48x48/apps/firefox.png
path=/usr/bin/firefox
[output]
name=X1
mode=1280x800
transform=90
# wanna get mad? use: transform=flipped-270
scale=1


rotate.sh (Rotate web 90º in firefox)
Code: Select all
#!/bin/bash
#
killall weston
rm -f /tmp/.X5-lock
weston &> /dev/null &
sleep 1
WAYLAND_DISPLAY=wayland-0 Xwayland :5 &
export DISPLAY=:5
if [ -z "$1" ]
then
firefox -url http://google.es &
else
firefox -url "$1" &
fi
xdotool search --sync --onlyvisible --class "Firefox" windowactivate key F11


And here the result.:

rotate https://books.google.es/books?....page&q=linux&f=true

Image

Image

And now we can do a properly OCR of screeshot capture :o
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1498
Joined: 2015-04-02 13:15

Re: [Solved] Opening a 90º rotated Application (Mode PORTRAI

Postby bester69 » 2019-10-28 03:36

sudo apt install weston xwayland gcolor2

Improved script rotate 90º.:
- added kwin manager windows
- added konsole for using within weston, just in case
- gcolor2 as control window script
(closing properly firefox before leaving weston)



rotate.sh (Rotate web 90º in firefox)
Code: Select all
#!/bin/bash
#
xdotool search  "Firefox" windowactivate key alt+F4
killall firefox-esr
killall weston
rm -f /tmp/.X5-lock
weston  &> /dev/null &
sleep 1
export WAYLAND_DISPLAY=wayland-0
Xwayland :5 &
export DISPLAY=:5
#Se lanza gestor de ventanas Kwin para facilitar
 kwin &
 konsole &
 if [ -z "$1" ]
 then
 firefox -url http://google.es &> /dev/null &
 else
 firefox -url "$1" &> /dev/null &
 fi
 sleep 1
xdotool search --sync --onlyvisible --class "Firefox" windowactivate key F11
DISPLAY=:0 xdotool search --sync --onlyvisible --class "gcolor2" windowminimize &
DISPLAY=:0 gcolor2 &> /dev/null
sleep 2
WID=$(xdotool search --name "Firefox" | tail -n 1)
xdotool windowactivate $WID key ctrl+q
sleep 2
killall weston
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1498
Joined: 2015-04-02 13:15


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable