update docs, add lots of keybinds and functions
This commit is contained in:
parent
5f4708aa59
commit
ab50c4fc51
|
@ -20,7 +20,8 @@
|
|||
- speedwm.bar.hide: 0 ! Hide the bar by default (0/1)
|
||||
- speedwm.bar.hide.tags: 0 ! Hide the tags (0/1)
|
||||
- speedwm.bar.hide.emptytags: 1 ! Hide the tags that have no windows open (0/1)
|
||||
- speedwm.bar.hide.powerline: 0 ! Hide the powerline drawn over the tags (0/1)
|
||||
- speedwm.bar.hide.powerlinetags: 0 ! Hide the powerline drawn over the tags (0/1)
|
||||
- speedwm.bar.hide.powerlinetitle: 0 ! Hide the powerline drawn around the title (0/1)
|
||||
- speedwm.bar.hide.floating: 0 ! Hide the floating window indicator (0/1)
|
||||
- speedwm.bar.hide.layout: 0 ! Hide the layout indicator (0/1)
|
||||
- speedwm.bar.hide.sticky: 0 ! Hide the sticky indicator (0/1)
|
||||
|
@ -115,6 +116,11 @@
|
|||
- speedwm.color.layout: 0 ! Color the layout indicator (0/1)
|
||||
- speedwm.color.selectedtitle: 0 ! Color the selected title (0/1)
|
||||
!@
|
||||
!! Powerline options
|
||||
!@
|
||||
- speedwm.bar.powerline.tag.shape: 1 ! Shape of the tag powerlines (0: >, 1: /)
|
||||
- speedwm.bar.powerline.title.shape: 1 ! Shape of the title powerlines (0: >, 1: /)
|
||||
!@
|
||||
!! Cursor options
|
||||
!@
|
||||
- speedwm.cursor.warp: 1 ! Warp the cursor to the next focused window/monitor (0/1)
|
||||
|
|
|
@ -68,29 +68,35 @@
|
|||
- 68 - Toggle the tag area in the bar
|
||||
- 69 - Toggle the empty tags in the bar
|
||||
- 70 - Toggle the powerline tags in the bar
|
||||
- 71 - Toggle the title area in the bar
|
||||
- 72 - Toggle the unselected title area in the bar
|
||||
- 73 - Toggle the layout area in the bar
|
||||
- 74 - Toggle the status area in the bar
|
||||
- 75 - Toggle the floating indicator area in the bar
|
||||
- 76 - Toggle the sticky indicator area in the bar
|
||||
- 77 - Toggle the icon in the window title
|
||||
- 78 - Toggle bar position (top/bottom)
|
||||
- 79 - Toggle layouit position (left/right)
|
||||
- 80 - Show all bar modules
|
||||
- 81 - Increase bar height by 1
|
||||
- 82 - Decrease bar height by 1
|
||||
- 83 - Reset bar height
|
||||
- 84 - Increase vertical barpadding by 1
|
||||
- 85 - Decrease vertical barpadding by 1
|
||||
- 86 - Increase horizontal barpadding by 1
|
||||
- 87 - Decrease horizontal barpadding by 1
|
||||
- 88 - Increase vertical and horizontal barpadding by 1
|
||||
- 89 - Decrease vertical and horizontal barpadding by 1
|
||||
- 90 - Toggle vertical barpadding
|
||||
- 91 - Toggle horizontal barpadding
|
||||
- 92 - Toggle vertical and horizontal barpadding
|
||||
- 93 - Reset vertical barpadding
|
||||
- 94 - Reset horizontal barpadding
|
||||
- 95 - Reset vertical and horizontal barpadding
|
||||
- 71 - Toggle the powerline title in the bar
|
||||
- 72 - Toggle the powerline tags and title in the bar
|
||||
- 73 - Toggle the shape for powerline tags in the bar
|
||||
- 74 - Toggle the shape for powerline title in the bar
|
||||
- 75 - Toggle the shape for powerline tags and title in the bar
|
||||
- 76 - Reset powerline options
|
||||
- 77 - Toggle the title area in the bar
|
||||
- 78 - Toggle the unselected title area in the bar
|
||||
- 79 - Toggle the layout area in the bar
|
||||
- 80 - Toggle the status area in the bar
|
||||
- 81 - Toggle the floating indicator area in the bar
|
||||
- 82 - Toggle the sticky indicator area in the bar
|
||||
- 83 - Toggle the icon in the window title
|
||||
- 84 - Toggle bar position (top/bottom)
|
||||
- 85 - Toggle layouit position (left/right)
|
||||
- 86 - Show all bar modules
|
||||
- 87 - Increase bar height by 1
|
||||
- 88 - Decrease bar height by 1
|
||||
- 89 - Reset bar height
|
||||
- 90 - Increase vertical barpadding by 1
|
||||
- 91 - Decrease vertical barpadding by 1
|
||||
- 92 - Increase horizontal barpadding by 1
|
||||
- 93 - Decrease horizontal barpadding by 1
|
||||
- 94 - Increase vertical and horizontal barpadding by 1
|
||||
- 95 - Decrease vertical and horizontal barpadding by 1
|
||||
- 96 - Toggle vertical barpadding
|
||||
- 97 - Toggle horizontal barpadding
|
||||
- 98 - Toggle vertical and horizontal barpadding
|
||||
- 99 - Reset vertical barpadding
|
||||
- 100 - Reset horizontal barpadding
|
||||
- 101 - Reset vertical and horizontal barpadding
|
||||
|
||||
|
|
|
@ -142,6 +142,12 @@
|
|||
- Super+p & u/d - Increase/decrease bar padding by 5
|
||||
- Super+p & r - Reset bar padding to default
|
||||
- Super+p & t - Toggle bar padding on/off
|
||||
- Super+, & w - Toggle title powerline on/off
|
||||
- Super+, & t - Toggle tag powerlines on/off
|
||||
- Super+, & a - Toggle title powerline shape
|
||||
- Super+, & d - Toggle tag powerline shape
|
||||
- Super+, & s - Toggle tag and title powerline shapes
|
||||
- Super+, & r - Reset powerline options
|
||||
- Super+Shift+g & i - Decrease inner gaps by 1
|
||||
- Super+Shift+g & o - Decrease outer gaps by 1
|
||||
- Super+Shift+e & a - Open the virtual keyboard
|
||||
|
|
|
@ -191,7 +191,6 @@ static Key keys[] = {
|
|||
{ MODIFIER1, XK_t, XK_w, togglebartitle, {0} },
|
||||
{ MODIFIER1, XK_t, XK_u, togglebarunseltitle, {0} },
|
||||
{ MODIFIER1, XK_t, XK_s, togglebarstatus, {0} },
|
||||
{ MODIFIER1, XK_t, XK_p, togglebarpowerline, {0} },
|
||||
{ MODIFIER1, XK_t, XK_y, togglebaremptytags, {0} },
|
||||
{ MODIFIER1, XK_t, XK_l, togglebarlt, {0} },
|
||||
{ MODIFIER1, XK_t, XK_i, togglebaricon, {0} },
|
||||
|
@ -199,6 +198,13 @@ static Key keys[] = {
|
|||
{ MODIFIER1, XK_t, XK_b, togglebarpos, {0} },
|
||||
{ MODIFIER1, XK_t, XK_r, resetbar, {0} },
|
||||
|
||||
{ MODIFIER1, XK_apostrophe,XK_w, toggletitlepowerline, {0} },
|
||||
{ MODIFIER1, XK_apostrophe,XK_t, toggletagpowerline, {0} },
|
||||
{ MODIFIER1, XK_apostrophe,XK_a, toggletitleplshape, {0} },
|
||||
{ MODIFIER1, XK_apostrophe,XK_d, toggletagplshape, {0} },
|
||||
{ MODIFIER1, XK_apostrophe,XK_s, toggleplshape, {0} },
|
||||
{ MODIFIER1, XK_apostrophe,XK_r, resetpowerline, {0} },
|
||||
|
||||
{ MODIFIER1, XK_l, XK_p, togglelayoutpos, {0} },
|
||||
|
||||
{ MODIFIER1, XK_w, XK_r, spawn, cmd( "speedwm-swal --randomize" ) },
|
||||
|
|
|
@ -219,7 +219,8 @@ static int hideicon = 0; /* Hide icon (1) or show (0)
|
|||
static int hidetags = 0; /* Hide status bar (1) or show (0) */
|
||||
static int hidesystray = 1; /* Hide systray by default (1) or show (0) */
|
||||
static int hideemptytags = 1; /* Hide empty tags (1) or show (0) */
|
||||
static int hidepowerline = 0; /* Hide tag powerline (1) or show (0) */
|
||||
static int hidetagpowerline = 0; /* Hide tag powerline (1) or show (0) */
|
||||
static int hidetitlepowerline = 1; /* Hide title powerline (1) or show (0) */
|
||||
static int hidefloating = 0; /* Hide floating indicator (1) or show (0) */
|
||||
static int hidesticky = 0; /* Hide sticky indicator (1) or show (0) */
|
||||
|
||||
|
@ -322,6 +323,10 @@ static int colorhiddentitle = 0; /* Color the hidden title. */
|
|||
/* Layout */
|
||||
static int colorlayout = 0; /* Color the layout indicator. If you're going to be using Powerlines, the tags look better with this set to 0. */
|
||||
|
||||
/* Powerline options */
|
||||
static int tagplshape = 0; /* Shape of the tag powerlines (0: >, 1: /) */
|
||||
static int titleplshape = 0; /* Shape of the title powerlines (0: >, 1: /) */
|
||||
|
||||
/* Text options
|
||||
*
|
||||
* Unused/empty tags
|
||||
|
|
196
signal.h
196
signal.h
|
@ -5,105 +5,111 @@
|
|||
* Once you're done with your edits, run 'make clean install'. */
|
||||
static Signal signals[] = {
|
||||
/* signum function argument */
|
||||
{ 1, setlayout, {.v = &layouts[0]} }, /* Tiling layout */
|
||||
{ 2, setlayout, {.v = &layouts[1]} }, /* Floating layout */
|
||||
{ 3, setlayout, {.v = &layouts[2]} }, /* Monocle layout */
|
||||
{ 4, setlayout, {.v = &layouts[3]} }, /* Grid layout */
|
||||
{ 5, setlayout, {.v = &layouts[4]} }, /* Deck layout */
|
||||
{ 6, setlayout, {.v = &layouts[5]} }, /* Centered Master layout */
|
||||
{ 7, setlayout, {.v = &layouts[6]} }, /* Centered Floating Master layout */
|
||||
{ 8, setlayout, {.v = &layouts[7]} }, /* Fibonacci Spiral layout */
|
||||
{ 9, setlayout, {.v = &layouts[8]} }, /* Fibonacci Dwindle layout */
|
||||
{ 10, setlayout, {.v = &layouts[9]} }, /* Bottom Stack layout */
|
||||
{ 11, setlayout, {.v = &layouts[10]} }, /* Horizontal Bottom Stack layout */
|
||||
{ 12, setlayout, {.v = &layouts[11]} }, /* Horizontal Grid layout */
|
||||
{ 13, setlayout, {.v = &layouts[12]} }, /* Dynamic Grid layout */
|
||||
{ 1, setlayout, {.v = &layouts[0]} }, /* Tiling layout */
|
||||
{ 2, setlayout, {.v = &layouts[1]} }, /* Floating layout */
|
||||
{ 3, setlayout, {.v = &layouts[2]} }, /* Monocle layout */
|
||||
{ 4, setlayout, {.v = &layouts[3]} }, /* Grid layout */
|
||||
{ 5, setlayout, {.v = &layouts[4]} }, /* Deck layout */
|
||||
{ 6, setlayout, {.v = &layouts[5]} }, /* Centered Master layout */
|
||||
{ 7, setlayout, {.v = &layouts[6]} }, /* Centered Floating Master layout */
|
||||
{ 8, setlayout, {.v = &layouts[7]} }, /* Fibonacci Spiral layout */
|
||||
{ 9, setlayout, {.v = &layouts[8]} }, /* Fibonacci Dwindle layout */
|
||||
{ 10, setlayout, {.v = &layouts[9]} }, /* Bottom Stack layout */
|
||||
{ 11, setlayout, {.v = &layouts[10]} }, /* Horizontal Bottom Stack layout */
|
||||
{ 12, setlayout, {.v = &layouts[11]} }, /* Horizontal Grid layout */
|
||||
{ 13, setlayout, {.v = &layouts[12]} }, /* Dynamic Grid layout */
|
||||
#if LAYOUT_CUSTOM
|
||||
{ 14, setlayout, {.v = &layouts[13]} }, /* Custom layout */
|
||||
{ 15, set_s_layout, {.v = &layouts[13]} },
|
||||
{ 14, setlayout, {.v = &layouts[13]} }, /* Custom layout */
|
||||
{ 15, set_s_layout, {.v = &layouts[13]} },
|
||||
#endif
|
||||
{ 16, cyclelayout, {.i = +1 } },
|
||||
{ 17, cyclelayout, {.i = -1 } },
|
||||
{ 18, setmfact, {.f = +0.05} },
|
||||
{ 19, setmfact, {.f = -0.05} },
|
||||
{ 20, togglesticky, {0} },
|
||||
{ 21, togglebar, {0} },
|
||||
{ 22, togglefullscr, {0} },
|
||||
{ 23, togglefloating, {0} },
|
||||
{ 24, zoom, {0} },
|
||||
{ 25, reorganizetags, {0} },
|
||||
{ 26, quit, {0} },
|
||||
{ 27, quit, {1} },
|
||||
{ 28, show, {0} },
|
||||
{ 29, hide, {0} },
|
||||
{ 30, killclient, {0} },
|
||||
{ 31, inplacerotate, {.i = +1 } },
|
||||
{ 32, inplacerotate, {.i = -1 } },
|
||||
{ 33, incmastercount, {.i = +1 } },
|
||||
{ 34, incmastercount, {.i = -1 } },
|
||||
{ 35, focusmaster, {0} },
|
||||
{ 36, focusstackvis, {.i = +1 } },
|
||||
{ 37, focusstackvis, {.i = -1 } },
|
||||
{ 38, focusstackhid, {.i = +1 } },
|
||||
{ 39, focusstackhid, {.i = -1 } },
|
||||
{ 40, toggleopacity, {0} },
|
||||
{ 41, setcfact, {.f = +0.05 } },
|
||||
{ 42, setcfact, {.f = -0.05 } },
|
||||
{ 43, viewtoleft, {0} },
|
||||
{ 44, viewtoright, {0} },
|
||||
{ 45, defaultgaps, {0} },
|
||||
{ 46, togglegaps, {0} },
|
||||
{ 47, incrgaps, {.i = +1 } },
|
||||
{ 48, incrgaps, {.i = -1 } },
|
||||
{ 49, incrigaps, {.i = +1 } },
|
||||
{ 50, incrigaps, {.i = -1 } },
|
||||
{ 51, incrogaps, {.i = +1 } },
|
||||
{ 52, incrogaps, {.i = -1 } },
|
||||
{ 53, killunsel, {0} },
|
||||
{ 54, focusmon, {.i = +1 } },
|
||||
{ 55, focusmon, {.i = -1 } },
|
||||
{ 56, scratchpad_show, {0} },
|
||||
{ 57, scratchpad_hide, {0} },
|
||||
{ 58, scratchpad_remove, {0} },
|
||||
{ 59, reset_layout, {0} },
|
||||
{ 60, resetmastercount, {0} },
|
||||
{ 16, cyclelayout, {.i = +1 } },
|
||||
{ 17, cyclelayout, {.i = -1 } },
|
||||
{ 18, setmfact, {.f = +0.05} },
|
||||
{ 19, setmfact, {.f = -0.05} },
|
||||
{ 20, togglesticky, {0} },
|
||||
{ 21, togglebar, {0} },
|
||||
{ 22, togglefullscr, {0} },
|
||||
{ 23, togglefloating, {0} },
|
||||
{ 24, zoom, {0} },
|
||||
{ 25, reorganizetags, {0} },
|
||||
{ 26, quit, {0} },
|
||||
{ 27, quit, {1} },
|
||||
{ 28, show, {0} },
|
||||
{ 29, hide, {0} },
|
||||
{ 30, killclient, {0} },
|
||||
{ 31, inplacerotate, {.i = +1 } },
|
||||
{ 32, inplacerotate, {.i = -1 } },
|
||||
{ 33, incmastercount, {.i = +1 } },
|
||||
{ 34, incmastercount, {.i = -1 } },
|
||||
{ 35, focusmaster, {0} },
|
||||
{ 36, focusstackvis, {.i = +1 } },
|
||||
{ 37, focusstackvis, {.i = -1 } },
|
||||
{ 38, focusstackhid, {.i = +1 } },
|
||||
{ 39, focusstackhid, {.i = -1 } },
|
||||
{ 40, toggleopacity, {0} },
|
||||
{ 41, setcfact, {.f = +0.05 } },
|
||||
{ 42, setcfact, {.f = -0.05 } },
|
||||
{ 43, viewtoleft, {0} },
|
||||
{ 44, viewtoright, {0} },
|
||||
{ 45, defaultgaps, {0} },
|
||||
{ 46, togglegaps, {0} },
|
||||
{ 47, incrgaps, {.i = +1 } },
|
||||
{ 48, incrgaps, {.i = -1 } },
|
||||
{ 49, incrigaps, {.i = +1 } },
|
||||
{ 50, incrigaps, {.i = -1 } },
|
||||
{ 51, incrogaps, {.i = +1 } },
|
||||
{ 52, incrogaps, {.i = -1 } },
|
||||
{ 53, killunsel, {0} },
|
||||
{ 54, focusmon, {.i = +1 } },
|
||||
{ 55, focusmon, {.i = -1 } },
|
||||
{ 56, scratchpad_show, {0} },
|
||||
{ 57, scratchpad_hide, {0} },
|
||||
{ 58, scratchpad_remove, {0} },
|
||||
{ 59, reset_layout, {0} },
|
||||
{ 60, resetmastercount, {0} },
|
||||
#if USESYSTRAY
|
||||
{ 61, togglesystray, {0} },
|
||||
{ 61, togglesystray, {0} },
|
||||
#endif
|
||||
{ 62, hideall, {0} },
|
||||
{ 63, showall, {0} },
|
||||
{ 64, reset_mfact, {0} },
|
||||
{ 62, hideall, {0} },
|
||||
{ 63, showall, {0} },
|
||||
{ 64, reset_mfact, {0} },
|
||||
#if USEXRESOURCES
|
||||
{ 65, reloadcolors, {0} },
|
||||
{ 65, reloadcolors, {0} },
|
||||
#endif
|
||||
{ 66, viewtoleft_vacant, {0} },
|
||||
{ 67, viewtoright_vacant, {0} },
|
||||
{ 68, togglebartags, {0} },
|
||||
{ 69, togglebaremptytags, {0} },
|
||||
{ 70, togglebarpowerline, {0} },
|
||||
{ 71, togglebartitle, {0} },
|
||||
{ 72, togglebarunseltitle,{0} },
|
||||
{ 73, togglebarlt, {0} },
|
||||
{ 74, togglebarstatus, {0} },
|
||||
{ 75, togglebarfloat, {0} },
|
||||
{ 76, togglebarsticky, {0} },
|
||||
{ 77, togglebaricon, {0} },
|
||||
{ 78, togglebarpos, {0} },
|
||||
{ 79, togglelayoutpos, {0} },
|
||||
{ 80, resetbar, {0} },
|
||||
{ 81, setbarheight, {.i = +1 } },
|
||||
{ 82, setbarheight, {.i = -1 } },
|
||||
{ 83, resetbarheight, {0} },
|
||||
{ 84, setbarpaddingv, {.i = +1 } },
|
||||
{ 85, setbarpaddingv, {.i = -1 } },
|
||||
{ 86, setbarpaddingh, {.i = +1 } },
|
||||
{ 87, setbarpaddingh, {.i = -1 } },
|
||||
{ 88, setbarpadding, {.i = +1 } },
|
||||
{ 89, setbarpadding, {.i = -1 } },
|
||||
{ 90, togglebarpaddingv, {0} },
|
||||
{ 91, togglebarpaddingh, {0} },
|
||||
{ 92, togglebarpadding, {0} },
|
||||
{ 93, resetbarpaddingv, {0} },
|
||||
{ 94, resetbarpaddingh, {0} },
|
||||
{ 95, resetbarpadding, {0} },
|
||||
{ 66, viewtoleft_vacant, {0} },
|
||||
{ 67, viewtoright_vacant, {0} },
|
||||
{ 68, togglebartags, {0} },
|
||||
{ 69, togglebaremptytags, {0} },
|
||||
{ 70, toggletagpowerline, {0} },
|
||||
{ 71, toggletitlepowerline, {0} },
|
||||
{ 72, togglepowerline, {0} },
|
||||
{ 73, toggletagplshape, {0} },
|
||||
{ 74, toggletitleplshape, {0} },
|
||||
{ 75, toggleplshape, {0} },
|
||||
{ 76, resetpowerline, {0} },
|
||||
{ 77, togglebartitle, {0} },
|
||||
{ 78, togglebarunseltitle, {0} },
|
||||
{ 79, togglebarlt, {0} },
|
||||
{ 80, togglebarstatus, {0} },
|
||||
{ 81, togglebarfloat, {0} },
|
||||
{ 82, togglebarsticky, {0} },
|
||||
{ 83, togglebaricon, {0} },
|
||||
{ 84, togglebarpos, {0} },
|
||||
{ 85, togglelayoutpos, {0} },
|
||||
{ 86, resetbar, {0} },
|
||||
{ 87, setbarheight, {.i = +1 } },
|
||||
{ 88, setbarheight, {.i = -1 } },
|
||||
{ 89, resetbarheight, {0} },
|
||||
{ 90, setbarpaddingv, {.i = +1 } },
|
||||
{ 91, setbarpaddingv, {.i = -1 } },
|
||||
{ 92, setbarpaddingh, {.i = +1 } },
|
||||
{ 93, setbarpaddingh, {.i = -1 } },
|
||||
{ 94, setbarpadding, {.i = +1 } },
|
||||
{ 95, setbarpadding, {.i = -1 } },
|
||||
{ 96, togglebarpaddingv, {0} },
|
||||
{ 97, togglebarpaddingh, {0} },
|
||||
{ 98, togglebarpadding, {0} },
|
||||
{ 99, resetbarpaddingv, {0} },
|
||||
{ 100, resetbarpaddingh, {0} },
|
||||
{ 101, resetbarpadding, {0} },
|
||||
};
|
||||
|
|
187
speedwm.c
187
speedwm.c
|
@ -271,10 +271,17 @@ struct Monitor {
|
|||
int hidetags;
|
||||
int hidesystray;
|
||||
int hideemptytags;
|
||||
int hidepowerline;
|
||||
int hidefloating;
|
||||
int hidesticky;
|
||||
|
||||
/* powerline stuff */
|
||||
int hidetagpowerline;
|
||||
int hidetitlepowerline;
|
||||
|
||||
/* powerline shape */
|
||||
int tagplshape;
|
||||
int titleplshape;
|
||||
|
||||
/* position */
|
||||
int barposition;
|
||||
int layoutposition;
|
||||
|
@ -590,7 +597,15 @@ static void togglebartags(const Arg *arg);
|
|||
static void togglebaremptytags(const Arg *arg);
|
||||
static void togglebartitle(const Arg *arg);
|
||||
static void togglebarunseltitle(const Arg *arg);
|
||||
static void togglebarpowerline(const Arg *arg);
|
||||
|
||||
static void toggletagpowerline(const Arg *arg);
|
||||
static void toggletitlepowerline(const Arg *arg);
|
||||
static void togglepowerline(const Arg *arg);
|
||||
static void toggletitleplshape(const Arg *arg);
|
||||
static void toggletagplshape(const Arg *arg);
|
||||
static void toggleplshape(const Arg *arg);
|
||||
static void resetpowerline(const Arg *arg);
|
||||
|
||||
static void togglebarlt(const Arg *arg);
|
||||
static void togglebarstatus(const Arg *arg);
|
||||
static void togglebarfloat(const Arg *arg);
|
||||
|
@ -1211,7 +1226,7 @@ buttonpress(XEvent *e)
|
|||
unsigned int i, x, click, occ;
|
||||
int plt = 0;
|
||||
|
||||
if (!selmon->hidepowerline)
|
||||
if (!selmon->hidetagpowerline)
|
||||
plt = plw;
|
||||
|
||||
Arg arg = {0};
|
||||
|
@ -1233,7 +1248,7 @@ buttonpress(XEvent *e)
|
|||
i = x = occ = 0;
|
||||
|
||||
/* powerline */
|
||||
if (!selmon->hidepowerline)
|
||||
if (!selmon->hidetagpowerline)
|
||||
x = plt;
|
||||
|
||||
/* Bitmask of occupied tags */
|
||||
|
@ -1312,7 +1327,7 @@ buttonpress(XEvent *e)
|
|||
x += (1.0 / (double)m->bt) * m->btw;
|
||||
} while (c && ev->x > x && (c = c->next));
|
||||
|
||||
if (selmon->hidepowerline && !!selmon->hidepowerline)
|
||||
if (selmon->hidetagpowerline || selmon->hidetitlepowerline)
|
||||
click = ClkWinTitle;
|
||||
|
||||
arg.v = c;
|
||||
|
@ -1698,10 +1713,17 @@ createmon(void)
|
|||
m->hidetags = hidetags;
|
||||
m->hidesystray = hidesystray;
|
||||
m->hideemptytags = hideemptytags;
|
||||
m->hidepowerline = hidepowerline;
|
||||
m->hidefloating = hidefloating;
|
||||
m->hidesticky = hidesticky;
|
||||
|
||||
/* powerline stuff */
|
||||
m->hidetagpowerline = hidetagpowerline;
|
||||
m->hidetitlepowerline = hidetitlepowerline;
|
||||
|
||||
/* shape of powerlines */
|
||||
m->tagplshape = tagplshape;
|
||||
m->titleplshape = titleplshape;
|
||||
|
||||
/* pos */
|
||||
m->barposition = barposition;
|
||||
m->layoutposition = layoutposition;
|
||||
|
@ -2283,12 +2305,11 @@ drawbaritems(Monitor *m)
|
|||
int wt;
|
||||
Clr *prevscheme, *nxtscheme; /* powerline schemes */
|
||||
|
||||
if (!selmon->hidepowerline) {
|
||||
if (!selmon->hidetagpowerline || !selmon->hidetitlepowerline) {
|
||||
plw = drw->fonts->h / 2 + 1;
|
||||
plt = plw;
|
||||
} else {
|
||||
} else
|
||||
plw = 0;
|
||||
}
|
||||
|
||||
/* indicators */
|
||||
int boxs = drw->fonts->h / 9;
|
||||
|
@ -2367,14 +2388,18 @@ resizebarwin(m);
|
|||
w = TEXTW(tagtext);
|
||||
|
||||
/* draw powerlined tags */
|
||||
if (!selmon->hidepowerline) {
|
||||
if (!selmon->hidetagpowerline) {
|
||||
prevscheme = scheme[SchemeBar]; /* previous scheme = scheme */
|
||||
if (urg & 1 << i && allowurgent)
|
||||
drw_settrans(drw, prevscheme, (nxtscheme = scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsUrg])); /* set transition colorscheme */
|
||||
else
|
||||
drw_settrans(drw, prevscheme, (nxtscheme = scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsNorm])); /* set transition colorscheme */
|
||||
|
||||
drw_arrow(drw, x, 0, plt, bh, 1, 0); /* draw arrow */
|
||||
if (!selmon->tagplshape)
|
||||
drw_arrow(drw, x, 0, plt, bh, 1, 0); /* draw arrow */
|
||||
else
|
||||
drw_arrow(drw, x, 0, plt, bh, 1, 1); /* draw slash */
|
||||
|
||||
x += plt;
|
||||
drw_setscheme(drw, nxtscheme); /* set scheme to next scheme */
|
||||
} else {
|
||||
|
@ -2397,11 +2422,16 @@ resizebarwin(m);
|
|||
}
|
||||
|
||||
/* draw end of powerline tags */
|
||||
if (!selmon->hidepowerline) {
|
||||
if (!selmon->hidetagpowerline) {
|
||||
prevscheme = nxtscheme; /* previous scheme = next colorscheme */
|
||||
nxtscheme = scheme[SchemeBar]; /* next colorscheme = bar color */
|
||||
drw_settrans(drw, prevscheme, nxtscheme); /* set transition colorscheme */
|
||||
drw_arrow(drw, x, 0, plt, bh, 1, 0); /* draw arrow */
|
||||
|
||||
if (!selmon->tagplshape)
|
||||
drw_arrow(drw, x, 0, plt, bh, 1, 0); /* draw arrow */
|
||||
else
|
||||
drw_arrow(drw, x, 0, plt, bh, 1, 1); /* draw arrow */
|
||||
|
||||
x += plt; /* powerline width */
|
||||
}
|
||||
}
|
||||
|
@ -2451,9 +2481,9 @@ resizebarwin(m);
|
|||
}
|
||||
|
||||
/* pl title */
|
||||
if (!selmon->hidepowerline)
|
||||
if (!selmon->hidetitlepowerline)
|
||||
tabw -= 2 * plt;
|
||||
else {
|
||||
else if (selmon->hidetagpowerline) {
|
||||
plt = 0;
|
||||
plw = 0;
|
||||
}
|
||||
|
@ -2510,22 +2540,23 @@ resizebarwin(m);
|
|||
}
|
||||
}
|
||||
|
||||
/* set scheme if we didn't set it earlier (because we ended the for) */
|
||||
if (docontinue) {
|
||||
tabw = w;
|
||||
remainder = w;
|
||||
}
|
||||
int pltitle = 0;
|
||||
|
||||
if (!selmon->hidetitlepowerline)
|
||||
pltitle = plt;
|
||||
|
||||
/* draw title and icon */
|
||||
#if USEWINICON
|
||||
if (selmon->hideicon) {
|
||||
#endif
|
||||
drw_text(drw, x + plt, 0, tabw, bh, lrpad / 2, c->name, 0);
|
||||
drw_text(drw, x + pltitle, 0, tabw, bh, lrpad / 2, c->name, 0);
|
||||
#if USEWINICON
|
||||
} else {
|
||||
drw_text(drw, x + plt, 0, tabw, bh, lrpad / 2 + (c->icon ? c->icw + iconspacing : 0), c->name, 0); /* draw, with icon spacing and width added */
|
||||
if (c->icon)
|
||||
drw_pic(drw, x + plt + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */
|
||||
drw_text(drw, x + pltitle, 0, tabw, bh, lrpad / 2 + (c->icon ? c->icw + iconspacing : 0), c->name, 0); /* draw, with icon spacing and width added */
|
||||
if (c->icon && !selmon->hidetitlepowerline)
|
||||
drw_pic(drw, x + pltitle + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */
|
||||
else if (c->icon)
|
||||
drw_pic(drw, x + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2539,14 +2570,26 @@ resizebarwin(m);
|
|||
drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0);
|
||||
}
|
||||
|
||||
if (!selmon->hidepowerline) {
|
||||
if (!selmon->hidetitlepowerline) {
|
||||
drw_settrans(drw, c == m->sel ? scheme[SchemeTitleSel] : scheme[scm], scheme[SchemeBar]);
|
||||
drw_arrow(drw, x, 0, plt, bh, 0, 1);
|
||||
drw_arrow(drw, x + tabw + plt, 0, plt, bh, 1, 1);
|
||||
|
||||
/* Slash shaped */
|
||||
if (selmon->titleplshape) {
|
||||
drw_arrow(drw, x, 0, plt, bh, 0, 1);
|
||||
drw_arrow(drw, x + tabw + plt, 0, plt, bh, 1, 1);
|
||||
} else {
|
||||
/* Arrow shaped */
|
||||
drw_arrow(drw, x, 0, plt, bh, 0, 0);
|
||||
drw_arrow(drw, x + tabw + plt, 0, plt, bh, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* x = x + title width, ending the title section of the bar */
|
||||
x += tabw + 2 * plt;
|
||||
/* x += title width */
|
||||
x += tabw;
|
||||
|
||||
/* extra width for title */
|
||||
if (!selmon->hidetitlepowerline)
|
||||
x += 2 * plt;
|
||||
}
|
||||
} else {
|
||||
/* set scheme to the bar scheme so we can draw other stuff later */
|
||||
|
@ -3787,7 +3830,7 @@ motionnotify(XEvent *e)
|
|||
unsigned int i, x, occ = 0, lts = 0;
|
||||
int plt = 0;
|
||||
|
||||
if (!selmon->hidepowerline)
|
||||
if (!selmon->hidetagpowerline)
|
||||
plt = plw;
|
||||
|
||||
#if USETAGPREVIEW
|
||||
|
@ -5835,9 +5878,53 @@ togglebarunseltitle(const Arg *arg)
|
|||
}
|
||||
|
||||
void
|
||||
togglebarpowerline(const Arg *arg)
|
||||
toggletagpowerline(const Arg *arg)
|
||||
{
|
||||
selmon->hidepowerline = !selmon->hidepowerline;
|
||||
selmon->hidetagpowerline = !selmon->hidetagpowerline;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
toggletitlepowerline(const Arg *arg)
|
||||
{
|
||||
selmon->hidetitlepowerline = !selmon->hidetitlepowerline;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
togglepowerline(const Arg *arg)
|
||||
{
|
||||
if (selmon->hidetitlepowerline == selmon->hidetagpowerline) {
|
||||
selmon->hidetitlepowerline = !selmon->hidetitlepowerline;
|
||||
selmon->hidetagpowerline = !selmon->hidetagpowerline;
|
||||
} else {
|
||||
selmon->hidetagpowerline = !selmon->hidetagpowerline;
|
||||
selmon->hidetitlepowerline = selmon->hidetagpowerline;
|
||||
}
|
||||
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
toggletagplshape(const Arg *arg)
|
||||
{
|
||||
selmon->tagplshape = !selmon->tagplshape;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
toggletitleplshape(const Arg *arg)
|
||||
{
|
||||
selmon->titleplshape = !selmon->titleplshape;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
toggleplshape(const Arg *arg)
|
||||
{
|
||||
selmon->titleplshape = !selmon->titleplshape;
|
||||
selmon->tagplshape = selmon->titleplshape;
|
||||
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
|
@ -5883,6 +5970,17 @@ togglebarsticky(const Arg *arg)
|
|||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
resetpowerline(const Arg *arg)
|
||||
{
|
||||
selmon->titleplshape = titleplshape;
|
||||
selmon->tagplshape = tagplshape;
|
||||
selmon->hidetagpowerline = hidetagpowerline;
|
||||
selmon->hidetitlepowerline = hidetitlepowerline;
|
||||
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
resetbar(const Arg *arg)
|
||||
{
|
||||
|
@ -5895,13 +5993,36 @@ resetbar(const Arg *arg)
|
|||
selmon->hidestatus = hidestatus;
|
||||
selmon->hidefloating = hidefloating;
|
||||
selmon->hidesticky = hidesticky;
|
||||
selmon->hidepowerline = hidepowerline;
|
||||
selmon->hidetagpowerline = hidetagpowerline;
|
||||
selmon->hidetitlepowerline = hidetitlepowerline;
|
||||
selmon->hideunselectedtitle = hideunselectedtitle;
|
||||
selmon->hideemptytags = hideemptytags;
|
||||
|
||||
selmon->barposition = barposition;
|
||||
selmon->layoutposition = layoutposition;
|
||||
|
||||
/* reset barpadding */
|
||||
resetbarpadding(arg);
|
||||
|
||||
updatebarpos(selmon);
|
||||
#if USESYSTRAY
|
||||
resizebarwin(selmon);
|
||||
if (!selmon->hidesystray) {
|
||||
XWindowChanges wc;
|
||||
wc.y = 0;
|
||||
if (!selmon->barposition)
|
||||
wc.y = selmon->mh - bh;
|
||||
XConfigureWindow(dpy, systray->win, CWY, &wc);
|
||||
}
|
||||
#else
|
||||
if (selmon->barposition) {
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx + sp, selmon->by + vp, selmon->ww - 2 * sp, selmon->bh);
|
||||
XMoveResizeWindow(dpy, selmon->traywin, selmon->wx + sp, selmon->by + vp, selmon->ww - 2 * sp, selmon->bh);
|
||||
} else {
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx + sp, selmon->by - vp, selmon->ww - 2 * sp, selmon->bh);
|
||||
XMoveResizeWindow(dpy, selmon->traywin, selmon->wx + sp, selmon->by - vp, selmon->ww - 2 * sp, selmon->bh);
|
||||
}
|
||||
#endif
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,11 +92,14 @@ ResourcePref resources[] = {
|
|||
{ "bar.hide.icon", INTEGER, &hideicon },
|
||||
{ "bar.hide.tags", INTEGER, &hidetags },
|
||||
{ "bar.hide.emptytags", INTEGER, &hideemptytags },
|
||||
{ "bar.hide.powerline", INTEGER, &hidepowerline },
|
||||
{ "bar.hide.powerlinetitle", INTEGER, &hidetitlepowerline },
|
||||
{ "bar.hide.powerlinetags", INTEGER, &hidetagpowerline },
|
||||
{ "bar.hide.status", INTEGER, &hidestatus },
|
||||
{ "bar.hide.systray", INTEGER, &hidesystray },
|
||||
{ "bar.hide.sticky", INTEGER, &hidesticky },
|
||||
{ "bar.hide.floating", INTEGER, &hidefloating },
|
||||
{ "bar.powerline.tag.shape", INTEGER, &tagplshape },
|
||||
{ "bar.powerline.title.shape", INTEGER, &titleplshape },
|
||||
{ "client.allowurgent", INTEGER, &allowurgent },
|
||||
{ "status.statusallmons", INTEGER, &statusallmons },
|
||||
{ "tag.resetlayout", INTEGER, &resetlayout },
|
||||
|
|
Loading…
Reference in a new issue