VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: My JWM Configuration (UPDATE)  (Read 4155 times)

macondo

  • Vectorite
  • ***
  • Posts: 252
My JWM Configuration (UPDATE)
« on: August 07, 2015, 02:44:11 pm »

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]
#updatedb

$ slocate .jwmrc

$ cp /etc/system.jwmrc .jwmrc

So, from now on i can access this file as user.

Code: [Select]
$ 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.

I corrected some items in the menu:

Code: [Select]
<Program icon="terminal.png" label="Qterminal">qterminal</Program>
<Program icon="www.png" label="Firefox">firefox</Program>
Just in case you use menu a lot.

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]

 <Group>
   <Name>qterminal</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, if you like your apps floating, ignore this section.
 
 TASKBAR
 For the regular look (taskbar at the bottom):
 
 
Code: [Select]
<Tray x="0" y="-1"  autohide="off">
 

 FOR THE TASKBAR ON TOP
 
Code: [Select]
  <Tray x="0" y="+1"  autohide="off">
 
 
 WITHOUT TITLEBAR
   
Code: [Select]
    <!-- Visual Styles -->
   <WindowStyle>

      <Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
      <Width>1</Width>
      <Height>2</Height>
   
   
 TASKBAR IN AUTOHIDE (á la ratpoison)
 
Code: [Select]
  <Tray x="0" y="+1"  autohide="top">
 
   
 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]

    <!-- 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". IIRC, 2 desktps is the default in Vectorlinux.

 

  KEYBINDINGS
 
  A = Alt
  C = Control
  4 = Windows key
 
 
Code: [Select]
   <!-- 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:qterminal</Key>
   <Key mask="" key="F2">exec:xfe</Key>
   <Key mask="" key="F3">exec:firefox</Key>
   <Key mask="" key="F8">exec:xchat</Key>
   <Key mask="" key="F7">exec:geany</Key>
   <Key mask="" key="F10">exec:jwm -restart</Key>
   <Key mask="" key="Print">exec:qterminal -e scrot -cd 10</Key>
   <Key mask="C" key="F1">root:1</Key>
   <Key mask="C" 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
 Print key takes a picture with scrot
 F1 launches terminal
 F2 launches file manager
 F4 closes app
 F8 launches xchat
 F10 restarts jwm
 alt + F1 gives you the main menu
 And so forth...
 
 SUDO
 As ROOT, edit /etc/sudoers and put this at the bottom:

 
Code: [Select]

 your_user_name    ALL=NOPASSWD:ALL

 
 
 
 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
 
 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 as ROOT and leave this line looking
 like this:
 
 
Code: [Select]
  # Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
 


 
Code: [Select]
$ nano .xinitrc
 

 Here's mine:
 
 
Code: [Select]
#!/bin/sh

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 (Control+F1)
next time you can restart with F10.

Code: [Select]
$ 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.
Good luck,
macondo aka Lou, bobo, cerealkiller


« Last Edit: January 20, 2016, 04:21:56 pm by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #1 on: September 22, 2015, 02:01:31 pm »

MENUS

In order to have a menu in JWM you need to have xdgmenumaker. IIRC, it
comes by default in VL7.1, otherwise, install it.

If you 'man xdgmenumaker', you'll see a section for JWM:

Code: [Select]
  JWM

              You can edit your ~/.jwmrc file and add a line that
              generates the applications menu, like this:

              <Include>exec: xdgmenumaker -n -i -f jwm</Include>

              You need to put that line somewhere in the RootMenu
              section of the ~/.jwmrc file.

              You can update the menu with:

              $ jwm -reload

              Or you can restart JWM and the updated menu should appear.
              The menu will be recreated every time JWM is started,
              restarted, or when the menu is
              reloaded with the above command. You can even add a menu
              item that will refresh the menu, like this:

              <Program label="Refresh Menu">jwm -reload</Program>

So I put it in my .jwmrc under the RootMenu:
(it's the last line on the file)

Code: [Select]
  <!-- The root menu. -->
    <RootMenu onroot="12">
        <Program icon="terminal.png"
label="Terminal">qterminal</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="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>
        </Menu>
        <Separator/>
        <Program icon="lock.png" label="Lock">
            xscreensaver-command -lock
        </Program>
        <Separator/>
        <Restart label="Restart" icon="restart.png"/>
        <Exit label="Exit" confirm="true" icon="quit.png"/>
        <Include>exec: xdgmenumaker -n -i -f jwm</Include>

Then activate it:

Code: [Select]
$ jwm -reload

Restart jwm and voilà!
Check the menu and it should be there.

screenie

« Last Edit: January 16, 2016, 11:59:08 am by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #2 on: September 22, 2015, 02:16:08 pm »

My latest keybindings:
C = Control
A = Alt
4 = Windows 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:qterminal</Key>
   <Key mask="" key="F2">exec:xfe</Key>
   <Key mask="4" key="F1">root:1</Key>
   <Key mask="4" key="F2">exec:gmrun</Key>
   <Key mask="C" key="f">exec:firefox</Key>
   <Key mask="" key="F7">exec:geeqie</Key>
   <Key mask="" key="F8">exec:xchat</Key>
   <Key mask="" key="F9">exec:libreoffice</Key>
   <Key mask="" key="F10">exec:jwm -restart</Key>
   <Key mask="" key="Print">exec:qterminal -e scrot -cd 10</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>

The first time, RESTART from the main menu, the next time you want to restart, you can just press F10

« Last Edit: September 23, 2015, 08:02:20 am by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4298
Re: My JWM Configuration (UPDATE)
« Reply #3 on: September 22, 2015, 05:06:18 pm »

Very nice. Shows that you can have a lean system that still looks good.  ;D
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3443
Re: My JWM Configuration (UPDATE)
« Reply #4 on: September 22, 2015, 05:30:25 pm »

Can we get some screenshots of this configuration in action please?

roarde

  • Vectorian
  • ****
  • Posts: 737
  • it's enough
Re: My JWM Configuration (UPDATE)
« Reply #5 on: September 22, 2015, 11:35:02 pm »

In order to have a menu in JWM you need to have xdgmenumaker. IIRC, it
comes by default in VL7.1, otherwise, install it.

If you 'man xdgmenumaker', you'll see a section for JWM:

7.1 Light includes xdgmenumaker, STD does not because xfce doesn't need it. For either, users will need to grab version 0.6 from the regular repos to get the manual page with the JWM info.

Thanks for mentioning that xdgmenumaker worked for you. I didn't have time to try it myself in JWM before it was time to request it be moved to the main repos.
Logged
Robert
VL 7.2 Light B2

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #6 on: September 23, 2015, 07:59:00 am »

In the alt-tab line of the keybinds, i changed the word 'nextstacked' for just 'next' in order to correct the problem of alt-tab missing sometimes when i pressed it.

Code: [Select]
<Key mask="A" key="Tab">next</Key>
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #7 on: September 23, 2015, 08:27:51 am »

roarde: de nada

MOE: here are some shots: the previous image company was sold to a german one. :(

« Last Edit: January 17, 2016, 01:55:11 pm by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #8 on: October 03, 2015, 11:10:16 am »

xombrero browser in jwm
« Last Edit: January 17, 2016, 01:48:50 pm by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

rbistolfi

  • Packager
  • Vectorian
  • ****
  • Posts: 2376
Re: My JWM Configuration (UPDATE)
« Reply #9 on: October 03, 2015, 03:55:49 pm »

Nice screenshots, congratulations!
Logged
"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #10 on: October 03, 2015, 05:19:49 pm »

Gracias, pibe!
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #11 on: October 03, 2015, 05:56:50 pm »

Autohide in any wm hides the taskbar wherever you got it (top or bottom).

which you can make reappear by passing the mouse cursor over it.

In the meantime, if you have previously eliminated the titlebar (and why not, you can maximize and close with your keys), you'll have more space in you desktop if you have a small screen monitor or a laptop.

Thanks to roarde for figuring out how to activate 'autohide'. The options are: top, bottom, left, right and off.
I have no titlebar and my taskbar is at the top by choice, so i use the 'top' option in autohide. example:

Code: [Select]
  <!-- Tray at the bottom. -->
    <Tray x="0" y="+1" autohide="top">
If your taskbar is at the bottom, then: autohide="bottom"
In ratpoison this is the default look, in icewm you do it thru the .icewm/preferences file.

Different looks:
« Last Edit: February 25, 2016, 10:47:40 am by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #12 on: January 07, 2016, 06:16:10 am »

Some users have asked me what the gobbledegook on my .xinitrc mean.
Code: [Select]
#!/bin/sh

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

exec jwm

From the top:
sets my keyboard, in my case, spanish, replace "es" for your keyboard language if you don't use the default English.
firefox will be launched automatically as I enter the Xs (after startx is typed).
ctrl + alt + backspace will log me out to the console.
xsetroot gives a black background.
unclutter makes the mouse pointer disappear in 2 seconds, it comes back when you move the mouse.
numlockx activates the numerical pad as i enter the Xs.
exec <whatever wm>  i'm using.

Note: you have to install unclutter and numlockx and reboot.
« Last Edit: January 07, 2016, 11:36:11 am by macondo »
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8

macondo

  • Vectorite
  • ***
  • Posts: 252
Re: My JWM Configuration (UPDATE)
« Reply #13 on: December 12, 2016, 05:38:34 pm »

I changed the keybind for the menu, a la icewm, now I just press the winkey on the left:

Code: [Select]
<Key mask="" key="Super_L">root:1</Key>
Logged
VL 7.1 Light - icewm - jwm - ratpoison
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Oscar Peterson - Bossa Nova - https://www.youtube.com/watch?v=cSX_7ejc5u8