HOWTO: JWM Basic Configuration

Post Reply
bobo
Douche bag
Posts: 78
Joined: 17. Feb 2015, 16:37
Location: Panama

HOWTO: JWM Basic Configuration

Post by bobo » 23. Mar 2015, 04:47

HOWTO: Basic configuration of JWM

JWM Basic Configuration

This is a very light, extremely fast window manager, one of my favorites.

First thing i do is copy the global config file /etc/system.jwmrc
to my /home, to do that i update the database as root, look for it, and
copy it to my /home. You are NOT allowed to edit the global file.

Code: Select all

#updatedb

$ slocate .jwmrc

$ cp /etc/system.jwmrc .jwmrc 
So, from now on i can access this file as user.

Code: Select all

$ nano .jwmrc
We're faced with a long config file but the good news is that there is
only one file :)
Note that the wm is very configurable and this is a subjective matter, what
is good for me, is not necessariy 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: Select all


 <Group>
   <Name>lxterminal</Name>
   <Option>maximized</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.

Otherwise, ignore this section.

TASKBAR
For the regular look (at the bottom):

Code: Select all

 <Tray x="0" y="-1" height="20" autohide="false">
 

FOR THE TASKBAR ON TOP

Code: Select all

  <Tray x="0" y="+1" height="20" autohide="false">
  

WITHOUT TITLEBAR

Code: Select all

    <!-- Visual Styles -->
   <WindowStyle>

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

TASKBAR IN AUTOHIDE (á la ratpoison)

Code: Select all

  <Tray x="0" y="+1" height="20" autohide="true">
 

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

Code: Select all


    <!-- Virtual Desktops -->
   <!-- Desktop tags can be contained within Desktops for desktop names. -->
   <Desktops width="2" height="1">
   
   Needless to say, if you want more, change the number of desktops in 
   "width". IIRC, 2 desktps is the default in Salix.

 

KEYBINDINGS

A = Alt
C = Control
4 = Windows key

Code: Select all

   <!-- 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="4" key="Right">rdesktop</Key>
   <Key mask="4" key="Left">ldesktop</Key>


   
   <Key mask="" key="F1">exec:lxterminal</Key>
   <Key mask="" key="F2">exec:xfe</Key>
   <Key mask="" key="F3">exec:firefox</Key>
   <Key mask="4" key="m">exec:sylpheed</Key>
   <Key mask="" key="F5">exec:sudo halt -p</Key>
   <Key mask="" key="F6">exec:sudo reboot</Key>
   <Key mask="" key="F8">exec:xchat</Key>
   <Key mask="C" key="g">exec:geany</Key>
   <Key mask="" key="F9">exec:libreoffice</Key>
   <Key mask="" key="F10">exec:jwm -restart</Key>
   <Key mask="" key="Print">exec:lxterminal -e scrot -cd 10</Key>
   <Key mask="A" key="F1">root:1</Key>
   <Key mask="A" key="F2">exec:gmrun</Key>

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

</JWM>
  

  


HOW DOES IT WORK

Alt-tab for moving btwn screens
Winkey + arrow right/left for changing workspaces
F4 closes apps
F12 maximizes screen
F3 launches browser
winkey + m launches sylpheed
Print key takes a picture with scrot
F1 launches terminal
F2 launches file manager
F4 closes app
F5 shutdown machine
F6 reboots
F8 launches xchat
F9 launches libreoffice
F10 restarts jwm
alt + F1 gives you the main menu
And so forth...

On F5 and F6 to shutdown/reboot the machine you have to have ALL type of
permission, WITH NO PASSWD. To have that, visudo if don't know vi,
edit /etc/sudoers as ROOT with your favorite editor and at the bottom add this:

Code: Select all

 %wheel ALL=(ALL) NOPASSWD: ALL
 

* This is matter of numerous arguments and subjective to say the
least, and if the boys at OpenBSD don't mind neither do I.

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. 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 user:

In order NOT to use gdm, edit /etc/inittab and leave this line looking
like this:

Code: Select all

  # Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
 

Code: Select all

 $ nano .xinitrc
 

Here's mine:

Code: Select all

 #!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

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

exec jwm

save/exit from the editor,restart from the menu (alt+F1)
next time you can restart with F10.

Code: Select all

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


#reboot

When you come back, you'll be at the console:
login: (username)
passwd: (userpassword) Enter
$ startx

OR
If this is too much of a PITA, use gdm and voilá! You're in, like Flynn.
Last edited by bobo on 7. Aug 2015, 20:10, edited 8 times in total.
Desktop: Celeron - 2 GB RAM - HD 160 GB - Slackel/Salix - icewm/jwm - Grub
KISS: Keep It Simple, Stupid

User avatar
gapan
Salix Wizard
Posts: 5396
Joined: 6. Jun 2009, 17:40

Re: HOWTO: JWM Basic Configuration

Post by gapan » 23. Mar 2015, 10:26

bobo wrote: On F5 and F6 to shutdown/reboot the machine you have to have ALL type of
permission, WITH NO PASSWD. To have that, visudo if don't know vi,
edit /etc/sudoers as ROOT with your favorite editor and at the bottom add this:

Code: Select all

 %wheel ALL=(ALL) NOPASSWD: ALL
 
This is a really bad idea. Security constraints are there for a reason. You should look into wm-logout.
Image
Image

User avatar
ginsim
Posts: 21
Joined: 17. Mar 2015, 15:13
Location: Bradford-on-Avon, UK

Re: HOWTO: JWM Basic Configuration

Post by ginsim » 24. Mar 2015, 13:15

I agree with gapan on the no password thing. But bobo, thanks for the tutorial, I will be installing jwm :geek:

cheers
simgin
My Doctor is called Racket.

bobo
Douche bag
Posts: 78
Joined: 17. Feb 2015, 16:37
Location: Panama

Re: HOWTO: JWM Basic Configuration

Post by bobo » 24. Mar 2015, 17:58

ginsim wrote:I agree with gapan on the no password thing. But bobo, thanks for the tutorial, I will be installing jwm :geek:

cheers
simgin
You're welcome! Happy trails...

As for sudo, i won't use it from now on.
My reasoning is that if in order to sudo I have to enter my passwd, i might as well, su to root ;)
Desktop: Celeron - 2 GB RAM - HD 160 GB - Slackel/Salix - icewm/jwm - Grub
KISS: Keep It Simple, Stupid

User avatar
gapan
Salix Wizard
Posts: 5396
Joined: 6. Jun 2009, 17:40

Re: HOWTO: JWM Basic Configuration

Post by gapan » 24. Mar 2015, 18:42

The point is that for reboot/shutting down you don't have to give a password anyway. Use wm-logout.
Image
Image

bobo
Douche bag
Posts: 78
Joined: 17. Feb 2015, 16:37
Location: Panama

SCREENSHOTS

Post by bobo » 4. Apr 2015, 16:05

i forgot to include pictures of it:

https://dyp.im/NtnrkXVSXC
regular look

https://dyp.im/NeGAEdDJGh
no titlebar - taskbar on top
Desktop: Celeron - 2 GB RAM - HD 160 GB - Slackel/Salix - icewm/jwm - Grub
KISS: Keep It Simple, Stupid

Post Reply