Portál AbcLinuxu, 5. května 2025 01:35

Dotaz: Program pro spuštění minimalizované aplikace na dané ploše

MaSo avatar 22.7.2011 22:52 MaSo | skóre: 15 | blog: MaSo | Frýdek-Místek
Program pro spuštění minimalizované aplikace na dané ploše
Přečteno: 1063×
Odpovědět | Admin
Jak se dá spustit v Ubuntu (9.10 - 10.10, Gnome) minimalizovaná aplikace a hlavně na předem definované ploše. Spouštění bych chtěl při startování systému (viz. grafická app. "Aplikace spouštěné při přihlášení"). Nechci toto řešit způsobem ukládání sessions při odhlašování...
Webové síťové nástroje: http://nettools.mzettik.cz (pracuje se na tom - pomalu :-) )

Řešení dotazu:


Nástroje: Začni sledovat (2) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

Fluttershy, yay! avatar 23.7.2011 00:07 Fluttershy, yay! | skóre: 93 | blog:
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Odpovědět | | Sbalit | Link | Blokovat | Admin
Což takhle devilspie nebo skript používající wmctrl?
🇵🇸Touch grass🇺🇦 ✊ ani boha, ani pána
24.7.2011 19:14 jadd | skóre: 34 | blog: Greenhorn
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
I já se omlouvám, příspěvek jsem psal před tebou ale než jsem ho poslal, tak jsi už odpověděl.
ME
       devilspie - perform actions on windows as they are created


SYNOPSIS
       devilspie [OPTION]...  configuration-files...


DESCRIPTION
       devilspie  is  a  program which can detect windows as they are created,
       and perform actions on them if they match as set of criteria.

       The configuration files are a set of s-expressions.  For  documentation
       and examples, see /usr/share/doc/devilspie-0.22/.

       Command-lines options:

       -a --apply-to-existing
              Apply to all existing windows instead of just new windows.

       -d --debug
              Output debug information

       -l --list-symbols
              List available symbols supported in input files.

       -s symname --symbol-doc=symname
               Get detailed help on symbol symname ('all' for all symbols).


ALLOWED SYMBOLS
       In the input files, the following symbols are known by devilspie:

       is     String equality, (is a b) means a is the same as b.

       contains
              Substring,  (contains  haystack  needle) means haystack contains
              needle.

       matches
              Regexp matches, (matches str pattern) means the  regexp  pattern
              matches str.

       window_name
              Return the title of the current window (String).

       window_role
              Return  the  role  (as determined by the WM_WINDOW_ROLE hint) of
              the current window (String).

       window_class
              Return the class of the current window (String).

       window_xid
              Return the X11 window id of the current window (Integer).

       application_name
              Return the application name (as determined by  libwnck)  of  the
              current window (String).

       window_property
              Returns   the   given   property   of   the  window,  e.g.  pass
              "_NET_WM_STATE" (String).

       window_workspace
              Returns the workspace a window is on (Integer).

       debug  Debugging function, outputs the current  window's  title,  name,
              role and geometry (Returns TRUE).

       print  Print args (without trailing 0 returns boolean).

       println
              Print args (with trailing 0 returns boolean).

       str    Transform parameters into strings and concat them.

       hex    Transform  the  integer  parameter  into an unsigned hexadecimal
              string (with 0x prefix).

       geometry
              Set position + size (as tring) of current window (returns  bool‐
              ean).

       fullscreen
              Make the current window fullscreen (returns TRUE).

       focus  Focus the current window (returns TRUE).

       center Center position of current window (returns boolean).

       maximize
              Maximise the current window (returns TRUE).

       maximize_vertically
              Maximise vertically the current window (returns TRUE).

       maximize_horizontally
              Maximise horizontally the current window (returns TRUE).

       unmaximize
              Un-maximise the current window (returns TRUE).

       minimize
              Minimise the current window (returns TRUE).

       unminimize
              Un-minimise the current window (returns TRUE).

       shade  Shade ("roll up") the current window (returns TRUE).

       unshade
              Un-shade ("roll down") the current window (returns TRUE).

       close  Close the current window (returns TRUE).

       pin    Pin the current window to all workspaces (returns TRUE).

       unpin  Unpin the current window from all workspaces (returns TRUE).

       stick  Make the current window stick to all viewports (returns TRUE).

       unstick
              Unstick the window from viewports (returns TRUE).

       set_workspace
              Move  the window to a specific workspace number, counting from 1
              (returns boolean).

       set_viewport
              Move the window to a specific viewport number, counting  from  1
              (returns boolean).

       skip_pager
              Remove the current window from the window list (returns TRUE).

       skip_tasklist
              Remove the current window from the pager (returns TRUE).

       above  Set  the  current window to be above all normal windows (returns
              TRUE).

       below  Set the current window to be below all normal  windows  (returns
              TRUE).

       decorate
              Add  the  window  manager  decorations  to  the  current  window
              (returns boolean).

       undecorate
              Remove the window manager decorations from  the  current  window
              (returns boolean).
      

       wintype
              Set  the  window  type  of the current window (returns boolean).
              Accepted values are:  normal,  dialog,  menu,  toolbar,  splash‐
              screen, utility, dock, desktop.

       opacity
              Change  the  opacity level (as integer in 0..100) of the current
              window (returns boolean).

       spawn_async
              Execute a command in the background (returns  boolean).  Command
              is  given as a single string, or as a series of strings (similar
              to execl).

       spawn_sync
              Execute a command in the foreground (returns command  output  as
              string, or FALSE on error). Command is given as a single string,
              or as a series of strings (similar to execl).


BUGS
       This manpage is almost useless, as it was thrown together on a train.


AUTHOR
       This manual page was written by Ross Burton ross@burtonini.com.



23.7.2011 00:15 jadd | skóre: 34 | blog: Greenhorn
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Odpovědět | | Sbalit | Link | Blokovat | Admin
Nevím jestli jsem sám, ale dotaz jsem pochopil tak z poloviny.
Aplikace spouštěné při přihlášení
Třeba umístěním do ~/.config/Autostart. Jak to ale spustit mimimalizovaně netuším.
23.7.2011 00:23 jadd | skóre: 34 | blog: Greenhorn
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Nevím jestli jsem sám, ale dotaz jsem pochopil tak z poloviny.
Už jsem pochopil, pak se ještě doplním. Jak to ale spustit mimimalizovaně a na předem vybrané ploše netuším.
24.7.2011 13:26 2X4B-523P | skóre: 38 | blog: Zelezo_vs_Debian
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Odpovědět | | Sbalit | Link | Blokovat | Admin
používá ta aplikace dbus nebo jiné rozhraní?
pepe_ avatar 24.7.2011 16:54 pepe_ | skóre: 48
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Odpovědět | | Sbalit | Link | Blokovat | Admin

Podle mne to má být vlastnost běžně dostupná v kde gnome lxde xfce a ne řešit to na koleni. Auto taky nestartuješ běžně urvanejma drátama. No ono je přeci důležitější se hádat o název system settings než udělat něco co uživatelé dektopu chtějí spoustu let .

Fluttershy, yay! avatar 24.7.2011 16:58 Fluttershy, yay! | skóre: 93 | blog:
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Nahlásil jsi do bugzilly námět na vylepšení? Poslal jsi patch? Hmmm? Zjevně to ti uživatelé tak moc nechtějí, ostatně řešení existují (viz můj komentář výše).
🇵🇸Touch grass🇺🇦 ✊ ani boha, ani pána
pepe_ avatar 24.7.2011 17:46 pepe_ | skóre: 48
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše

Bugzilla v češtině ? Hi , ani nevim co ty stránky po mne chtějí. Nejsem programátor abych přidával funkce okenímu manažeru. Když dam toto téma hledat na netu tak je tam jen tuny otázek že to lidé chtějí ale řešení je tak na 5 aplikací , ostatní mají smůlu. a to sou věci staré spousty let a doteď řešení není.

Fluttershy, yay! avatar 24.7.2011 17:54 Fluttershy, yay! | skóre: 93 | blog:
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
A window-matching utility, inspired by Sawfish's "Matched Windows" option and the lack of the functionality in Metacity. Metacity lacking window matching is not a bad thing — Metacity is a lean window manager, and window matching does not have to be a window manager task.

Devil's Pie @ GNOME (web)

🇵🇸Touch grass🇺🇦 ✊ ani boha, ani pána
pepe_ avatar 24.7.2011 18:29 pepe_ | skóre: 48
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Příloha:

Tak sem to skoušel , dělá to to co má ale odstraňuje to window decorator takže se se pak nedá pohodlně změnit velikost atd. Je to takové polovičaté.

pepe_ avatar 24.7.2011 18:32 pepe_ | skóre: 48
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše

Omlouvám se , moje chyba . Nezakomentoval sem odstranění dekorace.

zkoušel sem to na pidginu.

vytvořil sem ~/pidgin.ds

vložil :

(if (is (application_name) "Pidgin")
 (begin
 (if (is (window_role) "buddy_list")
 (begin
;                                (undecorate)
 (skip_tasklist)
 (geometry "199x767+0+0")
 )
 )
 (if (is (window_role) "conversation")
 (begin
;                                (undecorate)
 (geometry "822x400+201+0")
 )
 )
 )
)

uložil a pustil :

devilspie ~/pidgin.ds

děkuji za novinku kterou sem neznal.

pepe_ avatar 24.7.2011 18:50 pepe_ | skóre: 48
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
frEon avatar 27.7.2011 16:19 frEon | skóre: 40 | Praha
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
<flame>hubeny nebo ne, prace window manageru je umistit okno tam, kde ho chci mit. Vzdyt i zastaraly kwin z kde3 to umel, tak nechapu, proc ty lepsi a modernejsi window managery by to nemeli umet</flame>
Talking about music is like dancing to architecture.
MaSo avatar 27.7.2011 13:49 MaSo | skóre: 15 | blog: MaSo | Frýdek-Místek
Rozbalit Rozbalit vše Re: Program pro spuštění minimalizované aplikace na dané ploše
Odpovědět | | Sbalit | Link | Blokovat | Admin
Děkuji všem za rady včetně příkladů.
Vybral jsem si devilspie a funguje skvěle. S wmctrl jsem si neporozuměl (nejspíše nepochopil :-) )

Musel jsem vytvořit adresář "devilspie" v /etc, do kterého jsem vytvořil soubor "transmission.ds". devilspie prochází soubory v daném adresáři. Dále prochází adresář ~/user/.devilspie.
Můj příklad použití:
(if
 (is (application_name) "Transmission")
 (begin
  (set_workspace 3)
  (set_viewport 3)
  (minimize)
 )
)
set_workspace nastaví 3. plochu
set_viewport nastaví 3. plochu v rámci compizu
set_workspace mi nefungoval z důvodu používání compizu a tak místo něj se použije set_viewport (použil jsem obojí pro jistotu/přenositelnosti na jiné PC :-) )
minimize minimalizuje okno

dále již viz. "man devilspie"
Webové síťové nástroje: http://nettools.mzettik.cz (pracuje se na tom - pomalu :-) )

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.