From d3d4381b296912577550ae1d0310dbc35f7f98cd Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 13 Jan 2024 17:33:24 -0500 Subject: sxhkd housekeeping and debloat --- .local/bin/camtoggle | 5 ----- .local/bin/displayselect | 7 +++++++ .local/bin/ducksearch | 11 +++++++++++ .local/bin/websearch | 31 ------------------------------- 4 files changed, 18 insertions(+), 36 deletions(-) delete mode 100755 .local/bin/camtoggle create mode 100755 .local/bin/displayselect create mode 100755 .local/bin/ducksearch delete mode 100755 .local/bin/websearch (limited to '.local/bin') diff --git a/.local/bin/camtoggle b/.local/bin/camtoggle deleted file mode 100755 index 07cfa2c..0000000 --- a/.local/bin/camtoggle +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -[ "$1" == "" ] && \ -mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,4,6,8] | tail -n 1) || \ -mpv --no-keepaspect-window --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video$1 | tail -n 1) -# mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1) diff --git a/.local/bin/displayselect b/.local/bin/displayselect new file mode 100755 index 0000000..2b87894 --- /dev/null +++ b/.local/bin/displayselect @@ -0,0 +1,7 @@ +#!/bin/sh + +layoutdir="$XDG_CONFIG_HOME/screenlayout" + +layout="$(ls "$layoutdir" | dmenu -p "󰍺 Select layout: ")" + +[ -z "$layout" ] || sh "$layoutdir/$layout" diff --git a/.local/bin/ducksearch b/.local/bin/ducksearch new file mode 100755 index 0000000..d766623 --- /dev/null +++ b/.local/bin/ducksearch @@ -0,0 +1,11 @@ +#!/bin/sh +# Gives a dmenu prompt to search Google. +# Without input, will open Google.com. +# URLs will be directly handed to the browser. +# Anything else, it search it. + +query=$(printf " " | dmenu -i -p " Search DuckDuckGo") + +echo "$query" | head -c 1 + +$BROWSER "https://duckduckgo.com/?q=$query&t=ffab&atb=v1-1" diff --git a/.local/bin/websearch b/.local/bin/websearch deleted file mode 100755 index 2de2c75..0000000 --- a/.local/bin/websearch +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Gives a dmenu prompt to search Google. -# Without input, will open Google.com. -# URLs will be directly handed to the browser. -# Anything else, it search it. - -query=$(printf " " | dmenu -i -p " Search Google") - -echo "$query" | head -c 1 - -if [ $(echo "$query" | head -c 1) == "\!" ]; then - $BROWSER "https://duckduckgo.com/?q=$query&t=ffab&atb=v1-1" -else - $BROWSER "https://google.com/?q=$query&t=ffab&atb=v1-1" -fi - - -# # pgrep -x dmenu && exit -# # pgrep -x dmenu - -# choice=$(echo "" | dmenu -i -p " Search DuckDuckGo") || exit 1 - -# if [ "$choice" = "" ]; then -# firefox "https://duckduckgo.com" -# else -# if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then -# firefox "$choice" -# else -# firefox "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1" -# fi -# fi -- cgit v1.2.3