dotfiles

personal configurations for my systems and programs
git clone git@git.eonndev.com/dotfiles.git
Log | Files | Refs

commit cf0bdc6b3b5a794721997d76f7b8f63529cba0f1
parent 7bc54163995b0ec10b33e4822cd84b786f5468ac
Author: iressa <ian@eonndev.com>
Date:   Mon, 28 Jun 2021 17:08:19 -0400

emacs as default, some tweaks for dwm behavior

Diffstat:
M.bashrc | 2+-
M.conkyrc | 1+
M.conkyrc_tele | 1+
M.tmux.conf | 4++--
Mdwm/config.def.h | 1+
Mdwm/config.h | 3+++
Mdwm/dwm.c | 19+++++++++++++++++--
Mst/config.h | 2+-
8 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -21,7 +21,7 @@ fi export HOME=/home/ian export XAUTHORITY=$HOME/.Xauthority -export EDITOR=/usr/bin/vim +export EDITOR=/usr/bin/emacs alias scrot="scrot ~/Pictures/screenshots/%Y-%m-%d$s.png" alias n="nnn -e" diff --git a/.conkyrc b/.conkyrc @@ -11,6 +11,7 @@ conky.config = { conky.text = [[ RAM ${memperc}% ${membar} | \ CPU Usage ${cpu}% ${cpubar} | \ +v ${downspeed enp3s0} ^ ${upspeed enp3s0} | \ Video Temp ${exec sensors | grep mem | cut -d "+" -f 2 | cut -c1-6} | \ ${exec setxkbmap -query | grep -q "colemak" && echo "colemak" || echo "qwerty"} | \ ${time %A} ${time %D} ${time %H}:${time %M}:${time %S} diff --git a/.conkyrc_tele b/.conkyrc_tele @@ -36,4 +36,5 @@ conky.text = [[ ${execi 6000 fortune -n short | cowsay -e "--"} ${diskiograph} + ${alignr}${execi 1800 newsboat -x reload print-unread | grep -v "^0"} ]] diff --git a/.tmux.conf b/.tmux.conf @@ -1,5 +1,5 @@ -set -g prefix C-a -bind C-a send-prefix +set -g prefix C-o +bind C-o send-prefix bind \\ split-window -h bind | split-window -v diff --git a/dwm/config.def.h b/dwm/config.def.h @@ -78,6 +78,7 @@ static Key keys[] = { { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, diff --git a/dwm/config.h b/dwm/config.h @@ -69,6 +69,7 @@ static const char *soundmute[] = { "/usr/local/bin/changeVolume", "m", NULL}; static const char *micmute[] = { "/usr/bin/pactl", "set-source-mute", "1", "toggle", NULL}; //others static const char *colemaktoggle[] = { "/usr/local/bin/colemaktoggle.sh", NULL}; +static const char *emojipicker[] = { "/usr/bin/emoji-picker", NULL }; #include <X11/XF86keysym.h> static Key keys[] = { @@ -83,6 +84,7 @@ static Key keys[] = { // others { MODKEY, XK_Print, spawn, SHCMD("sleep 0.2; scrot -s '/home/ian/Pictures/screenshots/%Y-%m-%d_%wx_$h_scrot.png'") }, { MODKEY|ShiftMask, XK_Insert, spawn, {.v = colemaktoggle } }, + { MODKEY, XK_e, spawn, {.v = emojipicker } }, // wm { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, @@ -101,6 +103,7 @@ static Key keys[] = { { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, diff --git a/dwm/dwm.c b/dwm/dwm.c @@ -214,6 +214,7 @@ static void tagmon(const Arg *arg); static void tile(Monitor *); static void togglebar(const Arg *arg); static void togglefloating(const Arg *arg); +static void togglefullscr(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); static void unfocus(Client *c, int setfocus); @@ -531,6 +532,7 @@ clientmessage(XEvent *e) { XClientMessageEvent *cme = &e->xclient; Client *c = wintoclient(cme->window); + unsigned int i; if (!c) return; @@ -540,8 +542,14 @@ clientmessage(XEvent *e) setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */ || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen))); } else if (cme->message_type == netatom[NetActiveWindow]) { - if (c != selmon->sel && !c->isurgent) - seturgent(c, 1); + for (i = 0; i < LENGTH(tags) && !((1 << i) & c->tags); i++); + if (i < LENGTH(tags)) { + const Arg a = {.ui = 1 << i}; + selmon = c->mon; + view(&a); + focus(c); + restack(selmon); + } } } @@ -1754,6 +1762,13 @@ togglefloating(const Arg *arg) } void +togglefullscr(const Arg *arg) +{ + if(selmon->sel) + setfullscreen(selmon->sel, !selmon->sel->isfullscreen); +} + +void toggletag(const Arg *arg) { unsigned int newtags; diff --git a/st/config.h b/st/config.h @@ -102,7 +102,7 @@ static const char *colorname[] = { "#ff4b42", //red "#7ace1e", //green "#ffd21a", //yellow - "#5961b5", //blue + "#7279c0", //blue "#da3b98", //magenta "#81c970", //cyan "#7b80b9", //gray