maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   9 easy Desktop shortcuts (https://talk.maemo.org/showthread.php?t=20030)

emjayes 2008-05-13 13:36

9 easy Desktop shortcuts
 
One-click install:
http://mikie.dy.fi/maemo/shortcuts.install

It installs 9 Home-applets, named ShortCut1 -9

each can be configured individually by editing the corresponding config file: /home/user/.shortcutX.conf

the first line is the application/command launched,
and the second line is the name of the imagefile to use.

The shortcuts can be resized to your need, and the image will automagically scale to fit the entire button.
There is no transparency (yet) this is just a quick and dirty hack.
There is no other way to configure the shortcuts, than to edit the config-files in xterm.
Each shortcut has a predefined function and image, which you can use as starting point to tweak the to your preferences.

Screenshot showing scalability of buttons:
http://mikie.dy.fi/maemo/shortcuts.png

andrewfblack 2008-05-13 14:11

Re: 9 easy Desktop shortcuts
 
Will have to check this out when I get home.

anidel 2008-05-13 14:36

Re: 9 easy Desktop shortcuts
 
Installing.. I'll report back

REPORTING: installed fine. Checked the first shortcut file and noticed calculator was already there.
So I've enabled the first shortcut applet, but it won't appear on the desktop.
None of them does...

emjayes 2008-05-13 14:55

Re: 9 easy Desktop shortcuts
 
could you run in xterm:
Code:

python /usr/lib/hildon-desktop/shortcut9.py
what is the output?

anidel 2008-05-13 14:59

Re: 9 easy Desktop shortcuts
 
Quote:

Originally Posted by emjayes (Post 181074)
could you run in xterm:
Code:

python /usr/lib/hildon-desktop/shortcut9.py
what is the output?

Code:

nokia-N810-51-3:~# python /usr/lib/hildon-desktop/shortcut9.py
Traceback (most recent call last):
  File "/usr/lib/hildon-desktop/shortcut9.py", line 4, in <module>
    import hildondesktop
ImportError: No module named hildondesktop

Going to:

Code:

apt-get install python2.5-hildondesktop

anidel 2008-05-13 15:02

Re: 9 easy Desktop shortcuts
 
Ok now it does not fail. I mean the test you've asked me to do.
It just quits after a second.

But still nothing appears when I select any or all of the shortcut applets.

emjayes 2008-05-13 15:06

Re: 9 easy Desktop shortcuts
 
install this too:

hildon-desktop-python-loader

I will have to check the dependencies again

qwerty12 2008-05-13 15:12

Re: 9 easy Desktop shortcuts
 
I appreciate your work but if I may ask, what is difference between simple launcher and this?

anidel 2008-05-13 15:15

Re: 9 easy Desktop shortcuts
 
That worked, but I think i've discovered another bug.
I only tried it with the Terminal launcher, but when Terminal starts, than the desktop DOES not handle my clicks anymore.
The Web and Task Navigator menus do not appear when clicked.
When I close the Terminal, THEN all the clicks go thru and are handled.

qwerty12 2008-05-13 15:23

Re: 9 easy Desktop shortcuts
 
anidel, try adding
Quote:

&
after your command

anidel 2008-05-13 15:27

Re: 9 easy Desktop shortcuts
 
querty12, yup I am sure that is the fix, but I was simply reporting it to emjayes.

thanks :)

Benson 2008-05-13 16:04

Re: 9 easy Desktop shortcuts
 
Quote:

Originally Posted by qwerty12 (Post 181079)
I appreciate your work but if I may ask, what is difference between simple launcher and this?

Well, there's three differences.
First, and most important:
Until we get to lock the home layout, you can accidentally drag 9 things around your desktop, instead of 1, for 9 times the fun!

The others are more desirable; you can lay things out arbitrarily, say vertical instead of horizontal; or cleverly integrated with your wallpaper -- I used to do that on PCs when I had too much time.

Also, you don't need an item in the menu to launch it from home...

I'm really a big personal menu fan... just give me 5 personal menus I can throw up from 5 shortcuts, and I'd be happy.

emjayes 2008-05-13 16:17

Re: 9 easy Desktop shortcuts
 
any of these shortcuts can be modified to run personal menu.

Code:

personal-menu &
/usr/share/icons/hicolor/scalable/hildon/personal-menu.png

Yes, the unlocked Desktop is a real pain in the a**

GeraldKo 2008-05-13 16:28

Re: 9 easy Desktop shortcuts
 
Quote:

Originally Posted by Benson (Post 181102)
I'm really a big personal menu fan... just give me 5 personal menus I can throw up from 5 shortcuts, and I'd be happy.

Quote:

Originally Posted by emjayes (Post 181108)
any of these shortcuts can be modified to run personal menu.

Code:

personal-menu &
/usr/share/icons/hicolor/scalable/hildon/personal-menu.png


Is there a way to have more than one instance of Personal Menu, so that you could have a different set of items in each instance? You could launch PM1 from a shortcut and get your media apps, launch PM2 from a different shortcut and get your web-oriented apps, etc.

fiferboy 2008-05-13 17:11

Re: 9 easy Desktop shortcuts
 
For those wanting multiple PMs to use: currently the config file is hardcoded to be ~/.personal_menu.rc

There is a problem with having more than one (or, I should say more than three) Personal Menus running at once. As PM is a task navigator plugin, it needs to be loaded as one of the three plugins for your tablet. You could theoretically run three of them (after changing the code in several small ways for each one) but then you can't have anything else in your sidebar.

Maybe there needs to be a version of Personal Menu that doesn't need to load in the sidebar? Just a command with an argument specifying which configuration to use that pops up a menu? What say you?

GeraldKo 2008-05-13 17:41

Re: 9 easy Desktop shortcuts
 
Quote:

Originally Posted by fiferboy (Post 181125)
For those wanting multiple PMs to use: currently the config file is hardcoded to be ~/.personal_menu.rc

There is a problem with having more than one (or, I should say more than three) Personal Menus running at once. As PM is a task navigator plugin, it needs to be loaded as one of the three plugins for your tablet. You could theoretically run three of them (after changing the code in several small ways for each one) but then you can't have anything else in your sidebar.

Maybe there needs to be a version of Personal Menu that doesn't need to load in the sidebar? Just a command with an argument specifying which configuration to use that pops up a menu? What say you?

And the command could be launched by one of these desktop shortcut icons? Sounds good to me! Alternatively, I wouldn't mind killing off my Web-Bookmarks sidebar icon and having a second PM in which I would include those Web/Bookmark icons that I'd lose.

I'd like that arrangement in any event, but what I'm hoping to get to ultimately is a way to use one instance of PM also as a macro-typer. If you look at Posts #1, 18, and 19 in this thread, you'll see what I'm talking about. (You've given me some input on this before. I still haven't figured out how to do it. Obviously.)

Benson 2008-05-13 18:11

Re: 9 easy Desktop shortcuts
 
Quote:

Originally Posted by fiferboy (Post 181125)
Maybe there needs to be a version of Personal Menu that doesn't need to load in the sidebar? Just a command with an argument specifying which configuration to use that pops up a menu? What say you?

I say: 'W00T \/\/007!!1!'

I'm currently using cmd-nav and p-menu to get two menus; the ability to have three such menus in the navigator is tempting, but not essential. Popping up p-menu from the power-key, via powerlaunch, OTOH, looks great.

El Amir 2008-05-13 18:26

Re: 9 easy Desktop shortcuts
 
screenshot ? anybody ?

emjayes 2008-05-14 07:47

Re: 9 easy Desktop shortcuts
 
Version 0.0.1.1:
-Corrected the dependencies to include hildon-desktop-python-loader and python2.5-hildondesktop.

First post now has a screenshot.

emjayes 2008-05-14 12:05

Re: 9 easy Desktop shortcuts
 
Quote:

Originally Posted by Benson (Post 181102)
Well, there's three differences.
First, and most important:
Until we get to lock the home layout, you can accidentally drag 9 things around your desktop, instead of 1, for 9 times the fun!

I just found a method to make them "permanent"

in xterm:
Code:

sudo gainroot
chattr +i /home/user/.osso/hildon-desktop/home-layout.conf

Now, the applets WILL move, but their state is not saved in the config.

So when, and I do mean when you have once yet screwed the desktop.
Code:

killall hildon-desktop
will restore the state it was in before setting the immutable bit to the config.

Also, you can enable new applets, but they will be in their default position in the desktop after reboot, because their position is not saved.

So to enable new applets, first reset the immutable bit,
Code:

sudo gainroot
chattr -i /home/user/.osso/hildon-desktop/home-layout.conf

enable applets and set the bit again.


To have such a function as a button in personal menu:

in /home/user/.personal_menu.rc

[10]
app name=Reset Desktop
icon name=terminal
executable=/usr/local/bin/resetdesktop


/usr/local/bin/resetdesktop

#!/bin/sh
sudo /etc/init.d/hildon-desktop stop
sudo /etc/init.d/hildon-desktop start


run visudo, add these lines:
user ALL = NOPASSWD: /etc/init.d/hildon-desktop stop
user ALL = NOPASSWD: /etc/init.d/hildon-desktop start

Benson 2008-05-14 14:30

Re: 9 easy Desktop shortcuts
 
That, sir, is wonderful! Many thanks!

And once again, we (users at large, not me) have fixed Nokia's problem for them. I could get really grouchy about their software, if the hardware wasn't so sweet.

But, to my mind, it's as useful, or perhaps more, to have in personal menu a toggle for lockability...

Being too lazy to remember the precise details of sudo syntax (I think it's shell globbing, not regex?), I'm also going to fall back on two lines where one would do:

in /etc/sudoers (i.e. use visudo):
Code:

user ALL = NOPASSWD: /usr/bin/chattr -i /home/user/.osso/hildon-desktop/home-layout.conf
user ALL = NOPASSWD: /usr/bin/chattr +i /home/user/.osso/hildon-desktop/home-layout.conf

Then something like:
Code:

#!/bin/sh
if [ x`lsattr /home/user/.osso/hildon-desktop/home-layout.conf | grep '^[^ ]i'` != x ] ; then
  sudo /usr/bin/chattr -i /home/user/.osso/hildon-desktop/home-layout.conf
else
  sudo /usr/bin/chattr +i /home/user/.osso/hildon-desktop/home-layout.conf
fi

Throw that in a script to toggle it from p-menu...

Oh, and one thing; chattr is e2fs only, AFAIK. So only for SD-booting people?

emjayes 2008-05-14 14:51

Re: 9 easy Desktop shortcuts
 
Quote:

chattr is e2fs only, AFAIK. So only for SD-booting people?
I do boot from internal "MMC" of N810 so that may well be.

Here's an idea!

copy the home.conf and home-layout.conf to home.1 and home-layout.1
disable all used applets, enable other applets, save to home.2 etc.

With a small script you can have two different desktops!
just copy *.1 to *.conf and restart hildon-desktop to see desktop 1
then copy *.2 to *.conf and restart hildon-desktop to see desktop 2

I will make this tomorrow, if it seems interesting to people

Benson 2008-05-14 15:12

Re: 9 easy Desktop shortcuts
 
Slickness. If hildon-desktop weren't so slow at starting, I'd be restarting it everytime I rotate. With the ability to not only fix my wallpaper, but also swap the home applets layout, and also not worry about them getting moved... I think it'll be worth the time now.

(Previously, I had pretty much given up on home applets, and on nice wallpaper...)

emjayes 2008-05-15 10:14

Re: 9 easy Desktop shortcuts
 
Done:
http://www.internettablettalk.com/fo...ad.php?t=20078
AND it works for non-SD booting people.


All times are GMT. The time now is 16:52.

vBulletin® Version 3.8.8