stratact The point of this discussion is for CWM-related information to help me configure it in style I'm currently used to in KDE. I'm also open to different ideas that help promote productivity within a CWM environment, if people have stuff to share.
I don't have the impertinence to state you asked in right place (đ), but I do have something to share, namely my ~/.cwmrc
, which you might want to take some cue from:
## Application menu
command dmenu "dmenu_run -p '>>' -fn 'Iosevka Term:pixelsize=11' -nb '#0a0f14' -sb '#0a0f14' -nf grey90 -sf '#edb54b'"
command urxvt "urxvt"
command vi "urxvtc -title vi -e vi"
command nnn "urxvtc -g 75x25 -title nnn -e nnn"
command irssi "urxvtc -title irssi -e irssi"
command mutt "urxvtc -title mutt -e env MAIL=$HOME/Mail neomutt -F ~/.mutt/qmailrc"
command slrn "urxvtc -title slrn -e slrn -i ~/.slrnrc -f ~/.newsrc"
command w3m "urxvtc -title w3m -e w3m -s -cookie -F -graph https://www.duckduckgo.com/"
command ncmpc "urxvtc -title ncmpc -e ncmpc"
command snownews "urxvtc -title snownews -e snownews"
command calcurse "urxvtc -title calcurse -e calcurse"
command htop "urxvtc -title htop -e htop"
command xman "xman"
command xclipboard "xclipboard"
command xkill "xkill"
command xlock "xlock -name $HOME/.Xresources"
## WM Appearence:
borderwidth 2
moveamount 5
fontname "Iosevka Term:pixelsize=11"
snapdist 4
sticky no
color activeborder "#195465"
color inactiveborder slategrey
color menubg "#0a0f14"
color menufg "#d26939"
color font grey90
color selfont "#0a0f14"
color groupborder "#c33027"
gap 3 3 3 3 #[T,B,L,R]
## Ignore programs; no borders
ignore xclock
ignore dclock
ignore menu
ignore xbiff
ignore xmessage
ignore xsm
ignore xload
ignore xosview
## Predefined groups
autogroup 1 "urxvt"
autogroup 1 "xterm"
autogroup 2 "seamonkey"
autogroup 2 "dillo"
autogroup 2 "lftp"
autogroup 2 "xmftp"
autogroup 2 "hexchat"
autogroup 3 "claws-mail"
autogroup 3 "mpv"
autogroup 3 "xmms"
autogroup 3 "easytag"
autogroup 3 "xcdroast"
autogroup 3 "mps-youtube"
autogroup 4 "xedit"
autogroup 4 "nedit"
autogroup 4 "leafpad"
autogroup 4 "vim"
autogroup 4 "xournal"
autogroup 5 "gv"
autogroup 5 "zathura"
autogroup 5 "geomview"
autogroup 5 "xfig"
autogroup 5 "mupdf"
autogroup 5 "fbreader"
autogroup 5 "ddd"
autogroup 5 "texstudio"
autogroup 5 "libreoffice"
autogroup 5 "abiword"
autogroup 5 "chemtool"
autogroup 6 "gimp"
autogroup 6 "xpaint"
autogroup 6 "xv"
autogroup 6 "feh"
autogroup 6 "dia"
autogroup 6 "viewnior"
autogroup 7 "pcmanfm"
autogroup 7 "xfontsel"
autogroup 7 "nnn"
autogroup 7 "gpa"
autogroup 7 "xcalc"
autogrpup 7 "xclipboard"
autogroup 7 "htop"
autogroup 7 "xarchiver"
autogroup 7 "tkdiff"
autogroup 7 "xephem"
autogroup 8 "lxinput"
autogroup 8 "lxappearance"
autogroup 8 "xman"
autogroup 8 "lxrandr"
autogroup 8 "xvdi"
## KeyBindings
# no defaults
unbind-key all
# session
bind-key M-Return terminal
bind-key MS-F11 lock
bind-key M-w menu-window-hidden
bind-key M-e menu-exec
bind-key M-s menu-ssh
bind-key CM-r restart
bind-key CM-q quit
# window-ops
bind-key M-x window-delete
bind-key M-Down window-lower
bind-key M-Up window-raise
bind-key M-b window-maximize
bind-key M-z window-hide
bind-key M-v window-freeze
bind-key M-c window-sticky
bind-key M-n window-menu-label
bind-key M-g window-group
bind-key M-m window-fullscreen
# window navigation
bind-key M-Right window-cycle
bind-key M-Left window-rcycle
bind-key MS-Right group-cycle
bind-key MS-Left group-rcycle
bind-key M-0 group-toggle-all
bind-key M-1 group-only-1
bind-key M-2 group-only-2
bind-key M-3 group-only-3
bind-key M-4 group-only-4
bind-key M-5 group-only-5
bind-key M-6 group-only-6
bind-key M-7 group-only-7
bind-key MS-1 window-movetogroup-1
bind-key MS-2 window-movetogroup-2
bind-key MS-3 window-movetogroup-3
bind-key MS-4 window-movetogroup-4
bind-key MS-5 window-movetogroup-5
bind-key MS-6 window-movetogroup-6
bind-key MS-7 window-movetogroup-7
# window tiling
bind-key 4-b window-htile
bind-key 4-v window-vtile
bind-key 4-h window-snap-left
bind-key 4-j window-snap-down
bind-key 4-k window-snap-up
bind-key 4-l window-snap-right
bind-key 4S-h window-snap-up-left
bind-key 4S-j window-snap-up-right
bind-key 4S-k window-snap-down-right
bind-key 4S-l window-snap-down-left
# pointer movement
bind-key CS-j pointer-move-down-big
bind-key CS-k pointer-move-up-big
bind-key CS-h pointer-move-left-big
bind-key CS-l pointer-move-right-big
# window movement
bind-key M-h window-move-left-big
bind-key M-j window-move-down-big
bind-key M-k window-move-up-big
bind-key M-l window-move-right-big
# window Resizing
bind-key CM-h window-resize-left-big
bind-key CM-j window-resize-down-big
bind-key CM-k window-resize-up-big
bind-key CM-l window-resize-right-big
bind-key M-v window-vmaximize
bind-key M-b window-hmaximize
# mouse-bindings
unbind-mouse CM-M1
unbind-mouse M-M2
unbind-mouse M-M3
unbind-mouse CMS-M
bind-mouse C-3 window-menu-label
bind-mouse M-1 window-move
bind-mouse M-2 window-lower
bind-mouse M-3 window-resize
bind-mouse 4S-1 window-maximize
bind-mouse 4S-2 window-delete
bind-mouse 4S-3 window-hide
bind-mouse S-1 window-group
# app shortcuts
bind-key 4-t "urxvtc"
bind-key 4-p "dmenu_run -p '>>' -fn 'Iosevka Term:pixelsize=11' -nb '#0a0f14' -sb '#0a0f14' -nf grey90 -sf '#edb54b'"
bind-key 4-u "seamonkey"
bind-key 4-o "pcmanfm"
bind-key 4-i "nedit"
# volume settings, using common keycodes
bind-key S-F11 "mixerctl -w outputs.master-=5,0l5"
bind-key S-F12 "mixerctl -w outputs.master+=5,5"
bind-key S-F10 "mixerctl -w outputs.master=0,0"
# MPD controls
bind-key S-Right "mpc prev"
bind-key S-Down "mpc play"
bind-key S-Left "mpc next"
bind-key S-Up "mpc stop"
Remember that cwm(1) and cwmrc(5) man pages can answer to almost any cwm-related question đ
stratact To start off, I want to set up an XDG popup menu as the left-click mouse button on the root window. Can you awesome folks show me how?
You could use x11/dunst for that; my ~/.config/dunst/dunstrc
[global]
font = "Iosevka Term 7"
markup = yes
format = "%a: %s\n%b"
sort = yes
indicate_hidden = no
alignment = center
show_age_threshold = 60
show_indicators = yes
word_wrap = yes
ignore_newline = no
geometry = "200x20-1+1"
shrink = yes
transparency = 8
idle_threshold = 120
follow = mouse
sticky_history = yes
line_height = 0
separator_height = 2
padding = 7
horizontal_padding = 7
frame_color = "#778899"
separator_color = frame
startup_notification = true
frame_width = 2
show_icons = left
icon_position = left
max_icon_size = 16
icon_path = /usr/pkg/share/icons/Adwaita/16x16/status/:/usr/pkg/share/icons/Adwaita/16x16/devices/
browser=/usr/pkg/bin/seamonkey
dmenu = /usr/pkg/bin/dmenu -p dunst
[shortcuts]
close_all = mod4+backslash
history = mod4+backspace
[urgency_low]
background = "#0a0f14"
foreground = "#98d1ce"
timeout = 5
[urgency_normal]
background = "#0a0f14"
foreground = "#98d1ce"
timeout = 5
[urgency_critical]
background = "#0a0f14"
foreground = "#d26939"
timeout = 7
You'll need to start the dunst daemon at session startup (append dunst &
to your ~/.xinitrc
).
In CWM, left(1), middle(2) and right(3) mouse button click on root window are predefined (window list, group list and application menu respectively) and cannot be changed; unbinding all predefined mouse bindings results in them not working anymore. However you can define custom bindings using modifiers like I did in my config: in your case, you may for instance remap Super/Mod4+LeftClick on root window to a pop-up notification showing whatever you want, like:
bind-mouse 4-1 "notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information --urgency=low"
Hope this helps đ