Update: Add back old dwm tagging, fix winnav
This commit is contained in:
parent
7d7cabd575
commit
6e75b2f915
|
@ -23,7 +23,7 @@
|
|||
- Super+t | Reorganize tags and move clients
|
||||
- Super+f | Full-screen the selected window
|
||||
- Super+b | Show/hide the speedwm bar
|
||||
- Super+s | Show/hide the systray (If trayer is installed)
|
||||
- Super+s | Show/hide the systray
|
||||
- Super+j/k | Move focus between visible windows
|
||||
- Super+Control+Space | Moves focus to the Master window (or back if Master is already focused)
|
||||
- Super+Alt+j/k | Increase/decrease gaps between windows in tiling layout by 1
|
||||
|
@ -65,9 +65,18 @@
|
|||
- Super+Shift+Escape | Ask the user if they want to shutdown or reboot or nothing
|
||||
- Super+Shift+i | Open a dmenu prompt and open the file the user picks in Zathura
|
||||
- Super+Shift+p | Open a dmenu prompt and open the file the user picks in Vim
|
||||
- Super+Control+1 | Mutes your audio
|
||||
- Super+Control+2 | Increases your volume
|
||||
- Super+Control+1 | Decreases your volume
|
||||
- Super+Control+1 | Combine the current tag with tag 1
|
||||
- Super+Control+2 | Combine the current tag with tag 2
|
||||
- Super+Control+3 | Combine the current tag with tag 3
|
||||
- Super+Control+4 | Combine the current tag with tag 4
|
||||
- Super+Control+5 | Combine the current tag with tag 5
|
||||
- Super+Control+6 | Combine the current tag with tag 6
|
||||
- Super+Control+7 | Combine the current tag with tag 7
|
||||
- Super+Control+8 | Combine the current tag with tag 8
|
||||
- Super+Control+9 | Combine the current tag with tag 9
|
||||
- Super+Control+q | Mutes your audio
|
||||
- Super+Control+w | Increases your volume
|
||||
- Super+Control+e | Decreases your volume
|
||||
- Super+Control+e | Switch to layout 3 (Grid)
|
||||
- Super+Control+r | Switch to layout 1 (Monocle)
|
||||
- Super+Control+t | Switch to layout 0 (Master & stack)
|
||||
|
@ -77,17 +86,26 @@
|
|||
- Super+Control+Tab | Open a dmenu prompt asking the user what layout to switch to
|
||||
- Super+Control+h | Open a list of all keybinds in your terminal using less
|
||||
- Super+Control+Shift+a/d | Move between available layouts
|
||||
- Super+Alt+s | Make the current selected window sticky
|
||||
- Super+Control+Shift+Esc | Open speedwm-utils (Main menu)
|
||||
- Super+Control+Shift+1 | Move the focused window to tag 1
|
||||
- Super+Control+Shift+2 | Move the focused window to tag 2
|
||||
- Super+Control+Shift+3 | Move the focused window to tag 3
|
||||
- Super+Control+Shift+4 | Move the focused window to tag 4
|
||||
- Super+Control+Shift+5 | Move the focused window to tag 5
|
||||
- Super+Control+Shift+6 | Move the focused window to tag 6
|
||||
- Super+Control+Shift+7 | Move the focused window to tag 7
|
||||
- Super+Control+Shift+8 | Move the focused window to tag 8
|
||||
- Super+Control+Shift+9 | Move the focused window to tag 9
|
||||
- Super+Control+Shift+Esc | Open speedwm-utils
|
||||
- Super+Control+Shift+Arrow | Resize the window to the screen size.
|
||||
- Super+Control+Shift+s | Set a wallpaper
|
||||
- Super+Control+Shift+n | Connect to wifi (Requires iwd)
|
||||
- Super+Control+Shift+b | Connect to a bluetooth device (Requires bluez and bluez-utils)
|
||||
- Super+Control+Shift+e | Open up a list of dotfiles in dmenu that you can edit.
|
||||
- Super+Control+Shift+1 | Pauses your music
|
||||
- Super+Control+Shift+1 | Decreases your music volume
|
||||
- Super+Control+Shift+2 | Increase your music volume
|
||||
- Alt+Super+Up/Down | Resize the window keeping the aspect ratio of it.
|
||||
- Super+Control+Shift+n | Connect to WLAN
|
||||
- Super+Control+Shift+b | Connect to a Bluetooth device
|
||||
- Super+Control+Shift+d | Open up a list of dotfiles in dmenu that you can edit.
|
||||
- Super+Control+Shift+q | Pauses your music
|
||||
- Super+Control+Shift+w | Decreases your music volume
|
||||
- Super+Control+Shift+e | Increase your music volume
|
||||
- Super+Alt+s | Make the current selected window sticky
|
||||
- Super+Alt+Up/Down | Resize the window keeping the aspect ratio of it.
|
||||
- Alt+Tab | Switch windows quickly and easily
|
||||
- Alt+Control+j/k | Change window size vertically (cfact)
|
||||
|
||||
|
|
20
keybinds.h
20
keybinds.h
|
@ -18,6 +18,12 @@
|
|||
* Once you're done with your edits, run 'make clean install'.
|
||||
*/
|
||||
|
||||
/* Tag related keybinds */
|
||||
#define TAGKEYS(CHAIN,KEY,TAG) { MODIFIER1, CHAIN, KEY, view, {.ui = 1 << TAG } }, \
|
||||
{ MODIFIER1|ShiftMask, CHAIN, KEY, previewtag, {.ui = TAG} }, \
|
||||
{ MODIFIER1|ControlMask, CHAIN, KEY, toggleview, {.ui = 1 << TAG } }, \
|
||||
{ MODIFIER1|ShiftMask|ControlMask, CHAIN, KEY, tag, {.ui = 1 << TAG } },
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier chain key key function argument */
|
||||
|
||||
|
@ -40,19 +46,19 @@ static const Key keys[] = {
|
|||
{ MODIFIER1|CONTROL, -1, XK_s, spawn, RCMD(SCREENSHOT_FULL) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_u, spawn, RCMD(TERMINAL RSS) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_m, spawn, RCMD(KILLMUSIC) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_1, spawn, RCMD(VOL_MUTE) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_2, spawn, RCMD(VOL_DOWN) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_3, spawn, RCMD(VOL_UP) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_1, spawn, RCMD(PAUSEMUSIC) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_2, spawn, RCMD(DOWNMUSIC) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_3, spawn, RCMD(UPMUSIC) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_q, spawn, RCMD(VOL_MUTE) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_w, spawn, RCMD(VOL_DOWN) },
|
||||
{ MODIFIER1|CONTROL, -1, XK_e, spawn, RCMD(VOL_UP) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_q, spawn, RCMD(PAUSEMUSIC) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_w, spawn, RCMD(DOWNMUSIC) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_e, spawn, RCMD(UPMUSIC) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_k, spawn, RCMD(VOL_OUTPUT_SPEAKER) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_Escape, spawn, RCMD("speedwm-utils") },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_s, spawn, RCMD("speedwm-swal") },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_n, spawn, RCMD(NETWORK) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_b, spawn, RCMD(BLUETOOTH) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_m, spawn, RCMD(TERMINAL EMAIL) },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_e, spawn, RCMD("speedwm_run -configure") },
|
||||
{ MODIFIER1|CONTROL|SHIFT, -1, XK_d, spawn, RCMD("speedwm_run -configure") },
|
||||
{ MODIFIER1, -1, XK_s, spawn, RCMD("speedwm-core -toggle") },
|
||||
|
||||
/* Layout keybinds */
|
||||
|
|
|
@ -92,13 +92,6 @@
|
|||
#define BLUETOOTH "speedwm-btctrl" /* Bluetooth manager to use */
|
||||
#define NOTIFICATION "dunst" /* Notification daemon to use */
|
||||
|
||||
/* Paths */
|
||||
#define SESSION_FILE "/tmp/speedwm-session" /* Session file. This file may be used as a list of windows and their tagnum */
|
||||
|
||||
/* Misc */
|
||||
#define TAGKEYS(CHAIN,KEY,TAG) { MODIFIER1, CHAIN, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODIFIER1|ShiftMask, CHAIN, KEY, previewtag, {.ui = TAG} }, \
|
||||
|
||||
/* Options
|
||||
*
|
||||
* If xrdb is installed, you can simply edit ~/.config/speedwm-de/speedwmrc instead of recompiling.
|
||||
|
|
|
@ -112,6 +112,6 @@ esac
|
|||
|
||||
wmctrl -a "$target" && echo "Switched focus"
|
||||
|
||||
command -v xsetroot > /dev/null && xsetroot -name "fsignal:38"
|
||||
command -v xsetroot > /dev/null && xsetroot -name "fsignal:32"
|
||||
|
||||
RESTORE
|
||||
|
|
25
speedwm.c
25
speedwm.c
|
@ -502,6 +502,8 @@ static void updateicon(Client *c);
|
|||
#endif
|
||||
static void updatewindowtype(Client *c);
|
||||
static void updatewmhints(Client *c);
|
||||
static void toggleview(const Arg *arg);
|
||||
static void tag(const Arg *arg);
|
||||
static void view(const Arg *arg);
|
||||
static void viewtoleft(const Arg *arg);
|
||||
static void viewtoright(const Arg *arg);
|
||||
|
@ -613,6 +615,7 @@ static xcb_connection_t *xcon;
|
|||
|
||||
/* Shell command */
|
||||
#define RCMD(cmd) {.v = (const char*[]){ shell, "-c", cmd, NULL } },
|
||||
#define SESSION_FILE "/tmp/speedwm-session"
|
||||
|
||||
/* Modifiers */
|
||||
#define CONTROL ControlMask
|
||||
|
@ -2901,6 +2904,18 @@ motionnotify(XEvent *e)
|
|||
mon = m;
|
||||
}
|
||||
|
||||
void
|
||||
toggleview(const Arg *arg)
|
||||
{
|
||||
unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
|
||||
|
||||
if (newtagset) {
|
||||
selmon->tagset[selmon->seltags] = newtagset;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
moveresize(const Arg *arg) {
|
||||
/* only floating windows can be moved */
|
||||
|
@ -4364,6 +4379,16 @@ spawn(const Arg *arg)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
tag(const Arg *arg)
|
||||
{
|
||||
if (selmon->sel && arg->ui & TAGMASK) {
|
||||
selmon->sel->tags = arg->ui & TAGMASK;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
spawnbar()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue