Popis dwm
Dwm je dynamický správce oken pro X. Rozložení zobrazení oken je rovněž dynamické a zobrazuje se v závislosti na aplikacích a úlohách. Je malý, lehký a má minimalistický kód. Nastavení programu se provádí jeho kompilací, tedy je pevné.
Provádím zde konfiguraci nastavení správce oken dwm, vytvářím vlastní motivy/schémata, aplikuju patche a mnohé další.
Dwm je dynamický správce oken pro X. Rozložení zobrazení oken je rovněž dynamické a zobrazuje se v závislosti na aplikacích a úlohách. Je malý, lehký a má minimalistický kód. Nastavení programu se provádí jeho kompilací, tedy je pevné.
Dwm ovládá okna v režimech:
V dlaždicovém rozložení jsou okna dělena do hlavní a stohovatelné oblasti. Hlavní oblast obsahuje okna vyžadující nejvíce pozornosti a stohovatelná část obsahuje všechna ostatní okna. V plovoucím rozložení se mohou okna pohybovat volně a mít libovolnou velikost. V rozložení monoklu jsou okna zvětšena na velikost obrazovky. Dialogová okna jsou vždy plovoucí bez ohledu na aktivní rozložení.
Okna jsou seskupována pomocí tagů. Každé okno může být označeno s jedním nebo více tagy. Výběrem nějakého tagu se zobrazí všechna okna s těmito tagy.
Každá obrazovka obsahuje malý panel, který ukazuje všechny dostupné tagy, rozložení, název aktuálního okna a text zobrazený ze jména okna. Plovoucí okno je zobrazeno prázdným čtverečkem a maximalizované plovoucí okno prezentuje vyplněný čtvereček před názvem okna. Vybrané tagy jsou barevně odlišené. Tagy zaměřených oken jsou označeny vyplněným čtverečkem v horním levém rohu, zatímco tagy aplikované do jednoho nebo více oken jsou označeny prázdným čtverečkem.
Alpine Linux | apk add dwm |
---|---|
Arch Linux | pacman -S dwm |
CentOS | yum install dwm |
Debian/Ubuntu | apt get install dwm |
FreeBSD | pkg install dwm |
OpenSUSE | zypper in dwm |
make sudo make install
Nastavení dwm se provádí pouze při vlastní kompilaci programu a tedy jen jednou při instalaci. Hlavní nastavení je v souboru config.h a výchozí nastavení v souboru config.def.h.
Čas na liště: Text, který se zobrazí na liště, ovládáme pomocí nástroje xsetroot. Do souboru .xinitrc a nebo .xsession musíme napsat následující řádky:
while true; do xsetroot -name "$(date "+%Y-%m-%d %H:%M" )" sleep 60 done &
Patche jsou úpravy a vylepšení, které je možné zahrnout při instalaci/kompilaci.
Patchování Gitem: Git je verzovací nástroj, mimo jiné dovede aplikovat i patche. V mém případě patch na dwm budeme aplikovat takto:
Nástroj path: Jestliže chci aplikovat více patchů, volím nástroj patch, který zvládne zavést i více patchů.
Odpatchování nástrojem patch provedeme pomocí:
Patch cfacts-vanitygapspro mezery mezi klienty/okny je zatím nejlepší, který jsem v tomto směru viděl. Dovede klávesovými zkratkami vypnout/zapnout mezery, upravit jejich velikost a nastavit separátně vnější a vnitřní okraje. Také umí volitelně "chytré mezery": pokud je jeden klient - okraje nejsou, 2 a více klientů - okraje jsou.
static const unsigned int gappih = 35; /* horiz inner gap between windows */ static const unsigned int gappiv = 35; /* vert inner gap between windows */ static const unsigned int gappoh = 30; /* horiz outer gap between windows and screen edge */ static const unsigned int gappov = 30; /* vert outer gap between windows and screen edge */ static int smartgaps = 1; /* 1 means no outer gap when there is only one window */
Pro nabídku ukončení je skvělý patch exitmenu, který se dobře doplňuje s restartsig.
void exitdwm () { # if \ defined S_LOCK || \ defined S_SLEEP || \ defined S_SLEEP_ICON || \ defined S_RESTART_DWM || \ defined S_OFFSCREEN || \ defined S_EXIT || \ defined S_REBOOT || \ defined S_SHUTDOWN || \ defined S_LOCK_ICON || \ defined S_RESTART_DWM_ICON || \ defined S_OFFSCREEN_ICON || \ defined S_EXIT_ICON || \ defined S_REBOOT_ICON || \ defined S_SHUTDOWN_ICON || \ defined S_FORMAT || \ defined S_FORMAT_CLEAR # error (conflicting macro names) # endif # define S_LOCK "Zamknout" # define S_SLEEP "Spánek" # define S_RESTART_DWM "Restart Dwm" # define S_OFFSCREEN "Vynout obrazovky" # define S_EXIT "Konec DWM" # define S_REBOOT "Restart PC" # define S_SHUTDOWN "Vypnout PC" # define S_LOCK_ICON "🗝" // <= FontAwesome icons # define S_SLEEP_ICON "S" # define S_RESTART_DWM_ICON "⟳" # define S_OFFSCREEN_ICON "" # define S_EXIT_ICON "\uf2f5" # define S_REBOOT_ICON "" # define S_SHUTDOWN_ICON "⏻" # define S_FORMAT(ACTION) S_##ACTION##_ICON " " S_##ACTION # define S_FORMAT_CLEAR "sed 's/^..//'" FILE * exit_menu = popen ( "echo \"" S_FORMAT (LOCK) "\n" S_FORMAT (RESTART_DWM) "\n" S_FORMAT (OFFSCREEN) "\n" S_FORMAT (EXIT) "\n" S_FORMAT (SLEEP) "\n" S_FORMAT (REBOOT) "\n" S_FORMAT (SHUTDOWN) "\" | dmenu -p Konec? | " S_FORMAT_CLEAR , "r" ); char exit_action [16]; if ( exit_menu == NULL || fscanf (exit_menu, "%15[a-zA-Z -]", exit_action) == EOF ) { fputs ("Error. Failure in exit_dwm.", stderr); goto close_streams; } if (strcmp (exit_action, S_LOCK) == 0) system ("slock & sleep .5; xset dpms force off"); else if (strcmp (exit_action, S_RESTART_DWM) == 0) quit (& (const Arg) {1}); else if (strcmp (exit_action, S_SLEEP) == 0) system ("systemctl suspend"); else if (strcmp (exit_action, S_OFFSCREEN) == 0) system ("sleep .5; xset dpms force off"); else if (strcmp (exit_action, S_EXIT) == 0) quit (& (const Arg) {0}); else if (strcmp (exit_action, S_REBOOT) == 0) system ("systemctl reboot"); else if (strcmp (exit_action, S_SHUTDOWN) == 0) system ("systemctl poweroff -i"); close_streams: pclose (exit_menu); # undef S_LOCK # undef S_RESTART_DWM # undef S_OFFSCREEN # undef S_EXIT # undef S_REBOOT # undef S_SHUTDOWN # undef S_LOCK_ICON # undef S_RESTART_DWM_ICON # undef S_OFFSCREEN_ICON # undef S_EXIT_ICON # undef S_REBOOT_ICON # undef S_SHUTDOWN_ICON # undef S_FORMAT # undef S_FORMAT_CLEAR # undef S_SLEEP # undef S_SLEEP_ICON }
Používám patch useless_gap pro mezery mezi klienty, okna jsou tak úhledněji rozdělena a výsledek je hezčí. S mezerami nelze dále pracovat a přenastavovat během chodu programu.
Je perfektní patch zajišťující otevírání GUI aplikací ve stejném okně jako je terminál - terminál je "spolknut" a po ukončení GUI aplikace se opět terminál objeví. Velice dobré řešení v případě, že často otevíráme aplikace z terminálu a nechceme mít zaplněnou pracovní plochu okny s terminály.
Vytvoření skriptu, který generuje potřebný text a tento skript pak spustit při startu sezení ja také zajímavý způsob zobrazování dat ve statusu. Níže uvedený skript zobrazuje:
#!/bin/sh
_roura=/tmp/dwm-status.fifo
mkfifo "$_roura"
#citat,uzivatelpc,datum
while :;do
echo "A $(echo "Jdi do toho, máš na to!")"
echo "B $(echo $USER) @ $(echo $HOSTNAME)"
echo "C $(free -m | grep Mem | awk '{print $4}')MB"
echo "D $(date "+%A %d.%B %Y %H:%M" )"
sleep 60;
done > "$_roura" &
#hlasitost
while :;do
echo "E $(awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master))"
sleep 1;
done > "$_roura" &
cat "$_roura" | while read line; do
case $line in
A*) citat=${line#?};;
B*) uzivatel=${line#?};;
C*) ram=${line#?};;
E*) hlasitost=${line#?};;
D*) clock=${line#?};;
esac
xsetroot -name "$citat $uzivatel $ram $hlasitost $clock";
done
/* appearance */ static const unsigned int borderpx = 2; /* border pixel of windows */ static const unsigned int gappx = 10; /* gaps between windows */ static const unsigned int snap = 100; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ static const unsigned int systrayonleft = 1; /* 0: systray in the right corner, >0: systray on left of status text */ static const unsigned int systrayspacing = 2; /* systray spacing */ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "terminus:size=9" }; static const char dmenufont[] = "terminus:size=9"; static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; static const char col_cyan[] = "#7bbdbd"; static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_cyan, col_gray1, col_gray2 }, [SchemeSel] = { col_gray1, col_cyan, col_cyan }, };
Jsou virtuální obrazovky sloužící k zobrazení oken programů.
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
Může být užitečné nastavit pro každý program pravidla, která určí, zda se program spustí v takovém a nebo makovém tagu, plovoucí a nebo na prvním či druhém monitoru.
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "URxvt", NULL, NULL, 1 << 0, 0, -1 },
{ "Steam", NULL, NULL, 1 << 8, 1, -1 },
};
Jsou způsoby umístění a chování oken.
/* layout(s) */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ #include "fibonacci.c" static const Layout layouts[] = { /* symbol arrange function */ { " > [@] ", dwindle }, { " > ", tile }, /* first entry is default */ { " > ", NULL }, /* no layout function means floating behavior */ { " > ", monocle }, { " > [*] ", spiral }, };
#define MODKEY Mod4Mask
Defaultní nastavení je ALT.
Slouží jako zkratky pro start programů.
/* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run_history", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_cyan, "-sb", col_cyan, "-sf", col_gray1, NULL }; static const char *termcmd[] = { "urxvt", NULL }; static const char *filecmd[] = { "pcmanfm", NULL }; static const char *volup[] = { "amixer", "set", "Master", "2dB+", NULL }; static const char *voldown[] = { "amixer", "set", "Master", "2dB-", NULL };
Po stisku dané klávesy se vykoná příslušná akce(v rámci dwm) a nebo odstartuje CMD.
static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_r, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_Up, spawn, {.v = volup } }, { MODKEY|ShiftMask, XK_Down, spawn, {.v = voldown } }, { MODKEY, XK_F1, spawn, {.v = soubory } }, { MODKEY, XK_F2, spawn, {.v = web } }, { MODKEY, XK_F3, spawn, {.v = hudba } }, { MODKEY, XK_Escape, spawn, {.v = menu } }, { MODKEY, XK_e, spawn, {.v = menu } }, { MODKEY, XK_semicolon, view, {.ui = ~0 } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_Right, focusstack, {.i = +1 } }, { MODKEY, XK_Left, focusstack, {.i = -1 } }, { MODKEY, XK_Up, incnmaster, {.i = +1 } }, { MODKEY, XK_Down, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY|ShiftMask, XK_Return, zoom, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_q, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_r, setlayout, {.v = &layouts[3]} }, { MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} }, { MODKEY, XK_space, layoutscroll, {.i = +1 } }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } }, TAGKEYS( XK_plus, 0) TAGKEYS( XK_ecaron, 1) TAGKEYS( XK_scaron, 2) TAGKEYS( XK_ccaron, 3) TAGKEYS( XK_rcaron, 4) TAGKEYS( XK_zcaron, 5) TAGKEYS( XK_yacute, 6) TAGKEYS( XK_aacute, 7) TAGKEYS( XK_iacute, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, };
Stejné jako klávesové zkratky.
static Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, layoutscroll, {.i = +1 } }, { ClkLtSymbol, 0, Button2, layoutscroll, {.i = -1 } }, { ClkLtSymbol, 0, Button3, layoutscroll, {.i = -1 } }, { ClkLtSymbol, 0, Button4, setmfact, {.f = +0.05} }, { ClkLtSymbol, 0, Button5, setmfact, {.f = -0.05} }, { ClkWinTitle, 0, Button1, zoom, {0} }, { ClkWinTitle, 0, Button2, togglefloating, {0} }, { ClkWinTitle, 0, Button3, setlayout, {0} }, { ClkWinTitle, 0, Button4, focusstack, {.i = +1 } }, { ClkWinTitle, 0, Button5, focusstack, {.i = -1 } }, { ClkStatusText, 0, Button1, spawn, {.v = menu } }, { ClkStatusText, 0, Button2, spawn, {.v = killcmd } }, { ClkStatusText, 0, Button3, spawn, {.v = menu } }, { ClkStatusText, 0, Button4, spawn, {.v = volup } }, { ClkStatusText, 0, Button5, spawn, {.v = voldown } }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODKEY, Button4, setmfact, {.f = +0.05} }, { ClkClientWin, MODKEY, Button5, setmfact, {.f = -0.05} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button2, view, {.ui = ~0 } }, { ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, 0, Button4, layoutscroll, {.i = +1 } }, { ClkTagBar, 0, Button5, layoutscroll, {.i = -1 } }, { ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} }, { ClkRootWin, 0, Button1, spawn, {.v = menu } }, { ClkRootWin, 0, Button2, spawn, {.v = menu } }, { ClkRootWin, 0, Button3, spawn, {.v = menu } }, };
Téma a nastavení pro dwm verze 6.3 a s hlavní barvou koral - #94ebeb.
Verze | dwm 6.3 |
---|---|
OS | Arch Linux a jiné |
Popis | Konfigurační soubor s tématem, jednoduché nastavení, použité znaky z "awesome-terminal-fonts" |
Použité patche |
|
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int gappx = 10; /* gaps between windows */
static const unsigned int snap = 40; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "terminus:size=9" };
static const char dmenufont[] = "terminus:size=9";
static const char col_background[] = "#332f2d";
static const char col_lightbackground[] = "#847975";
static const char col_foreground[] = "#d2ffff";
static const char col_hlavni[] = "#94ebeb";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_foreground, col_background, col_background },
[SchemeSel] = { col_background, col_hlavni, col_foreground },
};
/* tagging */
static const char *tags[] = { "1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "0 "};
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "st", NULL, NULL, 0, 1, -1 },
{ "URxvt", NULL, NULL, 0, 1, -1 },
{ "XTerm", NULL, NULL, 0, 1, -1 },
{ "Bseterm", NULL, NULL, 0, 1, -1 },
{ "Libfm-pref-apps", NULL, NULL, 0, 1, -1 },
{ "dosbox", NULL, NULL, 0, 1, -1 },
{ "Dosbox", NULL, NULL, 0, 1, -1 },
{ "RetroArch", NULL, NULL, 0, 1, -1 },
{ "Steam", NULL, NULL, 0, 1, -1 },
{ "Wine", NULL, NULL, 0, 1, -1 },
{ "xfce4-appfinder", NULL, NULL, 0, 1, -1 },
{ "SWT", NULL, NULL, 1 << 2, 0, 0 },
{ "thunderbird", NULL, NULL, 1 << 1, 0, 0 },
{ "whatsdesk", NULL, NULL, 1 << 1, 0, 0 },
{ "Whatsapp-for-linux", NULL, NULL, 1 << 1, 0, 0 },
{ NULL, NULL, "WhatsApp", 1 << 1, 0, 0 },
{ "Pidgin", NULL, NULL, 1 << 1, 0, 0 },
{ "boss-Start", NULL, NULL, 0, 1, -1 },
{ "sun-awt-X11-XFramePeer", NULL, NULL, 0, 1, -1 },
{ NULL, NULL, "PuTTY Reconfiguration", 0, 1, -1 },
{ NULL, NULL, "PuTTY Configuration", 0, 1, -1 },
{ "Putty", NULL, NULL, 0, 1, -1 },
{ "Gpicview", NULL, NULL, 0, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.6; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ " > ", tile }, /* first entry is default */
{ " > ", NULL }, /* no layout function means floating behavior */
{ " > ", monocle },
{ NULL, NULL },
};
/* key definitions */
#define MODKEY Mod4Mask
#define ALT Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run_history", "-m", dmenumon, "-fn", dmenufont, "-nb", col_background, "-nf", col_foreground, "-sb", col_foreground, "-sf", col_background, NULL };
static const char *viacmd[] = { "via", NULL };
static const char *termcmd[] = { "terminal", NULL };
static const char *volup[] = { "amixer", "set", "Master", "2dB+", NULL };
static const char *voldown[] = { "amixer", "set", "Master", "2dB-", NULL };
static const char *menu[] = { "jgmenu_run", NULL };
static const char *menuprace[] = { "sh", "/home/martin/data/skripty/jgmenu-prace.sh", NULL };
static const char *screenshotcmd[] = { "sh", "/home/martin/data/skripty/screenshot.sh", NULL }; /* Spustí můj skript na screenshot celé obrazovky */
static const char *zaznamycmd[] = { "terminal", "-e", "zaznamy", NULL }; /* Spustí můj skript pro záznamy */
static const char *killcmd[] = { "xkill", NULL };
#include
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Up, spawn, {.v = volup } },
{ MODKEY|ShiftMask, XK_Down, spawn, {.v = voldown } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
{ 0, XF86XK_WWW, spawn, SHCMD("firefox") },
{ 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
{ 0, XF86XK_TouchpadOff, spawn, SHCMD("synclient TouchpadOff=1") },
{ 0, XF86XK_TouchpadOn, spawn, SHCMD("synclient TouchpadOff=0") },
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 15") },
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 15") },
{ 0, XK_Print, spawn, {.v = screenshotcmd } },
{ MODKEY, XK_z, spawn, {.v = zaznamycmd } },
{ MODKEY, XK_x, spawn, {.v = killcmd } },
{ MODKEY, XK_Escape, spawn, {.v = menu } },
{ MODKEY, XK_w, spawn, {.v = menu } },
{ MODKEY, XK_p, spawn, {.v = menuprace } },
{ MODKEY, XK_e, spawn, {.v = viacmd } },
{ MODKEY, XK_semicolon, view, {.ui = ~0 } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_k, focusstack, {.i = +1 } },
{ ALT, XK_Right, focusstack, {.i = +1 } },
{ MODKEY, XK_j, focusstack, {.i = -1 } },
{ ALT, XK_Left, focusstack, {.i = -1 } },
{ ALT, XK_Up, zoom, {0} },
{ MODKEY|ShiftMask, XK_l, incnmaster, {.i = +1 } },
{ MODKEY|ShiftMask, XK_h, incnmaster, {.i = -1 } },
{ MODKEY|ALT, XK_j, setmfact, {.f = -0.05} },
{ MODKEY|ALT, XK_k, setmfact, {.f = +0.05} },
{ MODKEY, XK_Up, zoom, {0} },
{ MODKEY, XK_Down, zoom, {0} },
{ MODKEY|ShiftMask, XK_k, zoom, {0} },
{ MODKEY|ShiftMask, XK_j, zoom, {0} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, togglefloating, {0} },
{ ALT, XK_f, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY, XK_Left, rotatetags, {.i = -1 } },
{ MODKEY, XK_Right, rotatetags, {.i = +1 } },
TAGKEYS( XK_plus, 0)
TAGKEYS( XK_ecaron, 1)
TAGKEYS( XK_scaron, 2)
TAGKEYS( XK_ccaron, 3)
TAGKEYS( XK_rcaron, 4)
TAGKEYS( XK_zcaron, 5)
TAGKEYS( XK_yacute, 6)
TAGKEYS( XK_aacute, 7)
TAGKEYS( XK_iacute, 8)
TAGKEYS( XK_eacute, 9)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {.v = &layouts[0]} },
{ ClkLtSymbol, 0, Button2, setlayout, {.v = &layouts[1]} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkLtSymbol, 0, Button4, setlayout, {.v = &layouts[0]} },
{ ClkLtSymbol, 0, Button5, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button1, zoom, {0} },
{ ClkWinTitle, 0, Button2, togglefloating, {0} },
{ ClkWinTitle, 0, Button3, killclient, {0} },
{ ClkWinTitle, 0, Button4, focusstack, {.i = +1 } },
{ ClkWinTitle, 0, Button5, focusstack, {.i = -1 } },
{ ClkStatusText, 0, Button1, spawn, {.v = menu } },
{ ClkStatusText, 0, Button2, spawn, {.v = menuprace } },
{ ClkStatusText, 0, Button3, spawn, {.v = menu } },
{ ClkStatusText, 0, Button4, spawn, {.v = volup } },
{ ClkStatusText, 0, Button5, spawn, {.v = voldown } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkClientWin, MODKEY, Button4, setmfact, {.f = +0.05} },
{ ClkClientWin, MODKEY, Button5, setmfact, {.f = -0.05} },
{ ClkClientWin, MODKEY|ShiftMask, Button1, zoom, {0} },
{ ClkClientWin, ALT, Button1, zoom, {0} },
{ ClkClientWin, MODKEY|ShiftMask, Button4, incnmaster, {.i = +1 } },
{ ClkClientWin, MODKEY|ShiftMask, Button5, incnmaster, {.i = -1 } },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button2, view, {.ui = ~0 } },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, 0, Button4, rotatetags, {.i = -1 } },
{ ClkTagBar, 0, Button5, rotatetags, {.i = +1 } },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
{ ClkRootWin, 0, Button1, spawn, {.v = menu } },
{ ClkRootWin, 0, Button2, spawn, {.v = menuprace } },
{ ClkRootWin, 0, Button3, spawn, {.v = menu } },
{ ClkRootWin, 0, Button4, rotatetags, {.i = -1 } },
{ ClkRootWin, 0, Button5, rotatetags, {.i = +1 } },
};
Téma a nastavení pro dwm bez aplikovaných patchů a s hlavní barvou cyan - #7bbdbd.
Verze | dwm 6.3 |
---|---|
OS | Arch Linux a jiné |
Popis | Kompletní konfigurace s tématem, jednoduché nastavení včetně tématu, použité znaky z "awesome-terminal-fonts" |
Použitý SW |
|
Pozadí:
/* See LICENSE file for copyright and license details.
__ ____ __ _
| \/ \ \ / / | |
| \ / |\ \ / / __| |_ ___ __ ___
| |\/| | \ \/ / / _` \ \ /\ / / '_ ` _ \
| | | | \ / | (_| |\ V V /| | | | | |
|_| |_| \/ \__,_| \_/\_/ |_| |_| |_|
*/
/* appearance */
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 100; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "terminus:size=9" };
static const char dmenufont[] = "terminus:size=9";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_cyan[] = "#7bbdbd";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_cyan, col_gray1, col_gray2 },
[SchemeSel] = { col_gray1, col_cyan, col_cyan },
};
/* tagging */
static const char *tags[] = { "1 >_ ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 " };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "st", NULL, NULL, 1 << 0, 0, -1 },
{ "URxvt", NULL, NULL, 1 << 0, 0, -1 },
{ "Xterm", NULL, NULL, 1 << 0, 0, -1 },
{ "xterm", NULL, NULL, 1 << 0, 0, -1 },
{ "Pcmanfm", NULL, NULL, 1 << 1, 0, -1 },
{ "Thunar", NULL, NULL, 1 << 1, 0, -1 },
{ "Xarchiver", NULL, NULL, 1 << 1, 0, -1 },
{ "Firefox", NULL, NULL, 1 << 2, 0, -1 },
{ "firefox", NULL, NULL, 1 << 2, 0, -1 },
{ "Chromium", NULL, NULL, 1 << 2, 0, -1 },
{ "navigator", NULL, NULL, 1 << 2, 0, -1 },
{ "transmission-gtk", NULL, NULL, 1 << 2, 0, -1 },
{ "Opera", NULL, NULL, 1 << 2, 0, -1 },
{ "Uzbl", NULL, NULL, 1 << 2, 0, -1 },
{ "Chromium", NULL, NULL, 1 << 2, 0, -1 },
{ "Dillo", NULL, NULL, 1 << 2, 0, -1 },
{ "Surf", NULL, NULL, 1 << 2, 0, -1 },
{ "navigator", NULL, NULL, 1 << 2, 0, -1 },
{ "Netsurf-gtk3", NULL, NULL, 1 << 2, 0, -1 },
{ "Links", NULL, NULL, 1 << 2, 0, -1 },
{ "Putty", NULL, NULL, 1 << 2, 0, -1 },
{ "Uzbl", NULL, NULL, 1 << 2, 0, -1 },
{ "Claws-mail", NULL, NULL, 1 << 3, 0, -1 },
{ "libreoffice", NULL, NULL, 1 << 3, 0, -1 },
{ "Notes", NULL, NULL, 1 << 3, 0, -1 },
{ "Orage", NULL, NULL, 1 << 3, 0, -1 },
{ "Thunderbird", NULL, NULL, 1 << 3, 0, -1 },
{ "Audacious", NULL, "Audacious", 1 << 4, 0, -1 },
{ "Audacity", NULL, NULL, 1 << 4, 0, -1 },
{ "Ciano", NULL, NULL, 1 << 4, 0, -1 },
{ "ClipGrab", NULL, NULL, 1 << 4, 0, -1 },
{ "MPlayer", NULL, NULL, 1 << 4, 0, -1 },
{ "Soundkonverter", NULL, NULL, 1 << 4, 0, -1 },
{ "soundkonverter", NULL, NULL, 1 << 4, 0, -1 },
{ "Vlc", NULL, NULL, 1 << 4, 0, -1 },
{ "vlc", NULL, NULL, 1 << 4, 0, -1 },
{ "Xfburn", NULL, NULL, 1 << 4, 0, -1 },
{ "Electron", NULL, NULL, 1 << 5, 0, -1 },
{ "Geany", NULL, NULL, 1 << 5, 0, -1 },
{ "Leafpad", NULL, NULL, 1 << 5, 0, -1 },
{ "Mousepad", NULL, NULL, 1 << 5, 0, -1 },
{ "Birdfont", NULL, NULL, 1 << 6, 0, -1 },
{ "Blender", NULL, NULL, 1 << 6, 1, -1 },
{ "Gimp", NULL, NULL, 1 << 6, 1, -1 },
{ "Gpicview", NULL, NULL, 1 << 6, 1, -1 },
{ "Inkscape", NULL, NULL, 1 << 6, 1, -1 },
{ "balena-etcher", NULL, NULL, 1 << 7, 0, -1 },
{ "Gnome-calculator", NULL, NULL, 1 << 7, 0, -1 },
{ "GParted", NULL, NULL, 1 << 7, 0, -1 },
{ "Gucharmap", NULL, NULL, 1 << 7, 0, -1 },
{ "hp-toolbox", NULL, NULL, 1 << 7, 0, -1 },
{ "Imager", NULL, NULL, 1 << 7, 0, -1 },
{ "Libfm-pref-apps", NULL, NULL, 1 << 7, 1, -1 },
{ "Lxappearance", NULL, NULL, 1 << 7, 0, -1 },
{ "Lxtask", NULL, NULL, 1 << 7, 0, -1 },
{ "Nvidia-settings", NULL, NULL, 1 << 7, 0, -1 },
{ "Org.gnome.Characters", NULL, NULL, 1 << 7, 0, -1 },
{ "VirtualBox Manager", NULL, NULL, 1 << 7, 0, -1 },
{ "Xfce4-about", NULL, NULL, 1 << 7, 0, -1 },
{ "Xfce4-taskmanager", NULL, NULL, 1 << 7, 0, -1 },
{ "dosbox", NULL, NULL, 1 << 8, 1, -1 },
{ "Dosbox", NULL, NULL, 1 << 8, 1, -1 },
{ "RetroArch", NULL, NULL, 1 << 8, 1, -1 },
{ "Steam", NULL, NULL, 1 << 8, 1, -1 },
{ "Wine", NULL, NULL, 1 << 8, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.60; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ " > ", tile }, /* first entry is default */
{ " > ", NULL }, /* no layout function means floating behavior */
{ " > ", monocle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define ALT Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run_history", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_cyan, "-sb", col_cyan, "-sf", col_gray1, NULL };
static const char *termcmd[] = { "st", NULL };
static const char *volup[] = { "amixer", "set", "Master", "2dB+", NULL };
static const char *voldown[] = { "amixer", "set", "Master", "2dB-", NULL };
static const char *soubory[] = { "pcmanfm", NULL };
static const char *web[] = { "firefox", NULL };
static const char *menu[] = { "jgmenu_run", NULL };
#include
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Up, spawn, {.v = volup } },
{ MODKEY|ShiftMask, XK_Down, spawn, {.v = voldown } },
{ MODKEY, XK_F1, spawn, {.v = termcmd } },
{ MODKEY, XK_F2, spawn, {.v = soubory } },
{ MODKEY, XK_F3, spawn, {.v = web } },
{ MODKEY, XK_Escape, spawn, {.v = menu } },
{ MODKEY, XK_w, spawn, {.v = menu } },
{ MODKEY, XK_e, spawn, {.v = menu } },
{ MODKEY, XK_semicolon, view, {.ui = ~0 } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_Right, focusstack, {.i = +1 } },
{ MODKEY, XK_Left, focusstack, {.i = -1 } },
{ MODKEY, XK_Up, incnmaster, {.i = +1 } },
{ MODKEY, XK_Down, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_k, focusstack, {.i = +1 } },
{ MODKEY, XK_j, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } },
TAGKEYS( XK_plus, 0)
TAGKEYS( XK_ecaron, 1)
TAGKEYS( XK_scaron, 2)
TAGKEYS( XK_ccaron, 3)
TAGKEYS( XK_rcaron, 4)
TAGKEYS( XK_zcaron, 5)
TAGKEYS( XK_yacute, 6)
TAGKEYS( XK_aacute, 7)
TAGKEYS( XK_iacute, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
{ 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") },
{ 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
{ 0, XF86XK_TouchpadOff, spawn, SHCMD("synclient TouchpadOff=1") },
{ 0, XF86XK_TouchpadOn, spawn, SHCMD("synclient TouchpadOff=0") },
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 15") },
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 15") },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {.v = &layouts[0]} },
{ ClkLtSymbol, 0, Button2, setlayout, {.v = &layouts[1]} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkLtSymbol, 0, Button4, setmfact, {.f = +0.05} },
{ ClkLtSymbol, 0, Button5, setmfact, {.f = -0.05} },
{ ClkWinTitle, 0, Button1, zoom, {0} },
{ ClkWinTitle, 0, Button2, togglefloating, {0} },
{ ClkWinTitle, 0, Button3, setlayout, {0} },
{ ClkWinTitle, 0, Button4, focusstack, {.i = +1 } },
{ ClkWinTitle, 0, Button5, focusstack, {.i = -1 } },
{ ClkStatusText, 0, Button1, spawn, {.v = menu } },
{ ClkStatusText, 0, Button3, spawn, {.v = menu } },
{ ClkStatusText, 0, Button4, spawn, {.v = volup } },
{ ClkStatusText, 0, Button5, spawn, {.v = voldown } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkClientWin, MODKEY, Button4, setmfact, {.f = +0.05} },
{ ClkClientWin, MODKEY, Button5, setmfact, {.f = -0.05} },
{ ClkClientWin, MODKEY|ShiftMask, Button1, zoom, {0} },
{ ClkClientWin, MODKEY|ShiftMask, Button4, incnmaster, {.i = +1 } },
{ ClkClientWin, MODKEY|ShiftMask, Button5, incnmaster, {.i = -1 } },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button2, view, {.ui = ~0 } },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
{ ClkRootWin, 0, Button1, spawn, {.v = menu } },
{ ClkRootWin, 0, Button2, spawn, {.v = menu } },
{ ClkRootWin, 0, Button3, spawn, {.v = menu } },
};
setxkbmap cz &
xrdb -merge ~/.Xresources-koral &
conky -c $HOME/.conkyrc-console | while read -r; do xsetroot -name "$REPLY"; done &
feh --bg-scale /opt/grafika/workout.png &
VBoxClient-all &
xcompmgr &
dwm
out_to_console yes out_to_x no background no update_interval 2 total_run_times 0 use_spacer none #use_xft yes TEXT ${cpu cpu}% ${freq_g}GHz ${mem}/${memmax} / ${fs_used}/${fs_size} /mnt/DATA ${fs_used /mnt/DATA}/${fs_size /mnt/DATA} $battery_percent% ${exec amixer get Master -M | grep -oE -m1 "[[:digit:]]*%"} ${time %A %d %B %H:%M}
Téma a nastavení pro dwm, aplikované patche a s hlavní barvou cyan - #7bbdbd.
Verze | dwm 6.3 |
---|---|
OS | Arch Linux a jiné |
Popis | Kompletní konfigurace s tématem, jednoduché nastavení včetně tématu, použité znaky z "awesome-terminal-fonts" |
Patche |
|
Použitý SW |
|
Soubory | dwm-koral.tar - celý zdrojový kód s aplikovanými patchi ke kompilaci/nahlédnutí |
Pozadí:
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int gappx = 10; /* gaps between windows */
static const unsigned int snap = 100; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayonleft = 1; /* 0: systray in the right corner, >0: systray on left of status text */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "terminus:size=9" };
static const char dmenufont[] = "terminus:size=9";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_cyan[] = "#7bbdbd";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_cyan, col_gray1, col_gray2 },
[SchemeSel] = { col_gray1, col_cyan, col_cyan },
};
/* tagging */
static const char *tags[] = { "𝟙 >_ ", "𝟚 ", "𝟛 ", "𝟜 ", "𝟝 ", "𝟞 ", "𝟟 ", "𝟠 ", "𝟡 " };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "URxvt", NULL, NULL, 1 << 0, 0, -1 },
{ "Xterm", NULL, NULL, 1 << 0, 0, -1 },
{ "xterm", NULL, NULL, 1 << 0, 0, -1 },
{ "Pcmanfm", NULL, NULL, 1 << 1, 0, -1 },
{ "Thunar", NULL, NULL, 1 << 1, 0, -1 },
{ "Xarchiver", NULL, NULL, 1 << 1, 0, -1 },
{ "Firefox", NULL, NULL, 1 << 2, 0, -1 },
{ "firefox", NULL, NULL, 1 << 2, 0, -1 },
{ "Chromium", NULL, NULL, 1 << 2, 0, -1 },
{ "navigator", NULL, NULL, 1 << 2, 0, -1 },
{ "transmission-gtk", NULL, NULL, 1 << 2, 0, -1 },
{ "Opera", NULL, NULL, 1 << 2, 0, -1 },
{ "Uzbl", NULL, NULL, 1 << 2, 0, -1 },
{ "Dillo", NULL, NULL, 1 << 2, 0, -1 },
{ "Surf", NULL, NULL, 1 << 2, 0, -1 },
{ "Netsurf-gtk3", NULL, NULL, 1 << 2, 0, -1 },
{ "Links", NULL, NULL, 1 << 2, 0, -1 },
{ "Putty", NULL, NULL, 1 << 2, 0, -1 },
{ "Claws-mail", NULL, NULL, 1 << 3, 0, -1 },
{ "libreoffice", NULL, NULL, 1 << 3, 0, -1 },
{ "Orage", NULL, NULL, 1 << 3, 0, -1 },
{ "Thunderbird", NULL, NULL, 1 << 3, 0, -1 },
{ "Ciano", NULL, NULL, 1 << 4, 0, -1 },
{ "ClipGrab", NULL, NULL, 1 << 4, 0, -1 },
{ "Soundkonverter", NULL, NULL, 1 << 4, 0, -1 },
{ "soundkonverter", NULL, NULL, 1 << 4, 0, -1 },
{ "Vlc", NULL, NULL, 1 << 4, 0, -1 },
{ "vlc", NULL, NULL, 1 << 4, 0, -1 },
{ "Audacious", NULL, "Audacious", 1 << 4, 0, -1 },
{ "Audacity", NULL, NULL, 1 << 4, 0, -1 },
{ "MPlayer", NULL, NULL, 1 << 4, 0, -1 },
{ "Xfburn", NULL, NULL, 1 << 4, 0, -1 },
{ "Geany", NULL, NULL, 1 << 5, 0, -1 },
{ "Leafpad", NULL, NULL, 1 << 5, 0, -1 },
{ "Mousepad", NULL, NULL, 1 << 5, 0, -1 },
{ "Birdfont", NULL, NULL, 1 << 6, 0, -1 },
{ "Blender", NULL, NULL, 1 << 6, 1, -1 },
{ "Gimp", NULL, NULL, 1 << 6, 1, -1 },
{ "Gpicview", NULL, NULL, 1 << 6, 1, -1 },
{ "Inkscape", NULL, NULL, 1 << 6, 1, -1 },
{ "Gucharmap", NULL, NULL, 1 << 7, 0, -1 },
{ "Libfm-pref-apps", NULL, NULL, 1 << 7, 1, -1 },
{ "Lxappearance", NULL, NULL, 1 << 7, 0, -1 },
{ "Xfce4-taskmanager", NULL, NULL, 1 << 7, 0, -1 },
{ "dosbox", NULL, NULL, 1 << 8, 1, -1 },
{ "Dosbox", NULL, NULL, 1 << 8, 1, -1 },
{ "RetroArch", NULL, NULL, 1 << 8, 1, -1 },
{ "Steam", NULL, NULL, 1 << 8, 1, -1 },
{ "Wine", NULL, NULL, 1 << 8, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
#include "fibonacci.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ " > ", tile }, /* first entry is default */
{ " > ", NULL }, /* no layout function means floating behavior */
{ " > ", monocle },
{ " > ", dwindle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run_history", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_cyan, "-sb", col_cyan, "-sf", col_gray1, NULL };
static const char *termcmd[] = { "urxvt", NULL };
static const char *filecmd[] = { "pcmanfm", NULL };
static const char *volup[] = { "amixer", "set", "Master", "2dB+", NULL };
static const char *voldown[] = { "amixer", "set", "Master", "2dB-", NULL };
static const char *soubory[] = { "pcmanfm", NULL };
static const char *web[] = { "firefox", NULL };
static const char *hudba[] = { "urxvt", "-e", "cmus", NULL };
static const char *kalendar[] = { "urxvt", "-e", "calcurse-online", NULL };
static const char *menu[] = { "jgmenu_run", NULL };
static const char *killcmd[] = { "xkill", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Up, spawn, {.v = volup } },
{ MODKEY|ShiftMask, XK_Down, spawn, {.v = voldown } },
{ MODKEY, XK_F1, spawn, {.v = soubory } },
{ MODKEY, XK_F2, spawn, {.v = web } },
{ MODKEY, XK_F3, spawn, {.v = hudba } },
{ MODKEY, XK_Escape, spawn, {.v = menu } },
{ MODKEY, XK_e, spawn, {.v = menu } },
{ MODKEY, XK_semicolon, view, {.ui = ~0 } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_Right, focusstack, {.i = +1 } },
{ MODKEY, XK_Left, focusstack, {.i = -1 } },
{ MODKEY, XK_Up, incnmaster, {.i = +1 } },
{ MODKEY, XK_Down, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_r, setlayout, {.v = &layouts[3]} },
{ MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} },
{ MODKEY, XK_space, layoutscroll, {.i = +1 } },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } },
TAGKEYS( XK_plus, 0)
TAGKEYS( XK_ecaron, 1)
TAGKEYS( XK_scaron, 2)
TAGKEYS( XK_ccaron, 3)
TAGKEYS( XK_rcaron, 4)
TAGKEYS( XK_zcaron, 5)
TAGKEYS( XK_yacute, 6)
TAGKEYS( XK_aacute, 7)
TAGKEYS( XK_iacute, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, layoutscroll, {.i = +1 } },
{ ClkLtSymbol, 0, Button2, layoutscroll, {.i = -1 } },
{ ClkLtSymbol, 0, Button3, layoutscroll, {.i = -1 } },
{ ClkLtSymbol, 0, Button4, setmfact, {.f = +0.05} },
{ ClkLtSymbol, 0, Button5, setmfact, {.f = -0.05} },
{ ClkWinTitle, 0, Button1, zoom, {0} },
{ ClkWinTitle, 0, Button2, togglefloating, {0} },
{ ClkWinTitle, 0, Button3, setlayout, {0} },
{ ClkWinTitle, 0, Button4, focusstack, {.i = +1 } },
{ ClkWinTitle, 0, Button5, focusstack, {.i = -1 } },
{ ClkStatusText, 0, Button1, spawn, {.v = menu } },
{ ClkStatusText, 0, Button2, spawn, {.v = killcmd } },
{ ClkStatusText, 0, Button3, spawn, {.v = menu } },
{ ClkStatusText, 0, Button4, spawn, {.v = volup } },
{ ClkStatusText, 0, Button5, spawn, {.v = voldown } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkClientWin, MODKEY, Button4, setmfact, {.f = +0.05} },
{ ClkClientWin, MODKEY, Button5, setmfact, {.f = -0.05} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button2, view, {.ui = ~0 } },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, 0, Button4, layoutscroll, {.i = +1 } },
{ ClkTagBar, 0, Button5, layoutscroll, {.i = -1 } },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
{ ClkRootWin, 0, Button1, spawn, {.v = menu } },
{ ClkRootWin, 0, Button2, spawn, {.v = menu } },
{ ClkRootWin, 0, Button3, spawn, {.v = menu } },
};
setxkbmap cz & xrdb -merge ~/.Xresources & volumeicon & conky -c $HOME/.conkyrc | while read -r; do xsetroot -name "$REPLY"; done & feh --bg-scale /opt/grafika/mv-koral.png & xcompmgr & dwm
out_to_console yes out_to_x no background no update_interval 2 total_run_times 0 use_spacer none #use_xft yes TEXT ${downspeed enp3s0} K/s ${upspeed enp3s0} K/s ${cpu cpu}% RAM $memeasyfree $fs_free $diskio $battery_percent% ${exec amixer get Master -M | grep -oE -m1 "[[:digit:]]*%"}𝄘${time %a %b %d %I:%M%P}
stay_alive = 1 tint2_look = 0 position_mode = pointer terminal_exec = urxvt terminal_args = -e menu_width = 200 menu_padding_top = 1 menu_padding_right = 1 menu_padding_bottom = 1 menu_padding_left = 1 menu_radius = 0 menu_border = 1 menu_halign = left sub_hover_action = 1 item_margin_y = 1 item_height = 18 item_padding_x = 1 item_radius = 0 item_border = 0 sep_height = 2 font = Terminus 12px icon_size = 18 color_menu_bg = #2b303b 90 color_norm_bg = #222222 0 color_norm_fg = #7bbdbd 100 color_sel_bg = #7bbdbd 60 color_sel_fg = #222222 100 color_sep_fg = #8fa1b3 40
^sep() CLI,^checkout(cli), utilities-terminal V terminálu,^checkout(vterminalu), utilities-terminal Konec,^checkout(konec), system-shutdown ,^tag(cli), BSD Games,^checkout(bsdgames), utilities-terminal Alsamixer,urxvt -e alsamixer,utilities-terminal Cmus,urxvt -e cmus,utilities-terminal Htop,urxvt -e htop,htop Kalendář online,urxvt -e calcurse-online,utilities-terminal Links,urxvt -e links,utilities-terminal MC,urxvt -e mc,utilities-terminal NCDU,urxvt -e ncdu /,utilities-terminal pcurses,urxvt -e pcurses,utilities-terminal ,^tag(bsdgames) adventure,urxvt -e adventure,utilities-terminal atc,urxvt -e atc,utilities-terminal battlestar,urxvt -e battlestar,utilities-terminal caesar,urxvt -e caesar,utilities-terminal cribbage,urxvt -e cribbage,utilities-terminal dab,urxvt -e dab,utilities-terminal drop4,urxvt -e drop4,utilities-terminal gofish,urxvt -e gofish,utilities-terminal gomoku,urxvt -e gomoku,utilities-terminal hangman,urxvt -e hangman,utilities-terminal klondike,urxvt -e klondike,utilities-terminal robots,urxvt -e robots,utilities-terminal sail,urxvt -e sail,utilities-terminal snake,urxvt -e snake,utilities-terminal spirhunt,urxvt -e spirhunt,utilities-terminal worm,urxvt -e worm,utilities-terminal wump,urxvt -e wump,utilities-terminal ,^tag(vterminalu), e4defrag - defragmentace,urxvt -e sudo e4defrag /,utilities-terminal ,^tag(konec) Suspend,systemctl -i suspend,system-log-out Reboot,systemctl -i reboot,system-reboot Poweroff,systemctl -i poweroff,system-shutdown
Terminál,urxvt,utilities-terminal Web,firefox,firefox Soubory,pcmanfm,system-file-manager ^sep()