1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | /* see LICENSE for copyright and license */
#ifndef CONFIG_H
#define CONFIG_H
/** modifiers **/
#define MOD1 Mod1Mask /* ALT key */
#define MOD4 Mod4Mask /* Super/Windows key */
#define CONTROL ControlMask /* Control key */
#define SHIFT ShiftMask /* Shift key */
/** generic settings **/
#define MASTER_SIZE 0.52
#define SHOW_PANEL True /* show panel by default on exec */
#define TOP_PANEL True /* False means panel is on bottom */
#define PANEL_HEIGHT 18 /* 0 for no space for panel, thus no panel */
#define DEFAULT_MODE TILE /* initial layout/mode: TILE MONOCLE BSTACK GRID FLOAT */
#define ATTACH_ASIDE True /* False means new window is master */
#define FOLLOW_WINDOW False /* follow the window when moved to a different desktop */
#define FOLLOW_MOUSE True /* focus the window the mouse just entered */
#define CLICK_TO_FOCUS False /* focus an unfocused window when clicked */
#define FOCUS_BUTTON Button3 /* mouse button to be used along with CLICK_TO_FOCUS */
#define BORDER_WIDTH 1 /* window border width */
#define FOCUS "#ecee37" /* focused window border color */
#define UNFOCUS "#043f0f" /* unfocused window border color */
#define MINWSZ 50 /* minimum window size in pixels */
#define DEFAULT_DESKTOP 0 /* the desktop to focus initially */
#define DESKTOPS 6 /* number of desktops - edit DESKTOPCHANGE keys to suit */
/**
* open applications to specified desktop with specified mode.
* if desktop is negative, then current is assumed
*/
static const AppRule rules[] = { \
/* class desktop follow float */
{ "MPlayer", 4, False, False },
{ "Urxvtc", -1, True, True },
{ "Chromium", 1, False, False },
{ "Thunderbird", 5, False, False },
{ "Gimp", -1, False, True },
{ "gimp-image-window", -1, False, True },
{ "nitrogen", -1, True, True },
{ "wine", -1, False, True },
{ "winecfg", -1, False, True },
{ "geeqie", 3, False, False },
{ "sxiv", -1, False, True },
{ "Zathura", 2, True, False },
};
/* helper for spawning shell commands */
#define SHCMD(cmd) {.com = (const char*[]){"/bin/sh", "-c", cmd, NULL}}
/**
* custom commands
* must always end with ', NULL };'
*/
static const char *termcmd[] = { "urxvtc", NULL };
static const char *menucmd[] = { "dmenu_run", "-nb", "#111111", "-nf", "#dada67", "-sb", "#425916", "-sf", "#ffffff", "-p", "d[-_-]b", "-fn", "-*-droid sans mono-medium-*-*-*-11-*-*-*-*-*-*-*", "-i", NULL };
static const char *musiccmd[] = { "urxvtc", "-e", "ncmpcpp", NULL };
static const char *nextmusic[] = { "mpc", "next", NULL };
static const char *previousmusic[] = { "mpc", "prev", NULL };
static const char *volinc[] = { "mpc", "volume", "+5", NULL };
static const char *voldesc[] = { "mpc", "volume", "-5", NULL };
static const char *filecmd[] = { "urxvtc", "-e", "ranger", NULL };
static const char *browsercmd[] = { "chromium", NULL };
static const char *emailcmd[] = { "thunderbird", NULL };
#define DESKTOPCHANGE(K,N) \
{ MOD1, K, change_desktop, {.i = N}}, \
{ MOD1|ShiftMask, K, client_to_desktop, {.i = N}},
/**
* keyboard shortcuts
*/
static Key keys[] = {
/* modifier key function argument */
{ MOD1, XK_b, togglepanel, {NULL}},
{ MOD1, XK_BackSpace, focusurgent, {NULL}},
{ MOD1|SHIFT, XK_c, killclient, {NULL}},
{ MOD1, XK_j, next_win, {NULL}},
{ MOD1, XK_k, prev_win, {NULL}},
{ MOD1, XK_h, resize_master, {.i = -10}}, /* decrease size in px */
{ MOD1, XK_l, resize_master, {.i = +10}}, /* increase size in px */
{ MOD1, XK_o, resize_stack, {.i = -10}}, /* shrink size in px */
{ MOD1, XK_p, resize_stack, {.i = +10}}, /* grow size in px */
{ MOD1|CONTROL, XK_h, rotate, {.i = -1}},
{ MOD1|CONTROL, XK_l, rotate, {.i = +1}},
{ MOD1|SHIFT, XK_h, rotate_filled, {.i = -1}},
{ MOD1|SHIFT, XK_l, rotate_filled, {.i = +1}},
{ MOD1, XK_Tab, last_desktop, {NULL}},
{ MOD1, XK_Return, swap_master, {NULL}},
{ MOD1|SHIFT, XK_j, move_down, {NULL}},
{ MOD1|SHIFT, XK_k, move_up, {NULL}},
{ MOD1|SHIFT, XK_t, switch_mode, {.i = TILE}},
{ MOD1|SHIFT, XK_m, switch_mode, {.i = MONOCLE}},
{ MOD1|SHIFT, XK_b, switch_mode, {.i = BSTACK}},
{ MOD1|SHIFT, XK_g, switch_mode, {.i = GRID}},
{ MOD1|SHIFT, XK_f, switch_mode, {.i = FLOAT}},
{ MOD1|CONTROL, XK_r, quit, {.i = 0}}, /* quit with exit value 0 */
{ MOD1|CONTROL, XK_q, quit, {.i = 1}}, /* quit with exit value 1 */
{ MOD1|SHIFT, XK_Return, spawn, {.com = termcmd}},
{ MOD4, XK_v, spawn, {.com = menucmd}},
{ MOD4, XK_m, spawn, {.com = musiccmd}},
{ MOD4, XK_p, spawn, {.com = previousmusic}},
{ MOD4, XK_n, spawn, {.com = nextmusic}},
{ MOD4, XK_Right, spawn, {.com = volinc}},
{ MOD4, XK_Left, spawn, {.com = voldesc}},
{ MOD4, XK_f, spawn, {.com = filecmd}},
{ MOD4, XK_b, spawn, {.com = browsercmd}},
{ MOD4, XK_e, spawn, {.com = emailcmd}},
{ MOD4, XK_j, moveresize, {.v = (int []){ 0, 25, 0, 0 }}}, /* move down */
{ MOD4, XK_k, moveresize, {.v = (int []){ 0, -25, 0, 0 }}}, /* move up */
{ MOD4, XK_l, moveresize, {.v = (int []){ 25, 0, 0, 0 }}}, /* move right */
{ MOD4, XK_h, moveresize, {.v = (int []){ -25, 0, 0, 0 }}}, /* move left */
{ MOD4|SHIFT, XK_j, moveresize, {.v = (int []){ 0, 0, 0, 25 }}}, /* height grow */
{ MOD4|SHIFT, XK_k, moveresize, {.v = (int []){ 0, 0, 0, -25 }}}, /* height shrink */
{ MOD4|SHIFT, XK_l, moveresize, {.v = (int []){ 0, 0, 25, 0 }}}, /* width grow */
{ MOD4|SHIFT, XK_h, moveresize, {.v = (int []){ 0, 0, -25, 0 }}}, /* width shrink */
DESKTOPCHANGE( XK_F1, 0)
DESKTOPCHANGE( XK_F2, 1)
DESKTOPCHANGE( XK_F3, 2)
DESKTOPCHANGE( XK_F4, 3)
DESKTOPCHANGE( XK_F5, 4)
DESKTOPCHANGE( XK_F6, 5)
};
/**
* mouse shortcuts
*/
static Button buttons[] = {
{ MOD1, Button1, mousemotion, {.i = MOVE}},
{ MOD1, Button3, mousemotion, {.i = RESIZE}},
{ MOD4, Button3, spawn, {.com = menucmd}},
};
#endif
/* vim: set expandtab ts=4 sts=4 sw=4 : */
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/usr/bin/env bash
wm="monsterwm"
ff="/tmp/monsterwm.fifo"
tags=('code' 'www' 'read' 'media' 'video' 'mail')
layouts=('[]=' '[ ]' 'T=' '[#]')
conky -c $HOME/.conkyrc | dzen2 -bg '#111111' -h 18 -x 320 -ta r -e -p -fn "-*-droid sans mono-medium-*-*-*-11-*-*-*-*-*-*-*" &
# Check if it's a pipe, otherwise create it
[[ -p $ff ]] || mkfifo -m 600 "$ff"
while read -t 60 -r wmout || true; do
desktops=( $(cut -d"|" -f1 <<< "$wmout") )
title="$(cut -d"|" -f2- <<< "$wmout")"
if [[ "${desktops[@]}" =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then
unset tmp
for desktop in "${desktops[@]}"; do
IFS=':' read -r d w m c u <<< "$desktop"
# Tags labels
label="${tags[$d]}"
# Is this the current desktop ? save the layout
((c)) && fg="#f0f13c" bg="#425916" && layout="${layouts[$m]}" || fg="#aaaaaa" bg="#111111"
# Has windows ?
((w)) && fg="#ffffff"
# Urgent windows ?
((u)) && fg="#ef2929"
tmp+="^fg($fg)^bg($bg) $label ^bg()^fg()"
done
fi
# Merge the clients indications, the tile and the info
echo "$tmp $layout $title"
done < "$ff" | dzen2 -bg '#111111' -w 320 -h 18 -ta l -e -p -fn "-*-droid sans mono-medium-*-*-*-11-*-*-*-*-*-*-*" &
while :; do "$wm" || break; done | tee -a "$ff"
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | background yes
out_to_console yes
out_to_x no
update_interval 1
TEXT
^fg(\#aab992)${mpd_status} ^fg(\#043f0f)> ^fg(\#055313)${mpd_artist} \
^fg(\#999999)${hwmon temp 1}° \
^fg(\#666666)${loadavg 1} \
^fg(\#dfe373)${cpu cpu1}% ^fg(\#dfe373)${cpu cpu2}% ^fg(\#fefffc)${freq_g 1}GHz \
^fg(\#90b02b)${mem} \
^fg(\#3a9c62)${if_existing /sys/class/power_supply/BAT1/present}Bat ${battery_percent BAT1}% (${battery_time BAT1})${else}AC${endif} \
^fg(\#c9dea7)${wireless_link_qual_perc wlp2s0}% ${wireless_essid wlp2s0} ^fg(\#ecee37)${upspeedf wlp2s0}k ^fg(\#fdff3b)${downspeedf wlp2s0}k \
^fg(\#ffffff)${time %b %d %H:%M}
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[ ! -s ~/.mpd/pid ] && mpd
nitrogen --restore&
urxvtd &
xrdb ~/.Xresources &
#conky -c ~/.conkycolors/conkyrc &
numlockx &
#/usr/bin/VBoxClient-all&
compton -b
#xsetroot -cursor_name left_ptr
#setxkbmap -layout fr
#exec xmonad
exec ~/scripts/monsterbar
# exe subtle
#exec monsterwm
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | # Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 6;
shadow-offset-x = -8;
shadow-offset-y = -9;
shadow-opacity = 0.7;
shadow-red = 0.3;
shadow-green = 0.7;
#shadow-blue = 0.8;
shadow-exclude = [ "! name ~= ''", "name = 'Notification'", "n:e:Plank", "class_g = 'Conky'", "name *= 'Chromium'", "name = 'dzen title'", "name = 'dzen slave'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'" ];
# shadow-exclude = "n:e:Notification";
shadow-ignore-shaped = false;
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# Opacity
menu-opacity = 0.8;
inactive-opacity = 0.8;
active-opacity = 0.9;
frame-opacity = 0.7;
inactive-opacity-override = false;
alpha-step = 0.06;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
# blur-background = true;
# blur-background-frame = true;
blur-kern = "3x3box"
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
blur-background-fixed = false;
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
opacity-rule = [
"90:class_g = 'URxvt'",
"95:class_g = 'Chromium'",
"98:class_g = 'MPlayer'"
];
# Fading
fading = false;
# fade-delta = 30;
fade-in-step = 0.03;
fade-out-step = 0.03;
# no-fading-openclose = true;
fade-exclude = [ ];
# Other
backend = "glx"
mark-wmwin-focused = true;
mark-ovredir-focused = true;
# use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
paint-on-overlay = true;
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];
# resize-damage = 1;
# GLX backend
# glx-no-stencil = true;
glx-copy-from-front = false;
# glx-use-copysubbuffermesa = true;
# glx-no-rebind-pixmap = true;
glx-swap-method = "undefined";
# glx-use-gpushader4 = true;
# Window type settings
wintypes:
{
tooltip = { fade = false; shadow = false; opacity = 0.75; focus = true; };
};
|
x
Notes
wallpaper found here: http://www.goodfon.su/wallpaper/stil-devushka-cvety-vesna.html