From 56ca92cb33da661e5efec77cdf047839990d1357 Mon Sep 17 00:00:00 2001 From: cronyakatsuki <64900606+cronyakatsuki@users.noreply.github.com> Date: Sun, 30 Oct 2022 16:07:16 +0100 Subject: [PATCH] Made the script dash compatible. --- dmenu-file-handler | 2 +- dmenu-games | 2 +- dmenu-kill | 2 +- dmenu-link-handler | 2 +- dmenu-pass | 2 +- dmenu-power-menu | 2 +- dmenu-pulse-port-man | 2 +- dmenu-runner | 2 +- dmenu-ryzenadj | 2 +- dmenu-screenshot | 2 +- dmenu-share | 2 +- dmenu-usb-man | 2 +- dmenu-wiki | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dmenu-file-handler b/dmenu-file-handler index eee156e..7bf1143 100755 --- a/dmenu-file-handler +++ b/dmenu-file-handler @@ -4,7 +4,7 @@ # and it will list all your files and open them # in your prefered program with xdg-open -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config # cd into the given directory cd $1 diff --git a/dmenu-games b/dmenu-games index 3487c0d..6ba7dbe 100755 --- a/dmenu-games +++ b/dmenu-games @@ -2,7 +2,7 @@ # dmenu script to open up my games -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config get_category () { category=$( game-run list | $DMENU -p "Choose game category:") diff --git a/dmenu-kill b/dmenu-kill index f35093e..15c6a53 100755 --- a/dmenu-kill +++ b/dmenu-kill @@ -2,7 +2,7 @@ # kill those pesky proceses -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config pid=$(ps -u $USER -o pid,%mem,%cpu,comm,cmd | sort -b -k3 -r | $DMENU -l 15 -i -p "Choose procces to kill: " | awk '{print $1}') diff --git a/dmenu-link-handler b/dmenu-link-handler index 000f21b..d3a2db2 100755 --- a/dmenu-link-handler +++ b/dmenu-link-handler @@ -3,7 +3,7 @@ # Feed this script a link or it will get it from your clipboard and it will give dmenu # with some choice of programs to open the link with. -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config case "$(printf "mpv\\nbrowser\\ncopy url [X11]\\ncopy url [Wayland]\\nw3m" | $DMENU -p "Open link with what program?")" in mpv) "$VIDEO" "$@" ;; diff --git a/dmenu-pass b/dmenu-pass index 98617d7..7897822 100755 --- a/dmenu-pass +++ b/dmenu-pass @@ -3,6 +3,6 @@ # This script is the SUDO_ASKPASS variable, meaning that it will be used as a # password prompt if needed. -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config $DMENU -P -p "$1" <&- && echo diff --git a/dmenu-power-menu b/dmenu-power-menu index 66869f8..5b8ccab 100755 --- a/dmenu-power-menu +++ b/dmenu-power-menu @@ -2,7 +2,7 @@ # simple power menu script -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config case "$(printf "shutdown\\nreboot" | $DMENU -p "Choose your poison")" in "shutdown") poweroff ;; diff --git a/dmenu-pulse-port-man b/dmenu-pulse-port-man index ee2ca9b..7ca51f7 100755 --- a/dmenu-pulse-port-man +++ b/dmenu-pulse-port-man @@ -1,6 +1,6 @@ #!/bin/sh -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config portMan () { notAvailable=$(pactl list sinks | grep 'analog-output-headphones' | grep 'not available') diff --git a/dmenu-runner b/dmenu-runner index 03cb3a6..b589813 100755 --- a/dmenu-runner +++ b/dmenu-runner @@ -1,6 +1,6 @@ #!/bin/sh -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config choice=$(dmenu_path | grep dmenu- | $DMENU -p "Choose script to run:") diff --git a/dmenu-ryzenadj b/dmenu-ryzenadj index a2781b6..5fc863f 100755 --- a/dmenu-ryzenadj +++ b/dmenu-ryzenadj @@ -2,7 +2,7 @@ # dmenu script for quickly setting ryzenadj profiles with my other script easily -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config get_category () { category=$( sudo ryzenset list | $DMENU -p "Choose profile category:") diff --git a/dmenu-screenshot b/dmenu-screenshot index c2a5d39..c59ebc8 100755 --- a/dmenu-screenshot +++ b/dmenu-screenshot @@ -3,7 +3,7 @@ # It lets you choose the kind of screenshot to take, including # copying the image or even highlighting an area to copy. -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config dir="$HOME/pics/screenshots" [ ! -d "$dir" ] && mkdir $dir -p diff --git a/dmenu-share b/dmenu-share index 0dd5cd6..5bc9142 100755 --- a/dmenu-share +++ b/dmenu-share @@ -1,6 +1,6 @@ #!/bin/sh -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config file=$(find $HOME -type f | $DMENU -l 15) [ -z "$file" ] && exit diff --git a/dmenu-usb-man b/dmenu-usb-man index 1686298..a6fa087 100755 --- a/dmenu-usb-man +++ b/dmenu-usb-man @@ -2,7 +2,7 @@ # a simple dmenu usb managment script -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config driveCount(){ count="$(printf '%s\n' "$1" | wc -l)" diff --git a/dmenu-wiki b/dmenu-wiki index 788502e..604b7a9 100755 --- a/dmenu-wiki +++ b/dmenu-wiki @@ -2,7 +2,7 @@ # Search offline copy of the arch wiki -source $HOME/.config/dmenu/config +. $HOME/.config/dmenu/config dir="/usr/share/doc/arch-wiki/html/en/"