HOWTO: JWM Configuration

HOWTO: JWM Basic Configuration

This is a very light, extremely fast window manager, one of my favorites. Uses 3 MB RAM.

First thing I do is copy the global config file /usr/local/etc/system.jwmrc to my /home. You are NOT allowed to edit the global file.

$ cp /usr/local/etc/system.jwmrc .jwmrc

So, from now on I can access this file as USER. $ nano .jwmrc

We're faced with a long config file but the good news is that there is only one file :)

Note that the window manager is very configurable and this is a subjective matter, what is good for me, is not necessarily good for you; there is a choice and it's all up to you.

In the first part I configure my apps to be launched full-sized, maximized, I like it that way, easy for me to work. No dragging, no resizing, just alt-tab to move from one to the other.

APPS OPTIONS
Code:
<Group>
   <Name>roxterm</Name>
   <Option>maximized</Option>
</Group>

<Group>
   <Name>firefox</Name>
   <Option>maximized</Option>
   <Option>notitle</Option>
</Group>

And so on, I do the same for xfe, firefox, sylpheed, xchat, etc. Make sure lines are aligned correctly IF you want your apps maximized. If you want no titlebar add 'notitle'.

Otherwise, if you like your apps floating, ignore this section.

TASKBAR
For the regular look (taskbar at the bottom):

Code:
<Tray x="0" y="-1"  autohide="off">

FOR THE TASKBAR ON TOP

Code:
  <Tray x="0" y="+1"  autohide="off">

WITHOUT TITLEBAR

Code:
    <!-- Visual Styles -->
   <WindowStyle>

      <Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
      <Width>1</Width>
      <Height>2</Height>

Or add 'notitle' in the Options at the beginning of the file to your apps.

TASKBAR IN AUTOHIDE (à la ratpoison)

Code:
  <Tray x="0" y="+1"  autohide="top">

Depending wherever you have your taskbar. Put top or bottom.

WORKSPACES
By default it comes with several workspaces, one on top of each other, I only use 2, one next to the other:

Code:
     <!-- Virtual Desktops -->
   <!-- Desktop tags can be contained within Desktops for desktop names.
-->
   <Desktops width="2" height="1">

Needless to say, if you want more workspaces, change the number of desktops in "width".

KEYBINDINGS

A = Alt
C = Control
4 = Windows key


Code:
   <!-- 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">next</Key>
   <Key mask="" key="F4">close</Key>
   <Key mask="" key="F12">maximize</Key>
   <Key mask="C" key="Right">rdesktop</Key>
   <Key mask="C" key="Left">ldesktop</Key>

   <Key mask="" key="F1">exec:roxterm</Key>
   <Key mask="" key="F2">exec:xfe</Key>
   <Key mask="" key="F3">exec:firefox</Key>
   <Key mask="" key="F7">exec:mirage</Key>
   <Key mask="" key="F8">exec:hexchat</Key>
   <Key mask="" key="F9">exec:libreoffice</Key>
   <Key mask="" key="F10">exec:jwm -restart</Key>
   <Key mask="" key="Print">exec:roxterm -e scrot -cd 10</Key>
   <Key mask="" key="Super_L">root:1</Key>
   <Key mask="C" key="space">exec:gmrun</Key>

#Volume
   <Key mask="C" key="Down">>exec:amixer set Master 6%- </Key>
   <Key mask="C" key="Up">exec:amixer set Master 6%+ </Key>
   <Key mask="C" key="0">exec:amixer sset Master,0 toggle </Key>

</JWM>


HOW DOES IT WORK

Alt-tab for moving between screens
Ctrl+ arrow right/left for changing workspaces
F4 closes apps
F12 maximizes screen
F3 launches browser
Print key takes a picture with scrot
F1 launches terminal
F2 launches file manager
F4 closes app
F8 launches xchat
Ctrl+spacebar gives you gmrun to launch apps
F10 restarts jwm
Windows key gives you the main menu. And so forth...

I have no use for the Fn keys, but if you do, you can add Alt, Ctrl or the Windows key to the Fn keys or any letter you feel confortable with. A+Fn key or C+Fn key or 4+Fn key, C-f for firefox, C-m for mirage, you get the idea.

The thing is to increase your speed, by the time you point and click with the mouse, you could be already working, with your keybinds.

To start jwm automatically as you enter X, edit the file .xinitrc as root:
# nano /home/user_name/.xinitrc

Here's mine:
Code:
#!/bin/sh

firefox &
setxkbmap -option terminate:ctrl_alt_bksp
xsetroot -solid black
unclutter -idle 2 &
numlockx &

exec jwm

Or just put 'exec jwm'


save/exit from the editor, RESTART from the menu, next time you can restart with F10.

jwm -p (to see if there any parsing errors)

#reboot

Good luck,
macondo aka Lou, bobo, cerealkiller

Reference:
http://joewing.net/projects/jwm/config.shtml

P.S. The only application that can give you a menu is xdgmenumaker, otherwise, you have to do it manually. Unfortunately xdgmenumaker is not in the FreeBSD repositories.

Screenies


Default look, and taskbar on top.
 
Thanks Macondo - I have tried this WM a couple of times but could never figure out how to make the taskbar smaller: it is almost 1/2 inch tall and takes up too much space. Is this possible?
 
Thanks Macondo - I have tried this WM a couple of times but could never figure out how to make the taskbar smaller: it is almost 1/2 inch tall and takes up too much space. Is this possible?

You're welcome, np. you have to lower the number in the 'Tray at the bottom' , mine is at 20 by default. Different distros omit this figure as in FreeBSD, what distro are you using?

Unfortunately, FreeBSD does not have this figure so you can NOT change the width. Instead, it comes at 20 by default. I will check the JWM site see if there is a hack for it, but yours shouldn't be this thick, I think my other box with Debian had this problem (thick taskbar), but I just lower the number to 20, (it's the figure prior to Autohide). Also, make sure the virtual desktops are in one horizontal line, instead of 2 or 3 lines one on top of the other.

Code:
  <!-- Virtual Desktops -->
    <!-- Desktop tags can be contained within Desktops for desktop names. -->
    <Desktops width="2" height="1">
Where 2 is the number of desktops, and 1 is one horizontal line only.

Code:
  <!-- Tray at the bottom. -->
    <Tray x="0" y="-1" autohide="off"> The width is missing here.

This screenie is JWM in FreeBSD 10.3, notice how thin the taskbar is by DEFAULT:

How many desktops you got?

Greetings,
 
Using FreeBSD exclusively, I don't use Linux. Interesting: I have seen other screenshots that show it as small as the screenie you posted. Mine is huge for some reason and it really shouldn't be - I am running on a 26inch monitor with 1980x1200 resolution. Thanks again.
 
Macondo: this works:
Code:
<!-- Tray at the bottom. -->
   <Tray x="0" y="-1" height="20" autohide="off">

Now it looks like the screenshot you posted. Thanks for the tip!
 
jwm and rox work very well together IMO. I use a rox panel at the top of the screen that's always visible, and a auto hide jwm tray at the bottom of screen, central - as a dock and tray, i.e. is defined using opening tray command of
<Tray autohide="bottom" insert="right" valign="bottom" halign="center" width="600" height="84">
... so its quite large (84 size when visible). Within that I have a clock, that is set to also act as a showdesk when clicked and that just shows the day of week/date/month, with a xclock next to that that shows the time, and then a dock and a xload chart and finally a tasklist

<Clock format=" %a %d %b">showdesktop</Clock>
<Spacer width="8"/>
<Swallow name="xclock" width="84" height="84">
xclock -padding 0 -hd cyan -hl cyan
</Swallow>
<Spacer width="8"/>
<Dock spacing="10"/>
<Swallow name="xload" width="64" height="72">
xload -nolabel -bg "#333333" -fg red -hl white
</Swallow>
<TaskList maxwidth="64"/>
</Tray>

Rox panels are good as you can drag/drop program files to them to add them to the tray, middle mouse drag/drop to move them around in the panel. You can also drag/drop files onto the icons in the panel to open that file using that icons program.

I include all my startup commands in the .jwmrc also, wrapping them inside the <StartupCommand>...</StartupCommand> tags. So to answer the previous posters question you might include something like

<StartupCommand>osmo</StartupCommand>
<StartupCommand>rox -p /home/user/.roxpinwork</StartupCommand>
<StartupCommand>rox -t /home/user/.roxpaneltop</StartupCommand>
<StartupCommand>numlockx</StartupCommand>
<StartupCommand>setxkbmap -option terminate:ctrl_alt_bksp</StartupCommand>
<StartupCommand>xclock -hd cyan -hl cyan</StartupCommand>
<StartupCommand>mixerctl outputs.hp_boost=on</StartupCommand>

... which is a extract from part of my current .jwmrc, notice the rox -t ... and rox -p ... for the panel at top of screen and rox pinboard activation.

I only have a single monitor and so just use a single desktop, I do however have multiple rox pinboards with different icons/files/folders (and backgrounds (wallpapers) on each. I include a script for each panel in the rox panel ... for instance the one for my office 'desktop' (pinboard) contains

#!/bin/sh
rox --pinboard=/home/user/.roxpinoffice

ditto in a similar manner for other pinboards (home, scratchpad, computer, music ...etc.). So a single click flips between whichever pinboard you desire. My computing one for instance contains links to configuration files along with html links to reference material; My music pinboard contains links to my current favourite videos/mp3's etc. I have it so pretty much everything is on pinboards or the panel so much so that I don't bother having a MENU at all. I even have my browser bookmarks on pinboards so that I just 'showdesktop' and navigate to the appropriate pinboard and click a html link to open a particular web page.

You can drag/drop files from within rox-filer onto the pinboard, but be mindful that just creates links to the files, not actual copies. You can also move pinboard icons around using drag/drop.

jwm aerosnap option in later versions of jwm is nice, enables you to drag a window to one of the sides and have that window sized to half screen ... handy for opening the likes of two rox filers windows side by side ready for dragging/dropping files between different folders.

Rox is all based on RISC (reduced instruction set) on X (hence ROX), very much for the mouse being primary (drag/drop movements). If you have most of your common programs in the rox panel then whenever you want to open a file you can just drag/drop it to the relevant program icons in the rox panel to open it. You can also set up OpenWith associations so that clicking a file opens it with a specific program.

https://drive.google.com/file/d/17hCFxVFSbQAYK4TO2K2nfQU3-BIyDoGp/view?usp=sharing
 

Attachments

  • s.jpg
    s.jpg
    226 KB · Views: 1,012
Compile options & functionality
x11-wm/jwm make config options of:
  • JPEG, PNG, SVG or XPM are needed for setting the background image to these file types. Compiling without these settings, doesn't seem to affect icons used in windows and in the task bar. SVG is turned off by default, and it also brings in a lot of unrelated dependencies, when used.
  • XINERAMA adjusts the behavior for maximizing windows on multi-screens. When Xinerama is not compiled into JWM, a maximized window will take up all of two screens. With it compiled in, a maximized window will take up only one screen where it's maximized.
  • XEXT allows the JWM option of noborder to work. noborder removes the border on windows. XEXT is also a core dependency of other JWM options: XINERAMA, XPM, XMU.
  • XFT is for better fonts used in JWM including window bars, and in the task bar. FRIBIDI is for Unicode and for bidirectional text for some written languages. NLS is another option of interest here.
  • XRENDR is a dependency of XFT.
JWM without options compiled in has a RES (Resident RAM) footprint of about 4 to 5MB (as of this writing). With XFT, XINERAMA, XEXT and XRENDR compiled in, JWM has a RES footprint of 9 to 11MB. Adding image-type dependencies and using a background with them increases RES to over 20MB. However, a few days ago, JWM was using 4 to 6MB (for RES) with many option dependencies turned on (they were in use), with a background image being used.

Adjusting Window via tasklist menu
Right-click in the taskbar on the application's tasklist. Then from that menu, right-click the program instance that you want to adjust.
jwm-tasklist1.png
jwm-tasklist2.png

The options show up to choose from, of: Move or Restore, Stick, Layer, Send To... Restore may have to be chosen for the Move option to show up.

Useful for when I switch one monitor for use as a television, and I want to move an application over to the monitor that has the taskbar on it. Without this, I would have to switch the screen back to monitor mode to move it to the other monitor, or guess where I'm aiming the mouse off-screen. Thread tasklist-menu-in-jwm.77457/.

More
Thread screenshots-of-bsd-window-managers-for-x11.81505/#post-524730 - a few JWM screenshots; notable configuration excerpts are under spoiler.

I use .xsession for starting xrandr and xscreensaver, rather than .jwmrc. .xsession can optionally also be used for starting any application where specific desktop placement isn't needed.

 
Compile options & functionality
x11-wm/jwm make config options of:
  • JPEG, PNG, SVG or XPM are needed for setting the background image to these file types. Compiling without these settings, doesn't seem to affect icons used in windows and in the task bar. SVG is turned off by default, and it also brings in a lot of unrelated dependencies, when used.
  • XINERAMA adjusts the behavior for maximizing windows on multi-screens. When Xinerama is not compiled into JWM, a maximized window will take up all of two screens. With it compiled in, a maximized window will take up only one screen where it's maximized.
  • XEXT allows the JWM option of noborder to work. noborder removes the border on windows. XEXT is also a core dependency of other JWM options: XINERAMA, XPM, XMU.
  • XFT is for better fonts used in JWM including window bars, and in the task bar. FRIBIDI is for Unicode and for bidirectional text for some written languages. NLS is another option of interest here.
  • XRENDR is a dependency of XFT.
JWM without options compiled in has a RES (Resident RAM) footprint of about 4 to 5MB (as of this writing). With XFT, XINERAMA, XEXT and XRENDR compiled in, JWM has a RES footprint of 9 to 11MB. Adding image-type dependencies and using a background with them increases RES to over 20MB. However, a few days ago, JWM was using 4 to 6MB (for RES) with many option dependencies turned on (they were in use), with a background image being used.

Adjusting Window via tasklist menu
Right-click in the taskbar on the application's tasklist. Then from that menu, right-click the program instance that you want to adjust.
View attachment 11146 View attachment 11147
The options show up to choose from, of: Move or Restore, Stick, Layer, Send To... Restore may have to be chosen for the Move option to show up.

Useful for when I switch one monitor for use as a television, and I want to move an application over to the monitor that has the taskbar on it. Without this, I would have to switch the screen back to monitor mode to move it to the other monitor, or guess where I'm aiming the mouse off-screen. Thread tasklist-menu-in-jwm.77457/.

More
Thread screenshots-of-bsd-window-managers-for-x11.81505/#post-524730 - a few JWM screenshots; notable configuration excerpts are under spoiler.

I use .xsession for starting xrandr and xscreensaver, rather than .jwmrc. .xsession can optionally also be used for starting any application where specific desktop placement isn't needed.

Interesting your knowledge with JWM, from what is seen in your images still needs to be polished and tuned for day to day use as they do in linux, I quite like JWM that at the time I tried it.
 
Interesting your knowledge with JWM, from what is seen in your images still needs to be polished and tuned for day to day use as they do in linux, I quite like JWM that at the time I tried it.
That above screenshot was for showing the menu option. I was recompiling it several times to test different options, so I left a few things out of that screenshot that I regularly have set: the background, gvolwheel and urxvt.

I have it set up how I want it, including with terminal applications, with gvolwheel, with my background, and with dual monitors. My JWM screenshots that are complete are at: Thread screenshots-of-bsd-window-managers-for-x11.81505/#post-524730/.


Cairo
Cairo is for SVG icons, which the only one this option affects is the default JWM icon in the root menu bar. For Cairo's function to work for JWM, SVG must also be set on. Toggling CAIRO, SVG, PNG, JPEG and XPM didn't affect other icons in my tasktray nor pager.

SVG is needed to use .svg wallpapers.
 
Last edited:
That above screenshot was for showing the menu option. I was recompiling it several times to test different options, so I left a few things out of that screenshot that I regularly have set: the background, gvolwheel and urxvt.

I have it set up how I want it, including with terminal applications, with gvolwheel, with my background, and with dual monitors. My JWM screenshots that are complete are at: Thread screenshots-of-bsd-window-managers-for-x11.81505/#post-524730/.


Cairo
Cairo is for SVG icons, which the only one this option affects is the default JWM icon in the root menu bar. For Cairo's function to work for JWM, SVG must also be set on. Toggling CAIRO, SVG, PNG, JPEG and XPM didn't affect other icons in my tasktray nor pager.

SVG is needed to use .svg wallpapers.
Do you have it tuned JWM? Any tools or scripts to automatically prescribe in the configuration text of the file what is in the system and not be doing manually what normally for newbies we don't know what to do?

sidetone said:
Compile options & functionality
[COLOR=#0645AD /*#007a00*/]x11-wm/jwm[/COLOR] make config options of:
  • JPEG, PNG, SVG or XPM are needed for setting the background image to these file types. Compiling without these settings, doesn't seem to affect icons used in windows and in the task bar. SVG is turned off by default, and it also brings in a lot of unrelated dependencies, when used.
  • XINERAMA adjusts the behavior for maximizing windows on multi-screens. When Xinerama is not compiled into JWM, a maximized window will take up all of two screens. With it compiled in, a maximized window will take up only one screen where it's maximized.
  • XEXT allows the JWM option of noborder to work. noborder removes the border on windows. XEXT is also a core dependency of other JWM options: XINERAMA, XPM, XMU.
  • XFT is for better fonts used in JWM including window bars, and in the task bar. FRIBIDI is for Unicode and for bidirectional text for some written languages. NLS is another option of interest here.
  • XRENDR is a dependency of XFT.
JWM without options compiled in has a RES (Resident RAM) footprint of about 4 to 5MB (as of this writing). With XFT, XINERAMA, XEXT and XRENDR compiled in, JWM has a RES footprint of 9 to 11MB. Adding image-type dependencies and using a background with them increases RES to over 20MB. However, a few days ago, JWM was using 4 to 6MB (for RES) with many option dependencies turned on (they were in use), with a background image being used.

Adjusting Window via tasklist menu
Right-click in the taskbar on the application's tasklist. Then from that menu, right-click the program instance that you want to adjust.
jwm-tasklist1.png

jwm-tasklist2.png


The options show up to choose from, of: Move or Restore, Stick, Layer, Send To... Restore may have to be chosen for the Move option to show up.

Useful for when I switch one monitor for use as a television, and I want to move an application over to the monitor that has the taskbar on it. Without this, I would have to switch the screen back to monitor mode to move it to the other monitor, or guess where I'm aiming the mouse off-screen. Thread tasklist-menu-in-jwm.77457/.

More
Thread screenshots-of-bsd-window-managers-for-x11.81505/#post-524730 - a few JWM screenshots; notable configuration excerpts are under spoiler.

I use .xsession for starting xrandr and xscreensaver, rather than .jwmrc. .xsession can optionally also be used for starting any application where specific desktop placement isn't needed.

The bad thing is that some laptops with low resources do not support compilation, and it is preferred to install binary packages so they do not overheat or end up dying, is it also valid that way?

macondo said:
I installed it again, forgot how good it is!
Already familiar with JWM? Do you understand it very well? I have a hard time understanding the configuration manually, and for the detection and configuration of devices such as USB/SmartPhone, SD memory, among others that are generally used to store music or data among other things.
 
JWM with most options, compiles in about a minute. So that won't be an issue for laptops. Most of the settings are already in the package by default. Type pkg info jwm. For background images, only 1 format is needed. JPEG is typically the lightest one on computer resources, with the exception of SVG, which comes with lots of problems.

SVG brings in tons and tons and tons and tons and tons and tons and tons and tons and tons of Linux/Gnome bloat. I advise against compiling that in, as it takes forever even on a desktop, and makes JWM no longer light. Without SVG, there's no need for compiling Cairo in. The way the SVG icon works in the menu bar also seems broken, as it's oversized, and I can't resize it.
 
JWM without options compiled in has a RES (Resident RAM) footprint of about 4 to 5MB (as of this writing). With XFT, XINERAMA, XEXT and XRENDR compiled in, JWM has a RES footprint of 9 to 11MB. Adding image-type dependencies and using a background with them increases RES to over 20MB. However, a few days ago, JWM was using 4 to 6MB (for RES) with many option dependencies turned on (they were in use), with a background image being used.
And is it good or not the footprint of the RES (resident RAM) that is swelling of 4 to 20MB ? How to prevent it from swelling more?
 
On request of sidetone in Thread freebsd-screen-shots.8877 regarding post #1842 here a guide how to display [edit] scalable [/edit] Tango icons in the root menu of JWM. Instead of Tango icons any icons can be used, just set the <IconPath> accordingly:

Requirements:
  • x11-wm/jwm build with CAIRO and SVG enabled
  • x11-themes/icons-tango installed
  • <IconPath> set to Tango in ~/.jwmrc (or system wide in /usr/local/etc/system.jwmrc)
To avoid unnecessary dependency port compilation one can install packages instead, but make sure the package repository configuration is the same as the ports trees branch. Package repo "latest", ports tree "main" branch. For "quarterly", setup accordingly:
Code:
# make install-missing-packages
After JWM installation remove build dependencies running pkg-autoremove(8).

For convenience I provide the v2.4 jwmrc attached to this post. In JWM v2.4 <IconPath> is set by default to Tango icons. "motif" is default style in v2.4, for "flat" set <{Window,Tray,Menu}Style decorations="flat">.

v2.4 jwmrc is backwards compatible with JWM v2.3 (but v2.3 jwmrc not with JWM v2.4), replace v2.3 with it or replace configuration sections of it with v2.3 or vice versa.

[EDIT]
Displaying icons in root menu isn't something that peaks my interest, so I didn't extensive testing. It turns out JWM needs to be build with options CAIRO and SVG if scalable icons (*.svg) are desired.

For *.png icons the port/package doesn't need those options enabled to display them. Following configuration specifies 32x32 icons.

~/.jwmrc
XML:
<!-- Path where icons can be found.
         IconPath can be listed multiple times to allow searching
         for icons in multiple paths.
      -->
    <IconPath>
      /usr/local/share/icons/Tango/32x32/actions
    </IconPath>
    <IconPath>
      /usr/local/share/icons/Tango/32x32/apps
    </IconPath>
    <IconPath>
      /usr/local/share/icons/Tango/32x32/places
    </IconPath>
    <IconPath>
      /usr/local/share/icons/Tango/32x32/status
    </IconPath>
    <IconPath>
      /usr/local/share/icons/Tango/32x32/mimetypes
    </IconPath>
[/EDIT]

JWM-root-menu-tango-icons1.png


It's also possible to set individual icons. Create a directory for them, e.g. ~/.icons or a directory readable system wide for all users (I put icons, themes, backgrounds, documentations which are not installed by the port/package framework to be accessible by all users under /usr/home).

Set <IconPath> to $HOME/.icons (set for system wide path accordingly), and give the icons a unique name. Otherwise, when a icon with the same name exists in other <IconPath> that one which comes first in all listed <IconPath> will be picked up.

Example with x11-themes/adwaita-icon-theme:
Code:
$ cp /usr/local/share/icons/Adwaita/48x48/places/folder.png ~/.icons/folder-adwaita.png

~/.jwmrc
XML:
    <!-- The root menu. -->
    ...
         <Menu icon="folder-adwaita.png" label="Applications">
    ...
    <!-- Path where icons can be found.
         IconPath can be listed multiple times to allow searching
         for icons in multiple paths.
      -->
    ...
    <IconPath>
        $HOME/.icons
    </IconPath>
    ...

Notice "Applications" icon.

JWM-root-menu-indiv-icons1.png
 

Attachments

  • jwmrc-2.4.txt
    7.3 KB · Views: 225
Last edited:
Multimedia keys
FreeBSD 13.1 allows use of multimedia keys for generally all standard keyboards. Newer FreeBSD RC revisions of 13.1 have better consistency of working keys than previous prereleases. Thread howto-enabling-multimedia-keys-for-desktop-usbhid.84464 is the howto for setting up multimedia keys starting from FreeBSD 13.1.

Specific to JWM, here's a sample of .jwmrc for assigning multimedia keys for volume control:
Code:
<Key key="XF86AudioMute">exec:mixer 0</Key>
<Key key="XF86AudioRaiseVolume">exec:mixer vol +3</Key>
<Key key="XF86AudioLowerVolume">exec:mixer vol -3</Key>


Simplifying .jwmrc configuration
By using additional configuration files, like .xsession, .xinitrc, .Xdefaults and .Xresources, .jwmrc can be simplified. .xsession and .xinitrc work the same way, so these can be linked together. .Xdefaults and .Xresources are also similar to each other, so these can can be linked together.

.xsession and .xinitrc can be used to start programs that can be used across many window managers which don't need to be placed in any particular position on the screen, such as screensavers and xrandr.
Code:
xrandr --output eDP-1 --primary --mode 1280x720 --rotate normal --output VGA-1 --mode 1280x800 --rotate normal
xscreensaver &
exec /usr/local/bin/jwm
Command line programs which aren't daemons can use this, or if more suitable, crontab. I've used crontab for scripts that popped up on a basic terminal which indicated package vulnerabilities and when FreeBSD updates were available which ran on bootups and every few days.

.Xdefaults and .Xresources can be used for font sizes/styles, cursor behavior and scroll displays.
Code:
xterm*cursorBlink: true
xterm*cursorUnderLine: true
xterm*ScrollBar: false
xterm*Background: black
xterm*Foreground: white
xterm*faceName: courier
xterm*faceSize: 14

xvt*background: black
xvt*foreground: white
xvt*faceName: courier
xvt*faceSize: 14
Now, the indications for fonts, cursor styles and scrolling behavior don't have to be written into .jwmrc for each use in startup or the menu.
Code:
<Program label="Terminal-xvt">xvt</Program>
...
<StartupCommand>xterm -geometry 100x30</StartupCommand>
 
Recently, I wasn't able to use my mouse scroll wheel to shade and unshade windows. I was scratching my head trying to fix this. It wasn't an issue of recompiling JWM, its dependencies or Xorg to fix libraries.

As of JWM release 2.4, mouse bindings are configurable. This was updated in the port of x11-wm/jwm in June 30, 2022.

To fix this, add to .jwmrc:
Code:
<!--Mouse bindings-->
<Mouse context="title" button="4">shade</Mouse>
<Mouse context="title" button="5">shade</Mouse>
Mouse buttons 4 and 5 are the scroll wheel. To see this, xev can be used.

Another one, to use the mouse scroll wheel on the root window to change desktops:
Code:
<Mouse context="root" button="4">ldesktop</Mouse>
<Mouse context="root" button="5">rdesktop</Mouse>
Then, use jwm -p to check the settings, otherwise, with the wrong settings, jwm can crash. Then, use jwm -reload.

To see more examples of mouse bindings, see /usr/local/etc/system.jwmrc.
 
Back
Top