Discussion:
Customize root menu
(too old to reply)
Fabrice DELENTE
2009-12-21 14:23:33 UTC
Permalink
Hello.

I'm trying to customize the root menu, so that I can place my favorite
applications in it, but I can't find documentation on how to do that.

I tried putting

(defvar apps-menu
`(("small RXvt" (system "small_RXvt &"))
("UTF8 Emacs" (system "emacs-utf8 &"))
("Firefox" (system "firefox &"))
("The GIMP" (system "gimp &"))
("xcalc" (system "xcalc &"))))

in ~/.sawfish/custom, but it didn't work.

Can the colors of the root menu (background and texts) be modified?

Thanks.
--
Fabrice DELENTE
Christopher Roy Bratusek
2009-12-21 16:20:42 UTC
Permalink
Am Mon, 21 Dec 2009 15:23:33 +0100
Post by Fabrice DELENTE
Hello.
I'm trying to customize the root menu, so that I can place my favorite
applications in it, but I can't find documentation on how to do that.
I tried putting
(defvar apps-menu
`(("small RXvt" (system "small_RXvt &"))
("UTF8 Emacs" (system "emacs-utf8 &"))
("Firefox" (system "firefox &"))
("The GIMP" (system "gimp &"))
("xcalc" (system "xcalc &"))))
in ~/.sawfish/custom, but it didn't work.
Well you say root-menu but define apps-menu, so which one is the one
you want to modify?
Post by Fabrice DELENTE
Can the colors of the root menu (background and texts) be modified?
the menu is a gtk+2 application, so you can adjust it via your gtk+2
theme.

Chris
Post by Fabrice DELENTE
Thanks.
Fabrice DELENTE
2009-12-21 16:25:50 UTC
Permalink
Post by Christopher Roy Bratusek
Well you say root-menu but define apps-menu, so which one is the one
you want to modify?
Both, but I'm trying my hand first but redefining the apps-menu; why aren't
my changes taken into account? Must I redefine root-menu too?
--
Fabrice DELENTE
Christopher Roy Bratusek
2009-12-21 16:52:51 UTC
Permalink
Am Mon, 21 Dec 2009 17:25:50 +0100
Post by Fabrice DELENTE
Post by Christopher Roy Bratusek
Well you say root-menu but define apps-menu, so which one is the one
you want to modify?
Both, but I'm trying my hand first but redefining the apps-menu; why
aren't my changes taken into account? Must I redefine root-menu too?
use define-special-variable instead of defvar. It's working here. In
addition, if you're using Sawfish 1.6.0 and want to have both the
autogenerated FDO-Menu and your custom one, refer back to
user-apps-menu instead to apps-menu.

Btw, according to sawfish.texi from 1.6.0 it is documented.

Chris
Fabrice DELENTE
2009-12-21 16:57:26 UTC
Permalink
Post by Christopher Roy Bratusek
Btw, according to sawfish.texi from 1.6.0 it is documented.
Well I'll upgrade to 1.6; but I looked in the wiki, and in the info file,
chap. 15, and it did say to use defvar to define it; it's what's used in
menus.jl too.
--
Fabrice DELENTE
Daniel Fetchinson
2009-12-21 17:36:19 UTC
Permalink
Post by Fabrice DELENTE
Post by Christopher Roy Bratusek
Btw, according to sawfish.texi from 1.6.0 it is documented.
Well I'll upgrade to 1.6; but I looked in the wiki, and in the info file,
chap. 15, and it did say to use defvar to define it; it's what's used in
menus.jl too.
This is what I use for customizing root menu:

(setq root-menu '(
("xterm" (system "xterm &"))
()
("firefox" (system "firefox &"))
("skype" (system "skype &"))
("vlc" (system "vlc &"))
()
("restart" restart)
("quit" quit)
("power off" (system "poweroff"))))


HTH,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
Daniel Fetchinson
2009-12-21 17:37:10 UTC
Permalink
Post by Daniel Fetchinson
Post by Fabrice DELENTE
Post by Christopher Roy Bratusek
Btw, according to sawfish.texi from 1.6.0 it is documented.
Well I'll upgrade to 1.6; but I looked in the wiki, and in the info file,
chap. 15, and it did say to use defvar to define it; it's what's used in
menus.jl too.
(setq root-menu '(
("xterm" (system "xterm &"))
()
("firefox" (system "firefox &"))
("skype" (system "skype &"))
("vlc" (system "vlc &"))
()
("restart" restart)
("quit" quit)
("power off" (system "poweroff"))))
I mean the above is in ~/.sawfishrc

HTH,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
Fabrice DELENTE
2009-12-21 17:38:59 UTC
Permalink
Post by Daniel Fetchinson
I mean the above is in ~/.sawfishrc
Ok, I'll try this too. Thanks!
--
Fabrice DELENTE
Christopher Roy Bratusek
2009-12-21 18:16:49 UTC
Permalink
Am Mon, 21 Dec 2009 18:36:19 +0100
Post by Daniel Fetchinson
Post by Fabrice DELENTE
Post by Christopher Roy Bratusek
Btw, according to sawfish.texi from 1.6.0 it is documented.
Well I'll upgrade to 1.6; but I looked in the wiki, and in the info
file, chap. 15, and it did say to use defvar to define it; it's
what's used in menus.jl too.
Well, your defvar is overidden by the menu.jls defvar,
setq/define-special-variable while overcome that. Just for the record.
Post by Daniel Fetchinson
(setq root-menu '(
("xterm" (system "xterm &"))
()
("firefox" (system "firefox &"))
("skype" (system "skype &"))
("vlc" (system "vlc &"))
()
("restart" restart)
("quit" quit)
("power off" (system "poweroff"))))
Daniel, if you're using Sawfish 1.6.0, you may consider

(poweroff halt)

instead of poweroff, as this does shutdown sawfish
cleanly, while

(system "poweroff")

doesn't.

By default this calls "sudo shutdown -h", but you can adjust it via

(define-special-variable halt-command "poweroff")

besides halt/halt-command, also reboot/reboot-command,
hibernate/hibernate-command and suspend/suspend-command are available
for poweroff as actions/options.

Chris
Post by Daniel Fetchinson
HTH,
Daniel
Fabrice DELENTE
2009-12-21 18:31:47 UTC
Permalink
Post by Christopher Roy Bratusek
Well, your defvar is overidden by the menu.jls defvar,
setq/define-special-variable while overcome that. Just for the record.
Ok, thanks for that.
--
Fabrice DELENTE
D M German
2009-12-21 23:42:32 UTC
Permalink
Post by Christopher Roy Bratusek
Well, your defvar is overidden by the menu.jls defvar,
setq/define-special-variable while overcome that. Just for the record.
Fabrice> Ok, thanks for that.

Just to complement the info you have gotten. I don't configure the root
menu, but the window menu. The advantage is that this way you can call
commands that take a window as a parameter

(setq window-ops-menu
`((,(_ "Mi_nimize") iconify-window
(insensitive . ,(lambda (w)
(not (window-iconifiable-p w)))))
(,(lambda (w)
(if (window-maximized-p w)
(_ "Unma_ximize")
(_ "Ma_ximize"))) maximize-window-toggle
(insensitive . ,(lambda (w)
(not (or (window-maximized-p w)
(window-maximizable-p w))))))
(,(_ "Toggle Maximize _Vertically") maximize-window-vertically-toggle w)
(,(_ "Toggle Maximize _Horizontally") maximize-window-horizontally-toggle w)
(,(_ "_Move") move-window-interactively)
(,(_ "Move _Inside") dmg-move-window-inside w)
(,(_ "Popup r_oot menu") popup-root-menu)
(,(_ "U_pdate to head") dmg-update-to-head)
(,(_ "_Resize") resize-window-interactively)
(,(_ "_Close") delete-window)
()
(,(_ "_Toggle") . window-ops-toggle-menu)
(,(_ "In _group") . window-group-menu)
(,(_ "_Send window to")
(,(_ "_Previous workspace") send-to-previous-workspace)
(,(_ "_Next workspace") send-to-next-workspace)
(,(_ "Copy to p_revious") copy-to-previous-workspace)
(,(_ "Copy to ne_xt") copy-to-next-workspace))
(,(_ "Stac_king")
(,(_ "_Raise") raise-window)
(,(_ "_Lower") lower-window)
(,(_ "_Upper layer") raise-window-depth)
(,(_ "Lo_wer layer") lower-window-depth))
(,(_ "Frame ty_pe") . frame-type-menu)
(,(_ "Frame sty_le") . frame-style-menu)))
--
--
Daniel M. German
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
Continue reading on narkive:
Loading...