Perhaps you are new to Linux, JWM (Joe’s Window Manager), or LWDE’s/WM’s (Light Weight Desktop Environments/Windows Managers), and you may be wondering what all the JWM Theme Friday stuff actually means. Well, today is your lucky day, because we are about to discuss it, line by line! Here is an example of a dark theme, yellow on black. Below you will find a comment for the pertinent lines on what the line is for. The picture for this article also has red numbers transposed over the display to show you which line number they correlate to.

Linux – keep it simple.

1 <?xml version=”1.0″?>
3 <JWM> (Start of file.)
5 <RootMenu height=”15″ onroot=”123″> (Menu hight, and which mouse button can activate the menu, in this case, button 1,2, or 3. This also tells JWM that you are now talking about the menu only.)
7 <Program icon=”xterm.png” label=”Terminal”>x-terminal-emulator</Program> (Which icon to display, what to call the menu option, and what command line is run when you click on it.)
8 <Program icon=”google-chrome-old.png” label=”Chrome”>google-chrome-stable</Program>
9 <Program icon=”qupzilla.png” label=”Midori”>midori</Program>
10 <Program icon=”chess.png” label=”Chess”>xboard</Program>
11 <Include>/etc/jwm/debian-menu</Include> (Include another whole menu file, which is written just like this file, but for just that menu option. This is how you get “drop down” or folders in your menus.)
13 <Separator/> (A line in the menu, not visable in the example due to the dark theme.)
14 <Program icon=”emblem-readonly.png” label=”Lock”>
15 xscreensaver-command -activate
16 </Program>
17 <Separator/>
19 <Restart label=”Restart” icon=”system-restart.png”/> (Special menu option to restart JWM, not your computer.)
20 <Program icon=”system-shutdown.png” label=”Shutdown”>sh /home/user/scripts/</Program>
21 <Exit label=”Exit” confirm=”true” icon=”system-log-out.png”/> (Special menu option to log out.)
23 </RootMenu> (This tells JWM that you are done talking about the menu.)
25 <Tray x=”0″ y=”-1″ height=”32″ autohide=”false”> (Where do you want JWM to put the menu, and how big the menu should be, and if it should hide automatically. This also tells JWM that you are now only talking about the tray, or “start bar”. Everything below will appear left to right.)
27 <TrayButton label=”Qemu”>root:1</TrayButton> (The name of the “start menu”/menu button.)
29 <TrayButton icon=”gaupol.png”>showdesktop</TrayButton> (A button to display the desktop.)
31 <Pager labeled=”true”/> (Do you want a pager? In this case yes.)
33 <TaskList maxwidth=”256″/> (How wide do you want the list of open windows to be.)
35 <Dock/>
37 <TrayButton popup=”Terminal” icon=”xterm.png”>exec:x-terminal-emulator</TrayButton> (Like menu options, these are buttons that launch programs. Note the exec: then command, you need to tell it to execute something when the button is pushed.)
38 <TrayButton popup=”Volume Control” icon=”unity-tweak-tool.png”>exec:pavucontrol</TrayButton>
39 <TrayButton popup=”File Manager” icon=”nemo.png”>exec:/usr/bin/pcmanfm</TrayButton>
40 <TrayButton popup=”Calculator” icon=”applications-mathematics.png”>exec:gcalctool</TrayButton>
41 <TrayButton popup=”Leafpad” icon=”leafpad.png”>exec:leafpad</TrayButton>
42 <TrayButton popup=”Midori Web Browser” icon=”qupzilla.png”>exec:midori</TrayButton>
43 <TrayButton popup=”Sylpheed Email” icon=”thunderbird.png”>exec:sylpheed</TrayButton>
44 <TrayButton popup=”Calendar Script” icon=”web-google-calendar.png”>exec:/home/user/scripts/</TrayButton>
46 <Swallow name=”xload” width=”64″> (This tells the “start bar” or menu bar to capture or swallow a program and display it inside of itself.)
47 xload -nolabel -bg black -fg yellow -hl white (The name of the program to run and whith what options. Just like the command line.)
48 </Swallow> (Done talking about the swallowed program.)
50 <Clock format=”%H:%M”>xclock</Clock> (Display the clock.)
52 </Tray> (This tells JWM that you are done talking about the tray.)
54 <WindowStyle> (Tells JWM that you are talking about windows.)
56 <Font>Sans-9</Font> (Name of font and size or options.)
57 <Width>3</Width>
58 <Height>22</Height> (Height of bar of window.)
61 <Active> (The window that is currently in use, or active.)
62 <Text>white</Text> (Color of the text for title.)
63 <Title>yellow:black</Title> (Color of title bar, in this case, I used two colors, which has a fade affect, yellow on top, fading to black on the bottom.)
64 <Outline>black</Outline> (A window boarder.)
65 </Active> (Done talking about active window.)
68 <Inactive> (The windows that are not currently in use.)
69 <Text>azure</Text>(Color of the text for title of inactive windows.)
70 <Title>gray:black</Title> (Color of title bar, in this case, I used two colors, which has a fade affect, gray on top, fading to black on the bottom of the inactive window.)
71 <Outline>black</Outline> (A window boarder for the inactive window.)
72 </Inactive> (Done talking about inactive window.)
74 </WindowStyle> (Done talking about windows.)
76 <TaskListStyle> (The taskbar, or list of open windows on the “start bar”.)
77 <Font>Sans-9</Font> (What font and options.)
78 <ActiveForeground>white</ActiveForeground> (The color of the active window text.)
79 <ActiveBackground>yellow:black</ActiveBackground> (The background of the task-window that is active.)
80 <Background>gray:black</Background> (The background of the task-window that is inactive.)
81 </TaskListStyle> (Done talking about the taskbar.)
83 <TrayStyle> (How the “start bar” or menu bar looks.)
84 <Font>Sans-12</Font>
85 <Foreground>azure</Foreground> (Color of the text for anything on the bar that is not specified elsewhere.)
86 <Background>black</Background> (Color of the bar.)
87 </TrayStyle>
89 <PagerStyle> (Tells JWM that you are talking about the desktop switching tool with visuals of open windows.)
90 <Outline>white</Outline>
91 <Foreground>dark gray</Foreground> (Inactive desktops open windows.)
92 <Background>black</Background> (Inactive desktops)
93 <ActiveForeground>gray</ActiveForeground> (Active desktop open windows.)
94 <ActiveBackground>azure</ActiveBackground> (Active desktop.)
95 </PagerStyle> (Done talking about the pager.)
97 <MenuStyle> (Tells JWM that you are talking about the menus physical apperance.)
98 <Font>Sans-9</Font> (Font and options.)
99 <Foreground>white</Foreground> (The color of the font of unhighlighted menu options.)
100 <Background>black</Background> (The overal menu background color.)
101 <ActiveForeground>azure</ActiveForeground> (The highlighted menu option text color.)
102 <ActiveBackground>yellow:black</ActiveBackground> (The highlighted menu option background color.)
103 </MenuStyle> (Done talking about the menu.)
105 <PopupStyle> (Tells JWM that you are refering to the informational windows that pop up when you hover over something like the clock.)
106 <Font>Sans-9</Font> (Font type and options.)
107 <Outline>blue</Outline> (The outline of the pop-up box.)
108 <Foreground>azure</Foreground> (The color of the text.)
109 <Background>black</Background> (The color inside the pop-up box window.)
110 </PopupStyle> (Done talking about the pop-ups.)
112 <IconPath> (Where to find the icons for the menu and “start bar”/taskbar.)
113 /home/user/icons/jwm/moka (There can be multiple lines for multiple places to look for icons.)
114 </IconPath> (Done listing where to find icons.)
116 <Desktops width=”4″ height=”1″> (How many desktops do you want. Width/height is how the pager will display them, and how they are physically arranged.)
117 <Background type=”command”>nitrogen –restore</Background> (How to display the background image or command, or color.)
118 </Desktops> (Done talking about desktops.)
120 <DoubleClickSpeed>400</DoubleClickSpeed> (Charicteristics.)
122 <DoubleClickDelta>2</DoubleClickDelta> (Charicteristics.)
124 <FocusModel>sloppy</FocusModel> (Charicteristics.)
126 <SnapMode distance=”10″>border</SnapMode> (Charicteristics.)
128 <MoveMode>opaque</MoveMode> (Charicteristics.)
130 <ResizeMode>opaque</ResizeMode> (Charicteristics.)
132 <StartupCommand>xbattbar -I azure -O black -i yellow -o black -p 10 -c -t 1 -a bottom</StartupCommand> (A command JWM should run as soon as it starts.)
133 <StartupCommand>nm-applet</StartupCommand> (A command JWM should run as soon as it starts.)
134 (Below are keyboard shortcut options.)
135 <Key key=”Up”>up</Key>
136 <Key key=”Down”>down</Key>
137 <Key key=”Right”>right</Key>
138 <Key key=”Left”>left</Key>
139 <Key key=”h”>left</Key>
140 <Key key=”j”>down</Key>
141 <Key key=”k”>up</Key>
142 <Key key=”l”>right</Key>
143 <Key key=”Return”>select</Key>
144 <Key key=”Escape”>escape</Key>
146 <Key mask=”A” key=”Tab”>next</Key>
147 <Key mask=”A” key=”F4″>close</Key>
148 <Key mask=”A” key=”#”>desktop#</Key>
149 <Key mask=”A” key=”F1″>root:1</Key>
150 <Key mask=”A” key=”F2″>window</Key>
151 <Key mask=”A” key=”F10″>maximize</Key>
152 <Key mask=”A” key=”Right”>rdesktop</Key>
153 <Key mask=”A” key=”Left”>ldesktop</Key>
154 <Key mask=”A” key=”Up”>udesktop</Key>
155 <Key mask=”A” key=”Down”>ddesktop</Key>
157 </JWM> (End of file.)

3 Replies to “How the JWM file works.”

  1. This is helping me so much already… I’ve read through some of the lines and it’s starting to make some sense to me now. I understood a little before but still… this will save so much time! Thanks!

  2. Ӏ’d like to thank you for the efforts уou have put in writing this sіte.I’m hoping to view the same high-gгade bloց pοsts from you іn the fսture as well.In trᥙth, your creative writing abilitieѕ has encouragеd me to gеt my own, personal ѕite now 😉

Leave a Reply

Your email address will not be published. Required fields are marked *