dots

git clone git://mattcarlson.org/repos/dots.git
Log | Files | Refs

commit a159a163acb77d6573963031994cec2b53c1fb29
parent eb7d81f6e786e6182bf911d629a997efc989930f
Author: Matthew Carlson <matt@mcarlson.xyz>
Date:   Tue, 27 Jul 2021 21:07:16 -0400

wpgtk and added some functions

Diffstat:
M.config/sh/aliasrc | 3++-
M.config/sh/functionrc | 1+
M.config/vim/vimrc | 1+
M.local/bin/wp.sh | 15+++++++++++++++
4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/.config/sh/aliasrc b/.config/sh/aliasrc @@ -22,7 +22,8 @@ alias \ # gnu/linux alias \ - free='free -m' \ + free='free -m' \ + ft='grep -nwIR' \ o='xdg-open' # startx diff --git a/.config/sh/functionrc b/.config/sh/functionrc @@ -5,3 +5,4 @@ f() { fff "${@}" && cd "$(cat "${XDG_CACHE_HOME:-${HOME}/.cache}/fff/.fff_d")" || exit ; } s() { du -a "${HOME}" | awk '{ $1="" } { gsub("^ ", "", $0); print "\"" $0 "\"" }' | fzf | xargs -or xdg-open ; } rands() { </dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c "${1}" ; echo ; } +rp() { for f in *; do mv "${f}" "$(printf '%s\n' "${f}" | sed "s/${1}/${2}/g")"; done ; } diff --git a/.config/vim/vimrc b/.config/vim/vimrc @@ -22,6 +22,7 @@ filetype plugin indent on call plug#begin('~/.config/vim/plugged') Plug 'vim-airline/vim-airline' Plug 'cormacrelf/vim-colors-github' +Plug 'Valloric/YouCompleteMe' call plug#end() " proper colors in st diff --git a/.local/bin/wp.sh b/.local/bin/wp.sh @@ -10,6 +10,7 @@ COLORS="${XDG_CACHE_HOME:-${HOME}/.cache}/wal/colors.sh" DEFAULTFG=259 # xresources handles suckless vars XRESOURCES="${XDG_CONFIG_HOME:-${HOME}/.config}/x/xresources" +TMP='/tmp/xsettingsd' # get random valid file in dir get_rand_file() { @@ -82,6 +83,16 @@ theme() { # remove cached themes and gen new one wal -c && wal -ni "${WP}" + # gtk + wpg -a "${file}" && wpg -ns "${file}" + + # use main color for gtk + sed -i "s/\@define-color selected_bg_color.*/\@define-color selected_bg_color @color2;/g" "${XDG_DATA_HOME:-${HOME}/.local/share}/themes/FlatColor/gtk-3.20/gtk.css" + + # xsettingsd to live reload gtk with correct color + printf "Net/ThemeName \"FlatColor\"" > "${TMP}" + xsettingsd -c "${TMP}" & + [ -f "${COLORS}" ] && . "${COLORS}" set -- ${color0} ${color1} ${color2} ${color3} ${color4} ${color5} ${color6} ${color7} \ @@ -111,7 +122,11 @@ theme() { # reload dwm dwmc reload + # zathura zathura-pywal + + # rm xsettingsd tmp later b/c it complains otherwise + rm -f "${TMP}" } main() {