You are not logged in.

#1 2008-01-25 20:53:34

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

life without a panel

Just wondered if its possible to live without a panel?

I like to have a clock on the screen and a list of open windows and [o the shame!]] some launchers for apps

Would love to get back to using Openbox but I have got real lazy

MrG


Mr Green

Offline

#2 2008-01-25 20:59:00

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: life without a panel

Openbox + pypanel solves it all...
Anyway when you mentioned it... some applications have tray icons which are unclickable without a panel... that's the only problem, I think.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#3 2008-01-25 21:03:21

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: life without a panel

I haven't had a panel for almost a year (with dwm) and I'm not missing it.

I used to have a clock in firefox, and screen, but I don't anymore (cause of 3.0beta and tiling (bare aterms))
List of open windows I don't need. I bound CapsLock to "alt-tab" behaviour for extra ease, sometimes I'll forget about a loose term behind firefox or something, but that's alright.
And I use a menu for launching apps (currently a home brewed Xdialog menu), which also displays time/HD use/load avg in the title.

Offline

#4 2008-01-25 21:08:34

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: life without a panel

Gilneas would you please pass on your homebrew?

Offline

#5 2008-01-25 21:28:35

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: life without a panel

Sure, but I'm actually trying to make a better one.

(substitute dash with bash if you don't have it)

#! /bin/dash
setsid $(awk -F'[ /]' '
{ print "\"" $0 "\" \"" $NF "\"" }' < $HOME/.menurc | xargs Xdialog --menubox "$(usefulinfo)" 400 400 400 2>&1 )&

It can be simplified, the second argument (description) is now the last word of the command.
Xdialog isn't the nicest solution, you'll notice it's somewhat inconvenient with the keyboard.
Plus it needs GTK, it's the only GTK app I have (not GTK2 though).
Since I have tiling, I don't know if 400/400/400 is appropriate at all... (I could put 1/1/1 and get the same result)

Needs a ".menurc" in ~, which has commands only.
e.g.

nice firefox
aoss dosbox
wine $g/freecell.exe

usefulinfo script: (only looks at sda7) (works nice in .bashrc too)

#! /bin/dash
( date '+%a, %b %d, %H:%M'; df -h | awk '/sda7/ {print $4}'; cat /proc/loadavg ) | sed 'N;N;s/\n/ || /g'

Offline

#6 2008-01-25 22:34:19

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: life without a panel

I gave it another shot with dialog in a new aterm. (sorry for posting offtopic twice)

I use two programs now, to avoid a quoting hell.

#! /bin/dash
aterm -sl 0 +sb +ls +trsb +tr -e menu2
setsid $(cat /tmp/menu) &

menu2:

#! /bin/dash
awk -F'[ /]' '{ print "\"" $0 "\" \"" $NF "\"" }' < $HOME/.menurc | xargs dialog --menu "$(usefulinfo)" 999 999 999 2>/tmp/menu

For some reason it needs a second to process Escape... (right + enter works fine though)

Offline

#7 2008-01-25 23:28:08

ibendiben
Member
Registered: 2007-10-10
Posts: 519

Re: life without a panel

It is better to use dialog --file. xargs can't handle dialogs exit status. Also you can use 0 0 0 to autoconf hight, width, list-length...
To use dialog --file you need to write all options to the file though...
So dialog --file /path/yourfile 2>/tmp/menu

yourfile:

--menu "$(usefulinfo)" 0 0 0 \
your list... \
... \
... \

Also awk doesn't need the '<' before the filepath AFAIK
Can you explain what you want with this? '{ print "\"" $0 "\" \"" $NF "\"" }' it looks like it could use some improvement neutral

Last edited by ibendiben (2008-01-25 23:35:04)

Offline

#8 2008-01-26 00:13:04

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: life without a panel

That's pretty cool.

I experimented a bit.
If you edit the .menurc a bit to "command" "description" (if it has spaces it needs to be quoted)
you can load it with
dialog --menu "$(usefulinfo)" 0 0 0 --file .menurc

(as if --file works like an include)

the --file doesn't mind newlines, so no need to escape them, they are treated as a new item.

Unfortunately, when I run something like this:

aterm -sl 0 +sb +ls +trsb +tr -e "dialog --menu \"$(usefulinfo)\" 0 0 0 --file $HOME/.menurc 2>/tmp/menu"

it exits immediately, while if I put that line ("dialog....2>/tmp/menu") in a script and run that, it does work.

PS a ~/.dialogrc I just made, it looks pretty good
PS2 that awk statement prints the command (entire line) and the last bit of the command (makes a good description) with some quotes around them.

Last edited by Gilneas (2008-01-26 00:22:24)

Offline

#9 2008-01-26 01:25:18

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: life without a panel

I only have a clock on my desktop. Everything else in E17 is easy handled with a mouse or the keyboard.

Offline

#10 2008-01-26 01:37:42

ibendiben
Member
Registered: 2007-10-10
Posts: 519

Re: life without a panel

Gilneas wrote:

That's pretty cool.

I experimented a bit.
If you edit the .menurc a bit to "command" "description" (if it has spaces it needs to be quoted)
you can load it with
dialog --menu "$(usefulinfo)" 0 0 0 --file .menurc

Thanks! smile

Gilneas wrote:

the --file doesn't mind newlines, so no need to escape them, they are treated as a new item.

Unfortunately, when I run something like this:

aterm -sl 0 +sb +ls +trsb +tr -e "dialog --menu \"$(usefulinfo)\" 0 0 0 --file $HOME/.menurc 2>/tmp/menu"

it exits immediately, while if I put that line ("dialog....2>/tmp/menu") in a script and run that, it does work.

That's why it needs the newlines escaped I think. Have the same problem if you escape?

Gilneas wrote:

PS a ~/.dialogrc I just made, it looks pretty good
PS2 that awk statement prints the command (entire line) and the last bit of the command (makes a good description) with some quotes around them.

For this:
nice firefox
aoss dosbox
wine $g/freecell.exe
you wouldn't need the quotes and if the menu needs spaces or any separator, it's more convenient to use sed imho. like this: sed "#\(.* <separator> .*\) <separator> \(discription\)$#\"\1\" \"\2\"#", which is quotable, so you can use only one script...right?... or??

Offline

#11 2008-01-26 02:01:47

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: life without a panel

ibendiben wrote:

That's why it needs the newlines escaped I think. Have the same problem if you escape?

Escaping didn't help, in fact it made the other program not work.
Try this for instance, does it quit immediately?

aterm -e "dialog --menu title 0 0 0 item1 desc1 item2 desc2"
ibendiben wrote:

it's more convenient to use sed imho.

Yeah you're right, sed would really be easier, I had my mind fixed on awk and then it's hard to see otherwise.
I think it would transform into:

sed 's#\(.*[ /]\(.*\)\)#"\1" "\2"#'

since it doesn't need escaping the " if you put it in ', and, unlike awk's print command, it isn't in a ".

Cutting off the description at either a space or /, e.g.

echo 'wine $g/freecell.exe' | sed 's#\(.*[ /]\(.*\)\)#"\1" "\2"#'

edit:
since part 1 of the sed it the entire line, this will do too

sed 's#.*[ /]\(.*\)#"&" "\1"#'

Last edited by Gilneas (2008-01-26 02:25:05)

Offline

#12 2008-01-26 02:24:59

ibendiben
Member
Registered: 2007-10-10
Posts: 519

Re: life without a panel

Gilneas wrote:
ibendiben wrote:

That's why it needs the newlines escaped I think. Have the same problem if you escape?

Escaping didn't help, in fact it made the other program not work.
Try this for instance, does it quit immediately?

aterm -e "dialog --menu title 0 0 0 item1 desc1 item2 desc2"

don't quote the dialog command..., just: aterm -e dialog --menu title 0 0 0 item1 desc1 item2 desc2
works with me

ibendiben wrote:

it's more convenient to use sed imho.

Gilneas wrote:

Yeah you're right, sed would really be easier, I had my mind fixed on awk and then it's hard to see otherwise.
I think it would transform into:

sed 's#\(.*[ /]\(.*\)\)#"\1" "\2"#'

since it doesn't need escaping the " if you put it in ', and, unlike awk's print command, it isn't in a ".
Cutting off the description at either a space or /, e.g.

echo 'wine $g/freecell.exe' | sed 's#\(.*[ /]\(.*\)\)#"\1" "\2"#'

Well but if you wanted to quote the sed command later, I thought you would need that single quote...

Gilneas wrote:

I use two programs now, to avoid a quoting hell.

lol

Offline

#13 2008-01-26 02:46:14

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: life without a panel

ibendiben wrote:

don't quote the dialog command..., just: aterm -e dialog --menu title 0 0 0 item1 desc1 item2 desc2
works with me

You're right, but it's still not working. It doesn't seem to redirect

aterm -e dialog --menu title 0 0 0 item1 desc1 item2 desc2 2>/tmp/menu
cat /tmp/menu

There isn't some secret --output-file option is there? (I saw an --output-fd, but that won't work will it?)

Offline

#14 2008-01-26 03:40:58

upsidaisium
Member
From: Vietnam
Registered: 2006-09-16
Posts: 263
Website

Re: life without a panel

i haven't had a panel in my setup for a while, and all's well for me.  currently i'm using evilwm, and i tend to not have more than one application open per virtual desktop (i've got them, why not use them?) which are easy enough to switch between, so a panel seems silly.


I've seen young people waste their time reading books about sensitive vampires. It's kinda sad. But you say it's not the end of the world... Well, maybe it is!

Offline

#15 2008-01-26 06:22:18

dumas
Member
From: Sydney
Registered: 2007-09-01
Posts: 103

Re: life without a panel

Am I the only one here who uses fluxbox without a panel? I use another homebrew app to choose windows rather than cycle through them with Alt Tab.

Here's the code, requires wmctrl and zenity. I don't like zenity too much.

#!/bin/bash
desktop=`wmctrl -d | awk '$2=="*" {print $1}'`
windows=$(wmctrl -l | awk "\$2==$desktop {print}" | cut -d' ' -f2-4 --complement | sed 's/ /_/g')
select=`zenity --list --column Windows --text 'Choose window:' --title Expose $windows | cut -d_ -f1`
wmctrl -i -a $select

jk

Offline

#16 2008-01-26 06:47:17

Xilon
Member
Registered: 2007-01-01
Posts: 243

Re: life without a panel

Well I don't have a "panel" per se, but I do have a bar (dzen), which displays the time, some stats, along with a tray. I don't miss a thing smile

Offline

#17 2008-01-26 08:39:33

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: life without a panel

Nothing on OpenBox.

I use gmrun (no reason for me to reinvent the wheel) and hotkeys to start applications and find myself doing a alt+f1;date [enter];ctrl+d sequence when I want to know the time. wink

Offline

#18 2008-01-26 11:15:31

z3ppelin
Member
Registered: 2006-07-10
Posts: 171

Re: life without a panel

I'm using openbox with fbpanel as launcher - 4 icons, autohide, no clock (I've got one in screen), no tray (gajim always on first dekstop, notifications do all I need), gmrun and shortcuts for quick launching. I almost dont use right-click menu.

Offline

#19 2008-01-26 12:02:19

gunnihinn
Member
From: Torreón, Mexico
Registered: 2007-10-28
Posts: 81

Re: life without a panel

Gilneas wrote:

I haven't had a panel for almost a year (with dwm) and I'm not missing it.

Second that, except I'm using Evilwm.

All the programs I use regularly are launched by "mod 4 + char" and the more infrequently used ones are started by "alt + f2" which launches gmrun. Turns out that the only programs I need to bind shortcuts for are Firefox, Sonata, Emacs, Pidgin and Xterm + a screen session launched on login. I've got a laptop, so I've also got some multimedia buttons lying around which I've bound to mpc shortcuts.

I do like the menu-hacks in this thread, I used Openbox for a bit and miss not having a menu that shows me all running screen sessions.

Offline

#20 2008-01-26 15:30:32

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: life without a panel

I think Openbox window list would be all I need [if I get stuck] on screen clock well.... its not a big problem but when I am on forums reading Mikkos posts I lose all track of time :-)

EDIT Thread Jackers.... lol

Last edited by Mr Green (2008-01-26 15:30:49)


Mr Green

Offline

Board footer

Powered by FluxBB