Patched DWM Flexipatch Build
- Wrote entire dwm-flexipatch build as org document - Moved README and README.md into README.org - Setup keybindings, colors, etc. for dwm-flexipatch
This commit is contained in:
4
Makefile
4
Makefile
@@ -42,6 +42,8 @@ endif
|
||||
clean:
|
||||
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
|
||||
rm -f dwm-msg
|
||||
rm -f config.h
|
||||
rm -f patches.h
|
||||
|
||||
dist: clean
|
||||
mkdir -p dwm-${VERSION}
|
||||
@@ -57,7 +59,7 @@ install: all
|
||||
ifdef YAJLLIBS
|
||||
cp -f dwm-msg ${DESTDIR}${PREFIX}/bin
|
||||
endif
|
||||
#cp -f patch/dwmc ${DESTDIR}${PREFIX}/bin
|
||||
cp -f patch/dwmc ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
|
||||
ifdef YAJLLIBS
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-msg
|
||||
|
48
README
48
README
@@ -1,48 +0,0 @@
|
||||
dwm - dynamic window manager
|
||||
============================
|
||||
dwm is an extremely fast, small, and dynamic window manager for X.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
In order to build dwm you need the Xlib header files.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
Edit config.mk to match your local setup (dwm is installed into
|
||||
the /usr/local namespace by default).
|
||||
|
||||
Afterwards enter the following command to build and install dwm (if
|
||||
necessary as root):
|
||||
|
||||
make clean install
|
||||
|
||||
|
||||
Running dwm
|
||||
-----------
|
||||
Add the following line to your .xinitrc to start dwm using startx:
|
||||
|
||||
exec dwm
|
||||
|
||||
In order to connect dwm to a specific display, make sure that
|
||||
the DISPLAY environment variable is set correctly, e.g.:
|
||||
|
||||
DISPLAY=foo.bar:1 exec dwm
|
||||
|
||||
(This will start dwm on display :1 of the host foo.bar.)
|
||||
|
||||
In order to display status info in the bar, you can do something
|
||||
like this in your .xinitrc:
|
||||
|
||||
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
|
||||
do
|
||||
sleep 1
|
||||
done &
|
||||
exec dwm
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
The configuration of dwm is done by creating a custom config.h
|
||||
and (re)compiling the source code.
|
6025
README.org
Normal file
6025
README.org
Normal file
File diff suppressed because it is too large
Load Diff
363
config.def.h
363
config.def.h
@@ -1,43 +1,49 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* appearance */
|
||||
#if ROUNDED_CORNERS_PATCH
|
||||
static const unsigned int borderpx = 0; /* border pixel of windows */
|
||||
static const int corner_radius = 10;
|
||||
#else
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||
#endif // ROUNDED_CORNERS_PATCH
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
|
||||
static const unsigned int snap = 10; /* snap pixel */
|
||||
|
||||
#if SWALLOW_PATCH
|
||||
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
|
||||
#endif // SWALLOW_PATCH
|
||||
|
||||
#if NO_MOD_BUTTONS_PATCH
|
||||
static int nomodbuttons = 1; /* allow client mouse button bindings that have no modifier */
|
||||
#endif // NO_MOD_BUTTONS_PATCH
|
||||
|
||||
#if VANITYGAPS_PATCH
|
||||
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 gappiv = 20; /* 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 const int smartgaps_fact = 1; /* gap factor when there is only one client; 0 = no gaps, 3 = 3x outer gaps */
|
||||
#endif // VANITYGAPS_PATCH
|
||||
|
||||
#if AUTOSTART_PATCH
|
||||
static const char autostartblocksh[] = "autostart_blocking.sh";
|
||||
static const char autostartsh[] = "autostart.sh";
|
||||
static const char dwmdir[] = "dwm";
|
||||
static const char localshare[] = ".local/share";
|
||||
#endif // AUTOSTART_PATCH
|
||||
|
||||
#if BAR_ANYBAR_PATCH
|
||||
static const int usealtbar = 1; /* 1 means use non-dwm status bar */
|
||||
static const char *altbarclass = "Polybar"; /* Alternate bar class name */
|
||||
static const char *altbarcmd = "$HOME/bar.sh"; /* Alternate bar launch command */
|
||||
static const char *altbarcmd = "/home/sravan/.config/dwm-flexipatch/polybar/launch.sh"; /* Alternate bar launch command */
|
||||
#endif // BAR_ANYBAR_PATCH
|
||||
|
||||
#if BAR_HOLDBAR_PATCH
|
||||
static const int showbar = 0; /* 0 means no bar */
|
||||
#else
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
#endif // BAR_HOLDBAR_PATCH
|
||||
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
|
||||
#if TAB_PATCH
|
||||
/* Display modes of the tab bar: never shown, always shown, shown only in */
|
||||
/* monocle mode in the presence of several windows. */
|
||||
@@ -46,24 +52,30 @@ enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always
|
||||
static const int showtab = showtab_auto; /* Default tab bar show mode */
|
||||
static const int toptab = False; /* False means bottom tab bar */
|
||||
#endif // TAB_PATCH
|
||||
|
||||
#if BAR_HEIGHT_PATCH
|
||||
static const int bar_height = 0; /* 0 means derive from font, >= 1 explicit height */
|
||||
#endif // BAR_HEIGHT_PATCH
|
||||
|
||||
#if BAR_PADDING_PATCH
|
||||
static const int vertpad = 10; /* vertical padding of bar */
|
||||
static const int sidepad = 10; /* horizontal padding of bar */
|
||||
#endif // BAR_PADDING_PATCH
|
||||
|
||||
#if BAR_WINICON_PATCH
|
||||
#define ICONSIZE 20 /* icon size */
|
||||
#define ICONSPACING 5 /* space between icon and title */
|
||||
#endif // BAR_WINICON_PATCH
|
||||
|
||||
#if FOCUSONCLICK_PATCH
|
||||
static const int focusonwheel = 0;
|
||||
#endif // FOCUSONCLICK_PATCH
|
||||
|
||||
#if FLOATPOS_PATCH
|
||||
static int floatposgrid_x = 5; /* float grid columns */
|
||||
static int floatposgrid_y = 5; /* float grid rows */
|
||||
#endif // FLOATPOS_PATCH
|
||||
|
||||
#if RIODRAW_PATCH
|
||||
static const char slopspawnstyle[] = "-t 0 -c 0.92,0.85,0.69,0.3 -o"; /* do NOT define -f (format) here */
|
||||
static const char slopresizestyle[] = "-t 0 -c 0.92,0.85,0.69,0.3"; /* do NOT define -f (format) here */
|
||||
@@ -72,31 +84,38 @@ static const int riodraw_borders = 0; /* 0 or 1, indicates whether the
|
||||
static const int riodraw_matchpid = 1; /* 0 or 1, indicates whether to match the PID of the client that was spawned with riospawn */
|
||||
#endif // SWALLOW_PATCH
|
||||
#endif // RIODRAW_PATCH
|
||||
|
||||
#if BAR_STATUSPADDING_PATCH
|
||||
static const int horizpadbar = 2; /* horizontal padding for statusbar */
|
||||
static const int vertpadbar = 0; /* vertical padding for statusbar */
|
||||
#endif // BAR_STATUSPADDING_PATCH
|
||||
|
||||
#if BAR_STATUSBUTTON_PATCH
|
||||
static const char buttonbar[] = "<O>";
|
||||
#endif // BAR_STATUSBUTTON_PATCH
|
||||
|
||||
#if BAR_SYSTRAY_PATCH
|
||||
static const unsigned int systrayspacing = 2; /* systray spacing */
|
||||
static const int showsystray = 1; /* 0 means no systray */
|
||||
#endif // BAR_SYSTRAY_PATCH
|
||||
/* Indicators: see patch/bar_indicators.h for options */
|
||||
|
||||
static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE;
|
||||
static int tiledindicatortype = INDICATOR_NONE;
|
||||
static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE;
|
||||
|
||||
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
|
||||
static int fakefsindicatortype = INDICATOR_PLUS;
|
||||
static int floatfakefsindicatortype = INDICATOR_PLUS_AND_LARGER_SQUARE;
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
|
||||
#if ONLYQUITONEMPTY_PATCH
|
||||
static const int quit_empty_window_count = 2; /* only allow dwm to quit if no windows are open, value here represents number of deamons */
|
||||
#endif // ONLYQUITONEMPTY_PATCH
|
||||
|
||||
#if BAR_EXTRASTATUS_PATCH
|
||||
static const char statussep = ';'; /* separator between status bars */
|
||||
#endif // BAR_EXTRASTATUS_PATCH
|
||||
|
||||
#if BAR_TABGROUPS_PATCH
|
||||
#if MONOCLE_LAYOUT
|
||||
static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
|
||||
@@ -104,26 +123,29 @@ static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
|
||||
static void (*bartabmonfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
|
||||
#endif // MONOCLE_LAYOUT
|
||||
#endif // BAR_TABGROUPS_PATCH
|
||||
|
||||
#if BAR_PANGO_PATCH
|
||||
static const char font[] = "monospace 10";
|
||||
#else
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
#endif // BAR_PANGO_PATCH
|
||||
|
||||
static const char dmenufont[] = "monospace:size=10";
|
||||
|
||||
static char c000000[] = "#000000"; // placeholder value
|
||||
|
||||
#if BAR_FLEXWINTITLE_PATCH
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
static char normfgcolor[] = "#bbbbbb";
|
||||
static char normbgcolor[] = "#222222";
|
||||
static char normbordercolor[] = "#444444";
|
||||
static char normfloatcolor[] = "#db8fd9";
|
||||
|
||||
static char selfgcolor[] = "#eeeeee";
|
||||
static char selbgcolor[] = "#005577";
|
||||
static char selbordercolor[] = "#005577";
|
||||
static char selfloatcolor[] = "#005577";
|
||||
static char normfgcolor[] = "#F8F8F2";
|
||||
static char normbgcolor[] = "#282A36";
|
||||
static char normbordercolor[] = "#4D4D4D";
|
||||
static char normfloatcolor[] = "#6272A4";
|
||||
|
||||
static char selfgcolor[] = "#282A36";
|
||||
static char selbgcolor[] = "#BD93F9";
|
||||
static char selbordercolor[] = "#BD93F9";
|
||||
static char selfloatcolor[] = "#FF79C6";
|
||||
|
||||
static char titlenormfgcolor[] = "#bbbbbb";
|
||||
static char titlenormbgcolor[] = "#222222";
|
||||
@@ -150,10 +172,10 @@ static char hidselfgcolor[] = "#227799";
|
||||
static char hidnormbgcolor[] = "#222222";
|
||||
static char hidselbgcolor[] = "#222222";
|
||||
|
||||
static char urgfgcolor[] = "#bbbbbb";
|
||||
static char urgbgcolor[] = "#222222";
|
||||
static char urgbordercolor[] = "#ff0000";
|
||||
static char urgfloatcolor[] = "#db8fd9";
|
||||
static char urgfgcolor[] = "#F8F8F2";
|
||||
static char urgbgcolor[] = "#282A36";
|
||||
static char urgbordercolor[] = "#FF5555";
|
||||
static char urgfloatcolor[] = "#FF5555";
|
||||
|
||||
#if BAR_FLEXWINTITLE_PATCH
|
||||
static char normTTBbgcolor[] = "#330000";
|
||||
@@ -242,6 +264,7 @@ static const unsigned int alphas[][3] = {
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
};
|
||||
#endif // BAR_ALPHA_PATCH
|
||||
|
||||
#if BAR_VTCOLORS_PATCH
|
||||
static const char title_bg_dark[] = "#303030";
|
||||
static const char title_bg_light[] = "#fdfdfd";
|
||||
@@ -341,35 +364,9 @@ static Sp scratchpads[] = {
|
||||
};
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
|
||||
/* Tags
|
||||
* In a traditional dwm the number of tags in use can be changed simply by changing the number
|
||||
* of strings in the tags array. This build does things a bit different which has some added
|
||||
* benefits. If you need to change the number of tags here then change the NUMTAGS macro in dwm.c.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* 1) static char *tagicons[][NUMTAGS*2] = {
|
||||
* [DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I" },
|
||||
* }
|
||||
*
|
||||
* 2) static char *tagicons[][1] = {
|
||||
* [DEFAULT_TAGS] = { "•" },
|
||||
* }
|
||||
*
|
||||
* The first example would result in the tags on the first monitor to be 1 through 9, while the
|
||||
* tags for the second monitor would be named A through I. A third monitor would start again at
|
||||
* 1 through 9 while the tags on a fourth monitor would also be named A through I. Note the tags
|
||||
* count of NUMTAGS*2 in the array initialiser which defines how many tag text / icon exists in
|
||||
* the array. This can be changed to *3 to add separate icons for a third monitor.
|
||||
*
|
||||
* For the second example each tag would be represented as a bullet point. Both cases work the
|
||||
* same from a technical standpoint - the icon index is derived from the tag index and the monitor
|
||||
* index. If the icon index is is greater than the number of tag icons then it will wrap around
|
||||
* until it an icon matches. Similarly if there are two tag icons then it would alternate between
|
||||
* them. This works seamlessly with alternative tags and alttagsdecoration patches.
|
||||
*/
|
||||
static char *tagicons[][NUMTAGS] = {
|
||||
[DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" },
|
||||
/* [DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, */
|
||||
[DEFAULT_TAGS] = { " ₁", "龎 ₂", " ₃", " ₄", "爵 ₅", " ₆", " ₇", " ₈", " ₉" },
|
||||
[ALTERNATIVE_TAGS] = { "A", "B", "C", "D", "E", "F", "G", "H", "I" },
|
||||
[ALT_TAGS_DECORATION] = { "<1>", "<2>", "<3>", "<4>", "<5>", "<6>", "<7>", "<8>", "<9>" },
|
||||
};
|
||||
@@ -388,37 +385,14 @@ static char *tagicons[][NUMTAGS] = {
|
||||
static const int tagrows = 2;
|
||||
#endif // BAR_TAGGRID_PATCH
|
||||
|
||||
/* There are two options when it comes to per-client rules:
|
||||
* - a typical struct table or
|
||||
* - using the RULE macro
|
||||
*
|
||||
* A traditional struct table looks like this:
|
||||
* // class instance title wintype tags mask isfloating monitor
|
||||
* { "Gimp", NULL, NULL, NULL, 1 << 4, 0, -1 },
|
||||
* { "Firefox", NULL, NULL, NULL, 1 << 7, 0, -1 },
|
||||
*
|
||||
* The RULE macro has the default values set for each field allowing you to only
|
||||
* specify the values that are relevant for your rule, e.g.
|
||||
*
|
||||
* RULE(.class = "Gimp", .tags = 1 << 4)
|
||||
* RULE(.class = "Firefox", .tags = 1 << 7)
|
||||
*
|
||||
* Refer to the Rule struct definition for the list of available fields depending on
|
||||
* the patches you enable.
|
||||
*/
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
* WM_WINDOW_ROLE(STRING) = role
|
||||
* _NET_WM_WINDOW_TYPE(ATOM) = wintype
|
||||
*/
|
||||
RULE(.wintype = WTYPE "DIALOG", .isfloating = 1)
|
||||
RULE(.wintype = WTYPE "UTILITY", .isfloating = 1)
|
||||
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
|
||||
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
|
||||
RULE(.class = "Gimp", .tags = 1 << 4)
|
||||
RULE(.class = "Firefox", .tags = 1 << 7)
|
||||
RULE(.title = "Origin", .isfloating = 1)
|
||||
#if SCRATCHPADS_PATCH
|
||||
RULE(.instance = "spterm", .tags = SPTAG(0), .isfloating = 1)
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
@@ -449,20 +423,9 @@ static const Inset default_inset = {
|
||||
};
|
||||
#endif // INSETS_PATCH
|
||||
|
||||
/* Bar rules allow you to configure what is shown where on the bar, as well as
|
||||
* introducing your own bar modules.
|
||||
*
|
||||
* monitor:
|
||||
* -1 show on all monitors
|
||||
* 0 show on monitor 0
|
||||
* 'A' show on active monitor (i.e. focused / selected) (or just -1 for active?)
|
||||
* bar - bar index, 0 is default, 1 is extrabar
|
||||
* alignment - how the module is aligned compared to other modules
|
||||
* widthfunc, drawfunc, clickfunc - providing bar module width, draw and click functions
|
||||
* name - does nothing, intended for visual clue and for logging / debugging
|
||||
*/
|
||||
static const BarRule barrules[] = {
|
||||
/* monitor bar alignment widthfunc drawfunc clickfunc name */
|
||||
{ -2 },
|
||||
#if BAR_STATUSBUTTON_PATCH
|
||||
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, "statusbutton" },
|
||||
#endif // BAR_STATUSBUTTON_PATCH
|
||||
@@ -537,13 +500,15 @@ static const BarRule barrules[] = {
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
||||
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
|
||||
static const int nmaster = 1; /* number of clients in master area */
|
||||
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
static const int nstack = 0; /* number of clients in primary stack area */
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
|
||||
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
|
||||
|
||||
#if DECORATION_HINTS_PATCH
|
||||
static const int decorhints = 1; /* 1 means respect decoration hints */
|
||||
#endif // DECORATION_HINTS_PATCH
|
||||
@@ -688,32 +653,32 @@ static const char *xkb_layouts[] = {
|
||||
};
|
||||
#endif // XKB_PATCH
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod1Mask
|
||||
#define MODKEY Mod4Mask
|
||||
|
||||
#if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
#elif COMBO_PATCH && SWAPTAGS_PATCH
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
|
||||
#elif COMBO_PATCH && TAGOTHERMONITOR_PATCH
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
#elif COMBO_PATCH
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
|
||||
@@ -726,24 +691,24 @@ static const char *xkb_layouts[] = {
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
#elif SWAPTAGS_PATCH
|
||||
#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} }, \
|
||||
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
|
||||
#elif TAGOTHERMONITOR_PATCH
|
||||
#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} }, \
|
||||
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
|
||||
#else
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
@@ -770,10 +735,10 @@ static const char *xkb_layouts[] = {
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
/* commands */
|
||||
#if !NODMENU_PATCH
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
#endif // NODMENU_PATCH
|
||||
|
||||
static const char *dmenucmd[] = {
|
||||
"dmenu_run",
|
||||
#if !NODMENU_PATCH
|
||||
@@ -789,7 +754,24 @@ static const char *dmenucmd[] = {
|
||||
#endif // BAR_DMENUMATCHTOP_PATCH
|
||||
NULL
|
||||
};
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *termcmd[] = { "alacritty", NULL };
|
||||
static const char *roficmd[] = { "rofi", "-show", "combi", NULL };
|
||||
static const char *controlcentercmd[] = { "/home/sravan/.scripts/control-center.sh", "--rofi", NULL };
|
||||
static const char *clipboardcmd[] = { "rofi", "-show", "clipboard", NULL };
|
||||
static const char *rbwcmd[] = { "rofi-rbw", NULL };
|
||||
static const char *volumecmd[] = { "/home/sravan/.scripts/pactl.sh", "--rofi", NULL };
|
||||
static const char *mediacmd[] = { "/home/sravan/.scripts/playerctl.sh", "--rofi", NULL };
|
||||
static const char *notificationcmd[] = { "/home/sravan/.scripts/dunst.sh", "--rofi", NULL };
|
||||
static const char *sessioncmd[] = { "/home/sravan/.scripts/session.sh", "--rofi", NULL };
|
||||
static const char *compositorcmd[] = { "/home/sravan/.scripts/picom.sh", "--rofi", NULL };
|
||||
static const char *lowervolumecmd[] = { "/home/sravan/.scripts/pactl.sh", "--lower", NULL };
|
||||
static const char *mutevolumecmd[] = { "/home/sravan/.scripts/pactl.sh", "--mute", NULL };
|
||||
static const char *raisevolumecmd[] = { "/home/sravan/.scripts/pactl.sh", "--raise", NULL };
|
||||
static const char *playerplaypausecmd[] = { "/home/sravan/.scripts/playerctl.sh", "--play-pause", NULL };
|
||||
static const char *playernextcmd[] = { "/home/sravan/.scripts/playerctl.sh", "--next", NULL };
|
||||
static const char *playerprevcmd[] = { "/home/sravan/.scripts/playerctl.sh", "--prev", NULL };
|
||||
static const char *flameshotcmd[] = { "flameshot", "gui", NULL };
|
||||
static const char *forceclosewindowcmd[] = { "xkill", NULL };
|
||||
|
||||
#if BAR_STATUSCMD_PATCH
|
||||
#if BAR_DWMBLOCKS_PATCH
|
||||
@@ -815,25 +797,48 @@ static Key on_empty_keys[] = {
|
||||
};
|
||||
#endif // ON_EMPTY_KEYS_PATCH
|
||||
|
||||
#include <X11/XF86keysym.h>
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
#if KEYMODES_PATCH
|
||||
{ MODKEY, XK_Escape, setkeymode, {.ui = COMMANDMODE} },
|
||||
#endif // KEYMODES_PATCH
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
|
||||
{ MODKEY, XK_p, spawn, {.v = roficmd } },
|
||||
{ MODKEY|ControlMask, XK_p, spawn, {.v = controlcentercmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY|ControlMask, XK_c, spawn, {.v = clipboardcmd} },
|
||||
{ MODKEY|ControlMask, XK_b, spawn, {.v = rbwcmd} },
|
||||
{ MODKEY|ControlMask, XK_v, spawn, {.v = volumecmd} },
|
||||
{ MODKEY|ControlMask, XK_m, spawn, {.v = mediacmd} },
|
||||
{ MODKEY|ControlMask, XK_n, spawn, {.v = notificationcmd} },
|
||||
{ MODKEY|ControlMask, XK_q, spawn, {.v = sessioncmd} },
|
||||
{ MODKEY|ControlMask, XK_Escape, spawn, {.v = compositorcmd} },
|
||||
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = lowervolumecmd} },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutevolumecmd} },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = raisevolumecmd} },
|
||||
{ 0, XF86XK_AudioPlay, spawn, {.v = playerplaypausecmd} },
|
||||
{ 0, XF86XK_AudioNext, spawn, {.v = playernextcmd} },
|
||||
{ 0, XF86XK_AudioPrev, spawn, {.v = playerprevcmd} },
|
||||
{ 0, XK_Print, spawn, {.v = flameshotcmd} },
|
||||
|
||||
#if RIODRAW_PATCH
|
||||
{ MODKEY|ControlMask, XK_p, riospawnsync, {.v = dmenucmd } },
|
||||
{ MODKEY|ControlMask, XK_Return, riospawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_s, rioresize, {0} },
|
||||
#endif // RIODRAW_PATCH
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
|
||||
{ MODKEY, XK_s, togglebar, {0} },
|
||||
|
||||
#if TAB_PATCH
|
||||
{ MODKEY|ControlMask, XK_b, tabmode, {-1} },
|
||||
#endif // TAB_PATCH
|
||||
|
||||
#if FOCUSMASTER_PATCH
|
||||
{ MODKEY|ControlMask, XK_space, focusmaster, {0} },
|
||||
#endif // FOCUSMASTER_PATCH
|
||||
|
||||
#if STACKER_PATCH
|
||||
STACKKEYS(MODKEY, focus)
|
||||
STACKKEYS(MODKEY|ShiftMask, push)
|
||||
@@ -841,138 +846,174 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
#endif // STACKER_PATCH
|
||||
|
||||
#if FOCUSDIR_PATCH
|
||||
{ MODKEY, XK_Left, focusdir, {.i = 0 } }, // left
|
||||
{ MODKEY, XK_Right, focusdir, {.i = 1 } }, // right
|
||||
{ MODKEY, XK_Up, focusdir, {.i = 2 } }, // up
|
||||
{ MODKEY, XK_Down, focusdir, {.i = 3 } }, // down
|
||||
#endif // FOCUSDIR_PATCH
|
||||
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
{ MODKEY, XK_s, swapfocus, {.i = -1 } },
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
|
||||
#if SWITCHCOL_PATCH
|
||||
{ MODKEY, XK_v, switchcol, {0} },
|
||||
#endif // SWITCHCOL_PATCH
|
||||
|
||||
#if ROTATESTACK_PATCH
|
||||
{ MODKEY|Mod4Mask, XK_j, rotatestack, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask, XK_k, rotatestack, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_j, rotatestack, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask, XK_k, rotatestack, {.i = -1 } },
|
||||
#endif // ROTATESTACK_PATCH
|
||||
|
||||
#if INPLACEROTATE_PATCH
|
||||
{ MODKEY|Mod4Mask, XK_j, inplacerotate, {.i = +2 } }, // same as rotatestack
|
||||
{ MODKEY|Mod4Mask, XK_k, inplacerotate, {.i = -2 } }, // same as reotatestack
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_j, inplacerotate, {.i = +1} },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_k, inplacerotate, {.i = -1} },
|
||||
{ MODKEY|Mod1Mask, XK_j, inplacerotate, {.i = +2 } }, // same as rotatestack
|
||||
{ MODKEY|Mod1Mask, XK_k, inplacerotate, {.i = -2 } }, // same as reotatestack
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_j, inplacerotate, {.i = +1} },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_k, inplacerotate, {.i = -1} },
|
||||
#endif // INPLACEROTATE_PATCH
|
||||
|
||||
#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
|
||||
{ MODKEY|ControlMask, XK_j, pushdown, {0} },
|
||||
{ MODKEY|ControlMask, XK_k, pushup, {0} },
|
||||
#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
|
||||
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
{ MODKEY|ControlMask, XK_i, incnstack, {.i = +1 } },
|
||||
{ MODKEY|ControlMask, XK_u, incnstack, {.i = -1 } },
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
|
||||
#if CFACTS_PATCH
|
||||
{ MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} },
|
||||
{ MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} },
|
||||
{ MODKEY|ShiftMask, XK_o, setcfact, {0} },
|
||||
#endif // CFACTS_PATCH
|
||||
|
||||
#if ASPECTRESIZE_PATCH
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_e, aspectresize, {.i = +24} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_r, aspectresize, {.i = -24} },
|
||||
#endif // ASPECTRESIZE_PATCH
|
||||
|
||||
#if MOVERESIZE_PATCH
|
||||
{ MODKEY|Mod4Mask, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } },
|
||||
{ MODKEY|Mod4Mask, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } },
|
||||
{ MODKEY|Mod4Mask, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } },
|
||||
{ MODKEY|Mod4Mask, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
|
||||
{ MODKEY|Mod1Mask, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } },
|
||||
{ MODKEY|Mod1Mask, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } },
|
||||
{ MODKEY|Mod1Mask, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } },
|
||||
{ MODKEY|Mod1Mask, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
|
||||
#endif // MOVERESIZE_PATCH
|
||||
|
||||
#if MOVESTACK_PATCH
|
||||
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||
#endif // MOVESTACK_PATCH
|
||||
|
||||
#if TRANSFER_PATCH
|
||||
{ MODKEY, XK_x, transfer, {0} },
|
||||
#endif // TRANSFER_PATCH
|
||||
|
||||
#if TRANSFER_ALL_PATCH
|
||||
{ MODKEY|ControlMask, XK_x, transferall, {0} },
|
||||
#endif // TRANSFER_ALL_PATCH
|
||||
|
||||
#if REORGANIZETAGS_PATCH
|
||||
{ MODKEY|ControlMask, XK_r, reorganizetags, {0} },
|
||||
#endif // REORGANIZETAGS_PATCH
|
||||
|
||||
#if DISTRIBUTETAGS_PATCH
|
||||
{ MODKEY|ControlMask, XK_d, distributetags, {0} },
|
||||
#endif // DISTRIBUTETAGS_PATCH
|
||||
|
||||
#if INSETS_PATCH
|
||||
{ MODKEY|ShiftMask|ControlMask, XK_a, updateinset, {.v = &default_inset } },
|
||||
#endif // INSETS_PATCH
|
||||
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
#if VANITYGAPS_PATCH
|
||||
{ MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_i, incrigaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_o, incrogaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_6, incrihgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_7, incrivgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_8, incrohgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_9, incrovgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_0, togglegaps, {0} },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} },
|
||||
{ MODKEY|Mod1Mask, XK_u, incrgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_i, incrigaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_o, incrogaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_6, incrihgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_7, incrivgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_8, incrohgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_9, incrovgaps, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_0, togglegaps, {0} },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_0, defaultgaps, {0} },
|
||||
#endif // VANITYGAPS_PATCH
|
||||
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
|
||||
#if SHIFTVIEW_PATCH
|
||||
{ MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
|
||||
#endif // SHIFTVIEW_PATCH
|
||||
|
||||
#if SHIFTVIEW_CLIENTS_PATCH
|
||||
{ MODKEY|Mod4Mask, XK_Tab, shiftviewclients, { .i = -1 } },
|
||||
{ MODKEY|Mod4Mask, XK_backslash, shiftviewclients, { .i = +1 } },
|
||||
{ MODKEY|Mod1Mask, XK_Tab, shiftviewclients, { .i = -1 } },
|
||||
{ MODKEY|Mod1Mask, XK_backslash, shiftviewclients, { .i = +1 } },
|
||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||
|
||||
#if BAR_WINTITLEACTIONS_PATCH
|
||||
{ MODKEY|ControlMask, XK_z, showhideclient, {0} },
|
||||
#endif // BAR_WINTITLEACTIONS_PATCH
|
||||
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_c, spawn, {.v = forceclosewindowcmd} },
|
||||
|
||||
#if KILLUNSEL_PATCH
|
||||
{ MODKEY|ShiftMask, XK_x, killunsel, {0} },
|
||||
#endif // KILLUNSEL_PATCH
|
||||
|
||||
#if SELFRESTART_PATCH
|
||||
{ MODKEY|ShiftMask, XK_r, self_restart, {0} },
|
||||
#endif // SELFRESTART_PATCH
|
||||
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
|
||||
#if RESTARTSIG_PATCH
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
|
||||
#endif // RESTARTSIG_PATCH
|
||||
|
||||
#if FOCUSURGENT_PATCH
|
||||
{ MODKEY, XK_u, focusurgent, {0} },
|
||||
#endif // FOCUSURGENT_PATCH
|
||||
|
||||
#if BAR_HOLDBAR_PATCH
|
||||
{ 0, HOLDKEY, holdbar, {0} },
|
||||
#endif // BAR_HOLDBAR_PATCH
|
||||
|
||||
#if WINVIEW_PATCH
|
||||
{ MODKEY, XK_o, winview, {0} },
|
||||
#endif // WINVIEW_PATCH
|
||||
|
||||
#if XRDB_PATCH && !BAR_VTCOLORS_PATCH
|
||||
{ MODKEY|ShiftMask, XK_F5, xrdb, {.v = NULL } },
|
||||
#endif // XRDB_PATCH
|
||||
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
|
||||
#if COLUMNS_LAYOUT
|
||||
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
|
||||
#endif // COLUMNS_LAYOUT
|
||||
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
{ MODKEY|ControlMask, XK_t, rotatelayoutaxis, {.i = +1 } }, /* flextile, 1 = layout axis */
|
||||
{ MODKEY|ControlMask, XK_Tab, rotatelayoutaxis, {.i = +2 } }, /* flextile, 2 = master axis */
|
||||
@@ -984,8 +1025,10 @@ static Key keys[] = {
|
||||
{ MODKEY|Mod5Mask|Mod1Mask, XK_Tab, rotatelayoutaxis, {.i = -4 } }, /* flextile, 4 = secondary stack axis */
|
||||
{ MODKEY|ControlMask, XK_Return, mirrorlayout, {0} }, /* flextile, flip master and stack areas */
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
|
||||
#if MAXIMIZE_PATCH
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_h, togglehorizontalmax, {0} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_l, togglehorizontalmax, {0} },
|
||||
@@ -993,30 +1036,39 @@ static Key keys[] = {
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_k, toggleverticalmax, {0} },
|
||||
{ MODKEY|ControlMask, XK_m, togglemax, {0} },
|
||||
#endif // MAXIMIZE_PATCH
|
||||
|
||||
#if NO_MOD_BUTTONS_PATCH
|
||||
{ MODKEY|ShiftMask, XK_Escape, togglenomodbuttons, {0} },
|
||||
#endif // NO_MOD_BUTTONS_PATCH
|
||||
|
||||
#if SCRATCHPADS_PATCH
|
||||
{ MODKEY, XK_grave, togglescratch, {.ui = 0 } },
|
||||
{ MODKEY|ControlMask, XK_grave, setscratch, {.ui = 0 } },
|
||||
{ MODKEY|ShiftMask, XK_grave, removescratch, {.ui = 0 } },
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
{ MODKEY|Mod4Mask, XK_space, unfloatvisible, {0} },
|
||||
{ MODKEY|Mod1Mask, XK_space, unfloatvisible, {0} },
|
||||
{ MODKEY|ShiftMask, XK_t, unfloatvisible, {.v = &layouts[0]} },
|
||||
{ MODKEY|ShiftMask, XK_m, unfloatvisible, {.v = &layouts[2]} },
|
||||
#endif // UNFLOATVISIBLE_PATCH
|
||||
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
{ MODKEY, XK_y, togglefullscreen, {0} },
|
||||
{ MODKEY|ShiftMask, XK_f, togglefullscreen, {0} },
|
||||
#endif // TOGGLEFULLSCREEN_PATCH
|
||||
|
||||
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
{ MODKEY|ShiftMask, XK_y, togglefakefullscreen, {0} },
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
|
||||
#if FULLSCREEN_PATCH
|
||||
{ MODKEY|ShiftMask, XK_f, fullscreen, {0} },
|
||||
#endif // FULLSCREEN_PATCH
|
||||
|
||||
#if STICKY_PATCH
|
||||
{ MODKEY|ShiftMask, XK_s, togglesticky, {0} },
|
||||
#endif // STICKY_PATCH
|
||||
|
||||
#if SCRATCHPAD_ALT_1_PATCH
|
||||
{ MODKEY, XK_minus, scratchpad_show, {0} },
|
||||
{ MODKEY|ShiftMask, XK_minus, scratchpad_hide, {0} },
|
||||
@@ -1028,10 +1080,12 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
#endif // SCRATCHPAD_ALT_1_PATCH
|
||||
|
||||
{ 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 } },
|
||||
|
||||
#if FOCUSADJACENTTAG_PATCH
|
||||
{ MODKEY, XK_Left, viewtoleft, {0} }, // note keybinding conflict with focusdir
|
||||
{ MODKEY, XK_Right, viewtoright, {0} }, // note keybinding conflict with focusdir
|
||||
@@ -1040,6 +1094,7 @@ static Key keys[] = {
|
||||
{ MODKEY|ControlMask, XK_Left, tagandviewtoleft, {0} },
|
||||
{ MODKEY|ControlMask, XK_Right, tagandviewtoright, {0} },
|
||||
#endif // FOCUSADJACENTTAG_PATCH
|
||||
|
||||
#if TAGALL_PATCH
|
||||
{ MODKEY|ShiftMask, XK_F1, tagall, {.v = "F1"} },
|
||||
{ MODKEY|ShiftMask, XK_F2, tagall, {.v = "F2"} },
|
||||
@@ -1060,27 +1115,32 @@ static Key keys[] = {
|
||||
{ MODKEY|ControlMask, XK_F8, tagall, {.v = "8"} },
|
||||
{ MODKEY|ControlMask, XK_F9, tagall, {.v = "9"} },
|
||||
#endif // TAGALL_PATCH
|
||||
|
||||
#if TAGALLMON_PATCH
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_comma, tagallmon, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_period, tagallmon, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_comma, tagallmon, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_period, tagallmon, {.i = -1 } },
|
||||
#endif // TAGALLMON_PATCH
|
||||
|
||||
#if TAGSWAPMON_PATCH
|
||||
{ MODKEY|Mod4Mask|ControlMask, XK_comma, tagswapmon, {.i = +1 } },
|
||||
{ MODKEY|Mod4Mask|ControlMask, XK_period, tagswapmon, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask|ControlMask, XK_comma, tagswapmon, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask|ControlMask, XK_period, tagswapmon, {.i = -1 } },
|
||||
#endif // TAGSWAPMON_PATCH
|
||||
|
||||
#if BAR_ALTERNATIVE_TAGS_PATCH
|
||||
{ MODKEY, XK_n, togglealttag, {0} },
|
||||
#endif // BAR_ALTERNATIVE_TAGS_PATCH
|
||||
|
||||
#if BAR_TAGGRID_PATCH
|
||||
{ MODKEY|ControlMask, XK_Up, switchtag, { .ui = SWITCHTAG_UP | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|ControlMask, XK_Down, switchtag, { .ui = SWITCHTAG_DOWN | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|ControlMask, XK_Right, switchtag, { .ui = SWITCHTAG_RIGHT | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|ControlMask, XK_Left, switchtag, { .ui = SWITCHTAG_LEFT | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod4Mask, XK_Up, switchtag, { .ui = SWITCHTAG_UP | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod4Mask, XK_Down, switchtag, { .ui = SWITCHTAG_DOWN | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod4Mask, XK_Right, switchtag, { .ui = SWITCHTAG_RIGHT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod4Mask, XK_Left, switchtag, { .ui = SWITCHTAG_LEFT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod1Mask, XK_Up, switchtag, { .ui = SWITCHTAG_UP | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod1Mask, XK_Down, switchtag, { .ui = SWITCHTAG_DOWN | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod1Mask, XK_Right, switchtag, { .ui = SWITCHTAG_RIGHT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
{ MODKEY|Mod1Mask, XK_Left, switchtag, { .ui = SWITCHTAG_LEFT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
|
||||
#endif // BAR_TAGGRID_PATCH
|
||||
|
||||
#if MOVEPLACE_PATCH
|
||||
{ MODKEY, XK_KP_7, moveplace, {.ui = WIN_NW }}, /* XK_KP_Home, */
|
||||
{ MODKEY, XK_KP_8, moveplace, {.ui = WIN_N }}, /* XK_KP_Up, */
|
||||
@@ -1092,6 +1152,7 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_KP_2, moveplace, {.ui = WIN_S }}, /* XK_KP_Down, */
|
||||
{ MODKEY, XK_KP_3, moveplace, {.ui = WIN_SE }}, /* XK_KP_Next, */
|
||||
#endif // MOVEPLACE_PATCH
|
||||
|
||||
#if EXRESIZE_PATCH
|
||||
{ MODKEY, XK_KP_7, explace, {.ui = EX_NW }}, /* XK_KP_Home, */
|
||||
{ MODKEY, XK_KP_8, explace, {.ui = EX_N }}, /* XK_KP_Up, */
|
||||
@@ -1102,14 +1163,12 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_KP_1, explace, {.ui = EX_SW }}, /* XK_KP_End, */
|
||||
{ MODKEY, XK_KP_2, explace, {.ui = EX_S }}, /* XK_KP_Down, */
|
||||
{ MODKEY, XK_KP_3, explace, {.ui = EX_SE }}, /* XK_KP_Next, */
|
||||
|
||||
{ MODKEY|ShiftMask, XK_KP_8, exresize, {.v = (int []){ 0, 25 }}}, /* XK_KP_Up, */
|
||||
{ MODKEY|ShiftMask, XK_KP_2, exresize, {.v = (int []){ 0, -25 }}}, /* XK_KP_Down, */
|
||||
{ MODKEY|ShiftMask, XK_KP_6, exresize, {.v = (int []){ 25, 0 }}}, /* XK_KP_Right, */
|
||||
{ MODKEY|ShiftMask, XK_KP_4, exresize, {.v = (int []){ -25, 0 }}}, /* XK_KP_Left, */
|
||||
{ MODKEY|ShiftMask, XK_KP_5, exresize, {.v = (int []){ 25, 25 }}}, /* XK_KP_Begin, */
|
||||
{ MODKEY|ShiftMask|ControlMask, XK_KP_5, exresize, {.v = (int []){ -25, -25 }}}, /* XK_KP_Begin, */
|
||||
|
||||
{ MODKEY|ControlMask, XK_KP_6, togglehorizontalexpand, {.i = +1} }, /* XK_KP_Right, */
|
||||
{ MODKEY|ControlMask, XK_KP_3, togglehorizontalexpand, {.i = 0} }, /* XK_KP_Next, */
|
||||
{ MODKEY|ControlMask, XK_KP_4, togglehorizontalexpand, {.i = -1} }, /* XK_KP_Left, */
|
||||
@@ -1120,6 +1179,7 @@ static Key keys[] = {
|
||||
{ MODKEY|ControlMask, XK_KP_7, togglemaximize, {.i = +1} }, /* XK_KP_Home, */
|
||||
{ MODKEY|ControlMask, XK_KP_5, togglemaximize, {.i = 0} }, /* XK_KP_Begin, */
|
||||
#endif // EXRESIZE_PATCH
|
||||
|
||||
#if FLOATPOS_PATCH
|
||||
/* Note that due to key limitations the below example kybindings are defined with a Mod3Mask,
|
||||
* which is not always readily available. Refer to the patch wiki for more details. */
|
||||
@@ -1162,20 +1222,24 @@ static Key keys[] = {
|
||||
{ Mod3Mask|Mod1Mask, XK_comma, floatpos, {.v = " 0p 1p" } }, // ↓
|
||||
{ Mod3Mask|Mod1Mask, XK_period, floatpos, {.v = " 1p 1p" } }, // ↘
|
||||
#endif // FLOATPOS_PATCH
|
||||
|
||||
#if SETBORDERPX_PATCH
|
||||
{ MODKEY|ControlMask, XK_minus, setborderpx, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_plus, setborderpx, {.i = +1 } },
|
||||
{ MODKEY|ControlMask, XK_numbersign, setborderpx, {.i = 0 } },
|
||||
#endif // SETBORDERPX_PATCH
|
||||
|
||||
#if CYCLELAYOUTS_PATCH
|
||||
{ MODKEY|ControlMask, XK_comma, cyclelayout, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_period, cyclelayout, {.i = +1 } },
|
||||
#endif // CYCLELAYOUTS_PATCH
|
||||
|
||||
#if MPDCONTROL_PATCH
|
||||
{ MODKEY, XK_F1, mpdchange, {.i = -1} },
|
||||
{ MODKEY, XK_F2, mpdchange, {.i = +1} },
|
||||
{ MODKEY, XK_Escape, mpdcontrol, {0} },
|
||||
#endif // MPDCONTROL_PATCH
|
||||
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
@@ -1619,4 +1683,3 @@ static IPCCommand ipccommands[] = {
|
||||
#endif // XRDB_PATCH
|
||||
};
|
||||
#endif // IPC_PATCH
|
||||
|
||||
|
@@ -39,14 +39,14 @@ FREETYPEINC = /usr/include/freetype2
|
||||
#PANGOLIB = `pkg-config --libs xft pango pangoxft`
|
||||
|
||||
# Uncomment for the ipc patch / IPC_PATCH
|
||||
#YAJLLIBS = -lyajl
|
||||
#YAJLINC = -I/usr/include/yajl
|
||||
YAJLLIBS = -lyajl
|
||||
YAJLINC = -I/usr/include/yajl
|
||||
|
||||
# Uncomment this for the rounded corners patch / ROUNDED_CORNERS_PATCH
|
||||
#XEXTLIB = -lXext
|
||||
|
||||
# Uncomment this for the swallow patch / SWALLOW_PATCH
|
||||
#XCBLIBS = -lX11-xcb -lxcb -lxcb-res
|
||||
XCBLIBS = -lX11-xcb -lxcb -lxcb-res
|
||||
|
||||
# This is needed for the winicon patch / BAR_WINICON_PATCH
|
||||
#IMLIB2LIBS = -lImlib2
|
||||
|
1001
patches.def.h
1001
patches.def.h
File diff suppressed because it is too large
Load Diff
791
polybar/config.ini
Normal file
791
polybar/config.ini
Normal file
@@ -0,0 +1,791 @@
|
||||
[colors]
|
||||
dark-gray = ${xrdb:background:#282A36}
|
||||
light-gray = ${xrdb:color8:#4D4D4D}
|
||||
lighter-gray = ${xrdb:color7:#BFBFBF}
|
||||
white = ${xrdb:foreground:#F8F8F2}
|
||||
purple = ${xrdb:color4:#BD93F9}
|
||||
blue = ${xrdb:color6:#8BE9FD}
|
||||
red = ${xrdb:color1:#FF5555}
|
||||
pink = ${xrdb:color5:#FF79C6}
|
||||
yellow = ${xrdb:color3:#F1FA8C}
|
||||
green = ${xrdb:color2:#50FA7B}
|
||||
orange = ${xrdb:color16:#FFB86C}
|
||||
|
||||
background = ${self.dark-gray}
|
||||
background-alt = ${self.light-gray}
|
||||
foreground = ${self.white}
|
||||
foreground-alt = ${self.lighter-gray}
|
||||
primary = ${self.purple}
|
||||
secondary = ${self.blue}
|
||||
alert = ${self.red}
|
||||
|
||||
; left
|
||||
powermenu = ${self.blue}
|
||||
|
||||
dwm-focused-foreground = ${self.background}
|
||||
dwm-focused-background = ${self.primary}
|
||||
dwm-unfocused-foreground = ${self.background}
|
||||
dwm-unfocused-background = ${self.pink}
|
||||
dwm-visible-foreground = ${self.background}
|
||||
dwm-visible-background = ${self.secondary}
|
||||
dwm-urgent-foreground = ${self.foreground}
|
||||
dwm-urgent-background = ${self.alert}
|
||||
dwm-empty-foreground = ${self.foreground}
|
||||
dwm-empty-background = ${self.background}
|
||||
|
||||
media-playing = ${self.green}
|
||||
|
||||
; center
|
||||
date = ${self.blue}
|
||||
time = ${self.yellow}
|
||||
|
||||
; right
|
||||
kernel = ${self.purple}
|
||||
cpu = ${self.yellow}
|
||||
memory = ${self.pink}
|
||||
filesystem = ${self.blue}
|
||||
dunst-notification-status = ${self.red}
|
||||
|
||||
[sizes]
|
||||
bar-height = ${xrdb:polybar.bar-height:25}
|
||||
module-margin = ${xrdb:polybar.module-margin:2}
|
||||
module-padding = ${xrdb:polybar.module-padding:2}
|
||||
tray-maxsize = ${xrdb:polybar.tray-maxsize:15}
|
||||
tray-scale = ${xrdb:polybar.tray-scale:1}
|
||||
maxlen = ${xrdb:polybar.maxlen:50}
|
||||
|
||||
[intervals]
|
||||
cpu = 1
|
||||
date = 1
|
||||
time = 1
|
||||
filesystem = 900
|
||||
memory = 1
|
||||
media-playing = 1
|
||||
dunst-notification-status = 1
|
||||
kernel = 86400
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
[bar/mybar]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
; If no monitor is given, the primary monitor is used if it exists
|
||||
monitor = ${env:MONITOR}
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
; monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Use fuzzy matching for monitors (only ignores dashes -)
|
||||
; Useful when monitors are named differently with different drivers.
|
||||
monitor-exact = true
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
; Note: With this most WMs will no longer reserve space for
|
||||
; the bar and it will overlap other windows. You need to configure
|
||||
; your WM to add a gap where the bar will be placed.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = false
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block.
|
||||
; The center block will stay in the middle of the bar whenever
|
||||
; possible. It can still be pushed around if other blocks need
|
||||
; more space.
|
||||
; When false, the center block is centered in the space between
|
||||
; the left and right block.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 100%
|
||||
height = ${sizes.bar-height}
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${colors.background}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
; background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded. For this to work you may also need to enable
|
||||
; pseudo-transparency or use a compositor like compton.
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
line-size = 0
|
||||
line-color = #f00
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed within this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
; border-size can be defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in 50% minus 10 pixels. The percentage is relative
|
||||
; to the monitor width or height depending on the border direction.
|
||||
; border-size =
|
||||
; border-color =
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding-right = ${self.module-margin}
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin = ${sizes.module-margin}
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
font-0 = "NotoSans Nerd Font:size=11;3"
|
||||
font-1 = "FiraCode Nerd Font:size=11;3"
|
||||
font-2 = "Droid Sans Mono:size=11;3"
|
||||
font-3 = "IPAPGothic:size=11;3"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
modules-left = powermenu dwm media-playing
|
||||
modules-center = date time
|
||||
modules-right = kernel cpu memory filesystem dunst-notification-status
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator = " "
|
||||
|
||||
; This value is used to add extra spacing between elements
|
||||
; @deprecated: This parameter will be removed in an upcoming version
|
||||
; spacing = 0
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
; wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale = en_US.utf8
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = ${env:TRAY_POS}
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = ${sizes.tray-maxsize}
|
||||
|
||||
; DEPRECATED! Since 3.3.0 the tray always uses pseudo-transparency
|
||||
; Enable pseudo transparency
|
||||
; Will automatically be enabled if a fully transparent
|
||||
; background color is defined using `tray-background`
|
||||
; tray-transparent = false
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${colors.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = ${self.module-margin}
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = ${sizes.tray-scale}
|
||||
|
||||
; Restack the bar window. Fixes the issue where the
|
||||
; bar is being drawn on top of fullscreen windows.
|
||||
;
|
||||
; Currently supported options:
|
||||
; generic (works in xmonad, may work with other WMs)
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
; wm-restack = generic
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; Set this to 0 to let polybar calculate the dpi from the screen size.
|
||||
; dpi =
|
||||
dpi-x = ${xrdb:dpi}
|
||||
dpi-y = ${xrdb:dpi}
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
; click-left =
|
||||
; click-middle =
|
||||
; click-right =
|
||||
; scroll-up =
|
||||
; scroll-down =
|
||||
; double-click-left =
|
||||
; double-click-middle =
|
||||
; double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/text
|
||||
content = " "
|
||||
|
||||
; "content" has the same properties as "format-NAME"
|
||||
; content-background = #000
|
||||
content-foreground = ${colors.powermenu}
|
||||
content-padding = ${bar/mybar.module-margin}
|
||||
|
||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
|
||||
; click-left = notify-send left
|
||||
; click-middle = notify-send middle
|
||||
; click-right = notify-send right
|
||||
click-left = "rofi -show combi"
|
||||
click-right = "/home/sravan/.scripts/control-center.sh --rofi"
|
||||
|
||||
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND"
|
||||
; scroll-up = notify-send scroll up
|
||||
; scroll-down = notify-send scroll down
|
||||
|
||||
[module/dwm]
|
||||
type = internal/dwm
|
||||
; format = <label-tags> <label-layout> <label-floating> <label-title>
|
||||
format = <label-tags> <label-layout>
|
||||
; Path to dwm socket (default: /tmp/dwm.sock)
|
||||
; socket-path = /tmp/dwm.sock
|
||||
|
||||
; Left-click to view tag, right-click to toggle tag view
|
||||
enable-tags-click = true
|
||||
; Scroll to cycle between available tags
|
||||
enable-tags-scroll = true
|
||||
; If true and enable-tags-scroll = true, scrolling will view all tags regardless if occupied
|
||||
tags-scroll-empty = true
|
||||
; If true and enable-tags-scroll = true, scrolling will cycle through tags backwards
|
||||
tags-scroll-reverse = true
|
||||
; If true and enable-tags-scroll = true, wrap active tag when scrolling
|
||||
tags-scroll-wrap = true
|
||||
; Left-click to set secondary layout, right-click to switch to previous layout
|
||||
enable-layout-click = true
|
||||
; Scroll to cycle between available layouts
|
||||
enable-layout-scroll = true
|
||||
; Wrap when scrolling and reaching beginning/end of layouts
|
||||
layout-scroll-wrap = true
|
||||
; Reverse scroll direction
|
||||
layout-scroll-reverse = true
|
||||
|
||||
; If enable-layout-click = true, clicking the layout symbol will switch to this layout
|
||||
secondary-layout-symbol = [M]
|
||||
|
||||
; Separator in between shown tags
|
||||
; label-separator = |
|
||||
|
||||
; Title of currently focused window
|
||||
; Available tokens:
|
||||
; %title%
|
||||
label-title = %title%
|
||||
label-title-padding = ${sizes.module-padding}
|
||||
label-title-foreground = ${colors.foreground}
|
||||
label-title-maxlen = ${sizes.maxlen}
|
||||
|
||||
; Symbol of current layout
|
||||
; Available tokens:
|
||||
; %symbol%
|
||||
label-layout = %symbol%
|
||||
label-layout-foreground = ${colors.foreground}
|
||||
label-layout-background = ${colors.background-alt}
|
||||
label-layout-underline = ${colors.background-alt}
|
||||
label-layout-padding = ${sizes.module-padding}
|
||||
|
||||
; Text to show when currently focused window is floating
|
||||
label-floating = (F)
|
||||
|
||||
; States: focused, unfocused, visible, urgent, empty
|
||||
; Available tokens:
|
||||
; %name%
|
||||
|
||||
; focused = Selected tag on focused monitor
|
||||
label-focused = %name%
|
||||
label-focused-foreground = ${colors.dwm-focused-foreground}
|
||||
label-focused-background = ${colors.dwm-focused-background}
|
||||
label-focused-underline = ${colors.dwm-focused-background}
|
||||
label-focused-padding = ${sizes.module-padding}
|
||||
|
||||
; unfocused = Unselected tag on unselected monitor
|
||||
label-unfocused = %name%
|
||||
label-unfocused-foreground = ${colors.dwm-unfocused-foreground}
|
||||
label-unfocused-background = ${colors.dwm-unfocused-background}
|
||||
label-unfocused-underline = ${colors.dwm-unfocused-background}
|
||||
label-unfocused-padding = ${sizes.module-padding}
|
||||
|
||||
; visible = Unselected tag, but occupied tag on any monitor
|
||||
label-visible = %name%
|
||||
label-visible-foreground = ${colors.dwm-visible-foreground}
|
||||
label-visible-background = ${colors.dwm-visible-background}
|
||||
label-visible-underline = ${colors.dwm-visible-background}
|
||||
label-visible-padding = ${sizes.module-padding}
|
||||
|
||||
; urgent = Unselected tag with window that has urgency hint set
|
||||
label-urgent = %name%
|
||||
label-urgent-foreground = ${colors.dwm-urgent-foreground}
|
||||
label-urgent-background = ${colors.dwm-urgent-background}
|
||||
label-urgent-underline = ${colors.dwm-urgent-background}
|
||||
label-urgent-padding = ${sizes.module-padding}
|
||||
|
||||
; empty = Unselected and unoccupied tag
|
||||
; This can be set to an empty string to hide empty tags
|
||||
label-empty = %name%
|
||||
label-empty-foreground = ${colors.dwm-empty-foreground}
|
||||
label-empty-background = ${colors.dwm-empty-background}
|
||||
label-empty-underline = ${colors.dwm-empty-background}
|
||||
label-empty-padding = ${sizes.module-padding}
|
||||
|
||||
[module/media-playing]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/bin/sh -c [command]")
|
||||
exec = ~/.config/dwm-flexipatch/polybar/scripts/get-media-playing.sh
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
; exec-if = pgrep -x myservice
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = false
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 5 (0 if `tail = true`)
|
||||
interval = ${intervals.media-playing}
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
; format-background = ${colors.background}
|
||||
; format-foreground =
|
||||
; format-padding = 4
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
label-foreground = ${colors.media-playing}
|
||||
label-maxlen = ${sizes.maxlen}
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||
click-left = "/home/sravan/.scripts/playerctl.sh --play-pause"
|
||||
; click-middle = echo middle %counter%
|
||||
click-right = "/home/sravan/.scripts/playerctl.sh --change"
|
||||
; double-click-left = echo double left %counter%
|
||||
; double-click-middle = echo double middle %counter%
|
||||
; double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||
scroll-up = "/home/sravan/.scripts/playerctl.sh --next"
|
||||
scroll-down = "/home/sravan/.scripts/playerctl.sh --prev"
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1.0
|
||||
interval = ${intervals.date}
|
||||
|
||||
; See "https://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
date = %a %x
|
||||
|
||||
; Optional time format
|
||||
; time = %X
|
||||
|
||||
; if `date-alt` or `time-alt` is defined, clicking
|
||||
; the module will toggle between formats
|
||||
date-alt = %A, %B %d, %Y
|
||||
; time-alt = %H:%M:%S
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
|
||||
; Available tokens:
|
||||
; %date%
|
||||
; %time%
|
||||
; Default: %date%
|
||||
label = " %date%"
|
||||
; label-font = 3
|
||||
label-foreground = ${colors.date}
|
||||
|
||||
[module/time]
|
||||
type = internal/date
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1.0
|
||||
interval = ${intervals.time}
|
||||
|
||||
; See "https://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; date = %a %x
|
||||
|
||||
; Optional time format
|
||||
time = %X
|
||||
|
||||
; if `date-alt` or `time-alt` is defined, clicking
|
||||
; the module will toggle between formats
|
||||
; date-alt = %A, %B %d, %Y
|
||||
time-alt = UTC%z (%Z)
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
|
||||
; Available tokens:
|
||||
; %date%
|
||||
; %time%
|
||||
; Default: %date%
|
||||
label = " %time%"
|
||||
; label-font = 3
|
||||
label-foreground = ${colors.time}
|
||||
|
||||
[module/kernel]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/bin/sh -c [command]")
|
||||
exec = echo " $(uname -r)"
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
; exec-if = pgrep -x myservice
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = false
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 5 (0 if `tail = true`)
|
||||
interval = ${intervals.kernel}
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
format-background = ${colors.background}
|
||||
format-foreground = ${colors.kernel}
|
||||
; format-padding = 4
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||
; click-left = echo left %counter%
|
||||
; click-middle = echo middle %counter%
|
||||
; click-right = echo right %counter%
|
||||
; double-click-left = echo double left %counter%
|
||||
; double-click-middle = echo double middle %counter%
|
||||
; double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||
; scroll-up = echo scroll up %counter%
|
||||
; scroll-down = echo scroll down %counter%
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = ${intervals.cpu}
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
format = %{A3:alacritty -e bpytop &:} <label> %{A}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load averaged over all cores
|
||||
; %percentage-sum% - Cumulative load on all cores
|
||||
; %percentage-cores% - load percentage for each core
|
||||
; %percentage-core[1-9]% - load percentage for specific core
|
||||
label = %percentage%%
|
||||
label-foreground = ${colors.cpu}
|
||||
|
||||
; Spacing between individual per-core ramps
|
||||
ramp-coreload-spacing = 1
|
||||
ramp-coreload-0 = ▁
|
||||
ramp-coreload-1 = ▂
|
||||
ramp-coreload-2 = ▃
|
||||
ramp-coreload-3 = ▄
|
||||
ramp-coreload-4 = ▅
|
||||
ramp-coreload-5 = ▆
|
||||
ramp-coreload-6 = ▇
|
||||
ramp-coreload-7 = █
|
||||
ramp-coreload-foreground = ${colors.cpu}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = ${intervals.memory}
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
format = %{A3:alacritty -e bpytop &:} <label> %{A}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = %percentage_used%%
|
||||
label-foreground = ${colors.memory}
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-indicator =
|
||||
bar-used-width = 50
|
||||
bar-used-foreground-0 = #55aa55
|
||||
bar-used-foreground-1 = #557755
|
||||
bar-used-foreground-2 = #f5a70a
|
||||
bar-used-foreground-3 = #ff5555
|
||||
bar-used-fill = ▐
|
||||
bar-used-empty = ▐
|
||||
bar-used-empty-foreground = #444444
|
||||
|
||||
; Only applies if <ramp-used> is used
|
||||
ramp-used-0 = ▁
|
||||
ramp-used-1 = ▂
|
||||
ramp-used-2 = ▃
|
||||
ramp-used-3 = ▄
|
||||
ramp-used-4 = ▅
|
||||
ramp-used-5 = ▆
|
||||
ramp-used-6 = ▇
|
||||
ramp-used-7 = █
|
||||
ramp-used-foreground = ${colors.memory}
|
||||
|
||||
; Only applies if <ramp-free> is used
|
||||
ramp-free-0 = ▁
|
||||
ramp-free-1 = ▂
|
||||
ramp-free-2 = ▃
|
||||
ramp-free-3 = ▄
|
||||
ramp-free-4 = ▅
|
||||
ramp-free-5 = ▆
|
||||
ramp-free-6 = ▇
|
||||
ramp-free-7 = █
|
||||
ramp-free-foreground = ${colors.memory}
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
|
||||
; Mountpoints to display
|
||||
mount-0 = /home
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = ${intervals.filesystem}
|
||||
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = true
|
||||
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
spacing = ${bar/mybar.module-margin}
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = %{A3:filelight &:} <label-mounted> %{A}
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = %{A3:gnome-disks &:} <label-unmounted> %{A}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = %percentage_used%%
|
||||
label-mounted-foreground = ${colors.filesystem}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; Default: %mountpoint% is not mounted
|
||||
label-unmounted = %mountpoint% is not mounted
|
||||
label-unmounted-foreground = ${colors.filesystem}
|
||||
|
||||
[module/dunst-notification-status]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/bin/sh -c [command]")
|
||||
exec = ~/.config/dwm-flexipatch/polybar/scripts/dunst-notification-status.sh
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
; exec-if = pgrep -x myservice
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = false
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 5 (0 if `tail = true`)
|
||||
interval = ${intervals.dunst-notification-status}
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
; format-background = ${colors.background}
|
||||
; format-foreground =
|
||||
; format-padding = 4
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
label-foreground = ${colors.dunst-notification-status}
|
||||
; label-maxlen =
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||
click-left = "/home/sravan/.scripts/dunst.sh --dnd"
|
||||
; click-middle = echo middle %counter%
|
||||
click-right = "/home/sravan/.scripts/dunst.sh --history"
|
||||
; double-click-left = echo double left %counter%
|
||||
; double-click-middle = echo double middle %counter%
|
||||
; double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||
; scroll-up =
|
||||
; scroll-down =
|
35
polybar/launch.sh
Executable file
35
polybar/launch.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
BAR="mybar"
|
||||
CONFIG="~/.config/dwm-flexipatch/polybar/config.ini"
|
||||
NUM_MONITORS=0
|
||||
CONNECTED_MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1)
|
||||
TRAY_POS="right"
|
||||
|
||||
killall -q polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
rm /tmp/polybar.pids
|
||||
sleep 1
|
||||
|
||||
for m in $CONNECTED_MONITORS; do
|
||||
let "NUM_MONITORS+=1"
|
||||
done
|
||||
|
||||
if [ $NUM_MONITORS == 1 ]; then
|
||||
# Launch on only monitor w/ systray
|
||||
MONITOR=$CONNECTED_MONITORS TRAY_POS=$TRAY_POS polybar --reload -c $CONFIG $BAR &
|
||||
else
|
||||
PRIMARY=$(xrandr --query | grep " connected" | grep "primary" | cut -d" " -f1)
|
||||
OTHERS=$(xrandr --query | grep " connected" | grep -v "primary" | cut -d" " -f1)
|
||||
|
||||
# Launch on primary monitor w/ systray
|
||||
MONITOR=$PRIMARY TRAY_POS=$TRAY_POS polybar --reload -c $CONFIG $BAR &
|
||||
sleep 1
|
||||
|
||||
# Launch on all other monitors w/o systray
|
||||
for m in $OTHERS; do
|
||||
MONITOR=$m TRAY_POS=none polybar --reload -c $CONFIG $BAR &
|
||||
done
|
||||
fi
|
||||
|
||||
echo "$!" >>/tmp/polybar.pids
|
16
polybar/scripts/dunst-notification-status.sh
Executable file
16
polybar/scripts/dunst-notification-status.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Check if dunst is running
|
||||
if pgrep -x "dunst" > /dev/null
|
||||
then
|
||||
is_paused=$(dunstctl is-paused)
|
||||
|
||||
if [[ $is_paused == 'false' ]]; then
|
||||
status_icon=" on"
|
||||
elif [[ $is_paused == 'true' ]]; then
|
||||
status_icon=" off"
|
||||
fi
|
||||
else
|
||||
status_icon=" off"
|
||||
fi
|
||||
|
||||
echo $status_icon
|
18
polybar/scripts/get-media-playing.sh
Executable file
18
polybar/scripts/get-media-playing.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
|
||||
|
||||
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
|
||||
echo " N/A"
|
||||
else
|
||||
artist=$(playerctl --player=playerctld metadata --format '{{ artist }}')
|
||||
title=$(playerctl --player=playerctld metadata --format '{{ title }}')
|
||||
status=$(playerctl --player=playerctld metadata --format '{{ status }}')
|
||||
|
||||
if [[ $status == "Paused" ]]; then
|
||||
status_icon=" "
|
||||
elif [[ $status == "Playing" ]]; then
|
||||
status_icon=" "
|
||||
fi
|
||||
|
||||
echo "$status_icon $artist - $title"
|
||||
fi
|
23
polybar/scripts/updates-pacman-aurhelper.sh
Executable file
23
polybar/scripts/updates-pacman-aurhelper.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
|
||||
if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$((updates_arch + updates_aur))
|
||||
|
||||
# if [ "$updates" -gt 0 ]; then
|
||||
# echo "# $updates"
|
||||
# else
|
||||
# echo ""
|
||||
# fi
|
||||
|
||||
echo "$updates"
|
Reference in New Issue
Block a user