dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit ebff484c6e45553c7fd16b3d5cd4a7936434decd
parent b43d283be4907a10567df279a798942aa4aaf2c7
Author: pyratebeard <root@pyratebeard.net>
Date:   Mon, 20 May 2024 16:51:23 +0100

moved dmenu wrapper to scripts repo

Diffstat:
Ddmenu/.local/bin/rundmc | 99-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 99 deletions(-)

diff --git a/dmenu/.local/bin/rundmc b/dmenu/.local/bin/rundmc @@ -1,99 +0,0 @@ -#!/usr/bin/zsh - -#DM_CMD=$(dmenu -m 0 -fn gohu:size=11 -i -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -l 10) - -dm_bin() { - bin_arr=() - while IFS= read -r line; do - bin_arr+=( "$line" ) - done < <( find $HOME/.local/bin ) - - choice=$(printf '%s\n' "${bin_arr[@]}" | awk -F/ '{print $NF}' | dmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'bin: ') - - if [ "$choice" ] ; then - #cmd="printf '%s\n' "${bin_arr[@]}" | grep $HOME/bin/$choice | head -n1" - cmd="$HOME/bin/${choice} $@" - urxvt -title dmenu -e zsh -c "herbstclient set_attr clients.focus.minimized true ; $cmd" - fi -} - -dm_func() { - func_arr=() - while IFS= read -r line; do - func_arr+=( "$line" ) - done < <( find $HOME/.zsh/functions ) - - choice=$(printf '%s\n' "${func_arr[@]}" | awk -F/ '{print $NF}' | dmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'functions: ') - - if [ "$choice" ] ; then - #cmd="printf '%s\n' "${func_arr[@]}" | grep $HOME/bin/$choice | head -n1" - cmd="$HOME/.zsh/functions/${choice} $@" - urxvt -title dmenu -e zsh -c "herbstclient set_attr clients.focus.minimized true ; $cmd" - fi -} - -dm_aliases() { - source $HOME/.zsh/aliases.zsh - alias_arr=() - while IFS= read -r line; do - alias_arr+=( "$line" ) - done < <( alias ) - - choice=$(printf '%s\n' "${alias_arr[@]}" | awk -F= '{print $1}' | dmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'submenu: ') - - if [ "$choice" ] ; then - cmd=$(printf '%s\n' "${alias_arr[@]}" | grep ^$choice | head -n1 | sed 's/=/%/' | awk -F% '{ print $NF }' | tr -d "'") - urxvt -title dmenu -e zsh -c "herbstclient set_attr clients.focus.minimized true ; $cmd" - #echo $cmd - fi -} - -dm_hidden() { - hide_arr=() - while IFS= read -r line; do - hide_arr+=( "$line" ) - done < <(hidden -c) - - choice=$(printf '%s\n' "${hide_arr[@]}" | awk -F: '{print $1}' | tr -d "'" | dmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'submenu: ') - - if [ "$choice" ] ; then - cmd=$(printf '%s\n' "${hide_arr[@]}" | grep "^'$choice'" | awk -F: '{ print $NF }' | tr -d "'") - urxvt -e zsh -c "$cmd" - #echo $cmd - fi -} - -dm_man() { - man_arr=() - while IFS= read -r line; do - man_arr+=( "$line" ) - done < <(man -k .) - - choice=$(printf '%s\n' "${man_arr[@]}" | dmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'manpage: ') - - if [ "$choice" ] ; then - cmd=$(printf '%s\n' "${man_arr[@]}" | grep ^$choice | awk '{print $1}') - urxvt -e zsh -c "source $HOME/.zsh/colored-man-pages.zsh ; man ${cmd}" - fi -} - -dm_pom() { - sleep 1500 - /usr/bin/notify-send -u 'low' "time's up" -} - -select_arr=("run" "bin" "functions" "aliases" "hidden" "man" "pom" "scratch" "clipmenu") -submenu=$(printf '%s\n' "${select_arr[@]}" | dmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'submenu: ') - -case $submenu in - run) dmenu_run -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'rundmc: ' ;; - bin) dm_bin ;; - functions) dm_func ;; - aliases) dm_aliases ;; - hidden) dm_hidden ;; - man) dm_man ;; - pom) dm_pom ;; - scratch) urxvtc -e zsh -c "less $HOME/.vimrc" ;; - clipmenu) clipmenu -i -l 10 -m 0 -fn gohu:size=11 -nb '#1f1d1b' -nf '#d3cab3' -sb '#454545' -sf '#dab733' -p 'clipmenu: ' ;; - *) exit ;; -esac