dwl-hardware.h (3511B)
1 /* 2 * NOTE(jake): i think its useful to share some settings between dwlb and dwl so putting this here 3 * not sure if i like this approach but it works 4 */ 5 6 #define DEVICE_FONT "monospace:size=10" 7 8 #ifndef NOT_DWL 9 #define COLOR(hex) { ((hex >> 24) & 0xFF) / 255.0f, \ 10 ((hex >> 16) & 0xFF) / 255.0f, \ 11 ((hex >> 8) & 0xFF) / 255.0f, \ 12 (hex & 0xFF) / 255.0f } 13 14 static const float rootcolor[] = COLOR(0x222222ff); 15 static const float bordercolor[] = COLOR(0x181818ff); 16 /* static const float focuscolor[] = COLOR(0x3465a4ff); */ 17 static const float focuscolor[] = COLOR(0xf38ba8ff); 18 static const float urgentcolor[] = COLOR(0xa40000ff); 19 20 void 21 initenv(void) 22 { 23 setenv("THEME", "solarized", 1); 24 } 25 26 /* monitors */ 27 /* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */ 28 static const MonitorRule monrules[] = { 29 /* name mfact nmaster scale layout rotate/reflect x y resx resy rate mode adaptive */ 30 { "DP-3", 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 1920, 0, 0, 0, 0.0f, 1, 0}, 31 { "DP-2", 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 0.0f, 1, 0}, 32 { "NULL", 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 0.0f, 0, 0}, 33 }; 34 35 /* Autostart */ 36 static const char *const autostart[] = { 37 "wbg", "/home/jake/Pictures/wallpaper", NULL, 38 "gentoo-pipewire-launcher", "restart", NULL, 39 "dwmblocks", "-b", NULL, 40 /* "waybar", NULL, */ 41 NULL /* terminate */ 42 }; 43 44 /* keyboard */ 45 static const struct xkb_rule_names xkb_rules = { 46 /* can specify fields: rules, model, layout, variant, options */ 47 /* example: 48 .options = "ctrl:nocaps", 49 */ 50 .options = "caps:escape", 51 }; 52 53 static const int repeat_rate = 25; 54 static const int repeat_delay = 600; 55 56 /* Trackpad */ 57 static const int tap_to_click = 1; 58 static const int tap_and_drag = 1; 59 static const int drag_lock = 1; 60 static const int natural_scrolling = 0; 61 static const int disable_while_typing = 1; 62 static const int left_handed = 0; 63 static const int middle_button_emulation = 0; 64 /* You can choose between: 65 LIBINPUT_CONFIG_SCROLL_NO_SCROLL 66 LIBINPUT_CONFIG_SCROLL_2FG 67 LIBINPUT_CONFIG_SCROLL_EDGE 68 LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN 69 */ 70 static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG; 71 72 /* You can choose between: 73 LIBINPUT_CONFIG_CLICK_METHOD_NONE 74 LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS 75 LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER 76 */ 77 static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS; 78 79 /* You can choose between: 80 LIBINPUT_CONFIG_SEND_EVENTS_ENABLED 81 LIBINPUT_CONFIG_SEND_EVENTS_DISABLED 82 LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE 83 */ 84 static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; 85 86 /* You can choose between: 87 LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT 88 LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE 89 */ 90 static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT; 91 static const double accel_speed = -0.15; 92 /* You can choose between: 93 LIBINPUT_CONFIG_TAP_MAP_LRM -- 1/2/3 finger tap maps to left/right/middle 94 LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right 95 */ 96 static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM; 97 #endif