You are not logged in.

#1 2007-04-03 11:49:21

madhatter
Member
From: Freudenstadt, Germany
Registered: 2004-09-01
Posts: 59

simple quake-style terminal

hi,
I wrote a simple bash-script which implements a simple quake-style terminal which relies on wmctrl
I wrote it because I don't like the available standalone solutions (e.g. tilda)

#!/bin/bash
#
# Implements a simple quake-style console


# check if a terminal is already created
if [ "`wmctrl -l | grep -c qconsole`" = "0" ]
then
    aterm +sb -name qconsole &
    wmctrl -r qconsole -b add,maximized_horz
    wmctrl -r qconsole -e 0,0,0,-1,-1
    wmctrl -r qconsole -b add,above
else
    wmctrl -r qconsole -b toggle,hidden
fi

You can change aterm to your preferred terminal but the name-option is important!
Now you only have to bind it to a keyboard shortcut using your favorite window manager/hotkey software.
Additionally, you can disable window decors if you're using openbox, by adding the following to your rc.xml:

<applications>
  <application name="qconsole">
    <decor>no</decor>
  </application>
</applications>

Offline

#2 2007-04-03 12:06:09

zergu
Member
From: Poland
Registered: 2005-10-10
Posts: 28
Website

Re: simple quake-style terminal

pacman -S yakuake? ;)

Offline

#3 2007-04-03 15:34:19

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: simple quake-style terminal

It's a great idea, but I have troubles actually getting it work:  I need to put "sleep 1" after running the terminal and before calling wmctrl, since otherwise when wmctrl is called, the window doesn't exist yet. The second thing is more serious: the window manager (tried with kwin and e16) seems to ignore the hidden flag - the window never hides.

Offline

#4 2007-04-03 15:52:01

madhatter
Member
From: Freudenstadt, Germany
Registered: 2004-09-01
Posts: 59

Re: simple quake-style terminal

zergu wrote:

pacman -S yakuake? wink

madhatter wrote:

I wrote it because I don't like the available standalone solutions

---

bender02 wrote:

I need to put "sleep 1" after running the terminal and before calling wmctrl, since otherwise when wmctrl is called, the window doesn't exist yet.

Ah, didn't thought about that - my PC is too fast smile

bender02 wrote:

The second thing is more serious: the window manager (tried with kwin and e16) seems to ignore the hidden flag - the window never hides.

Maybe they don't support that, I don't know how much they are EWMH compatible - works with openbox though

Offline

#5 2007-04-03 17:21:15

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: simple quake-style terminal

madhatter wrote:

Maybe they don't support that, I don't know how much they are EWMH compatible - works with openbox though

Well, according to the webpage of wmctrl, both WMs are supported and everything I tried with wmctrl worked, except "hidden". Ah, maybe I'll go back to fluxbox...

Offline

Board footer

Powered by FluxBB