diff options
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | README | 2 | ||||
| -rw-r--r-- | dmenu-5.0/drw.c | 5 | ||||
| -rw-r--r-- | dwm-6.3/config.h | 31 | ||||
| -rwxr-xr-x | dwm-6.3/scripts/dmenuunicode | 18 | ||||
| -rwxr-xr-x | dwm-6.3/scripts/passmenu2 | 60 | ||||
| -rw-r--r-- | st-0.8.4/config.h | 2 | ||||
| m--------- | sxiv | 0 |
8 files changed, 98 insertions, 28 deletions
@@ -1,15 +1,15 @@ include config.mk all: sarc - - -sarc: clean +sarc: @./scripts/set_theme.sh make -C $(DWM) make -C $(ST) make -C $(DMENU) + make -C sxiv make -C farbfeld make -C sent make -C wmname + gcc -o scripts/gip scripts/ip.c rm colors.h c: clean install: @@ -17,6 +17,7 @@ install: make install -C $(DWM) make install -C $(ST) make install -C $(DMENU) + make install -C sxiv make install -C scripts make install -C farbfeld make install -C sent @@ -28,3 +29,4 @@ clean: make clean -C farbfeld make clean -C sent make clean -C wmname + rm -r scripts/gip @@ -5,6 +5,8 @@ dmenu - a menu/launcher that can be used for other things st - terminal farbfeld - an image format sent - simple presentation software +sxiv - picture viewer +wmname - sets name for window manager COMPILE: diff --git a/dmenu-5.0/drw.c b/dmenu-5.0/drw.c index 4cdbcbe..e9c408d 100644 --- a/dmenu-5.0/drw.c +++ b/dmenu-5.0/drw.c @@ -140,11 +140,6 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349 * and lots more all over the internet. */ - FcBool iscol; - if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) { - XftFontClose(drw->dpy, xfont); - return NULL; - } font = ecalloc(1, sizeof(Fnt)); font->xfont = xfont; diff --git a/dwm-6.3/config.h b/dwm-6.3/config.h index ec0ebed..bfd6e8d 100644 --- a/dwm-6.3/config.h +++ b/dwm-6.3/config.h @@ -45,7 +45,7 @@ static const Rule rules[] = { /* class instance title tags mask isfloating isterminal noswallow monitor */ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, - { "St", NULL, NULL, 0, 0, 1, 0, -1 }, + { "st", NULL, NULL, 0, 0, 1, 0, -1 }, { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ }; @@ -86,7 +86,7 @@ static const Layout layouts[] = { { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } +#define SHCMD(cmd) { .v = (const char*[]){ "/bin/bash", "-c", cmd, NULL } } #define STATUSBAR "dwmblocks" @@ -107,22 +107,6 @@ static Key keys[] = { { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY|ShiftMask, XK_Return, zoom, {0} }, - { MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_i, incrigaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_o, incrogaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_6, incrihgaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_7, incrivgaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_8, incrohgaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_9, incrovgaps, {.i = +1 } }, - { MODKEY|Mod4Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } }, - { MODKEY|Mod4Mask, XK_0, togglegaps, {0} }, - { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_x, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, @@ -136,11 +120,20 @@ static Key keys[] = { { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, + { MODKEY, XK_r, spawn, SHCMD("mpvopen") }, + { MODKEY, XK_F3, spawn, SHCMD("st ranger") }, + { MODKEY, XK_F5, spawn, SHCMD("st ncmpcpp") }, { MODKEY|ShiftMask, XK_f, spawn, SHCMD("chromium-ungoogled") }, - { MODKEY, XK_r, spawn, SHCMD("get_weather") }, + { MODKEY, XK_w, spawn, SHCMD("get_weather") }, { MODKEY, XK_F11, spawn, SHCMD("dwm-vol_up") }, { MODKEY, XK_F10, spawn, SHCMD("dwm-vol_down") }, + { MODKEY, XK_F7, spawn, SHCMD("mpc toggle") }, + { MODKEY, XK_F8, spawn, SHCMD("mpc prev") }, + { MODKEY, XK_F6, spawn, SHCMD("mpc next") }, { MODKEY, XK_F9, spawn, SHCMD("pamixer -t") }, + { MODKEY, XK_p, spawn, SHCMD("sxiv -t ~/Pictures") }, + { MODKEY, XK_a, spawn, SHCMD("passmenu2") }, + { MODKEY, XK_e, spawn, SHCMD("dmenuunicode") }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) diff --git a/dwm-6.3/scripts/dmenuunicode b/dwm-6.3/scripts/dmenuunicode new file mode 100755 index 0000000..7d9a4ea --- /dev/null +++ b/dwm-6.3/scripts/dmenuunicode @@ -0,0 +1,18 @@ +#!/bin/sh + +# The famous "get a menu of emojis to copy" script. + +# Get user selection via dmenu from emoji file. +chosen=$(cut -d ';' -f1 ~/.local/share/larbs/emoji | dmenu -i -l 30 | sed "s/ .*//") + +# Exit if none chosen. +[ -z "$chosen" ] && exit + +# If you run this command with an argument, it will automatically insert the +# character. Otherwise, show a message that the emoji has been copied. +if [ -n "$1" ]; then + xdotool type "$chosen" +else + printf "$chosen" | xclip -selection clipboard + notify-send "'$chosen' copied to clipboard." & +fi diff --git a/dwm-6.3/scripts/passmenu2 b/dwm-6.3/scripts/passmenu2 new file mode 100755 index 0000000..3847219 --- /dev/null +++ b/dwm-6.3/scripts/passmenu2 @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +shopt -s nullglob globstar + +typeit=0 +if [[ $1 == "--type" ]]; then + typeit=1 + shift +fi + + +STARTDIR=${PASSWORD_STORE_DIR-~/.password-store} +BASEDIR=$STARTDIR +DONE=0 +LEVEL=0 +PREVSELECTION="" +SELECTION="" + +while [ "$DONE" -eq 0 ] ; do + password_files=( "$STARTDIR"/* ) + password_files=( "${password_files[@]#"$STARTDIR"/}" ) + password_files=( "${password_files[@]%.gpg}" ) + + if [ "$LEVEL" -ne 0 ] ; then + password_files=(".." "${password_files[@]}") + fi + entry=$(printf '%s\n' "${password_files[@]}" | dmenu "$@" -l 15) + + echo "entry: $entry" + if [ -z "$entry" ] ; then + DONE=1 + exit + fi + + if [ "$entry" != ".." ] ; then + PREVSELECTION=$SELECTION + SELECTION="$SELECTION/$entry" + + # check if another dir + if [ -d "$STARTDIR/$entry" ] ; then + STARTDIR="$STARTDIR/$entry" + LEVEL=$((LEVEL+1)) + else + # not a directory so it must be a real password entry + + if [[ $typeit -eq 0 ]]; then + pass show -c "$SELECTION" 2>/dev/null + else + xdotool - <<<"type --clearmodifiers -- $(pass show "$SELECTION" | head -n 1)" + fi + DONE=1 + fi + + else + LEVEL=$((LEVEL-1)) + SELECTION=$PREVSELECTION + STARTDIR="$BASEDIR/$SELECTION" + fi +done + diff --git a/st-0.8.4/config.h b/st-0.8.4/config.h index dfe2e2b..7f40a1a 100644 --- a/st-0.8.4/config.h +++ b/st-0.8.4/config.h @@ -7,7 +7,7 @@ * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ static char *font = "Source Code Pro:pixelsize=12:antialias=true:autohint=true"; -static char *font2[] = { "JoyPixels:pixelsize=10:antialias=true:autohint=true" }; +static char *font2[] = { "Twitter Color Emoji::pixelsize=10:antialias=true:autohint=true" }; static int borderpx = 2; /* diff --git a/sxiv b/sxiv new file mode 160000 +Subproject 2cac112dde5ffb2162f4ace7977e602878b8387 |