From d41321b4274b9d7afc6d56e26bf7228aa38adec7 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 3 Nov 2022 11:33:28 -0400 Subject: [PATCH] sxhkd: Remove clipboard to browser Although this was cute and allowed us to open links in any browser from anywhere on the computer, in practice this "ability" wasn't that useful. In the event that looking up words is needed, it's easier to open or switch to qutebrowser and use its search feature instead of trying to remember which keybinding is which. One solution for the future would be to synchronize qutebrowser search engines with a rofi/dmenu-like selection screen, which would solve the problem of not remembering which keybind is which. Frequently used search engines would be higher on the list and would require less or no typing beyond after the initial prompt. --- sxhkd/.config/sxhkd/ctb.sh | 27 --------------------------- sxhkd/.config/sxhkd/sxhkdrc | 15 --------------- 2 files changed, 42 deletions(-) delete mode 100755 sxhkd/.config/sxhkd/ctb.sh diff --git a/sxhkd/.config/sxhkd/ctb.sh b/sxhkd/.config/sxhkd/ctb.sh deleted file mode 100755 index 0996375b..00000000 --- a/sxhkd/.config/sxhkd/ctb.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# Clipboard to browser - -CLIPBOARD="$(xclip -o)" -OPEN="/usr/bin/$BROWSER" -URL="" - -if [[ "$1" == "jisho" ]]; then - URL="https://jisho.org/search/$CLIPBOARD" - -elif [[ "$1" == "weblio" ]]; then - URL="https://ejje.weblio.jp/content/$CLIPBOARD" - -elif [[ "$1" == "forvo" ]]; then - # URL="https://forvo.com/search/$CLIPBOARD" - URL="https://forvo.com/word/$CLIPBOARD/#ja" - -elif [[ "$1" == "deepl" ]]; then - URL="https://www.deepl.com/translator#ja/en/$CLIPBOARD" - -elif [[ "$1" == "cambridge" ]]; then - URL="https://dictionary.cambridge.org/dictionary/english/$CLIPBOARD" -fi - -if [[ "$URL" != "" ]]; then - "$OPEN" "$URL" -fi diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index 9a9f73fc..60fd6407 100644 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -131,19 +131,4 @@ super + F10 super + F11 playerctl -p mpv position "5+" && notify-send -t 2000 "Plus 5 seconds" "$(playerctl -p mpv position)" -super + F12 - ~/.config/sxhkd/ctb.sh jisho - -super + Home - ~/.config/sxhkd/ctb.sh forvo - -super + End - ~/.config/sxhkd/ctb.sh weblio - -super + Insert - ~/.config/sxhkd/ctb.sh deepl - -super + Delete - ~/.config/sxhkd/ctb.sh cambridge - # vim:ft=sxhkdrc