Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Devilspie wie verwende ich die geometry Variable?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Sourcecode
Guru
Guru


Joined: 25 Apr 2005
Posts: 392
Location: Germany, Kerpen in sew of Cologne

PostPosted: Tue Jun 05, 2007 5:26 am    Post subject: [SOLVED]Devilspie wie verwende ich die geometry Variable? Reply with quote

Also, aufgabenstellung ist folgende:

XFCE, 4 Workspaces

Bei Systemstart 4 Konsolen starten und diese Angeordnet auf 2 Workspaces verteilen, top soll auf Workspace1 Links oben, SAMBA soll auf Workspace1 Links unten, Masterconsole soll auf Workspace2 Links oben, Syslog soll auf Workspace2 Links unten.

Die 4 Konsolen automatisch zu starten habe ich hingekriegt (na welch ein Kunststück ;) )

Das diese 4 Konsolen auch auf die richtige Workspace zugeteilt werden hab ich mit Devilspie auch hinbekommen.

Jetzt habe ich nur das Problem das alle Konsolen nach Oben Links gespawnt werden, ich will sie aber so wie ich es beschrieben habe.

Ich weiss das das irgendwie mit der geometry Variable über X-GeometryString geht von wegen 0+0 usw.

Ich hab aber keinen Schimmer was für zahlen ich da eintragen muss bez. wie ich die Positionszahlen rausfinde.

any ideas?
_________________
Es gibt bloss eins, was wichtig ist: dass man sterben muss.

Suicide is man's way of telling God, "You can't fire me - I quit."

no one gets out here alive....


Last edited by Sourcecode on Tue Jun 05, 2007 5:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
der_flo
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2004
Posts: 142

PostPosted: Tue Jun 05, 2007 10:46 am    Post subject: Reply with quote

prinzpiell wäre es ja so (pseudocode, geht evtl in bash):
Code:

w=1280/2
h=1024/2
xterm -geometry ${w}x${h}+0+0 &
xterm -geometry ${w}x${h}+0+${h} &
xterm -geometry ${w}x${h}+${w}+0 &
xterm -geometry ${w}x${h}+${w}+${h} &


allerdings steht in der x-manpage, dass breite und höhe nicht unbedingt in pixeln gemessen werden muss, sondern ggf. auch in zeichen. und xterm macht genau das, man müsste also die anzahl der zeilen und spalten übergeben.

ich denke, dass es kompliziert wird, wenn du den schirm wirklich komplett ausnutzen willst. vielleicht kommt man mit probiererei ganz gut hin (allerdings nur solange man den font gleich lässt.

mit "konsole" zb. gehts besser, das verwendet pixelangaben.
ne gute alternative dazu: quadkonsole


ciao,
der flo
Back to top
View user's profile Send private message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 402

PostPosted: Tue Jun 05, 2007 2:05 pm    Post subject: Re: Devilspie wie verwende ich die geometry Variable? Reply with quote

Hi
Sourcecode wrote:
Also, aufgabenstellung ist folgende:

XFCE, 4 Workspaces

Bei Systemstart 4 Konsolen starten und diese Angeordnet auf 2 Workspaces verteilen, top soll auf Workspace1 Links oben, SAMBA soll auf Workspace1 Links unten, Masterconsole soll auf Workspace2 Links oben, Syslog soll auf Workspace2 Links unten.

Die 4 Konsolen automatisch zu starten habe ich hingekriegt (na welch ein Kunststück ;) )

Das diese 4 Konsolen auch auf die richtige Workspace zugeteilt werden hab ich mit Devilspie auch hinbekommen.

Jetzt habe ich nur das Problem das alle Konsolen nach Oben Links gespawnt werden, ich will sie aber so wie ich es beschrieben habe.

Ich weiss das das irgendwie mit der geometry Variable über X-GeometryString geht von wegen 0+0 usw.

Ich hab aber keinen Schimmer was für zahlen ich da eintragen muss bez. wie ich die Positionszahlen rausfinde.

any ideas?


Devilspie starte ich mit
Code:
/usr/bin/devilspie -a 2>&1 >/var/log/devilspie.log &

(auf schreibrechte für /var/log/devilspie.log achten)
Mit
Code:
 tail -f /var/log/devilspie.log
welcher Window Title, Application Name, Class
wenn du eine Application öffnest. Mit
Code:
xwininfo -frame
bekommst du size/pos usw. heraus.
In configdatei bei mir ist das ~/.devilspie/0_default.ds habe ich "debug" eingetragen wegen des Logfiles.
Hänge mal eine Beispiel ~/.devilspie/0_default.ds dran wird der Reihe nach abgearbeitet (achte auf Zeilen-
umbruch jede Regel eine zeile). Müste dann verständlich werden.
Code:

(begin
(debug)
(if (matches (window_name) "syslog-*") (begin (undecorate) (skip_pager) (skip_tasklist) (below) (pin) (stick) (geometry "1176x524+1280+0")))
(if (and (matches (window_name) "gdesklets-daemon") (is (application_name) "gdesklets-daemon") (is (window_class) "Gdesklets-daemon")) (begin (undecorate) (geometry "+1280+0")))
(if (and (matches (window_name) "gkrellm") (is (application_name) "gkrellm2") (is (window_class) "Gkrellm2")) (begin (undecorate) (geometry "+2454+0") (pin) (stick) (skip_pager) (skip_tasklist)))
(if (matches (window_name) "multi-gnome-terminal-left*") (begin (undecorate) (skip_pager) (skip_tasklist) (pin) (stick) (geometry "733x442+542+559")))
(if (and (matches (window_name) "gkrellm_S-*") (is (application_name) "gkrellm2") (is (window_class) "Gkrellm2")) (begin (undecorate) (geometry "+2453+643") (pin) (stick) (skip_pager) (skip_tasklist)))
(if (and (matches (window_name) "Reminder") (is (application_name) "Reminder") (is (window_class) "Toplevel")) (begin (geometry "+1280+0") (pin) (stick) (above)))
;(if (and (is (application_name) "gmpc") (is (window_class) "Gmpc")) (begin (geometry "+1280+0")))
(if (and (matches (window_name) "StarDict") (is (application_name) "stardict") (is (window_class) "Stardict")) (begin (geometry "502x406+2052+562")))
(if (and (matches (window_name) "Mozilla Firefox") (is (application_name) "Firefox") (is (window_class) "Firefox-bin")) (begin (geometry "748x580")))
(if (and (matches (window_name) "Add-ons") (is (application_name) "Firefox") (is (window_class) "Firefox-bin")) (begin (geometry "+1280+0")))
(if (and (matches (window_name) "Claws Mail") (is (application_name) "sylpheed-claws") (is (window_class) "Sylpheed-claws")) (begin (geometry "980x800")))
(if (matches (window_name) "multi-gnome-terminal-right*") (begin (undecorate) (skip_pager) (skip_tasklist) (pin) (stick) (geometry "1174x502+1280+499")))
(if (matches (window_name) "syslog-*") (begin (undecorate) (skip_pager) (skip_tasklist) (below) (pin) (stick) (geometry "1176x504+1280+0")))
(if (and (matches (window_name) "Datei-Browser") (is (application_name) "Dateimanager") (is (window_class) "Nautilus")) (begin (geometry "819x638")))
(if (and (matches (window_name) "Desktop-Suche") (is (application_name) "search") (is (window_class) "Search")) (begin (geometry "+1848+419")))
)


MfG
Back to top
View user's profile Send private message
Sourcecode
Guru
Guru


Joined: 25 Apr 2005
Posts: 392
Location: Germany, Kerpen in sew of Cologne

PostPosted: Tue Jun 05, 2007 5:46 pm    Post subject: Reply with quote

Danke sowas wie xwininfo, das gibt mir die Geometry Daten.

Leider zerhaut mir das den ganzen Desktop wenn ich die so Eintrage wie sie mir angezeigt werden wie die Konsolen gesetzt sind, aber das find ich schon noch raus, is ja nix wildes.


thx
_________________
Es gibt bloss eins, was wichtig ist: dass man sterben muss.

Suicide is man's way of telling God, "You can't fire me - I quit."

no one gets out here alive....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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