summaryrefslogtreecommitdiff
path: root/devel/template/scwmrc-wm-icons
blob: e62e2455ec9fe72624199f180a329f84e2ccd55b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
;;;
;  This file includes scwm configuration for using with wm-icons.
;  Optimized for the default scwm-0.9 configuration.
;  Using this file doesn't break your existing .scwmrc, just extends it.
;  You probably need to edit it if you have a non-default configuration.
;
;  Instructions:
;    1) Install wm-icons (configure & make install)
;    2) Copy this file to home directory (add leading dot) and put this line:
;         (load ".scwmrc-wm-icons")
;       as the last line of your .scwmrc
;    3) (Re)Start scwm
;
;  The file is not perfect, it'll be better in the next versions.
;  Send your comments to migo@homemail.com.
;;;


(set! image-load-path
	(append! (list
		(string-append (user-home) "~/@userdir@") "@icondir@"
	) image-load-path)
)
(use-modules (app scwm flux))  ; for window-info

;; You can comment this out or in to get title-icon for any window a-la fvwm95.
;(set-button-face! 1 (make-face '((relief raised)) '((pixmap mini-program-icon))))


{{DEFINE_ALL_ICONS}}


;;;
;  Change Icon Set submenu
;;;

;;
;; This defines the submenu for changing icon set online.
;; wm-icons-config must be in your path or put full path in #:action below.
;;

(define menu-icon-sets (menu (list
	(menuitem "Change Icon Set" #:image-left wmi-menu-themes)
	menu-title menu-separator
{{MINI_ICON_SET_ITERATOR("
	(menuitem "menu	@ICON_SET@" @ADJUST@#:image-left wmi-menu-item #:action "wm-icons-config -q -p -f menu @ICON_SET@")
")}}
	menu-separator
{{MINI_ICON_SET_ITERATOR("
	(menuitem "mini	@ICON_SET@" @ADJUST@#:image-left wmi-menu-item #:action "wm-icons-config -q -p -f mini @ICON_SET@")
")}}
	menu-separator
{{NORM_ICON_SET_ITERATOR("
	(menuitem "norm	@ICON_SET@" @ADJUST@#:image-left wmi-menu-item #:action "wm-icons-config -q -p -f norm @ICON_SET@")
")}}
	menu-separator
{{SIZE_ICON_SET_ITERATOR("16x16", "
	(menuitem "16x16	@ICON_SET@" @ADJUST@#:image-left wmi-menu-item #:action "wm-icons-config -q -p -f 16x16 @ICON_SET@")
")}}
	menu-separator
	(menuitem "Restart	to activate" #:image-left wmi-menu-restart #:action (lambda () (restart "scwm")))
)))

;; You can comment the following out or in.
(bind-mouse 'root "C-M-S-3" (lambda () (popup-menu menu-icon-sets)))
;! How can we dynamically add submenu in scwm?
;!AddToMenu "menu-root-start" "&Icon Set%menu/themes.xpm" Popup Icon-Sets
;!AddToMenu "menu-modules" "&Icon Set%menu/themes.xpm" Popup Icon-Sets

;;;
;  Window operations
;;;

;;
;; This defines the most common window operations.
;; It seems that window-ops-menu is most common name for this menu.
;;
;(define menu-window-ops (menu (list
(define window-ops-menu (menu (list
	(menuitem "Window Operations" #:image-left wmi-menu-window)
	menu-title menu-separator
	(menuitem "&Move"     #:image-left wmi-menu-window-move     #:action interactive-move)
	(menuitem "&Resize"   #:image-left wmi-menu-window-resize   #:action interactive-resize)
	(menuitem "&Iconify"  #:image-left wmi-menu-window-iconify  #:action toggle-iconify)
	(menuitem "Ma&ximize" #:image-left wmi-menu-window-maximize #:action toggle-maximize)
;	(menuitem "&Tall"     #:image-left wmi-menu-window-maximize #:action toggle-max-vert)
;	(menuitem "&Wide"     #:image-left wmi-menu-window-maximize #:action toggle-max-horz)
	(menuitem "S&hade"    #:image-left wmi-menu-window-shade    #:action toggle-window-shade)
	(menuitem "&Sticky"   #:image-left wmi-menu-window-stick    #:action toggle-stick)
	(menuitem "R&aise"    #:image-left wmi-menu-window-raise    #:action raise-window)
	(menuitem "&Lower"    #:image-left wmi-menu-window-lower    #:action lower-window)
	menu-separator
	(menuitem "In&fo"     #:image-left wmi-menu-window-identify #:action window-info)
	(menuitem "&On-top"   #:image-left wmi-menu-window-raise    #:action toggle-on-top)
	(menuitem "&Print"    #:image-left wmi-menu-printing        #:action print-window)
	menu-separator
	(menuitem "&Close"    #:image-left wmi-menu-window-close    #:action close-window)
	(menuitem "&Delete"   #:image-left wmi-menu-window-delete   #:action delete-window)
	(menuitem "&Destroy"  #:image-left wmi-menu-window-destroy  #:action destroy-window)
	menu-separator
	(menuitem "Switch to..." #:image-left wmi-menu-windows      #:action (lambda () (show-window-list-menu #:show-geometry #t)))
	(menuitem "Re&fresh"  #:image-left wmi-menu-refresh         #:action refresh)
	(menuitem "&Icon Set" #:image-left wmi-menu-themes          #:action menu-icon-sets)
)))

;; You can comment the following in if not bound yet.
;(bind-mouse 'root 3 (lambda () (popup-menu window-ops-menu)))


;;;
;  Quit submenu
;;;

;;
;; This defines (overrides) quit menu.
;;
(define menu-quit-verify (menu (list
	(menuitem "Really quit scwm?" #:image-left wmi-menu-quit)
	menu-title menu-separator
	(menuitem "Restart"       #:image-left wmi-menu-restart #:action (lambda () (restart "scwm")))
	(menuitem "Refresh"       #:image-left wmi-menu-refresh #:action (lambda () (refresh)))
	menu-separator
	(menuitem "Restart dummy" #:image-left wmi-menu-terminal   #:action (lambda () (restart "xterm")))
	menu-separator
	(menuitem "Yes"           #:image-left wmi-menu-choice-yes #:action quit)
	(menuitem "No"            #:image-left wmi-menu-choice-no  #:action #f)
	menu-separator
)))

;; You can comment the following out or in.
(bind-mouse 'root "C-M-3" (lambda () (popup-menu menu-quit-verify)))


;;;
;  Known applications
;;;

{{STYLE_ICONS}}