ducksearch and toggletouch posix sh
This commit is contained in:
parent
40084275f5
commit
4e97178df2
2 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Gives a dmenu prompt to search DuckDuckGo.
|
# Gives a dmenu prompt to search DuckDuckGo.
|
||||||
# Without input, will open DuckDuckGo.com.
|
# Without input, will open DuckDuckGo.com.
|
||||||
# URLs will be directly handed to the browser.
|
# URLs will be directly handed to the browser.
|
||||||
|
@ -13,8 +12,7 @@ choice=$(echo "🦆" | dmenu -i -p "Search DuckDuckGo:") || exit 1
|
||||||
if [ "$choice" = "🦆" ]; then
|
if [ "$choice" = "🦆" ]; then
|
||||||
$browser "https://duckduckgo.com"
|
$browser "https://duckduckgo.com"
|
||||||
else
|
else
|
||||||
# Detect if url
|
if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then
|
||||||
if [[ "$choice" =~ ^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$ ]]; then
|
|
||||||
$browser "$choice"
|
$browser "$choice"
|
||||||
else
|
else
|
||||||
$browser "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1"
|
$browser "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# Toggle touchpad. Requires xf86-input-synaptics.
|
# Toggle touchpad. Requires xf86-input-synaptics.
|
||||||
(synclient | grep TouchpadOff.*1 && synclient TouchpadOff=0)>/dev/null && echo "TouchPad reactivated." && exit
|
(synclient | grep "TouchpadOff.*1" && synclient TouchpadOff=0)>/dev/null && echo "TouchPad reactivated." && exit
|
||||||
synclient TouchpadOff=1 && echo "TouchPad deactivated."
|
synclient TouchpadOff=1 && echo "TouchPad deactivated."
|
||||||
|
|
Loading…
Reference in a new issue