Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 22 Nov 2014, 12:55
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Desktop Icons and background with jwm ONLY(no ROX, xtdesk..)
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [29 Posts]   Goto page: 1, 2 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Sun 10 Jan 2010, 14:26    Post subject:  Desktop Icons and background with jwm ONLY(no ROX, xtdesk..)
Subject description: You can make a tray anywhere
 

For all of you minimalists out there, here is a way to get rid of ROX if you are only using it for desktop icons

here is an example using gparted:
<Tray x="-25" y="-32" height="64" layer="0">
<TrayButton icon="gparted.png">exec:gparted</TrayButton>
</Tray>

You can save them to a file /root/.jwmrc and add this in /etc/xdg/templates/_root_.jwmrc like:
<Include>/root/.jwmrc-desktop</Include>
after
<Include>/root/.jwmrc-tray</Include>

You can also use it for the desktop background - I would recommend using /usr/share/background/default.jpg as a symlink and changing the symlink
Code:
ln-s -f $1 /usr/share/background/default

and running refreshing
Code:
jwm -restart


more on that here:
http://joewing.net/programs/jwm/config.shtml
and here:
http://wiki.archlinux.org/index.php/JWM
dt-icon.png
 Description   
 Filesize   33.18 KB
 Viewed   9956 Time(s)

dt-icon.png


_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Mon 11 Jan 2010, 22:04    Post subject:  

Here is further info:

First edit /root/.xinitrc and comment out the rox lines
{just restart X to close rox or use pprocess to kill it
afterwards you can just restart jwm to apply changes}
add my code to your /root/.jwm/jwmrc-personal ... replace <Desktops count="2"/>
{alternatively you can put it in a separate file and use <Include>/pathto/file</Include>}


<!-- Number of virtual desktops -->
<Desktops count="2">
<Desktop Name="One">
<Background type="image">/usr/share/backgrounds/default.jpg</Background>
</Desktop>
<Desktop Name="Two">
<Background type="image">/usr/share/backgrounds/default.jpg</Background>
</Desktop>
</Desktops>

<Tray layout="horizontal" x="10" y="-32" layer="0" border="0">
<TrayButton popup="sda1" icon="drive48.png">exec:rox /mnt/sda1</TrayButton>
<TrayButton popup="sda5" icon="drive48.png">exec:rox /mnt/sda5</TrayButton>
<TrayButton popup="sda7" icon="drive48.png">exec:rox /mnt/sda7</TrayButton>
<TrayButton popup="sda8" icon="drive48.png">exec:rox /mnt/sda8</TrayButton>
</Tray>

<Tray layout="vertical" x="10" y="10" layer="0" border="0">
<TrayButton popup="File Manager" icon="folder48.png">exec:rox</TrayButton>
<TrayButton label="Home"></TrayButton>
</Tray>

<Tray layout="vertical" x="74" y="10" layer="0" border="0">
<TrayButton label="Tools"></TrayButton>
<TrayButton popup="Terminal" icon="console48.png">exec:rxvt</TrayButton>
<TrayButton popup="Control Panel" icon="configuration48.png">exec:wizardwizard</TrayButton>
<TrayButton popup="Manage Drives" icon="gparted.png">exec:gparted</TrayButton>
</Tray>

<Tray layout="vertical" x="138" y="10" layer="0" border="0">
<TrayButton label="Internet"></TrayButton>
<TrayButton popup="Default Browser" icon="www48.png">exec:defaultbrowser</TrayButton>
<TrayButton popup="Default Mail" icon="email48.png">exec:defaultemail</TrayButton>
<TrayButton popup="Default Chat" icon="chat48.png">exec:defaultchat</TrayButton>
</Tray>

<Tray layout="vertical" x="202" y="10" layer="0" border="0">
<TrayButton label="Office"></TrayButton>
<TrayButton popup="Abiword Word Processor" icon="word48.png">exec:abiword</TrayButton>
<TrayButton popup="Gnumeric Spreadsheet" icon="gnumeric48.png">exec:gnumeric</TrayButton>
</Tray>

<Tray x="266" y="10" layer="0" border="0">
<!-- We can use this with sed to place a NEWICON1 -->
</Tray>
<!-- More NEWICONS -->

<Tray x="-12" y="12" layer="0" border="0">
<TrayButton popup="Xlock lock screen" icon="lock-screen48.png">exec:/usr/local/apps/Xlock/AppRun -locknow</TrayButton>
</Tray>
jwm_only_desktop.jpg
Description  Now that's MUCH better if I do say so myself.
jpg

 Download 
Filename  jwm_only_desktop.jpg 
Filesize  169.22 KB 
Downloaded  2022 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Mon 11 Jan 2010, 22:56    Post subject:  

kind of a creative approach Smile nice work, hmmm I bet plug'in play usb sticks don't come up when plugged in Smile
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Mon 11 Jan 2010, 23:33    Post subject:  

I have already thought about that one - since the files are just xml it shouldn't be that hard to adapt the eventmanager

Put <Include>/root/.jwmrc-drives</Include> in the .jwmrc template
When new drive is inserted (or mounted/unmounted) rebuild .jwmrc-drives then jwm -restart

bonus is all of the fixpuppypin stuff can go away

hmmm... what command to use when it is clicked since right click is the same as left click??? ... Xdialog script or just mount if not mounted and open it with <defaultfilemanager> <-- I guess this would be possible too

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5042
Location: Arizona, U.S.A.

PostPosted: Mon 11 Jan 2010, 23:46    Post subject:  

Not to mention folks that don`t like the mess HotPup makes of the desktop.
It doesn`t position the icons very well, and it`s interface is less than intuitive.
It would be much better if it`s icons were on an edge docked panel.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Tue 12 Jan 2010, 02:47    Post subject:  

As you can see these trays can be put anywhere so that would be solved. I just wish I could make the background of the tray clear or at least translucent.

I also added these ON/OFF tags to /root/.jwmrc-tray to later be able to turn them on and off using sed and jwm -restart
Does anyone know a good way to toggle this other than sed?
    <!-- BLINKYON --><Swallow name="blinky">blinkydelayed -bg "#DCDAD5"</Swallow><!-- BLINKYON -->
    <!-- ASAPMON --><Swallow name="asapm">asapmshell -u 4 </Swallow><!-- ASAPMON -->
    <!-- FREEMEMAPLETON --> <Swallow name="freememapplet" width="34">freememappletshell</Swallow><!-- FREEMEMAPLETON -->
    <!-- XLOADOFF <Swallow name="xload" width="32">xload -nolabel -bg "#888888" -fg red -hl white</Swallow> XLOADOFF -->


as well as an option to turn off absvolume by editing /root/.xinitrc (similar to glipper)
if [ -f /root/.absvolume_on ];then
...
fi
to turn it on echo >/root/.absvolume_on
to turn it off rm /root/.absvolume_on

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
magerlab

Joined: 08 Jul 2007
Posts: 731

PostPosted: Tue 12 Jan 2010, 03:12    Post subject:  

may be it would be better to use approach what gray uses in NOP with drive icons - to open a dialog when icon is clicked ( mount or unmount)
_________________
skype: desafimager
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Tue 12 Jan 2010, 15:32    Post subject:  

magerlab wrote:
may be it would be better to use approach what gray uses in NOP with drive icons - to open a dialog when icon is clicked ( mount or unmount)


thanks, I'll check it out.

Another hack:
If you want desktop "icons" instead of buttons there is an Opacity tag that you can apply to its associated tray (I haven't experimented yet, but I have seen it used before in a puplet for the main tray - same concept) Anyhow I can't find any documentation of its usage except for examples in Patriot's thread.

This would also be good for automatic spacing (such as for drive icons) by including a blank tray button(s) as a separator, while still grouping them in a single tray (avoids having to calculate locations)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5042
Location: Arizona, U.S.A.

PostPosted: Tue 12 Jan 2010, 15:38    Post subject:  

technosaurus; My thought exactly about the transparent panels.
Much better than icons on the desktop...

Sed and grep are the only ways I`ve ever changed any config. files.
If you must do it a lot, make a utility like mine I made for locating,
changing, and removing ROX desktop icons ( sed and grep ).

The best setup I can think of would be ( with separators in between ):
The taskbar and tray docked on the left side of the screen vertically.

The top is buttons to select which desktop ( 1, 2, 3 ,4 ).
----------------------------
Then drive buttons for all drives fixed and removable.
----------------------------
Then the task buttons ( there`s lots of room for many of them ).
----------------------------
And the clock that`s the Menu button at the bottom.

It`d be really cool if it slid out from the left border...

Last edited by sunburnt on Wed 13 Jan 2010, 14:07; edited 2 times in total
Back to top
View user's profile Send private message 
dejan555


Joined: 30 Nov 2008
Posts: 2715
Location: Montenegro

PostPosted: Tue 12 Jan 2010, 17:12    Post subject:  

This is cool:



Cool

Panel code:

Code:
<JWM>
<Tray y="-32" halign="center" layer="0">
<TrayButton icon="/usr/local/lib/X11/pixmaps/home48.png">exec:rox ~</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/console48.png">exec:rxvt -bg black -fg white -sr</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/www48.png">exec:defaultbrowser</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/drive48.png">exec:pmount</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/chat48.png">exec:defaultchat</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/multimedia48.png">exec:defaultmediaplayer</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/paint48.png">exec:defaultpaint</TrayButton>
<TrayButton icon="/usr/local/lib/X11/pixmaps/shutdown24.png">exec:/usr/bin/shutdownjwm</TrayButton>
</Tray>
</JWM>


For gradiented background:

Code:
<Background type="gradient">black:#6EBDC7</Background>

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Fri 15 Jan 2010, 01:43    Post subject: Basic Volume Control for jwm  

Here is a tray button and bash script (Xsetvol) to replace absvolume

Tray button recommend putting it after <Dock/> in /root/.jwmrc-tray
<TrayButton popup="Audio Control" icon="audio-volume-high.png">exec:Xsetvol</TrayButton>

Xsetvol bash script to set volume
Code:
#!/bin/sh
VOLUME=`amixer get Master | grep 'Mono:' | cut -d '%' -f 1 | cut -d '[' -f 2`
VOLUME=`Xdialog 2>&1 --under-mouse --title "Volume Control" --icon /usr/share/mini-icons/audio-volume-high.png --ok-label Set --cancel-label Advanced --wrap --help "Click on Advanced to adjust Mic, input, CD and other settings." --rangebox "Master Volume" 9 45 0 100 $VOLUME`
if [ $? -eq 0 ];then
amixer set Master $VOLUME"%"
else
rxvt +sb -geometry 90x20 -e alsamixer
fi
aplay /usr/share/audio/2barks.au &

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Fri 15 Jan 2010, 10:32    Post subject:  

I forgot to post a screenshot for my volume control script. It pops up a slider with a "Set" and "Advanced" button (will post a shot tonight)

Set: changes the Master Volume

Advanced: brings up an nicely formatted alsamixer

The problem with Xdialog is that it doesn't always behave as documented/expected.
1. exiting other than pressing cancel does not set $? to 255 (but maybe that is jwm?)
2. pressing the UP arrow in a slider menu makes the value go down (Lets call it pilot mode)
3. geometry is random XxY-X-Y does not give you an X by Y window X and Y from the bottom right


"rxvt +sb -geometry 90x20 -e alsamixer" should be the default for starting alsamixer in its .desktop file (maybe something in the title bar saying something like "Use your keyboard to change volume settings")

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
bugman


Joined: 20 Dec 2005
Posts: 2131
Location: buffalo commons

PostPosted: Sat 16 Jan 2010, 07:24    Post subject:  

ah, this is great, i love it, many thanks!!!
_________________
. . . the machines are clean
and the machines are not corrupted


- lee "scratch" perry
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Sun 17 Jan 2010, 00:58    Post subject:  

bugman wrote:
ah, this is great, i love it, many thanks!!!


I'm glad you approve - I had you in mind when I started doing this.

I've been trying to find the specific code that builds the drive icons... in the mean time a single icon for pmount works fair enough

What else am I missing?

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
bugman


Joined: 20 Dec 2005
Posts: 2131
Location: buffalo commons

PostPosted: Sun 17 Jan 2010, 07:21    Post subject:  

i'm using pmount for the cd, my hard drives are all mounted at boot

the pup event thing was always flaky for me anyways, sometimes it worked right, other times it brought up pmount anyways

i've also disabled cups and a couple of other unused services, and i use the 24px icons

kept absvolume and blinky as i like them--bad internet connection so blinky helps me keep an eye open, weird volume control on my speakers so absvolume is often used as well

my starting ram usage varies [why is that?], ranging from the high 40s to low 60s

Cool

_________________
. . . the machines are clean
and the machines are not corrupted


- lee "scratch" perry
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [29 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1060s ][ Queries: 13 (0.0067s) ][ GZIP on ]