2023-05-04 07:10:19 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## quick web browsing ##
|
|
|
|
|
2023-08-26 06:54:55 +02:00
|
|
|
. /tmp/wms_var
|
2023-05-04 07:10:19 +02:00
|
|
|
|
|
|
|
COLORS="-menu-background-color 0x000000 \
|
|
|
|
-menu-foreground-color 0x$AC \
|
|
|
|
-scroll-bar-bar-color 0x$AC \
|
|
|
|
-scroll-bar-frame-color 0x$IC"
|
|
|
|
|
2023-08-04 20:22:54 +02:00
|
|
|
BROWSER="links -g $COLORS"
|
2023-05-27 06:16:58 +02:00
|
|
|
XSEL=$(xclip -o)
|
2023-05-04 07:10:19 +02:00
|
|
|
|
2023-08-04 20:22:54 +02:00
|
|
|
echo $XSEL | grep -Eq "^https://|^http://|^www." && $BROWSER $XSEL \
|
2023-05-04 07:10:19 +02:00
|
|
|
|| $BROWSER "https://duckduckgo.com/?q=$XSEL"
|
|
|
|
|
|
|
|
## xselection ##
|
|
|
|
# under xprop: XSEL=$(xprop -root | awk -F "=" '/CUT_BUFFER0/ {gsub("\"","",$2); print $2}')
|
|
|
|
# under wmutils: XSEL=$(atomx CUT_BUFFER0 $(lsw -r))
|
2023-05-27 06:16:58 +02:00
|
|
|
# with xclip: XSEL=$(xclip -o)
|