Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
91ded7cbaa
13
README.md
13
README.md
@ -19,6 +19,8 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6
|
||||
|
||||
### Changelog:
|
||||
|
||||
2023-06-25 - Added the toggletopbar patch
|
||||
|
||||
2023-01-18 - Added the view history patch
|
||||
|
||||
2022-10-08 - Added the alt-tab patch
|
||||
@ -772,15 +774,18 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6
|
||||
- [togglefullscreen](https://github.com/bakkeby/patches/wiki/togglefullscreen/)
|
||||
- allows you to toggle fullscreen on and off using a single shortcut key
|
||||
|
||||
- [togglelayout](https://github.com/bakkeby/patches/wiki/togglelayout)
|
||||
- toggle layout using the same keyboard shortcuts to set the layout
|
||||
- e.g. hitting `MOD+m` switches to monocle layout, hitting the same keybinding again brings
|
||||
you back to the previous layout
|
||||
|
||||
- [toggletag](https://github.com/bakkeby/patches/wiki/toggletag)
|
||||
- toggle tags using the same keyboard shortcuts to view tags
|
||||
- e.g. hitting `MOD+4` lets you view tag 4 and hitting the keybinding a second time brings
|
||||
you back to where you were before
|
||||
|
||||
- [togglelayout](https://github.com/bakkeby/patches/wiki/togglelayout)
|
||||
- toggle layout using the same keyboard shortcuts to set the layout
|
||||
- e.g. hitting `MOD+m` switches to monocle layout, hitting the same keybinding again brings
|
||||
you back to the previous layout
|
||||
- [toggletopbar](https://dwm.suckless.org/patches/toggletopbar/)
|
||||
- allows for the bar position (top or bottom) to be toggled during runtime
|
||||
|
||||
- [transfer](https://dwm.suckless.org/patches/transfer/)
|
||||
- lets you transfer the currently focused client between the master and stack area while
|
||||
|
33
README.org
33
README.org
@ -162,6 +162,7 @@
|
||||
- [[#tag-swap-monitor][Tag Swap Monitor]]
|
||||
- [[#tap-resize][Tap Resize]]
|
||||
- [[#toggle-fullscreen][Toggle Fullscreen]]
|
||||
- [[#toggle-top-bar][Toggle Top Bar]]
|
||||
- [[#toggle-layout][Toggle Layout]]
|
||||
- [[#toggle-tag][Toggle Tag]]
|
||||
- [[#transfer][Transfer]]
|
||||
@ -300,6 +301,8 @@ Browsing patches? There is a [[https://coggle.it/diagram/X9IiSSM6PTWOM9Wz][map o
|
||||
|
||||
** Changelog
|
||||
|
||||
2023-06-25 - Added the toggletopbar patch
|
||||
|
||||
2023-01-18 - Added the view history patch
|
||||
|
||||
2022-10-08 - Added the alt-tab patch
|
||||
@ -981,13 +984,16 @@ Browsing patches? There is a [[https://coggle.it/diagram/X9IiSSM6PTWOM9Wz][map o
|
||||
- [[https://github.com/bakkeby/patches/wiki/togglefullscreen/][togglefullscreen]]
|
||||
- allows you to toggle fullscreen on and off using a single shortcut key
|
||||
|
||||
- [[https://github.com/bakkeby/patches/wiki/togglelayout][togglelayout]]
|
||||
- toggle layout using the same keyboard shortcuts to set the layout
|
||||
- e.g. hitting ~MOD+m~ switches to monocle layout, hitting the same keybinding again brings you back to the previous layout
|
||||
|
||||
- [[https://github.com/bakkeby/patches/wiki/toggletag][toggletag]]
|
||||
- toggle tags using the same keyboard shortcuts to view tags
|
||||
- e.g. hitting ~MOD+4~ lets you view tag 4 and hitting the keybinding a second time brings you back to where you were before
|
||||
|
||||
- [[https://github.com/bakkeby/patches/wiki/togglelayout][togglelayout]]
|
||||
- toggle layout using the same keyboard shortcuts to set the layout
|
||||
- e.g. hitting ~MOD+m~ switches to monocle layout, hitting the same keybinding again brings you back to the previous layout
|
||||
- [[https://dwm.suckless.org/patches/toggletopbar/][toggletopbar]]
|
||||
- allows for the bar position (top or bottom) to be toggled during runtime
|
||||
|
||||
- [[https://dwm.suckless.org/patches/transfer/][transfer]]
|
||||
- lets you transfer the currently focused client between the master and stack area while increasing or decreasing the master area (nmaster) accordingly
|
||||
@ -3031,6 +3037,16 @@ https://github.com/bakkeby/patches/blob/master/dwm/dwm-togglefullscreen-6.2.diff
|
||||
#define TOGGLEFULLSCREEN_PATCH 1
|
||||
#+END_SRC
|
||||
|
||||
*** Toggle Top Bar
|
||||
|
||||
This patch allows for the bar position (top or bottom) to be toggled during runtime.
|
||||
|
||||
https://dwm.suckless.org/patches/toggletopbar/
|
||||
|
||||
#+BEGIN_SRC c :tangle patches.def.h
|
||||
#define TOGGLETOPBAR_PATCH 0
|
||||
#+END_SRC
|
||||
|
||||
*** Toggle Layout
|
||||
|
||||
Minor patch that lets you use the same keyboard shortcut to toggle to the previous layout if the designated layout is already active.
|
||||
@ -3039,7 +3055,6 @@ This allows you to use e.g. MOD+m to change to the monocle layout and use the sa
|
||||
|
||||
https://github.com/bakkeby/patches/wiki/togglelayout
|
||||
|
||||
|
||||
#+BEGIN_SRC c :tangle patches.def.h
|
||||
#define TOGGLELAYOUT_PATCH 0
|
||||
#+END_SRC
|
||||
@ -4713,6 +4728,10 @@ static const Key keys[] = {
|
||||
|
||||
{ MODKEY, XK_s, togglebar, {0} },
|
||||
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
{ MODKEY|ShiftMask, XK_b, toggletopbar, {0} },
|
||||
#endif // TOGGLETOPBAR_PATCH
|
||||
|
||||
#if TAB_PATCH
|
||||
{ MODKEY|ControlMask, XK_b, tabmode, {-1} },
|
||||
#endif // TAB_PATCH
|
||||
@ -5285,6 +5304,9 @@ static const Signal signals[] = {
|
||||
{ "focusstack", focusstack },
|
||||
{ "setmfact", setmfact },
|
||||
{ "togglebar", togglebar },
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
{ "toggletopbar", toggletopbar },
|
||||
#endif // TOGGLETOPBAR_PATCH
|
||||
{ "incnmaster", incnmaster },
|
||||
{ "togglefloating", togglefloating },
|
||||
{ "focusmon", focusmon },
|
||||
@ -5482,6 +5504,9 @@ static IPCCommand ipccommands[] = {
|
||||
IPCCOMMAND( tag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( tagmon, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( togglebar, 1, {ARG_TYPE_NONE} ),
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
IPCCOMMAND( toggletopbar, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // TOGGLETOPBAR_PATCH
|
||||
IPCCOMMAND( togglefloating, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( toggletag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( toggleview, 1, {ARG_TYPE_UINT} ),
|
||||
|
10
config.def.h
10
config.def.h
@ -937,6 +937,10 @@ static const Key keys[] = {
|
||||
|
||||
{ MODKEY, XK_s, togglebar, {0} },
|
||||
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
{ MODKEY|ShiftMask, XK_b, toggletopbar, {0} },
|
||||
#endif // TOGGLETOPBAR_PATCH
|
||||
|
||||
#if TAB_PATCH
|
||||
{ MODKEY|ControlMask, XK_b, tabmode, {-1} },
|
||||
#endif // TAB_PATCH
|
||||
@ -1503,6 +1507,9 @@ static const Signal signals[] = {
|
||||
{ "focusstack", focusstack },
|
||||
{ "setmfact", setmfact },
|
||||
{ "togglebar", togglebar },
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
{ "toggletopbar", toggletopbar },
|
||||
#endif // TOGGLETOPBAR_PATCH
|
||||
{ "incnmaster", incnmaster },
|
||||
{ "togglefloating", togglefloating },
|
||||
{ "focusmon", focusmon },
|
||||
@ -1698,6 +1705,9 @@ static IPCCommand ipccommands[] = {
|
||||
IPCCOMMAND( tag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( tagmon, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( togglebar, 1, {ARG_TYPE_NONE} ),
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
IPCCOMMAND( toggletopbar, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // TOGGLETOPBAR_PATCH
|
||||
IPCCOMMAND( togglefloating, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( toggletag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( toggleview, 1, {ARG_TYPE_UINT} ),
|
||||
|
@ -30,6 +30,7 @@ case $# in
|
||||
transferall) ;&
|
||||
togglealttag) ;&
|
||||
togglebar) ;&
|
||||
toggletopbar) ;&
|
||||
togglefloating) ;&
|
||||
togglefullscreen) ;&
|
||||
fullscreen) ;&
|
||||
|
@ -310,6 +310,9 @@
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
#include "togglefullscreen.c"
|
||||
#endif
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
#include "toggletopbar.c"
|
||||
#endif
|
||||
#if TRANSFER_PATCH
|
||||
#include "transfer.c"
|
||||
#endif
|
||||
|
@ -312,6 +312,9 @@
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
#include "togglefullscreen.h"
|
||||
#endif
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
#include "toggletopbar.h"
|
||||
#endif
|
||||
#if TRANSFER_PATCH
|
||||
#include "transfer.h"
|
||||
#endif
|
||||
|
20
patch/toggletopbar.c
Normal file
20
patch/toggletopbar.c
Normal file
@ -0,0 +1,20 @@
|
||||
void
|
||||
toggletopbar(const Arg *arg)
|
||||
{
|
||||
Bar *bar;
|
||||
Monitor *m = selmon;
|
||||
|
||||
for (bar = m->bar; bar; bar = bar->next)
|
||||
bar->topbar = !bar->topbar;
|
||||
|
||||
if (!m->showbar) {
|
||||
togglebar(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
updatebarpos(m);
|
||||
|
||||
for (bar = m->bar; bar; bar = bar->next)
|
||||
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||
arrange(m);
|
||||
}
|
1
patch/toggletopbar.h
Normal file
1
patch/toggletopbar.h
Normal file
@ -0,0 +1 @@
|
||||
static void toggletopbar(const Arg *arg);
|
@ -333,6 +333,8 @@
|
||||
|
||||
#define TOGGLEFULLSCREEN_PATCH 1
|
||||
|
||||
#define TOGGLETOPBAR_PATCH 0
|
||||
|
||||
#define TOGGLELAYOUT_PATCH 0
|
||||
|
||||
#define TOGGLETAG_PATCH 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user