patch(bar): dwl bar.patch
This commit is contained in:
parent
1a74e74094
commit
b1ea5090ee
5 changed files with 780 additions and 79 deletions
108
config.def.h
108
config.def.h
|
|
@ -12,6 +12,18 @@ static const float bordercolor[] = COLOR(0x444444ff);
|
|||
static const float focuscolor[] = COLOR(0x005577ff);
|
||||
static const float unfocuseddim[] = COLOR(0x00000088);
|
||||
static const float urgentcolor[] = COLOR(0xff0000ff);
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = {"monospace:size=10"};
|
||||
static const float rootcolor[] = COLOR(0x000000ff);
|
||||
|
||||
static uint32_t colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { 0xbbbbbbff, 0x222222ff, 0x444444ff },
|
||||
[SchemeSel] = { 0xeeeeeeff, 0x005577ff, 0x005577ff },
|
||||
[SchemeUrg] = { 0, 0, 0x770000ff },
|
||||
};
|
||||
|
||||
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
|
||||
static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You can also use glsl colors */
|
||||
|
||||
|
|
@ -21,19 +33,16 @@ static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You ca
|
|||
/* logging */
|
||||
static int log_level = WLR_ERROR;
|
||||
|
||||
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
||||
static const Rule rules[] = {
|
||||
<<<<<<< HEAD
|
||||
/* app_id title tags mask isfloating neverdim monitor */
|
||||
/* examples:
|
||||
{ "Gimp_example", NULL, 0, 1, 0, -1 },
|
||||
*/
|
||||
{ "firefox_example", NULL, 1 << 8, 0, 1, -1 },
|
||||
=======
|
||||
/* app_id title tags mask isfloating monitor */
|
||||
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
||||
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
||||
/* default/example rule: can be changed but cannot be eliminated; at least one rule must exist */
|
||||
>>>>>>> main
|
||||
{ "firefox-developer-edition", NULL, 1 << 8, 0, 1, -1 },
|
||||
{ "idea", NULL, 1 << 0, 0, 1, -1},
|
||||
{ "vesktop", NULL, 1 << 1, 0, 1, -1 },
|
||||
{ "thunderbird", NULL, 1 << 2, 0, 1, -1 }
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
|
|
@ -46,14 +55,17 @@ static const Layout layouts[] = {
|
|||
|
||||
/* monitors */
|
||||
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator
|
||||
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients due to
|
||||
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899 */
|
||||
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients
|
||||
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899
|
||||
*/
|
||||
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
||||
static const MonitorRule monrules[] = {
|
||||
/* name mfact nmaster scale layout rotate/reflect x y
|
||||
* example of a HiDPI laptop monitor:
|
||||
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 }, */
|
||||
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||
/* default monitor rule: can be changed but cannot be eliminated; at least one monitor rule must exist */
|
||||
/* name mfact nmaster scale layout rotate/reflect x y */
|
||||
// example of a HiDPI laptop monitor:
|
||||
{ "HDMI-A-1", 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||
//
|
||||
/* defaults */
|
||||
{ NULL, 0.55f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||
};
|
||||
|
||||
/* keyboard */
|
||||
|
|
@ -62,11 +74,12 @@ static const struct xkb_rule_names xkb_rules = {
|
|||
/* example:
|
||||
.options = "ctrl:nocaps",
|
||||
*/
|
||||
.options = NULL,
|
||||
.layout = "us,gr",
|
||||
.options = "grp:win_space_toggle",
|
||||
};
|
||||
|
||||
static const int repeat_rate = 25;
|
||||
static const int repeat_delay = 600;
|
||||
static const int repeat_rate = 50;
|
||||
static const int repeat_delay = 250;
|
||||
|
||||
/* Trackpad */
|
||||
static const int tap_to_click = 1;
|
||||
|
|
@ -102,7 +115,7 @@ static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
|
|||
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
|
||||
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
||||
*/
|
||||
static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;
|
||||
static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT;
|
||||
static const double accel_speed = 0.0;
|
||||
|
||||
/* You can choose between:
|
||||
|
|
@ -122,19 +135,56 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
|
|||
{ WLR_MODIFIER_ALT, KEY, focusnthmon, {.ui = TAG} }, \
|
||||
{ WLR_MODIFIER_ALT|WLR_MODIFIER_SHIFT, SKEY, tagnthmon, {.ui = TAG} }
|
||||
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
/* commands */
|
||||
static const char *termcmd[] = { "foot", NULL };
|
||||
static const char *menucmd[] = { "wmenu-run", NULL };
|
||||
|
||||
static const char *termcmd[] = { "foot",
|
||||
"-f", "BlexMono Nerd Font:size=16",
|
||||
"fish",
|
||||
NULL
|
||||
};
|
||||
static const char *menucmd[] = {
|
||||
"wmenu-run",
|
||||
"-f", "BlexMono Nerd Font Normal 16",
|
||||
"-b",
|
||||
"-S", "026873",
|
||||
"-N", "181926",
|
||||
NULL
|
||||
};
|
||||
static const char *lockcmd[] = { "swaylock", NULL };
|
||||
static const char *fmcmd[] = { "pcmanfm", NULL };
|
||||
static const char *screencmd[] = {"screenshot.sh", NULL };
|
||||
static const char *screenfilecmd[] = {"screenshot-file.sh", NULL };
|
||||
static const char *zellijcmd[] = {
|
||||
"foot",
|
||||
"-f", "BlexMono Nerd Font:size=16",
|
||||
"zellij",
|
||||
NULL
|
||||
};
|
||||
static const char *volcmdup[] = {
|
||||
"vol.sh",
|
||||
"up",
|
||||
NULL
|
||||
};
|
||||
static const char *volcmddown[] = {
|
||||
"vol.sh",
|
||||
"down",
|
||||
NULL
|
||||
};
|
||||
static const char *volcmdzero[] = {
|
||||
"vol.sh",
|
||||
"mute",
|
||||
NULL
|
||||
};
|
||||
static const Key keys[] = {
|
||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||
{ MODKEY, XKB_KEY_b, togglebar, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Z, spawn, {.v = zellijcmd} },
|
||||
{ MODKEY, XKB_KEY_w, spawn, {.v = fmcmd} },
|
||||
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
||||
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
||||
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
||||
|
|
@ -142,9 +192,15 @@ static const Key keys[] = {
|
|||
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
|
||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_L, spawn, {.v = lockcmd} },
|
||||
{ 0, XKB_KEY_Print, spawn, {.v = screencmd} },
|
||||
{ MODKEY, XKB_KEY_Print, spawn, {.v = screenfilecmd} },
|
||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||
{ 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = volcmddown} },
|
||||
{ 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volcmdup} },
|
||||
{ 0, XKB_KEY_XF86AudioMute, spawn, {.v = volcmdzero} },
|
||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XKB_KEY_space, setlayout, {0} },
|
||||
|
|
@ -181,6 +237,6 @@ static const Key keys[] = {
|
|||
static const Button buttons[] = {
|
||||
{ MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
|
||||
{ MODKEY, BTN_MIDDLE, togglefloating, {0} },
|
||||
{ MODKEY|ShiftMask, BTN_MIDDLE, toggledimmingclient, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, BTN_MIDDLE, toggledimmingclient, {0} },
|
||||
{ MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue