Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE-3 ==> e16 HOWTO
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Tue May 18, 2010 2:30 am    Post subject: KDE-3 ==> e16 HOWTO Reply with quote

This post will get you started with e16.

This site has over 200 e16 themes. I like Dufrenite, NorthernLights, and StarEnli, but you may not. There are previews of all the themes. I suggest you poke around and grab half a dozen that you like. The site also has the best instructions I've seen for editing e16 themes (but don't even think about editing themes yet). To install a theme, simple move the .etheme file to the ~/.e16/themes/ directory.

E16 has "virtual desktops" which are just like multiple desktops in KDE, Gnome, etc. It also has "desktop areas" which you get to by bumping your mouse up against one of the borders of the screen. It is like the desktop area is larger than the screen. I found this confusing and have turned it off since I already have dual monitors via Twinview. It might be great for a netbook though.

If you increase the number of desktops (I use seven) extra pager windows will open. They will all be on top of each other. The pager is not one window like in most other DE/WMs. It is a window for each desktop. You drag with alt-<left cick> and you resize with alt-<middle-click> I make each pager window borderless (alt-<rightclick> always gets you to the titlebar menu) and stack them. I turned off the zooming and stuff. I don't rememeber if the KDE pager does this but the e16 pager lets you take a window out of the pager and put it on the current desktop.

In general, you modify things by copying files from $EROOT/config (/usr/share/e16/config) to your ~/.e16 directory and then editing them there. You can restart e16 WITHOUT closing down any of your apps. It just takes a few seconds. You sometimes need to clear the config cache first (under Maintenance).

The easiest way to fix fonts being too small is to copy my fonts.cfg (the name matters) into your ~/.e16 directory:
Code:
#include <definitions>
__E_CFG_VERSION 1
__E_CFG_VERSION 1
__FONTS __BGN
font-default        "Vera/13"
font-border         "Vera/13"
font-coords         "VeraBd/14"
font-dialog         "Vera/14"
font-dialog-hilite   "Vera/12"   /* ??? */
font-epplet         "Vera/12"
font-epplet-small   "Vera/10"
font-epplet-medium   "Vera/12"
font-epplet-large   "Vera/14"
font-focus          "VeraBd/11"
font-iconbox         "VeraBd/11"
font-init           "VeraBd/12"
font-menu           "Vera/13"
font-pager          "VeraBd/11"
font-tooltip        "VeraBd/11"
__END

These will probably be too big for you. Lower the numbers to get the fonts the size you want. You will also have to turn off the theme fonts in Settings ==> Theme. The available fonts are in /usr/share/e16/fonts. I'm happy with Vera so I haven't tried adding any fonts.

I use xmodmap to map my keyboard keys. Create three directories:
Code:
$ cd ~/.e16
$ mkdir Start Stop Init

Put scripts you want to run when e16 starts (such as xmodmap) in Init (the scripts in the Start directory will run when e16 starts and also when it restarts). If the script ends in .sh it will be run in the foreground, otherwise it will be run in the background.

To change the keybindings, copy /usr/share/e16/config/bindings.cfg to ~/.e16 then edit the copy and restart. There is no cascading going on so copy the complete file and then change what you want to change.

Same thing with menus. You can edit the files in ~/.e16/menus. You can also copy files from /usr/share/e16/config/menus to ~/.e16/menus and then edit them there.

You can adjust about 95% of the e16 settings using the Settings GUI. You can edit the full 100% (AFAIK) with the fabulous command line program eesh. Use "eesh help" "eesh help all" and "eesh help full" for help on using eesh. The eesh program is to e16 as DCOP is to KDE. The combination of being able to edit keybindings and menus combined with the eesh program is what gives you great power over e16. Warning: Do not call eesh from scripts in Start/ Stop/ or Init/ subdirectories that are launched in the foreground (script name ends in .sh). This will cause e16 to hang.

I installed the Cherokee web server and installed info2html and man2html cgi programs. This gives me man and info pages in HTML format like the man: and info: kioslaves. The info2html package worked well. The man2html package sort of sucked so I wrote my own Perl script based on the rman program.

I'm using pcmanfm for my file browser. It can also mount/umount removable media like USB sticks. I use lxpanel for the simple taskbar it provides. E16 comes with no panels. It is like fluxbox and you get to everything by clicking on the desktop. I like the XFCE "terminal" program (emerge 11-terms/terminal) as a replacement for konsole. There are others available such as RoxTerm and lxterm. I use Firefox instead of Konqueror and I use Claws-mail instead of Kmail. I plan to hack Claws-mail so Ctrl-a goes to the beginning of the line.

I've been writing a lot of little scripts to customize e16. Here are a couple. The e16-restart script clears the config cache before doing a restart:
Code:
#!/bin/bash

$EROOT/scripts/e_cache_clean config
eesh exit restart


The change-desktop script moves both a window and the default desktop, just like the mousewheel can do on titlebars in KDE-3:
Code:
#!/bin/bash

case "$1" in
    next|prev)
    goto=""
    ;;
    *)
    goto="goto"
esac

eesh <<HERE
wop current raise
wop current desk $1
desk $goto $1
HERE

Normally you give it the number of a desktop (starting with zero). The case statement allows you to give it "next" and "prev" as well. Here is next-desktop:
Code:
#!/bin/bash

eesh <<HERE
wop current raise
wop current desk next
desk next
HERE

I bound this and the prev-desktop script to Ctrl-mousewheel so Ctrl-mousewheel anywhere on a window will take you and that window to the next or previous desktop.

I suggest using mostly GTK apps and then try to find a GTK theme and an e16 theme that work well together. I ended up modifying the Blue-Joy GTK theme and the NorthernLights e16 theme to get something that I like that works together. It would be great if we could get a collection of combined GTK + e16 themes. Learning how to edit e16 themes was rather daunting. Try to get the menus and panels and bindings and fonts all working first.

Oh yes, e16 has real transparency with composite and also psuedo-transparency for those who don't have or want composite. The two don't mix well so you will have to choose. I chose pseudo transparency but only use it for Conky, Gkrellm and terminals. I think a lot of the themes were designed assuming composite transparency. That explains the plethora of plain gray menu backgrounds.
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1052
Location: The Holy city of Honolulu

PostPosted: Tue May 18, 2010 6:54 am    Post subject: Reply with quote

Nice post :)

Stable E has been a love of mine for years. One of my favourite aspects of e16 is the menu configuration. Editing menus in e16 is via cli is simple & elegant, and you can get the menus exactly how you like them.
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Tue May 18, 2010 6:09 pm    Post subject: Reply with quote

One of the things I liked most about KDE-3 was access to the rightclick menu in Konqueror so I could easily add my own right-click searches for highligted text. This combined with the cgi: kioslave gave me a lot of power. Firefox has some extensions that help but I never found one I really liked.

I don't have a perfect substitute but what I've made is in some ways better. The key is a little command-line program called xclip that can echo the contents of the X-windows clipboard. Here is google-search:
Code:
#!/bin/bash

url="http://www.google.com/search?q="
args=$(url-encode `xclip -o`)
#echo $args
firefox "$url$args" &> /dev/null


Here is url-encode:
Code:
#!/usr/bin/perl

for (@ARGV) {
    s/^\s+|\s+$//;              # remove leading/trailing whitespace (ws)
    m/\s/ and $_ = qq{"$_"};    # interior ws => quote the string

    # Escape wacky characters
    s{([^-.~\w\s'/i$!*()])}{sprintf("%%%02X", ord($1))}seg;

    # Convert whitespace to plus signs
    s/\s+/+/g;
}

# "Return" (via print) one big string
print join "+",  @ARGV;


I tried to use the xclip -display option to let the cgi programs use xclip directly but it didn't work. It is probably a very good thing that it didn't work.

I want to make desktop icon buttons for my most commonly used searches but so far I've been unable to get them to work reliably across themes so for now I've settled for menu entries. H'mm. I just realized that I can also add some "hot-keys" to bindings.cfg that will allow me to use key combinations to get to my searches. Maybe Ctrl-Alt-g for google, etc.

Edit: Updated the url-encode script.

Update: I'm now using a simple gtkdialog script to give me a panel of buttons for doing my standard searches.


Last edited by BitJam on Thu Aug 26, 2010 8:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1052
Location: The Holy city of Honolulu

PostPosted: Tue May 18, 2010 6:14 pm    Post subject: Reply with quote

Years back I used to use an iconbar with e16 (the iconbar was a stand alone application based off of the old e17 code). There must be something similar still out there.
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Tue May 18, 2010 6:50 pm    Post subject: Reply with quote

E16 comes with an iconbox already. I make it borderless and transparent. I put it right where the lxpanel pops out (it is set to transparent and auto-hide). This works well for me.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Tue May 18, 2010 7:55 pm    Post subject: Reply with quote

The way my desktop is configured with multiple backgrounds and pseudo-transparency, after I do a restart the background doesn't get updated correctly when windows move or disappear. This is easily fixed by changing to another desktop and then changing back. I tried automating this in e16-restart:
Code:
#!/bin/bash

$EROOT/scripts/e_cache_clean config
eesh exit restart
sleep 3
eesh desk next
sleep 1
eesh desk prev

YMMV. I had previously edited e_cache_clean to get rid of the dialog box saying the purge was complete. I edited my menus to call e16-restart instead of doing the built-in restart.
Back to top
View user's profile Send private message
gcyoung
Apprentice
Apprentice


Joined: 04 Jul 2007
Posts: 170
Location: England

PostPosted: Sun Aug 26, 2012 11:31 am    Post subject: Reply with quote

If you are still an e16 "fan" Bitjam, you might be able to help me with this:-

I'm constantly frustrated when emerging several programs or making a fresh installation of gentoo, to have the screen blanking out, so that I must flip the spacebar to periodically to ensure that the machine is still happily compiling; or, even worse, when watching a film from the BBC with adobe-flash, having to activate the keyboard every 10 minutes or so to keep watching.

I have used the gnome-power-manager in the past, but that doesn't seem to work any more with the system I now have. In any event it means installing about 57 extra unwanted gnome based programs as well. I tried also the xfce4 power-manager, but that will not work either.

I am, therefore, looking to find a power manager that does not require many supporting programs and will work with e16, or, alternatively, some way of switching of the monitor power saving setup. I have an Asus motherboard with a GPU (combined ati 6000 graphics and athon64 CPU).

if any e16 users have solved this problem I'd be grateful to learn how
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Tue Sep 18, 2012 2:53 am    Post subject: Reply with quote

Am on vacation now. Still LOVE e16. Use the "xset" command. Will post a script when I get home.

To leave display on use:
Code:
xset dpms 0 0 0 s 0 0


To set timeout to $x seconds use:
Code:
xset dpms $x $x $x s $x $x
Back to top
View user's profile Send private message
gcyoung
Apprentice
Apprentice


Joined: 04 Jul 2007
Posts: 170
Location: England

PostPosted: Tue Sep 18, 2012 2:02 pm    Post subject: Reply with quote

Many thanks BitJam. I was not aware of the xset command. I have now read the man page and set up the command you suggested in my ~/.e16/Init/"setupscript". I can easily set it back to defaults if I need to go away and leave the computer on for a long time, although it's probably easier to just turn the monitor off.

Look forward to seeing what sort of script you cook up!
Back to top
View user's profile Send private message
gcyoung
Apprentice
Apprentice


Joined: 04 Jul 2007
Posts: 170
Location: England

PostPosted: Tue Sep 18, 2012 2:47 pm    Post subject: machine commander & e16 Reply with quote

A further thought.

I use machine commander (mc ) as a file manager quit a bit, and have to open it by opening a terminal first. If any e16 user knows how to open it via a script which would automatically open up a terminal first, so that the script could be put into a menu, I'd be grateful to learn of it. I have tried various options, but without much success.

I'm currently working on getting usb2 files to open up without a graphical file manager (ie in mc) on insertion, and will post this if/when successful,
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Tue Sep 18, 2012 7:45 pm    Post subject: Reply with quote

Code:
aterm -e mc

Or
Code:
urxvt -e mc
should work. Check the man page for the terminal program you want to use because -e may not be universal. Put it in a little shell scrpt if you want to call it via a hotkey.
Back to top
View user's profile Send private message
gcyoung
Apprentice
Apprentice


Joined: 04 Jul 2007
Posts: 170
Location: England

PostPosted: Thu Sep 20, 2012 9:58 am    Post subject: e16 and mc Reply with quote

Works fine. Thanks again Bitjam.
I use the X11 Terminal program so I have set that up in a one line script which I call from my main menu.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2506
Location: Silver City, NM

PostPosted: Mon Oct 01, 2012 1:11 pm    Post subject: Reply with quote

Here is the "toggle-sleep" script I use:
Code:
#!/bin/bash

minutes=16
seconds=$((minutes * 60))


if xset q | grep -q "Standby: [1-9]"; then
    xset  dpms 0 0 0 s 0 0 
    eesh dialog_ok "Sleep disabled"
else
    xset  dpms $seconds $seconds $seconds s $seconds $seconds 
    eesh dialog_ok "Sleep enabled.  Delay: $minutes minutes"
fi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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