CWM Getting started

Hi all,

Historically I've used Desktop Environments, mostly x11-wm/xfce4 in the past few years, but I want to give x11-wm/cwm a go. I've got some questions about non-cwm specific (I think) settings/features:
  1. I use deskutils/nextcloudclient for syncing files between a number of computers. Under Xfce I use the "session and startup" feature to start Nextcloud, but I'm not sure how I should achieve this under cwm?
  2. Similar to the question above, I currently use security/gnome-keyring to store a few paswords (e.g. for Nextcloud), can I continue to use this under cwm? Or is there something easier/better?
  3. After a very quick test I see that my keymap looks to be set to US, even though my /etc/rc.conf has keymap="uk", Xfce seems to inherit the system values. I've found that I can use setxkbmap gb, where should I put commands like this? My guess is somewhere like ~/.xsession?
Thanks very much!
Ben
 
but I'm not sure how I should achieve this under cwm?
Hello. Just use an old, good time-tested method-.xinitrc. The same goes to security/gnome-keyring. Also don't forget this sign &

Previously, when I used Linux, for starting gnome-keyring I used this method
Code:
dbus-update-activation-environment --systemd DISPLAY
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
 
I have been using x11-wm/cwm for a few months now and really like it. I was not able to offer any advice in terms of your question but just wanted to state I am very happy with the window manager. Plenty of config examples out there on the web and I'd be happy to share mine as well if you'd like.
 
I have been using x11-wm/cwm for a few months now and really like it. I was not able to offer any advice in terms of your question but just wanted to state I am very happy with the window manager.

So I chose x11-wm/cwm for a few reasons:
  • I've been wanting to try going without a DE for some time
  • I like the licensing terms of cwm (ISC)
  • It's developed in a fellow *BSD based project
  • I work in a place called Cwmbran, which often gets shortened to "cwm"
But it was your posts that introduced me to it, so thank you very much. I'm hoping to be very happy with it :)

Plenty of config examples out there on the web and I'd be happy to share mine as well if you'd like.

I would love that, if you wouldn't mind 😊
 
By all means! It is normally named .cwmrc but couldn't upload a dot file so I renamed it. It resides in the root of your user's home. Pretty self explanatory but I "borrowed" it from the web so there are a couple of entries that I can't explain. Obviously tweak to your liking and feel free to ask questions and I'll answer to the best of my ability.

Only odd thing about it are the key combos to exit and restart: ctrl+alt+shift+q to quit and ctrl+alt+shift+r. You won't accidentally restart or exit, lol.
 

Attachments

  • cwmrc.txt
    1.5 KB · Views: 602
Hmmm, so I did a little at the weekend in my personal laptop and brought my configuration into my work machine.
I do much of my day-to-day tasks on FreeBSD inside a VirtualBox VM, which lives on my work laptop running Windows 10.
This VM has two monitors, and x11-wm/cwm gets mirrored on both screens…

My guess is that Xfce has been holding my hand, and I now need to understand how to tell my Window Manager how to use two displays?
 
Thanks Phishfry, got both my monitors working now! I was going to paste my xorg config here, but I've realised I don't seem to be able to copy and paste between applications...Another thing to learn!
 
I was going to paste my xorg config here, but I've realised I don't seem to be able to copy and paste between applications...Another thing to learn!

OK, install x11/xclipboard and I have some copy and paste :D

My /usr/local/etc/X11/xorg.conf.d/10-monitor.conf looks like this:

Code:
Section "Monitor"
        Identifier "VGA-0"
        Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
        Option "PreferredMode" "1920x1200_60.00"
        Option "LeftOf" "VGA-1"
EndSection

Section "Monitor"
        Identifier "VGA-1"
        Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
        Option "PreferredMode" "1920x1200_60.00"
        Option "RightOf" "VGA-0"
EndSection
 
My (OpenBSD) .cwrmc ...
Code:
gap                             1 0 0 0
ignore                          xclock
ignore                          xload
color inactiveborder            Black
color activeborder              "#494949"
color groupborder               "#01a252"
color urgencyborder             "#3d9751"
color selfont                   "#0034A9"
color font                      "#FFFFFF"
color menufg                    "#49F6F6"
color menubg                    "#333333"
fontname                        "News10:size=11:antialias=true"
bind-key CM-comma               "mixerctl outputs.master=-5"
bind-key CM-period              "mixerctl outputs.master=+5"

In .xsession I just load things in the background before running cwm

audacious &
libreoffice &
chrome &
cwm

Not a pane person myself, excepting if comparing two windows side by side, and moving/resizing windows is alt left/middle mouse (in my case pressing alt and depress the scrollwheel to resize). More typically I just maximise all windows ctrl-alt-m and flip between them alt-tab as desired. alt ? and type the first two/three characters of what program I want to narrow the list down to usually a single program and enter to run it. ctrl-alt-x to close a window. ctrl-alt-Enter to start a xterm .... pretty much all I use (other than the ctrl-alt < and > keys for sound up/down as per in the above .cwmrc, but more usually I use audacious volume controls for that along with tweaking other equaliser settings)

s.png


Got a new pair of Sony Bass Boost headphones at Christmas - which are loud, so I now set the default boot sound level to 171 (255 max) which is comfortable when audacious is at max volume level, but I can 'blast' with the ctrl-alt > (and <) keys is 'needed' :) The extra bass also does require some dialling that down a little in the equaliser otherwise its too boomy for my liking. Headphones attached via a additional 5m lead, so freedom to wander away from the deep recliner chair that I browse/type from.

I leave that 1 pixel top of screen gap so even with windows maximised I can still left/middle/right mouse click the desktop (move mouse to top of screen) for the windows/groups/applications menus. I don't use groups either (nor do I associate applications into the cwm menu), so mostly if I do use that its just to left mouse click for the list of available windows choice.

.xsession for me because I run xenodm as user and its set to auto start and auto login at bootup. The userid that I run X under isn't in group wheel so no su, and I have all setuid scripts turned off for 'others'. I only use the console (I tend to login as root on tty3) for root/admin things (I run tmux and have a tput menu of common actions such as shutdown, reboot, mounting android phone ...etc.).

s.png
 
Back
Top