Compare commits
5 Commits
f4f7069cae
...
24e80c4eed
Author | SHA1 | Date | |
---|---|---|---|
|
24e80c4eed | ||
|
477a1c1202 | ||
|
4ca6571a05 | ||
|
d2ba136896 | ||
|
58b58dc44e |
37
README.org
37
README.org
@@ -123,6 +123,7 @@
|
|||||||
- [[#only-one-rule-match][Only One Rule Match]]
|
- [[#only-one-rule-match][Only One Rule Match]]
|
||||||
- [[#only-quit-on-empty][Only Quit On Empty]]
|
- [[#only-quit-on-empty][Only Quit On Empty]]
|
||||||
- [[#per-tag][Per Tag]]
|
- [[#per-tag][Per Tag]]
|
||||||
|
- [[#per-monitor][Per Monitor]]
|
||||||
- [[#place-direction][Place Direction]]
|
- [[#place-direction][Place Direction]]
|
||||||
- [[#place-mouse][Place Mouse]]
|
- [[#place-mouse][Place Mouse]]
|
||||||
- [[#push][Push]]
|
- [[#push][Push]]
|
||||||
@@ -223,6 +224,7 @@
|
|||||||
- [[#bars][Bars]]
|
- [[#bars][Bars]]
|
||||||
- [[#modules][Modules]]
|
- [[#modules][Modules]]
|
||||||
- [[#launch-script][Launch Script]]
|
- [[#launch-script][Launch Script]]
|
||||||
|
- [[#justfile][Justfile]]
|
||||||
|
|
||||||
* Welcome
|
* Welcome
|
||||||
|
|
||||||
@@ -2547,6 +2549,16 @@ This controls whether or not to also store bar position on a per tag basis, or l
|
|||||||
#define PERTAGBAR_PATCH 0
|
#define PERTAGBAR_PATCH 0
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Per Monitor
|
||||||
|
|
||||||
|
**** Vanity Gaps
|
||||||
|
|
||||||
|
This patch allows configuring vanity gaps on a per-monitor basis rather than all monitors (default).
|
||||||
|
|
||||||
|
#+BEGIN_SRC c :tangle patches.def.h
|
||||||
|
#define PERMON_VANITYGAPS_PATCH 0
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Place Direction
|
*** Place Direction
|
||||||
|
|
||||||
Similar to the focusdir patch this patch allow users to move a window in any direction in the tiled stack (up, down, left, right).
|
Similar to the focusdir patch this patch allow users to move a window in any direction in the tiled stack (up, down, left, right).
|
||||||
@@ -4300,11 +4312,9 @@ static const Rule rules[] = {
|
|||||||
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
|
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
|
||||||
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
|
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
|
||||||
RULE(.title = "Picture in picture", .isfloating = 1)
|
RULE(.title = "Picture in picture", .isfloating = 1)
|
||||||
RULE(.class = "Ferdium", .tags = 1 << 0)
|
|
||||||
RULE(.class = "Beeper", .tags = 1 << 0)
|
RULE(.class = "Beeper", .tags = 1 << 0)
|
||||||
RULE(.class = "Signal", .tags = 1 << 0)
|
RULE(.class = "Signal", .tags = 1 << 0)
|
||||||
RULE(.class = "discord", .tags = 1 << 0)
|
RULE(.class = "discord", .tags = 1 << 0)
|
||||||
RULE(.class = "notion-app-enhanced", .tags = 1 << 1)
|
|
||||||
RULE(.class = "Logseq", .tags = 1 << 1)
|
RULE(.class = "Logseq", .tags = 1 << 1)
|
||||||
RULE(.class = "pocket-casts-linux", .tags = 1 << 2)
|
RULE(.class = "pocket-casts-linux", .tags = 1 << 2)
|
||||||
RULE(.class = "Spotify", .tags = 1 << 3)
|
RULE(.class = "Spotify", .tags = 1 << 3)
|
||||||
@@ -5875,6 +5885,9 @@ media-playing-background = ${self.green}
|
|||||||
media-playing-underline = ${self.background}
|
media-playing-underline = ${self.background}
|
||||||
media-playing-overline = ${self.background}
|
media-playing-overline = ${self.background}
|
||||||
|
|
||||||
|
; center
|
||||||
|
tray-background = ${self.background}
|
||||||
|
|
||||||
; right
|
; right
|
||||||
kernel-foreground = ${self.background}
|
kernel-foreground = ${self.background}
|
||||||
kernel-background = ${self.orange}
|
kernel-background = ${self.orange}
|
||||||
@@ -6140,7 +6153,7 @@ tray-maxsize = ${sizes.tray-maxsize}
|
|||||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||||
; By default the tray container will use the bar
|
; By default the tray container will use the bar
|
||||||
; background color.
|
; background color.
|
||||||
tray-background = ${colors.background}
|
tray-background = ${colors.tray-background}
|
||||||
|
|
||||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||||
tray-offset-x = 0
|
tray-offset-x = 0
|
||||||
@@ -7148,3 +7161,21 @@ fi
|
|||||||
|
|
||||||
echo "$!" >>/tmp/polybar.pids
|
echo "$!" >>/tmp/polybar.pids
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* Justfile
|
||||||
|
|
||||||
|
#+BEGIN_SRC just :tangle justfile
|
||||||
|
set shell := ["bash", "-c"]
|
||||||
|
|
||||||
|
# List just commands by default
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Update doom emacs and sync config
|
||||||
|
dwm-rebuild:
|
||||||
|
sudo make clean install
|
||||||
|
|
||||||
|
# Run polybar launch script
|
||||||
|
dwm-launch-polybar:
|
||||||
|
./polybar/launch.sh
|
||||||
|
#+END_SRC
|
||||||
|
@@ -474,11 +474,9 @@ static const Rule rules[] = {
|
|||||||
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
|
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
|
||||||
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
|
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
|
||||||
RULE(.title = "Picture in picture", .isfloating = 1)
|
RULE(.title = "Picture in picture", .isfloating = 1)
|
||||||
RULE(.class = "Ferdium", .tags = 1 << 0)
|
|
||||||
RULE(.class = "Beeper", .tags = 1 << 0)
|
RULE(.class = "Beeper", .tags = 1 << 0)
|
||||||
RULE(.class = "Signal", .tags = 1 << 0)
|
RULE(.class = "Signal", .tags = 1 << 0)
|
||||||
RULE(.class = "discord", .tags = 1 << 0)
|
RULE(.class = "discord", .tags = 1 << 0)
|
||||||
RULE(.class = "notion-app-enhanced", .tags = 1 << 1)
|
|
||||||
RULE(.class = "Logseq", .tags = 1 << 1)
|
RULE(.class = "Logseq", .tags = 1 << 1)
|
||||||
RULE(.class = "pocket-casts-linux", .tags = 1 << 2)
|
RULE(.class = "pocket-casts-linux", .tags = 1 << 2)
|
||||||
RULE(.class = "Spotify", .tags = 1 << 3)
|
RULE(.class = "Spotify", .tags = 1 << 3)
|
||||||
|
9
dwm.c
9
dwm.c
@@ -482,6 +482,9 @@ struct Monitor {
|
|||||||
int gappiv; /* vertical gap between windows */
|
int gappiv; /* vertical gap between windows */
|
||||||
int gappoh; /* horizontal outer gaps */
|
int gappoh; /* horizontal outer gaps */
|
||||||
int gappov; /* vertical outer gaps */
|
int gappov; /* vertical outer gaps */
|
||||||
|
#if PERMON_VANITYGAPS_PATCH
|
||||||
|
int enablegaps; /* whether gaps are enabled */
|
||||||
|
#endif // PERMON_VANITYGAPS_PATCH
|
||||||
#endif // VANITYGAPS_PATCH
|
#endif // VANITYGAPS_PATCH
|
||||||
#if SETBORDERPX_PATCH
|
#if SETBORDERPX_PATCH
|
||||||
int borderpx;
|
int borderpx;
|
||||||
@@ -1769,6 +1772,10 @@ createmon(void)
|
|||||||
}
|
}
|
||||||
#endif // PERTAG_PATCH
|
#endif // PERTAG_PATCH
|
||||||
|
|
||||||
|
#if PERMON_VANITYGAPS_PATCH
|
||||||
|
m->enablegaps = 1;
|
||||||
|
#endif // PERMON_VANITYGAPS_PATCH
|
||||||
|
|
||||||
#if SEAMLESS_RESTART_PATCH
|
#if SEAMLESS_RESTART_PATCH
|
||||||
restoremonitorstate(m);
|
restoremonitorstate(m);
|
||||||
#endif // SEAMLESS_RESTART_PATCH
|
#endif // SEAMLESS_RESTART_PATCH
|
||||||
@@ -4651,6 +4658,8 @@ updatebarpos(Monitor *m)
|
|||||||
#if BAR_PADDING_VANITYGAPS_PATCH && VANITYGAPS_PATCH
|
#if BAR_PADDING_VANITYGAPS_PATCH && VANITYGAPS_PATCH
|
||||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||||
if (!selmon || selmon->pertag->enablegaps[selmon->pertag->curtag])
|
if (!selmon || selmon->pertag->enablegaps[selmon->pertag->curtag])
|
||||||
|
#elif PERMON_VANITYGAPS_PATCH
|
||||||
|
if (!selmon || selmon->enablegaps)
|
||||||
#else
|
#else
|
||||||
if (enablegaps)
|
if (enablegaps)
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH
|
||||||
|
13
justfile
Normal file
13
justfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
set shell := ["bash", "-c"]
|
||||||
|
|
||||||
|
# List just commands by default
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Update doom emacs and sync config
|
||||||
|
dwm-rebuild:
|
||||||
|
sudo make clean install
|
||||||
|
|
||||||
|
# Run polybar launch script
|
||||||
|
dwm-launch-polybar:
|
||||||
|
./polybar/launch.sh
|
@@ -1,5 +1,5 @@
|
|||||||
/* Settings */
|
/* Settings */
|
||||||
#if !PERTAG_VANITYGAPS_PATCH
|
#if !(PERTAG_VANITYGAPS_PATCH || PERMON_VANITYGAPS_PATCH)
|
||||||
static int enablegaps = 1;
|
static int enablegaps = 1;
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH
|
||||||
|
|
||||||
@@ -69,10 +69,12 @@ setgapsex(const Arg *arg)
|
|||||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||||
if (!selmon->pertag->enablegaps[selmon->pertag->curtag])
|
if (!selmon->pertag->enablegaps[selmon->pertag->curtag])
|
||||||
selmon->pertag->enablegaps[selmon->pertag->curtag] = 1;
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = 1;
|
||||||
|
#elif PERMON_VANITYGAPS_PATCH
|
||||||
|
selmon->enablegaps = 1;
|
||||||
#else
|
#else
|
||||||
if (!enablegaps)
|
if (!enablegaps)
|
||||||
enablegaps = 1;
|
enablegaps = 1;
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||||
|
|
||||||
setgaps(oh, ov, ih, iv);
|
setgaps(oh, ov, ih, iv);
|
||||||
}
|
}
|
||||||
@@ -83,24 +85,35 @@ togglegaps(const Arg *arg)
|
|||||||
{
|
{
|
||||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||||
selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
|
||||||
|
#elif PERMON_VANITYGAPS_PATCH
|
||||||
|
selmon->enablegaps = !selmon->enablegaps;
|
||||||
#else
|
#else
|
||||||
enablegaps = !enablegaps;
|
enablegaps = !enablegaps;
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||||
|
|
||||||
#if BAR_PADDING_VANITYGAPS_PATCH
|
#if BAR_PADDING_VANITYGAPS_PATCH
|
||||||
|
#if PERMON_VANITYGAPS_PATCH
|
||||||
updatebarpos(selmon);
|
updatebarpos(selmon);
|
||||||
for (Bar *bar = selmon->bar; bar; bar = bar->next)
|
for (Bar *bar = selmon->bar; bar; bar = bar->next)
|
||||||
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||||
|
#else
|
||||||
|
for (Monitor *m = mons; m; m = m->next) {
|
||||||
|
updatebarpos(m);
|
||||||
|
for (Bar *bar = m->bar; bar; bar = bar->next)
|
||||||
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||||
|
}
|
||||||
|
#endif // PERMON_VANITYGAPS_PATCH
|
||||||
|
|
||||||
#if BAR_SYSTRAY_PATCH
|
#if BAR_SYSTRAY_PATCH
|
||||||
drawbarwin(systray->bar);
|
drawbarwin(systray->bar);
|
||||||
#endif // BAR_SYSTRAY_PATCH
|
#endif // BAR_SYSTRAY_PATCH
|
||||||
#endif // BAR_PADDING_VANITYGAPS_PATCH
|
#endif // BAR_PADDING_VANITYGAPS_PATCH
|
||||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
|
||||||
|
#if (PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH) || PERMON_VANITYGAPS_PATCH
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
#else
|
#else
|
||||||
arrange(NULL);
|
arrange(NULL);
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -193,9 +206,11 @@ getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
|||||||
unsigned int n, oe, ie;
|
unsigned int n, oe, ie;
|
||||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||||
oe = ie = m->pertag->enablegaps[m->pertag->curtag];
|
oe = ie = m->pertag->enablegaps[m->pertag->curtag];
|
||||||
|
#elif PERMON_VANITYGAPS_PATCH
|
||||||
|
oe = ie = m->enablegaps;
|
||||||
#else
|
#else
|
||||||
oe = ie = enablegaps;
|
oe = ie = enablegaps;
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||||
|
@@ -241,6 +241,8 @@
|
|||||||
|
|
||||||
#define PERTAGBAR_PATCH 0
|
#define PERTAGBAR_PATCH 0
|
||||||
|
|
||||||
|
#define PERMON_VANITYGAPS_PATCH 0
|
||||||
|
|
||||||
#define PLACEDIR_PATCH 0
|
#define PLACEDIR_PATCH 0
|
||||||
|
|
||||||
#define PLACEMOUSE_PATCH 1
|
#define PLACEMOUSE_PATCH 1
|
||||||
|
@@ -70,6 +70,9 @@ media-playing-background = ${self.green}
|
|||||||
media-playing-underline = ${self.background}
|
media-playing-underline = ${self.background}
|
||||||
media-playing-overline = ${self.background}
|
media-playing-overline = ${self.background}
|
||||||
|
|
||||||
|
; center
|
||||||
|
tray-background = ${self.background}
|
||||||
|
|
||||||
; right
|
; right
|
||||||
kernel-foreground = ${self.background}
|
kernel-foreground = ${self.background}
|
||||||
kernel-background = ${self.orange}
|
kernel-background = ${self.orange}
|
||||||
@@ -312,7 +315,7 @@ tray-maxsize = ${sizes.tray-maxsize}
|
|||||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||||
; By default the tray container will use the bar
|
; By default the tray container will use the bar
|
||||||
; background color.
|
; background color.
|
||||||
tray-background = ${colors.background}
|
tray-background = ${colors.tray-background}
|
||||||
|
|
||||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||||
tray-offset-x = 0
|
tray-offset-x = 0
|
||||||
|
Reference in New Issue
Block a user