Add Thinkpad config
This commit is contained in:
parent
952e2adb3f
commit
fa8e6aaf5f
11
Makefile
11
Makefile
|
@ -3,14 +3,19 @@
|
||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
|
ifdef LAPTOP
|
||||||
|
CFLAGS += -DLAPTOP
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef THINKPAD
|
||||||
|
CFLAGS += -DTHINKPAD
|
||||||
|
endif
|
||||||
|
|
||||||
SRC = drw.c dwm.c util.c
|
SRC = drw.c dwm.c util.c
|
||||||
OBJ = ${SRC:.c=.o}
|
OBJ = ${SRC:.c=.o}
|
||||||
|
|
||||||
all: options dwm
|
all: options dwm
|
||||||
|
|
||||||
laptop: LFLAG = -DLAPTOP
|
|
||||||
laptop: install
|
|
||||||
|
|
||||||
options:
|
options:
|
||||||
@echo dwm build options:
|
@echo dwm build options:
|
||||||
@echo "CFLAGS = ${CFLAGS}"
|
@echo "CFLAGS = ${CFLAGS}"
|
||||||
|
|
21
config.def.h
21
config.def.h
|
@ -65,7 +65,11 @@ const char *spcmd1[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
|
||||||
const char *spcmd2[] = {"st", "-n", "spranger", "-g", "144x41", "-e", "ranger", NULL };
|
const char *spcmd2[] = {"st", "-n", "spranger", "-g", "144x41", "-e", "ranger", NULL };
|
||||||
//const char *spcmd2[] = {"st", "-n", "sppcmanfm", "-g", "144x41", "-e", "/home/slococo/launchPcmanfm", NULL };
|
//const char *spcmd2[] = {"st", "-n", "sppcmanfm", "-g", "144x41", "-e", "/home/slococo/launchPcmanfm", NULL };
|
||||||
//const char *spcmd2[] = {"pcmanfm", NULL };
|
//const char *spcmd2[] = {"pcmanfm", NULL };
|
||||||
|
#ifdef THINKPAD
|
||||||
|
const char *spcmd3[] = {"bitwarden", NULL };
|
||||||
|
#else
|
||||||
const char *spcmd3[] = {"bitwarden-desktop", NULL };
|
const char *spcmd3[] = {"bitwarden-desktop", NULL };
|
||||||
|
#endif
|
||||||
static Sp scratchpads[] = {
|
static Sp scratchpads[] = {
|
||||||
/* name cmd */
|
/* name cmd */
|
||||||
{"spterm", spcmd1},
|
{"spterm", spcmd1},
|
||||||
|
@ -233,23 +237,40 @@ static Key keys[] = {
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
{ MODKEY, XK_q, spawn, SHCMD("kill -15 $(ps -u $USER -o pid,%mem,%cpu,command | sort -b -k2 -r | sed -n '1!p' | cut -b 1-75 | dmenu -l 15)") },
|
{ MODKEY, XK_q, spawn, SHCMD("kill -15 $(ps -u $USER -o pid,%mem,%cpu,command | sort -b -k2 -r | sed -n '1!p' | cut -b 1-75 | dmenu -l 15)") },
|
||||||
|
#ifndef THINKPAD
|
||||||
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pulsemixer --change-volume -1; sigdwmblocks 2") },
|
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pulsemixer --change-volume -1; sigdwmblocks 2") },
|
||||||
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pulsemixer --change-volume +1; sigdwmblocks 2") },
|
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pulsemixer --change-volume +1; sigdwmblocks 2") },
|
||||||
{ 0, XF86XK_AudioMute, spawn, SHCMD("pulsemixer --toggle-mute; sigdwmblocks 2") },
|
{ 0, XF86XK_AudioMute, spawn, SHCMD("pulsemixer --toggle-mute; sigdwmblocks 2") },
|
||||||
|
#else
|
||||||
|
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("$HOME/.local/bin/volume sink -0.1; sigdwmblocks 2") },
|
||||||
|
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("$HOME/.local/bin/volume sink +0.1; sigdwmblocks 2") },
|
||||||
|
{ 0, XF86XK_AudioMute, spawn, SHCMD("$HOME/.local/bin/volume sink mute; sigdwmblocks 2") },
|
||||||
|
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("$HOME/.local/bin/volume source mute; sigdwmblocks 2") },
|
||||||
|
#endif
|
||||||
|
#ifndef THINKPAD
|
||||||
{ 0, XF86XK_AudioPlay, spawn, SHCMD("$HOME/.local/bin/player play-pause") },
|
{ 0, XF86XK_AudioPlay, spawn, SHCMD("$HOME/.local/bin/player play-pause") },
|
||||||
{ 0, XF86XK_AudioNext, spawn, SHCMD("$HOME/.local/bin/player next") },
|
{ 0, XF86XK_AudioNext, spawn, SHCMD("$HOME/.local/bin/player next") },
|
||||||
{ 0, XF86XK_AudioPrev, spawn, SHCMD("$HOME/.local/bin/player previous") },
|
{ 0, XF86XK_AudioPrev, spawn, SHCMD("$HOME/.local/bin/player previous") },
|
||||||
{ 0, XF86XK_AudioStop, spawn, SHCMD("$HOME/.local/bin/player --all-players stop") },
|
{ 0, XF86XK_AudioStop, spawn, SHCMD("$HOME/.local/bin/player --all-players stop") },
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef LAPTOP
|
#ifdef LAPTOP
|
||||||
|
#ifndef THINKPAD
|
||||||
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 5") },
|
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 5") },
|
||||||
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 5") },
|
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 5") },
|
||||||
{ 0, XF86XK_KbdBrightnessDown, spawn, SHCMD("brightnessctl --device='smc::kbd_backlight' set 20%-") },
|
{ 0, XF86XK_KbdBrightnessDown, spawn, SHCMD("brightnessctl --device='smc::kbd_backlight' set 20%-") },
|
||||||
{ 0, XF86XK_KbdBrightnessUp, spawn, SHCMD("brightnessctl --device='smc::kbd_backlight' set +20%") },
|
{ 0, XF86XK_KbdBrightnessUp, spawn, SHCMD("brightnessctl --device='smc::kbd_backlight' set +20%") },
|
||||||
#else
|
#else
|
||||||
|
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("brightnessctl set 5%-") },
|
||||||
|
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl set 5%+") },
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
{ 0, XF86XK_HomePage, spawn, SHCMD("pcmanfm") },
|
{ 0, XF86XK_HomePage, spawn, SHCMD("pcmanfm") },
|
||||||
{ 0, XF86XK_Tools, spawn, SHCMD("pkill imwheel && imwheel -b 45") },
|
{ 0, XF86XK_Tools, spawn, SHCMD("pkill imwheel && imwheel -b 45") },
|
||||||
{ 0, XF86XK_AudioStop, spawn, SHCMD("dunstctl set-paused toggle; sigdwmblocks 6") },
|
{ 0, XF86XK_AudioStop, spawn, SHCMD("dunstctl set-paused toggle; sigdwmblocks 6") },
|
||||||
{ 0, XK_Print, spawn, SHCMD("$HOME/.local/bin/screenshot") },
|
{ 0, XK_Print, spawn, SHCMD("$HOME/.local/bin/screenshot") },
|
||||||
|
#ifdef THINKPAD
|
||||||
|
{ 0, XF86XK_Messenger, spawn, SHCMD("slock") },
|
||||||
#endif
|
#endif
|
||||||
{ MODKEY|ShiftMask, XK_m, spawn, SHCMD("noisetorch; $TERMINAL -e \"alsamixer\"") },
|
{ MODKEY|ShiftMask, XK_m, spawn, SHCMD("noisetorch; $TERMINAL -e \"alsamixer\"") },
|
||||||
{ MODKEY, XK_v, spawn, SHCMD("clipmenu") },
|
{ MODKEY, XK_v, spawn, SHCMD("clipmenu") },
|
||||||
|
|
Loading…
Reference in New Issue