Other JWM

Hello community!
Does anyone have any idea how to configure this lightweight window manager? There is not much documentation of this beautiful lightweight window manager on the internet and the little there is on its home page are just clues.
 
Wow, look at that, useful examples. I'm used to my 2 favorites these days, dwm and openbox, but your post is more useful, IMHO, than most of what I've seen.
 
Using JWM as a pkg install here. I added the following to quickly get to editing the .jwmrc:

XML:
<Program label="edit menus">xterm -e vi .jwmrc</Program>

Did not immediately realize the "Restart" lets you tweak the .jwmrc file and then see the results.

XPM and PNG icons work fine. SVG does not. The icon path is fussy. I reduced mine to a single line and dropped all the PNG and XPM files to my ~/.icon folder.

My icon path looks like this:

XML:
<IconPath>/usr/home/unitrunker/.icons</IconPath>

The $HOME macro did not work for me with icons. It did work for the background. Here's my Desktops section with background:

XML:
<Desktops width="4" height="1">
    <Background type="scale">$HOME/Downloads/FREEBSD_LOGO.png</Background>
</Desktops>
 
XPM and PNG icons work fine. SVG does not.
Svg should work if you compile the option in, which pulls in a lot of dependencies, bc it doesn't just pull in the limited library like png, jpg and maybe xpm do.

The icon path is fussy. I reduced mine to a single line and dropped all the PNG and XPM files to my ~/.icon folder.

My icon path looks like this:

XML:
<IconPath>/usr/home/unitrunker/.icons</IconPath>

The $HOME macro did not work for me with icons. It did work for the background. Here's my Desktops section with background:

XML:
<Desktops width="4" height="1">
    <Background type="scale">$HOME/Downloads/FREEBSD_LOGO.png</Background>
</Desktops>
In my experience, the target path for background had to be the full path, and no ~. I bet that works too.
 
Using JWM as a pkg install here. I added the following to quickly get to editing the .jwmrc:

XML:
<Program label="edit menus">xterm -e vi .jwmrc</Program>

Did not immediately realize the "Restart" lets you tweak the .jwmrc file and then see the results.

XPM and PNG icons work fine. SVG does not. The icon path is fussy. I reduced mine to a single line and dropped all the PNG and XPM files to my ~/.icon folder.

My icon path looks like this:

XML:
<IconPath>/usr/home/unitrunker/.icons</IconPath>

The $HOME macro did not work for me with icons. It did work for the background. Here's my Desktops section with background:

XML:
<Desktops width="4" height="1">
    <Background type="scale">$HOME/Downloads/FREEBSD_LOGO.png</Background>
</Desktops>

Thank you for your response, with your procedure change the wallpaper. What I still can't detect are icons and themes, and I can't add basic applications to the taskbar either.

This is the configuration file:


$ vi /home/user/.jwmrc
Code:
<?xml version="1.0"?>
<JWM>

    <!-- The root menu. -->
    <RootMenu onroot="12">
       
        <Program icon="rxvt.png" label="Terminal">rxvt</Program>
        <Program icon="xterm.png" label="Terminal">xterm</Program>
        <Program icon="terminal.png" label="LXTerminal">lxterminal</Program>
        <Menu icon="folder.png" label="Applications">
            <Program icon="music.png" label="Audacious">audacious</Program>
            <Program icon="calculator.png" label="Calculator">xcalc</Program>
            <Program icon="gimp.png" label="Gimp">gimp</Program>
            <Program icon="chat.png" label="Pidgin">pidgin</Program>
            <Program icon="www.png" label="Firefox">firefox</Program>
            <Program icon="midori.png" label="Midori">midori</Program>
            <Program icon="editor.png" label="XEdit">xedit</Program>
            <Program icon="editor.png" label="Mousepad">mousepad</Program>
            <Program icon="editor.png" label="Leafpad">leafpad</Program>
            <Program label="pcmanfm.png" label="File Manager">pcmanfm</Program>
        </Menu>
        <Menu icon="folder.png" label="Utilities">
            <Program icon="font.png" label="Fonts">xfontsel</Program>
            <Program icon="window.png" label="Window Properties">
                xprop | xmessage -file -
            </Program>
            <Program icon="window.png" label="Window Information">
                xwininfo | xmessage -file -
            </Program>
        </Menu>
        <Separator/>
        <Program icon="lock.png" label="Lock">
            xlock -mode blank
        </Program>
        <Separator/>
        <Restart label="Restart" icon="restart.png"/>
        <Exit label="Exit" confirm="true" icon="quit.png"/>
        <Program icon="system-sudo.png" label="Reboot">sudo reboot</Program>
        <Program icon="system-shutdown.png" label="Shutdown">shutdown -p now</Program>
    </RootMenu>

    <!-- Options for program groups. -->
    <Group>
        <Option>tiled</Option>
        <Option>aerosnap</Option>
    </Group>
    <Group>
        <Class>Pidgin</Class>
        <Option>sticky</Option>
    </Group>
    <Group>
        <Name>xterm</Name>
        <Option>vmax</Option>
    </Group>
    <Group>
        <Name>xclock</Name>
        <Option>drag</Option>
        <Option>notitle</Option>
    </Group>
        <Name>firefox</Name>
        <Option>notitle</Option>
    </Group>    

    <!-- Tray at the bottom. -->
    <Tray x="25"  x="0" y="-1" autohide="off">

        <TrayButton icon="jwm-blue">root:1</TrayButton>
        <Spacer width="2"/>
        <TrayButton label="_">showdesktop</TrayButton>
        <Spacer width="2"/>

        <Pager labeled="true"/>

        <TaskList maxwidth="256"/>

        <Swallow name="volumeicon">/bin/bash -c "sleep 4:volumeicon"</Swallow>

        <Swallow name="nm-applet">nm-applet</Swallow>

       <Swallow name="conky">/opt/my_soft/my_conky/start-conky.sh</swallow>

        <Dock/>
        <Clock format="%H:%M"><Button mask="123">exec:xclock</Button></Clock>

    </Tray>

    <!-- Visual Styles -->
    <WindowStyle>
        <Font>Sans-9:bold</Font>
        <Width>4</Width>
        <Height>21</Height>
        <Corner>3</Corner>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
        <Outline>#000000</Outline>
        <Opacity>0.5</Opacity>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
            <Outline>#000000</Outline>
            <Opacity>1.0</Opacity>
        </Active>
    </WindowStyle>
    <TrayStyle group="true" list="all">
        <Font>Sans-9</Font>
        <Background>#333333</Background>
        <Foreground>#FFFFFF</Foreground>
        <Outline>#000000</Outline>
        <Opacity>0.75</Opacity>
    </TrayStyle>
    <TaskListStyle>
      <Font>Sans-9</Font>
      <Active>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
      </Active>
      <Foreground>#FFFFFF</Foreground>
      <Background>#333333</Background>
    </TaskListStyle>
    <PagerStyle>
        <Outline>#000000</Outline>
        <Foreground>#555555</Foreground>
        <Background>#333333</Background>
        <Text>#FFFFFF</Text>
        <Active>
            <Foreground>#0077CC</Foreground>
            <Background>#004488</Background>
        </Active>
    </PagerStyle>
    <MenuStyle>
        <Font>Sans-9</Font>
        <Foreground>#FFFFFF</Foreground>
        <Background>#333333</Background>
        <Outline>#000000</Outline>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
        </Active>
        <Opacity>0.85</Opacity>
    </MenuStyle>
    <PopupStyle>
        <Font>Sans-9</Font>
        <Foreground>#000000</Foreground>
        <Background>#999999</Background>
    </PopupStyle>

    <!-- Path where icons can be found.
         IconPath can be listed multiple times to allow searching
         for icons in multiple paths.
      -->
    <IconPath>
        $HOME/.icons/jwm
        /usr/local/share/icons/
        /usr/local/share/pixmaps
        /usr/local/lib/X11/icons
    </IconPath>
    <IconPath>
        /usr/local/share/icons/
    </IconPath>

    <!-- Virtual Desktops -->
    <!-- Desktop tags can be contained within Desktops for desktop names. -->
    <Desktops width="1" height="1">
        Default background. Note that a Background tag can be
              contained within a Desktop tag to give a specific background
              for that desktop.
         -->
            <Background type="scale">$HOME/Downloads/imageq.png</Background>
        </Desktops>

        <Background type="solid">#111111</Background>
    </Desktops>-->
   
    <Desktop>
        <Background type="image" width="1366" height="768">dm-background.png</Background>
    </Desktop>

    <!-- Double click speed (in milliseconds) -->
    <DoubleClickSpeed>400</DoubleClickSpeed>

    <!-- Double click delta (in pixels) -->
    <DoubleClickDelta>2</DoubleClickDelta>

    <!-- The focus model (sloppy or click) -->
    <FocusModel>sloppy</FocusModel>

    <!-- The snap mode (none, screen, or border) -->
    <SnapMode distance="10">border</SnapMode>

    <!-- The move mode (outline or opaque) -->
    <MoveMode>opaque</MoveMode>

    <!-- The resize mode (outline or opaque) -->
    <ResizeMode>opaque</ResizeMode>

    <!-- Key bindings -->
    <Key key="Up">up</Key>
    <Key key="Down">down</Key>
    <Key key="Right">right</Key>
    <Key key="Left">left</Key>
    <Key key="h">left</Key>
    <Key key="j">down</Key>
    <Key key="k">up</Key>
    <Key key="l">right</Key>
    <Key key="Return">select</Key>
    <Key key="Escape">escape</Key>

    <Key mask="A" key="Tab">nextstacked</Key>
    <Key mask="A" key="F4">close</Key>
    <Key mask="A" key="#">desktop#</Key>
    <Key mask="A" key="F1">root:1</Key>
    <Key mask="A" key="F2">window</Key>
    <Key mask="A" key="F10">maximize</Key>
    <Key mask="A" key="Right">rdesktop</Key>
    <Key mask="A" key="Left">ldesktop</Key>
    <Key mask="A" key="Up">udesktop</Key>
    <Key mask="A" key="Down">ddesktop</Key>

</JWM>
 
I see one - maybe two mistakes. The "Desktop" element should appear as a child of "Desktop". You have two <Background> elements and only one Desktop. One of the <Background> elements is likely redundant.
Something like ...

XML:
<Desktops width="1" height="1">
<Background type="image">/path/to/image</Background>
<Desktop name="teo" />
</Desktops>

I think I had some bad XML in my earlier attempts. This now works for me as the IconPath.

XML:
<IconPath>$HOME/.icons</IconPath>
 
I see one - maybe two mistakes. The "Desktop" element should appear as a child of "Desktop". You have two <Background> elements and only one Desktop. One of the <Background> elements is likely redundant.
Something like ...

XML:
<Desktops width="1" height="1">
<Background type="image">/path/to/image</Background>
<Desktop name="teo" />
</Desktops>

Would that procedure go instead of the one below?

Code:
<Background type="scale">$HOME/Downloads/imageq.png</Background>
According to the terminal, it yields those results:


$ jwm -p
Code:
JWM: warning: /home/user/.jwmrc[64]: close tag "Group" does not match open tag "JWM"
JWM: warning: /home/user/.jwmrc[168]: close tag "Desktops" does not match open tag "JWM"
JWM: warning: /home/user/.jwmrc[62]: invalid tag in JWM: Name
$
 
Why is JWM in your opening tag? It's self evident, the Group and Desktops closing tags need the same name opening tags, not JWM.
 
Last edited:
$ jwm -p
Code:
JWM: warning: /home/user/.jwmrc[64]: close tag "Group" does not match open tag "JWM"
JWM: warning: /home/user/.jwmrc[168]: close tag "Desktops" does not match open tag "JWM"
JWM: warning: /home/user/.jwmrc[62]: invalid tag in JWM: Name
Code:
[JWM][/Group]
[JWM][/Desktops]

I see two problems. You forgot an opening tag for one Group. Then on the Desktops section, you misplaced the comment out tags. I think the last error message will fix from fixing the one from group.
 
In another thread, teo asked for an example .jwmrc file. The file is an XML document. When customizing your jwm file, it is important to understand how to maintain a well-formed XML document.

Here it is:

Code:
<?xml version="1.0"?>
<JWM>

    <!-- The root menu. -->
    <RootMenu onroot="12">
        <Program icon="terminal.png" label="Terminal">xterm</Program>
        <Menu icon="folder.png" label="Applications">
            <Program icon="music.png" label="Audacious">audacious</Program>
            <Program icon="calculator.png" label="Calculator">xcalc</Program>
            <Program icon="gimp.png" label="Gimp">gimp</Program>
            <Program icon="chat.png" label="Pidgin">pidgin</Program>
            <Program icon="www.png" label="Firefox">firefox</Program>
            <Program icon="editor.png" label="XEdit">xedit</Program>
        </Menu>
        <Menu icon="folder.png" label="Utilities">
            <Program icon="font.png" label="Fonts">xfontsel</Program>
            <Program icon="window.png" label="Window Properties">
                xprop | xmessage -file -
            </Program>
            <Program icon="window.png" label="Window Information">
                xwininfo | xmessage -file -
            </Program>
        </Menu>
        <Separator/>
        <Program icon="lock.png" label="Lock">
            xlock -mode blank
        </Program>
        <Separator/>
        <Restart label="Restart" icon="restart.png"/>
        <Exit label="Exit" confirm="true" icon="quit.png"/>
    </RootMenu>

    <!-- Options for program groups. -->
    <Group>
        <Option>tiled</Option>
        <Option>aerosnap</Option>
    </Group>
    <Group>
        <Class>Pidgin</Class>
        <Option>sticky</Option>
    </Group>
    <Group>
        <Name>xterm</Name>
        <Option>vmax</Option>
    </Group>
    <Group>
        <Name>xclock</Name>
        <Option>drag</Option>
        <Option>notitle</Option>
    </Group>

    <!-- Tray at the bottom. -->
    <Tray x="0" y="-1" autohide="off">

        <TrayButton icon="jwm-blue">root:1</TrayButton>
        <Spacer width="2"/>
        <TrayButton label="_">showdesktop</TrayButton>
        <Spacer width="2"/>

        <Pager labeled="true"/>

        <TaskList maxwidth="256"/>

        <Dock/>
        <Clock format="%H:%M"><Button mask="123">exec:xclock</Button></Clock>

    </Tray>

    <!-- Visual Styles -->
    <WindowStyle>
        <Font>Sans-9:bold</Font>
        <Width>4</Width>
        <Height>21</Height>
        <Corner>3</Corner>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
        <Outline>#000000</Outline>
        <Opacity>0.5</Opacity>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
            <Outline>#000000</Outline>
            <Opacity>1.0</Opacity>
        </Active>
    </WindowStyle>
    <TrayStyle group="true" list="all">
        <Font>Sans-9</Font>
        <Background>#333333</Background>
        <Foreground>#FFFFFF</Foreground>
        <Outline>#000000</Outline>
        <Opacity>0.75</Opacity>
    </TrayStyle>
    <TaskListStyle>
      <Font>Sans-9</Font>
      <Active>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
      </Active>
      <Foreground>#FFFFFF</Foreground>
      <Background>#333333</Background>
    </TaskListStyle>
    <PagerStyle>
        <Outline>#000000</Outline>
        <Foreground>#555555</Foreground>
        <Background>#333333</Background>
        <Text>#FFFFFF</Text>
        <Active>
            <Foreground>#0077CC</Foreground>
            <Background>#004488</Background>
        </Active>
    </PagerStyle>
    <MenuStyle>
        <Font>Sans-9</Font>
        <Foreground>#FFFFFF</Foreground>
        <Background>#333333</Background>
        <Outline>#000000</Outline>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
        </Active>
        <Opacity>0.85</Opacity>
    </MenuStyle>
    <PopupStyle>
        <Font>Sans-9</Font>
        <Foreground>#000000</Foreground>
        <Background>#999999</Background>
    </PopupStyle>

    <!-- Path where icons can be found.
         IconPath can be listed multiple times to allow searching
         for icons in multiple paths.
      -->
    <IconPath>
        /usr/share/icons/wm-icons/32x32-aquafusion
    </IconPath>
    <IconPath>
        /usr/local/share/jwm
    </IconPath>

    <!-- Virtual Desktops -->
    <!-- Desktop tags can be contained within Desktops for desktop names. -->
    <Desktops width="4" height="1">
        <!-- Default background. Note that a Background tag can be
              contained within a Desktop tag to give a specific background
              for that desktop.
         -->
        <Background type="solid">#111111</Background>
    </Desktops>

    <!-- Double click speed (in milliseconds) -->
    <DoubleClickSpeed>400</DoubleClickSpeed>

    <!-- Double click delta (in pixels) -->
    <DoubleClickDelta>2</DoubleClickDelta>

    <!-- The focus model (sloppy or click) -->
    <FocusModel>sloppy</FocusModel>

    <!-- The snap mode (none, screen, or border) -->
    <SnapMode distance="10">border</SnapMode>

    <!-- The move mode (outline or opaque) -->
    <MoveMode>opaque</MoveMode>

    <!-- The resize mode (outline or opaque) -->
    <ResizeMode>opaque</ResizeMode>

    <!-- Key bindings -->
    <Key key="Up">up</Key>
    <Key key="Down">down</Key>
    <Key key="Right">right</Key>
    <Key key="Left">left</Key>
    <Key key="h">left</Key>
    <Key key="j">down</Key>
    <Key key="k">up</Key>
    <Key key="l">right</Key>
    <Key key="Return">select</Key>
    <Key key="Escape">escape</Key>

    <Key mask="A" key="Tab">nextstacked</Key>
    <Key mask="A" key="F4">close</Key>
    <Key mask="A" key="#">desktop#</Key>
    <Key mask="A" key="F1">root:1</Key>
    <Key mask="A" key="F2">window</Key>
    <Key mask="A" key="F10">maximize</Key>
    <Key mask="A" key="Right">rdesktop</Key>
    <Key mask="A" key="Left">ldesktop</Key>
    <Key mask="A" key="Up">udesktop</Key>
    <Key mask="A" key="Down">ddesktop</Key>

    <!-- Mouse bindings -->
    <Mouse context="root" button="4">ldesktop</Mouse>
    <Mouse context="root" button="5">rdesktop</Mouse>

    <Mouse context="title" button="1">move</Mouse>
    <Mouse context="title" button="2">move</Mouse>
    <Mouse context="title" button="3">window</Mouse>
    <Mouse context="title" button="4">shade</Mouse>
    <Mouse context="title" button="5">shade</Mouse>
    <Mouse context="title" button="11">maximize</Mouse>

    <Mouse context="icon" button="1">window</Mouse>
    <Mouse context="icon" button="2">move</Mouse>
    <Mouse context="icon" button="3">window</Mouse>
    <Mouse context="icon" button="4">shade</Mouse>
    <Mouse context="icon" button="5">shade</Mouse>

    <Mouse context="border" button="1">resize</Mouse>
    <Mouse context="border" button="2">move</Mouse>
    <Mouse context="border" button="3">window</Mouse>

    <Mouse context="close" button="-1">close</Mouse>
    <Mouse context="close" button="2">move</Mouse>
    <Mouse context="close" button="-3">close</Mouse>

    <Mouse context="maximize" button="-1">maximize</Mouse>
    <Mouse context="maximize" button="-2">maxv</Mouse>
    <Mouse context="maximize" button="-3">maxh</Mouse>

    <Mouse context="minimize" button="-1">minimize</Mouse>
    <Mouse context="minimize" button="2">move</Mouse>
    <Mouse context="minimize" button="-3">shade</Mouse>

</JWM>
 
Back
Top