From f700458feb8649700af39f9ca0db1316252ee080 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Sat, 28 Mar 2020 22:59:04 +0100 Subject: [PATCH] Change/Add dmenu script and switch to extension less + /usr/bin/env --- .config/alacritty/alacritty.yml | 2 +- .config/bspwm/bspwmrc | 2 +- ...u-bspwm-desktop.sh => dmenu_bspwm_desktop} | 2 +- ...content.sh => dmenu_bspwm_desktop_content} | 2 +- ...u-bspwm-monitor.sh => dmenu_bspwm_monitor} | 2 +- .config/dmenu/dmenu_run_with_aliases | 9 ++++++ .config/sxhkd/sxhkdrc | 30 +++++++++---------- .zshenv | 2 +- .zshrc | 15 ++-------- 9 files changed, 33 insertions(+), 33 deletions(-) rename .config/dmenu/{dmenu-bspwm-desktop.sh => dmenu_bspwm_desktop} (98%) rename .config/dmenu/{dmenu-bspwm-desktop-content.sh => dmenu_bspwm_desktop_content} (97%) rename .config/dmenu/{dmenu-bspwm-monitor.sh => dmenu_bspwm_monitor} (97%) create mode 100755 .config/dmenu/dmenu_run_with_aliases diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 9488f8a..cb13ce1 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -281,7 +281,7 @@ colors: # # Window opacity as a floating point number from `0.0` to `1.0`. # The value `0.0` is completely transparent and `1.0` is opaque. -background_opacity: 1 +background_opacity: 0.1 #selection: #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 6759a54..8c8d85e 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash sxhkd & diff --git a/.config/dmenu/dmenu-bspwm-desktop.sh b/.config/dmenu/dmenu_bspwm_desktop similarity index 98% rename from .config/dmenu/dmenu-bspwm-desktop.sh rename to .config/dmenu/dmenu_bspwm_desktop index 2747a35..cd4409a 100755 --- a/.config/dmenu/dmenu-bspwm-desktop.sh +++ b/.config/dmenu/dmenu_bspwm_desktop @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash dmenu_string="Wrong parameter" diff --git a/.config/dmenu/dmenu-bspwm-desktop-content.sh b/.config/dmenu/dmenu_bspwm_desktop_content similarity index 97% rename from .config/dmenu/dmenu-bspwm-desktop-content.sh rename to .config/dmenu/dmenu_bspwm_desktop_content index b8fbf45..706c772 100755 --- a/.config/dmenu/dmenu-bspwm-desktop-content.sh +++ b/.config/dmenu/dmenu_bspwm_desktop_content @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash dmenu_string="Wrong parameter" diff --git a/.config/dmenu/dmenu-bspwm-monitor.sh b/.config/dmenu/dmenu_bspwm_monitor similarity index 97% rename from .config/dmenu/dmenu-bspwm-monitor.sh rename to .config/dmenu/dmenu_bspwm_monitor index 3072bb0..cf5f0e8 100755 --- a/.config/dmenu/dmenu-bspwm-monitor.sh +++ b/.config/dmenu/dmenu_bspwm_monitor @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash dmenu_string="Wrong parameter" diff --git a/.config/dmenu/dmenu_run_with_aliases b/.config/dmenu/dmenu_run_with_aliases new file mode 100755 index 0000000..310b8a2 --- /dev/null +++ b/.config/dmenu/dmenu_run_with_aliases @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh + +if [[ -f $HOME/.zsh_alias ]]; then + source $HOME/.zsh_alias +fi + +command_to_run=$({ alias | awk '{split($0,alias,"="); print alias[1];}' ; dmenu_path ; } | sort | dmenu -i -fn Hack -nb "#282a36" -nf "#f8f8f2" -sb "#44475a" -sf "#f8f8f2" "$@") + +eval ${command_to_run} & diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index f6fe6a2..08bfca5 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -123,46 +123,46 @@ alt + Return # run program launcher alt + d - dmenu_run -i -fn Hack -nb "#282a36" -nf "#f8f8f2" -sb "#44475a" -sf "#f8f8f2" + if [ -x $(command -v zsh) ]; then $HOME/.config/dmenu/dmenu_run_with_aliases; else dmenu_run -i -fn Hack -nb "#282a36" -nf "#f8f8f2" -sb "#44475a" -sf "#f8f8f2"; fi alt + x - $HOME/.config/dmenu/dmenu-bspwm-desktop-content.sh goto + $HOME/.config/dmenu/dmenu_bspwm_desktop_content goto alt + shift + x - $HOME/.config/dmenu/dmenu-bspwm-desktop-content.sh move + $HOME/.config/dmenu/dmenu_bspwm_desktop_content move alt + ctrl + shift + x - $HOME/.config/dmenu/dmenu-bspwm-desktop-content.sh movefollow + $HOME/.config/dmenu/dmenu_bspwm_desktop_content movefollow alt + z; r - $HOME/.config/dmenu/dmenu-bspwm-desktop.sh rename + $HOME/.config/dmenu/dmenu_bspwm_desktop rename alt + z; d - $HOME/.config/dmenu/dmenu-bspwm-desktop.sh delete + $HOME/.config/dmenu/dmenu_bspwm_desktop delete alt + z; s - $HOME/.config/dmenu/dmenu-bspwm-desktop.sh swap + $HOME/.config/dmenu/dmenu_bspwm_desktop swap alt + z; h - $HOME/.config/dmenu/dmenu-bspwm-desktop.sh bubbleprev + $HOME/.config/dmenu/dmenu_bspwm_desktop bubbleprev alt + z; l - $HOME/.config/dmenu/dmenu-bspwm-desktop.sh bubblenext + $HOME/.config/dmenu/dmenu_bspwm_desktop bubblenext alt + a; g - $HOME/.config/dmenu/dmenu-bspwm-monitor.sh goto + $HOME/.config/dmenu/dmenu_bspwm_monitor goto alt + a; s - $HOME/.config/dmenu/dmenu-bspwm-monitor.sh swap + $HOME/.config/dmenu/dmenu_bspwm_monitor swap alt + a; shift + n - $HOME/.config/dmenu/dmenu-bspwm-monitor.sh movenode + $HOME/.config/dmenu/dmenu_bspwm_monitor movenode alt + a; ctrl + shift + n - $HOME/.config/dmenu/dmenu-bspwm-monitor.sh movenodefollow + $HOME/.config/dmenu/dmenu_bspwm_monitor movenodefollow alt + a; shift + d - $HOME/.config/dmenu/dmenu-bspwm-monitor.sh movedesktop + $HOME/.config/dmenu/dmenu_bspwm_monitor movedesktop alt + a; ctrl + shift + d - $HOME/.config/dmenu/dmenu-bspwm-movement-monitor.sh movedesktopfollow + $HOME/.config/dmenu/dmenu_bspwm_movement_monitor movedesktopfollow diff --git a/.zshenv b/.zshenv index 72f5270..bf83666 100644 --- a/.zshenv +++ b/.zshenv @@ -3,7 +3,7 @@ typeset -TUx LD_LIBRARY_PATH ld_library_path path=("$HOME/bin" "$HOME/.local/bin" "/usr/local/bin" "$path[@]" "$HOME/JUCE") -if [[ -a $HOME/.zshpath ]]; then +if [[ -f $HOME/.zshpath ]]; then source $HOME/.zshpath fi diff --git a/.zshrc b/.zshrc index b0f50fd..de5cfa7 100644 --- a/.zshrc +++ b/.zshrc @@ -105,15 +105,6 @@ fi gpg-connect-agent updatestartuptty /bye -alias la='ls -lahF' -alias ll='ls -lhF' -alias ls='ls -F --color=tty' -alias lsa='ls -aF' -alias layout='xkblayout-state print "%s %v"' -alias picom-default='picom -bGC --backend glx --unredir-if-possible-delay 1000 --vsync' -alias screenkey-obs='screenkey --no-systray -t 2 -p fixed -s small -g 960x36+960+4 --key-mode composed --bak-mode full --mods-mode normal --scr 0 -f Hack' -alias tmate-obs='tmate -k tmk-ET35fx5m9cA7cxOt4jjWkSmaOy -r DustVoice' -alias xfce-polkit='/usr/lib/xfce-polkit/xfce-polkit' -alias davinci-resolve='/opt/resolve/bin/resolve' - -alias rofi-scripts='alias | sed -e "s/=.*//"' +if [[ -f $HOME/.zsh_alias ]]; then + source $HOME/.zsh_alias +fi