dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

dwl-hardware.h (3658B)


      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(0xe78284ff);
     18 static const float urgentcolor[]            = COLOR(0xa40000ff);
     19 
     20 void
     21 initenv(void)
     22 {
     23     setenv("THEME", "solarized", 1);
     24 }
     25 
     26 /* monitors */
     27 static const MonitorRule monrules[] = {
     28     /* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
     29     /* name/desc     mfact  nmaster scale layout       rotate/reflect                x       y  resx  resy  rate     mode   adaptive */
     30     { "eDP-1",       0.50f, 1,      1.5f, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL,   0,    480, 2560, 1440, 60.0f,    -1,   0},
     31     { "Pavilion32",  0.50f, 1,      1,    &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL,   1706,   0, 2560, 1440, 60.0f,    1,    0},
     32     { NULL,          0.50f, 1,      1,    &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL,   1706,   0, 0,    0,    0.0f,     0,    0},
     33 };
     34 
     35 /* Autostart */
     36 static const char *const autostart[] = {
     37     "gentoo-pipewire-launcher", "restart", NULL,
     38     "swayidle.sh", NULL,
     39     "preserve_dbus.sh", NULL,
     40     "davmail_launch", NULL,
     41     "baraction.sh", NULL,
     42     "wbg", "/home/jake/Pictures/wallpaper", NULL,
     43     NULL /* terminate */
     44 };
     45 
     46 /* keyboard */
     47 static const struct xkb_rule_names xkb_rules = {
     48     /* can specify fields: rules, model, layout, variant, options */
     49     /* example:
     50        .options = "ctrl:nocaps",
     51     */
     52     .options = "caps:escape",
     53 };
     54 
     55 static const int repeat_rate = 25;
     56 static const int repeat_delay = 600;
     57 
     58 /* Trackpad */
     59 static const int tap_to_click = 1;
     60 static const int tap_and_drag = 1;
     61 static const int drag_lock = 1;
     62 static const int natural_scrolling = 0;
     63 static const int disable_while_typing = 1;
     64 static const int left_handed = 0;
     65 static const int middle_button_emulation = 0;
     66 
     67 /* You can choose between:
     68    LIBINPUT_CONFIG_SCROLL_NO_SCROLL
     69    LIBINPUT_CONFIG_SCROLL_2FG
     70    LIBINPUT_CONFIG_SCROLL_EDGE
     71    LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
     72 */
     73 static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
     74 
     75 /* You can choose between:
     76    LIBINPUT_CONFIG_CLICK_METHOD_NONE
     77    LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
     78    LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
     79 */
     80 static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
     81 
     82 /* You can choose between:
     83    LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
     84    LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
     85    LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
     86 */
     87 static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
     88 
     89 /* You can choose between:
     90    LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
     91    LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
     92 */
     93 static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;
     94 static const double accel_speed = -0.6;
     95 /* You can choose between:
     96    LIBINPUT_CONFIG_TAP_MAP_LRM -- 1/2/3 finger tap maps to left/right/middle
     97    LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right
     98 */
     99 static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM;
    100 #endif