From 23836c4cdb252f8d1077298fcfe70a9afafe9e91 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 16 Oct 2020 08:43:28 +0200 Subject: Add dwmblocks todos --- platforms/linux/xorg/config.h | 313 ++++++++++++++++++++++ platforms/linux/xorg/default.nix | 14 +- platforms/linux/xorg/dunstrc | 431 +++++++++++++++++++++++++++++++ platforms/linux/xorg/dwmblocks-todo.diff | 12 + 4 files changed, 768 insertions(+), 2 deletions(-) create mode 100644 platforms/linux/xorg/config.h create mode 100644 platforms/linux/xorg/dunstrc create mode 100644 platforms/linux/xorg/dwmblocks-todo.diff diff --git a/platforms/linux/xorg/config.h b/platforms/linux/xorg/config.h new file mode 100644 index 0000000..a7a8226 --- /dev/null +++ b/platforms/linux/xorg/config.h @@ -0,0 +1,313 @@ +/* See LICENSE file for copyright and license details. */ + +/* Constants */ +#define TERMINAL "st" +#define TERMCLASS "St" + +/* appearance */ +static const unsigned int borderpx = 3; /* border pixel of windows */ +static const unsigned int snap = 32; /* snap pixel */ +static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ +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 unsigned int gappih = 20; /* horiz inner gap between windows */ +static const unsigned int gappiv = 10; /* vert inner gap between windows */ +static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ +static const unsigned int gappov = 20; /* vert outer gap between windows and screen edge */ +static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ +static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ +static const int showbar = 1; /* 0 means no bar */ +static const int topbar = 0; /* 0 means bottom bar */ +static const char *fonts[] = { "monospace:size=10", "JoyPixels:pixelsize=10:antialias=true:autohint=true" }; +static char dmenufont[] = "monospace:size=10"; +static char normbgcolor[] = "#222222"; +static char normbordercolor[] = "#444444"; +static char normfgcolor[] = "#bbbbbb"; +static char selfgcolor[] = "#eeeeee"; +static char selbordercolor[] = "#770000"; +static char selbgcolor[] = "#005577"; +static char *colors[][3] = { + /* fg bg border */ + [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor }, + [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor }, +}; + +typedef struct { + const char *name; + const void *cmd; +} Sp; +const char *spcmd1[] = {TERMINAL, "-n", "spterm", "-g", "120x34", NULL }; +const char *spcmd2[] = {TERMINAL, "-n", "spcalc", "-f", "monospace:size=16", "-g", "50x20", "-e", "bc", "-lq", NULL }; +static Sp scratchpads[] = { + /* name cmd */ + {"spterm", spcmd1}, + {"spranger", spcmd2}, +}; + +/* 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 iscentered isfloating isterminal noswallow monitor */ + { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, 0, -1 }, + { TERMCLASS, NULL, NULL, 0, 0, 0, 1, 0, -1 }, + { NULL, NULL, "Event Tester", 0, 0, 0, 0, 1, -1 }, + { NULL, "spterm", NULL, SPTAG(0), 0, 1, 1, 0, -1 }, + { NULL, "spcalc", NULL, SPTAG(1), 0, 1, 1, 0, -1 }, + { NULL, "telegram-desktop", NULL, 0, 1, 1, 0, 0, -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 = 1; /* 1 means respect size hints in tiled resizals */ +#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */ +#include "vanitygaps.c" +static const Layout layouts[] = { + /* symbol arrange function */ + { "[]=", tile }, /* Default: Master on left, slaves on right */ + { "TTT", bstack }, /* Master on top, slaves on bottom */ + + { "[@]", spiral }, /* Fibonacci spiral */ + { "[\\]", dwindle }, /* Decreasing in size right and leftward */ + + { "H[]", deck }, /* Master on left, slaves in monocle-like mode on right */ + { "[M]", monocle }, /* All windows on top of eachother */ + + { "|M|", centeredmaster }, /* Master in middle, slaves on sides */ + { ">M>", centeredfloatingmaster }, /* Same but master floats */ + + { "><>", NULL }, /* no layout function means floating behavior */ + { NULL, NULL }, +}; + +/* 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} }, +#define STACKKEYS(MOD,ACTION) \ + { MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \ + { MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, \ + { MOD, XK_v, ACTION##stack, {.i = 0 } }, \ + /* { MOD, XK_grave, ACTION##stack, {.i = PREVSEL } }, \ */ + /* { MOD, XK_a, ACTION##stack, {.i = 1 } }, \ */ + /* { MOD, XK_z, ACTION##stack, {.i = 2 } }, \ */ + /* { MOD, XK_x, ACTION##stack, {.i = -1 } }, */ + +/* 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", "-i", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, "-c", "-bw", "2", "-l", "15", NULL }; +static const char *termcmd[] = { TERMINAL, NULL }; + +#include +#include "shiftview.c" +static Key keys[] = { + /* modifier key function argument */ + STACKKEYS(MODKEY, focus) + STACKKEYS(MODKEY|ShiftMask, push) + /* { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("") }, */ + { MODKEY, XK_grave, spawn, SHCMD("dmenuunicode") }, + /* { MODKEY|ShiftMask, XK_grave, togglescratch, SHCMD("") }, */ + TAGKEYS( XK_1, 0) + TAGKEYS( XK_2, 1) + TAGKEYS( XK_3, 2) + TAGKEYS( XK_4, 3) + TAGKEYS( XK_5, 4) + TAGKEYS( XK_6, 5) + TAGKEYS( XK_7, 6) + TAGKEYS( XK_8, 7) + TAGKEYS( XK_9, 8) + { MODKEY, XK_0, view, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + { MODKEY, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 5; kill -44 $(pidof dwmblocks)") }, + { MODKEY|ShiftMask, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 15; kill -44 $(pidof dwmblocks)") }, + { MODKEY, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof dwmblocks)") }, + { MODKEY|ShiftMask, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)") }, + { MODKEY, XK_BackSpace, spawn, SHCMD("sysact") }, + { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("xset dpms force off") }, + + { MODKEY, XK_Tab, view, {0} }, + /* { MODKEY|ShiftMask, XK_Tab, spawn, SHCMD("") }, */ + { MODKEY, XK_q, killclient, {0} }, + { MODKEY|ShiftMask, XK_q, spawn, SHCMD("sysact") }, + { MODKEY, XK_w, spawn, SHCMD("$BROWSER") }, + { MODKEY|ShiftMask, XK_w, spawn, SHCMD(TERMINAL " -e sudo nmtui") }, + { MODKEY, XK_e, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") }, + { MODKEY|ShiftMask, XK_e, spawn, SHCMD(TERMINAL " -e abook -C ~/.config/abook/abookrc --datafile ~/.config/abook/addressbook") }, + { MODKEY, XK_r, spawn, SHCMD(TERMINAL " -e lf") }, + { MODKEY|ShiftMask, XK_r, spawn, SHCMD(TERMINAL " -e htop") }, + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, /* tile */ + { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} }, /* bstack */ + { MODKEY, XK_y, setlayout, {.v = &layouts[2]} }, /* spiral */ + { MODKEY|ShiftMask, XK_y, setlayout, {.v = &layouts[3]} }, /* dwindle */ + { MODKEY, XK_u, setlayout, {.v = &layouts[4]} }, /* deck */ + { MODKEY|ShiftMask, XK_u, setlayout, {.v = &layouts[5]} }, /* monocle */ + { MODKEY, XK_i, setlayout, {.v = &layouts[6]} }, /* centeredmaster */ + { MODKEY|ShiftMask, XK_i, setlayout, {.v = &layouts[7]} }, /* centeredfloatingmaster */ + { MODKEY, XK_o, incnmaster, {.i = +1 } }, + { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } }, + { MODKEY, XK_p, spawn, SHCMD("mpc toggle") }, + { MODKEY|ShiftMask, XK_p, spawn, SHCMD("mpc pause ; pauseallmpv") }, + { MODKEY, XK_bracketleft, spawn, SHCMD("mpc seek -10") }, + { MODKEY|ShiftMask, XK_bracketleft, spawn, SHCMD("mpc seek -60") }, + { MODKEY, XK_bracketright, spawn, SHCMD("mpc seek +10") }, + { MODKEY|ShiftMask, XK_bracketright, spawn, SHCMD("mpc seek +60") }, + { MODKEY, XK_backslash, spawn, SHCMD("telegram-desktop") }, + /* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("") }, */ + + { MODKEY, XK_a, spawn, SHCMD(TERMINAL " -e amfora") }, + { MODKEY|ShiftMask, XK_a, defaultgaps, {0} }, + { MODKEY, XK_s, togglesticky, {0} }, + /* { MODKEY|ShiftMask, XK_s, spawn, SHCMD("") }, */ + { MODKEY, XK_d, spawn, {.v = dmenucmd } }, + /* { MODKEY, XK_d, spawn, SHCMD("") } }, */ + { MODKEY, XK_f, togglefullscr, {0} }, + { MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[8]} }, + { MODKEY, XK_g, shiftview, { .i = -1 } }, + { MODKEY|ShiftMask, XK_g, shifttag, { .i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + /* J and K are automatically bound above in STACKEYS */ + { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { MODKEY, XK_semicolon, shiftview, { .i = 1 } }, + { MODKEY|ShiftMask, XK_semicolon, shifttag, { .i = 1 } }, + { MODKEY, XK_apostrophe, togglescratch, {.ui = 1} }, + /* { MODKEY|ShiftMask, XK_apostrophe, spawn, SHCMD("") }, */ + { MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0} }, + + { MODKEY, XK_z, incrgaps, {.i = +3 } }, + /* { MODKEY|ShiftMask, XK_z, spawn, SHCMD("") }, */ + { MODKEY, XK_x, incrgaps, {.i = -3 } }, + /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("") }, */ + /* { MODKEY, XK_c, spawn, SHCMD("") }, */ + /* { MODKEY|ShiftMask, XK_c, spawn, SHCMD("") }, */ + /* V is automatically bound above in STACKKEYS */ + { MODKEY, XK_b, togglebar, {0} }, + /* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("") }, */ + { MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e nvim -c VimwikiIndex") }, + { MODKEY|ShiftMask, XK_n, spawn, SHCMD(TERMINAL " -e newsboat; pkill -RTMIN+6 dwmblocks") }, + { MODKEY, XK_m, spawn, SHCMD(TERMINAL " -e ncmpcpp") }, + { MODKEY|ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, + { MODKEY, XK_comma, spawn, SHCMD("mpc prev") }, + { MODKEY|ShiftMask, XK_comma, spawn, SHCMD("mpc seek 0%") }, + { MODKEY, XK_period, spawn, SHCMD("mpc next") }, + { MODKEY|ShiftMask, XK_period, spawn, SHCMD("mpc repeat") }, + + { MODKEY, XK_Left, focusmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } }, + { MODKEY, XK_Right, focusmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } }, + + { MODKEY, XK_Page_Up, shiftview, { .i = -1 } }, + { MODKEY|ShiftMask, XK_Page_Up, shifttag, { .i = -1 } }, + { MODKEY, XK_Page_Down, shiftview, { .i = +1 } }, + { MODKEY|ShiftMask, XK_Page_Down, shifttag, { .i = +1 } }, + { MODKEY, XK_Insert, spawn, SHCMD("xdotool type $(cat ~/.local/share/larbs/snippets | dmenu -i -l 50 | cut -d' ' -f1)") }, + + { MODKEY, XK_F1, spawn, SHCMD("groff -mom /usr/local/share/dwm/larbs.mom -Tpdf | zathura -") }, + { MODKEY, XK_F2, spawn, SHCMD("tutorialvids") }, + { MODKEY, XK_F3, spawn, SHCMD("displayselect") }, + { MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") }, + { MODKEY, XK_F5, xrdb, {.v = NULL } }, + { MODKEY, XK_F6, spawn, SHCMD("torwrap") }, + { MODKEY, XK_F7, spawn, SHCMD("td-toggle") }, + { MODKEY, XK_F8, spawn, SHCMD("mw -Y") }, + { MODKEY, XK_F9, spawn, SHCMD("dmenumount") }, + { MODKEY, XK_F10, spawn, SHCMD("dmenuumount") }, + { MODKEY, XK_F11, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") }, + { MODKEY, XK_F12, xrdb, {.v = NULL } }, + { MODKEY, XK_space, zoom, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + + { 0, XK_Print, spawn, SHCMD("maim pic-full-$(date '+%y%m%d-%H%M-%S').png") }, + { ShiftMask, XK_Print, spawn, SHCMD("maimpick") }, + { MODKEY, XK_Print, spawn, SHCMD("dmenurecord") }, + { MODKEY|ShiftMask, XK_Print, spawn, SHCMD("dmenurecord kill") }, + { MODKEY, XK_Delete, spawn, SHCMD("dmenurecord kill") }, + { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") }, + + { 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, + { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof dwmblocks)") }, + { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof dwmblocks)") }, + { 0, XF86XK_AudioPrev, spawn, SHCMD("playerctl previous") }, + { 0, XF86XK_AudioNext, spawn, SHCMD("playerctl next") }, + { 0, XF86XK_AudioPause, spawn, SHCMD("playerctl play-pause") }, + { 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause") }, + { 0, XF86XK_AudioStop, spawn, SHCMD("playerctl stop") }, + { 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") }, + { 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") }, + { 0, XF86XK_AudioMedia, spawn, SHCMD(TERMINAL " -e ncmpcpp") }, + { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") }, + { 0, XF86XK_PowerOff, spawn, SHCMD("sysact") }, + { 0, XF86XK_Calculator, spawn, SHCMD(TERMINAL " -e bc -l") }, + { 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") }, + { 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") }, + { 0, XF86XK_DOS, spawn, SHCMD(TERMINAL) }, + { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") }, + { 0, XF86XK_TaskPane, spawn, SHCMD(TERMINAL " -e htop") }, + { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") }, + { 0, XF86XK_MyComputer, spawn, SHCMD(TERMINAL " -e lf /") }, + /* { 0, XF86XK_Battery, spawn, SHCMD("") }, */ + { 0, XF86XK_Launch1, spawn, SHCMD("xset dpms force off") }, + { 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") }, + + /* { MODKEY|Mod4Mask, XK_h, incrgaps, {.i = +1 } }, */ + /* { MODKEY|Mod4Mask, XK_l, incrgaps, {.i = -1 } }, */ + /* { MODKEY|Mod4Mask|ShiftMask, XK_h, incrogaps, {.i = +1 } }, */ + /* { MODKEY|Mod4Mask|ShiftMask, XK_l, incrogaps, {.i = -1 } }, */ + /* { MODKEY|Mod4Mask|ControlMask, XK_h, incrigaps, {.i = +1 } }, */ + /* { MODKEY|Mod4Mask|ControlMask, XK_l, incrigaps, {.i = -1 } }, */ + /* { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} }, */ + /* { MODKEY, XK_y, incrihgaps, {.i = +1 } }, */ + /* { MODKEY, XK_o, incrihgaps, {.i = -1 } }, */ + /* { MODKEY|ControlMask, XK_y, incrivgaps, {.i = +1 } }, */ + /* { MODKEY|ControlMask, XK_o, incrivgaps, {.i = -1 } }, */ + /* { MODKEY|Mod4Mask, XK_y, incrohgaps, {.i = +1 } }, */ + /* { MODKEY|Mod4Mask, XK_o, incrohgaps, {.i = -1 } }, */ + /* { MODKEY|ShiftMask, XK_y, incrovgaps, {.i = +1 } }, */ + /* { MODKEY|ShiftMask, XK_o, incrovgaps, {.i = -1 } }, */ + +}; + +/* button definitions */ +/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ +static Button buttons[] = { + /* click event mask button function argument */ +#ifndef __OpenBSD__ + { ClkWinTitle, 0, Button2, zoom, {0} }, + { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} }, + { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} }, + { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} }, + { ClkStatusText, 0, Button4, sigdwmblocks, {.i = 4} }, + { ClkStatusText, 0, Button5, sigdwmblocks, {.i = 5} }, + { ClkStatusText, ShiftMask, Button1, sigdwmblocks, {.i = 6} }, +#endif + { ClkStatusText, ShiftMask, Button3, spawn, SHCMD(TERMINAL " -e nvim ~/.local/src/dwmblocks/config.h") }, + { ClkClientWin, MODKEY, Button1, movemouse, {0} }, + { ClkClientWin, MODKEY, Button2, defaultgaps, {0} }, + { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, + { ClkClientWin, MODKEY, Button4, incrgaps, {.i = +1} }, + { ClkClientWin, MODKEY, Button5, incrgaps, {.i = -1} }, + { ClkTagBar, 0, Button1, view, {0} }, + { ClkTagBar, 0, Button3, toggleview, {0} }, + { ClkTagBar, MODKEY, Button1, tag, {0} }, + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, + { ClkTagBar, 0, Button4, shiftview, {.i = -1} }, + { ClkTagBar, 0, Button5, shiftview, {.i = 1} }, + { ClkRootWin, 0, Button2, togglebar, {0} }, +}; diff --git a/platforms/linux/xorg/default.nix b/platforms/linux/xorg/default.nix index 06ccbac..34a1aea 100644 --- a/platforms/linux/xorg/default.nix +++ b/platforms/linux/xorg/default.nix @@ -16,11 +16,21 @@ let ]; header_config_file = ./config.h; }; + + todos = pkgs.writeScriptBin "todos" '' + #!${pkgs.stdenv.shell} + case $BLOCK_BUTTON in + 1) notify-send "Tasks" "\n$(todoist l | cut -d\ -f5- | sed 's/^/* /')" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + esac + + echo "✅$(todoist list | wc -l)" + ''; in { imports = [ ./dunst - }; + ]; home.packages = with pkgs; [ mpd @@ -29,7 +39,7 @@ in nur.repos.pn.dockd pndwmblocks pndwm - roboto-slab + todos ]; xsession = { diff --git a/platforms/linux/xorg/dunstrc b/platforms/linux/xorg/dunstrc new file mode 100644 index 0000000..c2bb8f8 --- /dev/null +++ b/platforms/linux/xorg/dunstrc @@ -0,0 +1,431 @@ +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectively. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "300x5-30+20" + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + idle_threshold = 120 + + ### Text ### + + font = Monospace 12 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # When word_wrap is set to no, specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 0 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 32 + + # Paths to default icons. + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = ctrl+space + + # Close all notifications. + close_all = ctrl+shift+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". Make sure this key actually exists on your keyboard layout, + # e.g. check output of 'xmodmap -pke' + history = ctrl+grave + + # Context menu. + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 10 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + background = "#285577" + foreground = "#ffffff" + timeout = 10 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# timeout +# urgency +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/platforms/linux/xorg/dwmblocks-todo.diff b/platforms/linux/xorg/dwmblocks-todo.diff new file mode 100644 index 0000000..8615cf8 --- /dev/null +++ b/platforms/linux/xorg/dwmblocks-todo.diff @@ -0,0 +1,12 @@ +diff --git a/config.h b/config.h +index cc9281b..7242149 100644 +--- a/config.h ++++ b/config.h +@@ -1,6 +1,7 @@ + //Modify this file to change what commands output to your statusbar, and recompile using the make command. + static const Block blocks[] = { + /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ ++ {"", "todos", 800, 19}, + {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9}, + /* {"", "music", 0, 11},*/ + {"", "pacpackages", 0, 8}, -- cgit 1.4.1