+cwmrc and arrange script
This commit is contained in:
parent
cf60ed9316
commit
b40a261643
59
.cwmrc
Normal file
59
.cwmrc
Normal file
@ -0,0 +1,59 @@
|
||||
sticky yes
|
||||
gap 18 1 1 1
|
||||
snapdist 10
|
||||
|
||||
ignore dock
|
||||
ignore menu
|
||||
ignore panel
|
||||
|
||||
fontname "Go Regular:pixelsize=13"
|
||||
|
||||
borderwidth 2
|
||||
color activeborder "#99aab9"
|
||||
color font "#eeeeff"
|
||||
color inactiveborder "#000000"
|
||||
color menubg "#798a99"
|
||||
color menufg "#eeeeff"
|
||||
color urgencyborder "red"
|
||||
|
||||
command "Browser" "~/bin/browser"
|
||||
command "Terminal" "/usr/X11R6/bin/xterm"
|
||||
command "Emacs" "/usr/local/bin/emacs"
|
||||
|
||||
# make emacs usable again
|
||||
unbind-key C-slash
|
||||
unbind-key CM-f
|
||||
unbind-key CM-a
|
||||
unbind-key CM-h
|
||||
unbind-key CM-j
|
||||
unbind-key CM-k
|
||||
unbind-key CM-l
|
||||
unbind-key M-period
|
||||
unbind-key M-h
|
||||
unbind-key M-j
|
||||
unbind-key M-k
|
||||
unbind-key M-l
|
||||
|
||||
bind-key M-r "rofi -show run"
|
||||
bind-key MS-r restart
|
||||
bind-key MS-n "mpc next"
|
||||
bind-key MS-p "mpc toggle"
|
||||
bind-key MS-i "/home/qbit/.screenlayout/internal.sh"
|
||||
bind-key MS-e "/home/qbit/.screenlayout/external.sh"
|
||||
bind-key MS-equal window-vtile
|
||||
bind-key M-equal window-htile
|
||||
bind-key MC-l lock
|
||||
|
||||
unbind-key C-slash
|
||||
|
||||
autogroup 1 "chromium-browser,Chromium-browser"
|
||||
autogroup 1 "Navigator,Firefox"
|
||||
autogroup 1 "Xephyr"
|
||||
autogroup 2 "xterm,XTerm"
|
||||
autogroup 3 "emacs,Emacs"
|
||||
autogroup 4 "drawterm,DrawTerm"
|
||||
autogroup 5 "jetbrains-goland,jetbrains-goland"
|
||||
autogroup 9 "xconsole,XConsole"
|
||||
|
||||
bind-mouse MS-1 menu-window
|
||||
bind-mouse M-3 window-resize
|
50
bin/arrange
Executable file
50
bin/arrange
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/ksh
|
||||
|
||||
ROOT=$(lswin -r)
|
||||
W=$(wattr w ${ROOT})
|
||||
H=$(wattr h ${ROOT})
|
||||
|
||||
# Layout
|
||||
# x
|
||||
# ______________
|
||||
# | brw | |
|
||||
# | 0 | |
|
||||
# |______| xtm |
|
||||
# y | emx | 2 |
|
||||
# | 1 | |
|
||||
# | | |
|
||||
# --------------
|
||||
|
||||
set -A windows
|
||||
|
||||
for i in $(lswin); do
|
||||
n=$(wname $i)
|
||||
case $n in
|
||||
emacs*)
|
||||
echo "[X] emacs $i"
|
||||
windows[1]=$i
|
||||
;;
|
||||
Main*)
|
||||
echo "[X] ksh $i"
|
||||
windows[2]=$i
|
||||
;;
|
||||
*)
|
||||
echo "[X] chrome $i"
|
||||
windows[0]=$i
|
||||
esac
|
||||
done
|
||||
|
||||
OS=18
|
||||
GAP=3
|
||||
|
||||
Y=$((H-OS-GAP))
|
||||
|
||||
HH=$((H/2))
|
||||
HW=$((W/2))
|
||||
HOS=$((OS/2))
|
||||
|
||||
echo "Moving ${#windows[@]} windows"
|
||||
# wtp x y w h id
|
||||
wtp $((0+GAP)) $((OS+GAP)) $((HW-GAP)) $((HH-HOS)) ${windows[0]} # chrome
|
||||
wtp $((0+GAP)) $((OS+HH-GAP)) $((HW-GAP)) $((HH-HOS-GAP)) ${windows[1]} # emacs
|
||||
wtp $((HW+GAP)) $((OS+GAP)) $((HW-GAP-GAP)) $((H-OS-GAP-GAP)) ${windows[2]} # xterm
|
Loading…
Reference in New Issue
Block a user