mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-25 10:23:42 +01:00
Update hn, rofi- maim,power,prompt,search
This commit is contained in:
parent
2148df813e
commit
9440b57d09
10
hn
10
hn
@ -22,7 +22,7 @@ if ! test -x "$(command -v gum)"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 <(cat <<EOF
|
||||
selection=$(python3 <(cat <<EOF
|
||||
|
||||
import feedparser
|
||||
HNFeed = feedparser.parse("https://hnrss.org/newest")
|
||||
@ -32,8 +32,8 @@ class bcolors:
|
||||
ENDC = "\033[0m"
|
||||
|
||||
for item in HNFeed.entries:
|
||||
print(f"{bcolors.HEADER}%s{bcolors.ENDC}" % item.title)
|
||||
print(item.links[0].href)
|
||||
print()
|
||||
print(f"[{item.title}]({item.links[0].href})")
|
||||
EOF
|
||||
) | gum pager
|
||||
) | gum format -t "markdown" | gum choose --limit=1)
|
||||
|
||||
xdg-open "$(echo "$selection" | grep -o 'http[s]\?://[^ ]\+')" >/dev/null || echo "$selection"
|
||||
|
4
rofimaim
4
rofimaim
@ -17,7 +17,7 @@ screen=' Screen'
|
||||
area=' Select area'
|
||||
window=' Window'
|
||||
|
||||
chosen=$(printf '%s;%s;%s\n' "$screen" "$area" "$window" \
|
||||
chosen=$(printf '%s;%s;%s' "$screen" "$area" "$window" \
|
||||
| rofi -theme-str 'window { width: 10em; height: 10em; }' \
|
||||
-P 'Screenshot' \
|
||||
-dmenu \
|
||||
@ -35,6 +35,4 @@ esac
|
||||
# shellcheck disable=2086
|
||||
maim --hidecursor --quiet --quality=3 --format='png' $extra_args "$screenshot_path" && {
|
||||
notify-send --icon=org.xfce.screenshooter "Screenshot saved as $screenshot_path"
|
||||
|
||||
xclip -selection clipboard -target 'image/png' -in "$screenshot_path"
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ lock=' Lock'
|
||||
suspend='鈴 Suspend'
|
||||
log_out=' Log out'
|
||||
|
||||
chosen=$(printf '%s;%s;%s;%s;%s\n' "$power_off" "$reboot" "$lock" "$suspend" \
|
||||
chosen=$(printf '%s;%s;%s;%s;%s' "$power_off" "$reboot" "$lock" "$suspend" \
|
||||
"$log_out" \
|
||||
| rofi -theme-str 'window { width: 10em; height: 11em; }' \
|
||||
-dmenu -p "Session"\
|
||||
|
@ -54,7 +54,7 @@ while [ $# -ne 0 ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
chosen=$(printf '%s;%s\n' "$yes" "$no" \
|
||||
chosen=$(printf '%s;%s' "$yes" "$no" \
|
||||
| rofi -theme-str 'window { width: 10em; height: 11em; }' \
|
||||
-p "$query" \
|
||||
-dmenu \
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
rofi -dmenu -p "Search" -theme-str 'window { width: 40em; height: 4em; }' | xargs -I{} xdg-open "https://librey.hyperreal.coffee/search.php?q={}"
|
||||
rofi -dmenu -p "Search" -theme-str 'window { width: 40em; height: 4em; }' | xargs -I{} xdg-open "https://librey.nirn.quest/search.php?q={}"
|
||||
|
Loading…
Reference in New Issue
Block a user