|
2010-10-31
, 19:16
|
|
Posts: 623 |
Thanked: 289 times |
Joined on Jan 2010
@ UK
|
#822
|
/home/user/.backgrounds
DESKTOP_TO_ROTATE=4 if [ ! -f "/home/user/.backgro...
/home/user/.backgrounds/rotate-landscape-4.png /home/user/.backgrounds/rotate-landscape-inverted-4.png /home/user/.backgrounds/rotate-portrait-4.png /home/user/.backgrounds/rotate-portrait-inverted-4.png
The Following 6 Users Say Thank You to JonWW For This Useful Post: | ||
|
2010-10-31
, 19:40
|
|
Posts: 675 |
Thanked: 923 times |
Joined on Apr 2010
@ London
|
#823
|
I've made a QBW to rotate a desktop background according to the orientation of the phone. Enjoy.
Download and open the attatched zip file.
Copy the image files to:
Next import 'Desktop-rotator.QBW.txt' into a new QBW on any desktop, it does not matter which desktop as becon is hidden.Code:/home/user/.backgrounds
Edit the Advanced settings and where you see the peice of code
change the value to the desktop you wish to rotate. Also change the image names to the same desktop number.Code:DESKTOP_TO_ROTATE=4 if [ ! -f "/home/user/.backgro...
Code:/home/user/.backgrounds/rotate-landscape-4.png /home/user/.backgrounds/rotate-landscape-inverted-4.png /home/user/.backgrounds/rotate-portrait-4.png /home/user/.backgrounds/rotate-portrait-inverted-4.png
The Following User Says Thank You to D4rKlar For This Useful Post: | ||
|
2010-10-31
, 19:58
|
Posts: 490 |
Thanked: 191 times |
Joined on May 2010
|
#824
|
|
2010-10-31
, 21:07
|
|
Posts: 675 |
Thanked: 923 times |
Joined on Apr 2010
@ London
|
#825
|
|
2010-10-31
, 22:07
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#826
|
Does anyone know how to switch on-press animation from "hexagon inside rectangle" to rectangle ?
|
2010-10-31
, 22:16
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#827
|
OK JonWWs gravity desktop switcher works perfectly, although as No!No!No!Yes! mentioned there might be - there is - quite a bit of lag, possibly due to loading the background images.
Thinking logically, this might be reduced by cutting the orientations to just two - portrait and landscape. Whilst invert-portrait and invert-landscape are awesome, in essence they are just eye-candy as no apps work in those orientations anyway... How easy would it be to cut the number of orientations down?
Kind Regards,
D4rKlar
...
# "landscape (inverted)") cp "/home/user/.backgrounds/rotate-landscape-inverted-$DESKTOP_TO_ROTATE.png" "/home/user/.backgrounds/background-$DESKTOP_TO_ROTATE.png";;
# "portrait (inverted)") cp "/home/user/.backgrounds/rotate-portrait-inverted-$DESKTOP_TO_ROTATE.png" "/home/user/.backgrounds/background-$DESKTOP_TO_ROTATE.png";;
...
|
2010-10-31
, 23:23
|
|
Posts: 133 |
Thanked: 51 times |
Joined on Jul 2010
@ Swiss
|
#828
|
|
2010-10-31
, 23:41
|
Posts: 41 |
Thanked: 19 times |
Joined on Jan 2010
|
#829
|
|
2010-11-01
, 05:10
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#830
|
@No!No!No!Yes! i've tried to tweak your new cmd for rotation for a play/pause button and used @techies cmd for that button, but couldn't make it work right, it only started and the icon vanished. So i tried the above code you posted for the fm transmitter. Just pasted the start and stop buttons from mediaplayer dbus codes and it works as it should.
Now my problem is, i don't know how to integrate the rotation code to that beecon/button and that is needed to match the other beecons on my desktop (all rotating). I'm as shaz really lost on how to put the codes together
Any help will be great
Ps: I rather have 3 beccons/buttons than 4 for music on my desktop (previous, next, play/stop - previous, next, stop, start)...
c=$QBW_CURRENT_RESULTS_TEXT
if [ "_$c" == "_" -o "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ];then
# On startup, initial play state is
# "stopped" so just set c=0 here
c=0;
fi;
if [ "$QBW_EXEC_REASON" == "QBW_CLICK" ];then
if [ $c -eq 1 ]; then
# Add here command for Stop/Pause
c=0;
else
# Add here command for Play/Resume
c=1;
fi;
fi
case "$QBW_ORIENTATION_MODE" in
"portrait") x=644;y=292;xt=`expr 4 + 4 \\* $c` ;;
"landscape (inverted)") x=644;y=155;xt=`expr 5 + 4 \\* $c` ;;
"portrait (inverted)") x=0;y=155;xt=`expr 6 + 4 \\* $c` ;;
*) x=0;y=292;xt=`expr 3 + 4 \\* $c` ;;
esac
# comment next line with "sharp" (trailing char of this line) if you don't need widget move
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_position int32:$x int32:$y
echo $c
exit $xt
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
Now my problem is, i don't know how to integrate the rotation code to that beecon/button and that is needed to match the other beecons on my desktop (all rotating). I'm as shaz really lost on how to put the codes together
Any help will be great
Ps: I rather have 3 beccons/buttons than 4 for music on my desktop (previous, next, play/stop - previous, next, stop, start)...
My Procreate art:
https://folio.procreate.art/dousan
My Søciety6:
http://society6.com/Dousan
Last edited by Dousan; 2010-10-31 at 18:28.