File: EWMH-BaseStruts

package info (click to toggle)
fvwm-crystal 3.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 21,708 kB
  • sloc: sh: 3,265; cs: 1,335; python: 875; makefile: 214
file content (116 lines) | stat: -rw-r--r-- 4,061 bytes parent folder | download | duplicates (2)
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
# Written by: Maciej Delmanowski <harnir@linux.net.pl>

# Overview:
# Functions for easier usage of EWMHBaseStruts command. How to use:
# 1. Set the desktop boundaries using EWMH-Desktop function, example:
#       EWMH-Desktop 3 3 3 3
#    It will set a frame 3 pixels thick around desktop, windows will not
#    maximize over this frame.
# 2. Set separate space for each edge of the screen. Example of setting
#    a border on the top edge, 30 pixels thick:
#       EWMH-Panel-Top 30
#    You can set all panel borders at once using EWMH-Panel function, similar
#    to EWMH-Desktop.
# 3. Now bind EWMH-Toggle function like this:
#       Mouse 2 R N EWMH-Toggle Mouse 2 R N
#    You have to tell this function what binding did you used. Now using that
#    binding (ex. middle mouse button on the desktop) will hide or show all
#    FvwmButtons, FvwmPager, FvwmIconMan and additionally gkrellm windows.
#    Also desktop borders will be automatycally adjusted to shown/hidden
#    state.


DestroyFunc EWMH-Desktop
AddToFunc EWMH-Desktop
+ I SetEnv EWMH_BS_Desktop_Left		$0
+ I SetEnv EWMH_BS_Desktop_Right	$1
+ I SetEnv EWMH_BS_Desktop_Top		$2
+ I SetEnv EWMH_BS_Desktop_Bottom	$3
+ I EWMH-Set-Desktop
+ I SetEnv EWMH_BS_Panel_Left	$[EWMH_BS_Desktop_Left]
+ I SetEnv EWMH_BS_Panel_Right	$[EWMH_BS_Desktop_Right]
+ I SetEnv EWMH_BS_Panel_Top	$[EWMH_BS_Desktop_Top]
+ I SetEnv EWMH_BS_Panel_Bottom	$[EWMH_BS_Desktop_Bottom]

DestroyFunc EWMH-Set-Desktop
AddToFunc EWMH-Set-Desktop
+ I EWMHBaseStruts $[EWMH_BS_Desktop_Left] $[EWMH_BS_Desktop_Right] $[EWMH_BS_Desktop_Top] $[EWMH_BS_Desktop_Bottom]

DestroyFunc EWMH-Panel
AddToFunc EWMH-Panel
+ I SetEnv EWMH_BS_Panel_Left	$0
+ I SetEnv EWMH_BS_Panel_Right	$1
+ I SetEnv EWMH_BS_Panel_Top	$2
+ I SetEnv EWMH_BS_Panel_Bottom	$3
+ I EWMH-Set-Panel

DestroyFunc EWMH-Panel-Left
AddToFunc EWMH-Panel-Left
+ I SetEnv EWMH_BS_Panel_Left $0
+ I EWMH-Set-Panel

DestroyFunc EWMH-Panel-Right
AddToFunc EWMH-Panel-Right
+ I SetEnv EWMH_BS_Panel_Right $0
+ I EWMH-Set-Panel

DestroyFunc EWMH-Panel-Top
AddToFunc EWMH-Panel-Top
+ I SetEnv EWMH_BS_Panel_Top $0
+ I EWMH-Set-Panel

DestroyFunc EWMH-Panel-Bottom
AddToFunc EWMH-Panel-Bottom
+ I SetEnv EWMH_BS_Panel_Bottom $0
+ I EWMH-Set-Panel

DestroyFunc EWMH-Set-Panel
AddToFunc EWMH-Set-Panel
+ I EWMHBaseStruts $[EWMH_BS_Panel_Left] $[EWMH_BS_Panel_Right] $[EWMH_BS_Panel_Top] $[EWMH_BS_Panel_Bottom]

DestroyFunc EWMH-Toggle
AddToFunc EWMH-Toggle
+ I Interface_Hide $0 $1 $2 $3

DestroyFunc Interface_Show
AddToFunc Interface_Show
+ I All (DesktopIcons)			Iconify false
+ I All (FvwmPager)			Iconify false
+ I All (FvwmButtons-*)		Iconify false
#+ I All (FvwmButtons-Pager)		Iconify false
#+ I All (FvwmButtons-Clock)		Iconify false
#+ I All (FvwmButtons-Panel*)		Iconify false
#+ I All (FvwmButtons-MainMenu)		Iconify false
#+ I All (FvwmButtons-Bot*)		Iconify false
#+ I All (FvwmButtons-Musi*)		Iconify false
+ I All (ApplicationPanel)		Iconify false
+ I All (FvwmIconMan)			Iconify false
+ I All (gkrellm)			Iconify false
+ I All (gDeskCal)			Iconify false
+ I All (trayer)			Iconify false
+ I All (FvwmStalonePanel)		Iconify false
PipeRead "if [ \"$(echo $[infostore.Fvwm_Crystal_Recipe]| sed -e 's:.*Amiga:Amiga:')\" = \"Amiga\" ]; then echo '+ I Restore-TopBar-RaiseLower'; fi"
+ I EWMH-Set-Panel
+ I $0 $1 $2 $3 Interface_Hide $0 $1 $2 $3

DestroyFunc Interface_Hide
AddToFunc Interface_Hide
+ I All (DesktopIcons)			Iconify true
+ I All (FvwmPager)			Iconify true
+ I All (FvwmButtons-*)		Iconify true
#+ I All (FvwmButtons-Pager)		Iconify true
#+ I All (FvwmButtons-MainMenu)		Iconify true
#+ I All (FvwmButtons-Clock)		Iconify true
#+ I All (FvwmButtons-Panel*)		Iconify true
#+ I All (FvwmButtons-Bot*)		Iconify true
#+ I All (FvwmButtons-Musi*)		Iconify true
+ I All (ApplicationPanel)		Iconify true
+ I All (FvwmIconMan)			Iconify true
+ I All (gkrellm)			Iconify true
+ I All (gDeskCal)			Iconify true
+ I All (trayer)			Iconify true
+ I All (FvwmStalonePanel)		Iconify true
+ I EWMH-Set-Desktop
+ I $0 $1 $2 $3 Interface_Show $0 $1 $2 $3

# vim:ft=fvwm