feat(dwm): screenshots
This commit is contained in:
parent
aee809669d
commit
4a2dc0c95b
3 changed files with 18 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
#include <X11/XF86keysym.h>
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
|
||||
|
@ -62,20 +62,29 @@ static const Layout layouts[] = {
|
|||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
/* commands */
|
||||
|
||||
// dmenu
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
|
||||
// terminal
|
||||
static const char *termcmd[] = { "alacritty", NULL };
|
||||
static const char *locksaver[] = { "i3lock", "-c", "#000000", NULL };
|
||||
|
||||
// general & sys
|
||||
static const char *locksaver[] = { "i3lock", "-c", "#000000", NULL };
|
||||
static const char *vol_up[] = { "amixer", "set", "Master", "5%+", NULL };
|
||||
static const char *vol_down[] = { "amixer", "set", "Master", "5%-", NULL };
|
||||
static const char *vol_mute[] = { "amixer", "set", "Master", "toggle", NULL };
|
||||
|
||||
static const char *light_up[] = {"light", "-A", "5", NULL};
|
||||
static const char *light_down[] = {"light", "-U", "5", NULL};
|
||||
|
||||
// screenshots
|
||||
static const char *screenshot[] = {"flameshot", "full", "-c", NULL};
|
||||
static const char *screenshot_partial[] = {"flameshot", "gui", "-c", NULL};
|
||||
|
||||
// kill dwm
|
||||
static const char *dwmdie[] = {"/bin/sh", "-c", "pkill dwm-start && pkill dwm", "null"};
|
||||
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
|
@ -101,6 +110,8 @@ static Key keys[] = {
|
|||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
{ 0, XK_Print, spawn, {.v = screenshot } },
|
||||
{ Mod1Mask, XK_Print, spawn, {.v = screenshot_partial } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down } },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = vol_mute } },
|
||||
|
|
|
@ -26,6 +26,7 @@ done &
|
|||
|
||||
nm-applet &
|
||||
mate-volume-control-status-icon &
|
||||
flameshot &
|
||||
feh -z -Z --bg-scale /home/didier/Pictures/background.png
|
||||
|
||||
exec dwm >/dev/null
|
||||
|
|
|
@ -8,7 +8,8 @@ $SUDO $PM $PM_INSTALL $PM_NOCONFIRM \
|
|||
network-manager-applet \
|
||||
alsa-utils \
|
||||
dstat \
|
||||
curl
|
||||
curl \
|
||||
flameshot
|
||||
|
||||
# clone
|
||||
[ -d /tmp/dotfiles-dwm ] || git clone https://git.suckless.org/dwm /tmp/dotfiles-dwm
|
||||
|
@ -31,4 +32,4 @@ chmod +x ./files/dwm/dwm-start.sh
|
|||
$SUDO cp ./files/dwm/dwm-start.sh /usr/local/bin/dwm-start
|
||||
|
||||
# DM entry
|
||||
$SUDO cp ./files/dwm/dwm.desktop /usr/share/xsessions/dwm.desktop
|
||||
$SUDO cp ./files/dwm/dwm.desktop /usr/share/xsessions/dwm.desktop
|
||||
|
|
Loading…
Reference in a new issue