New scripts!
This commit is contained in:
parent
bf2f7de916
commit
1c445071f9
|
@ -0,0 +1,56 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
FLAG=$1
|
||||||
|
|
||||||
|
B="links2" # browser
|
||||||
|
TB="links2 -socks-proxy 127.0.0.1:9050 -only-proxies 1" # tor browser
|
||||||
|
|
||||||
|
TORSOCK="9050"
|
||||||
|
# torcheck (depends of nc)
|
||||||
|
torcheck() {
|
||||||
|
if ! nc -z localhost $TORSOCK; then
|
||||||
|
echo "tor is NOT running" &
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "
|
||||||
|
xbrowser.sh [-d, -n ]
|
||||||
|
-d) browser
|
||||||
|
-t) torsock browser"
|
||||||
|
}
|
||||||
|
|
||||||
|
case $FLAG in
|
||||||
|
-d) # browser
|
||||||
|
browser=$B
|
||||||
|
;;
|
||||||
|
-t) # torsock browser
|
||||||
|
torcheck &&
|
||||||
|
browser=$TB
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
INPUT=$(awk '{print $1}' < $HOME/.bookmarks | fzfmenu.sh) # chose website
|
||||||
|
URL=$(cat ~/.bookmarks | grep ^$INPUT | cut -d ' ' -f 2) # grep url's
|
||||||
|
|
||||||
|
if [ -n "$INPUT" ]; then # if input exist grep url's
|
||||||
|
if [ -n "$URL" ]; then # if match url exist search it
|
||||||
|
$browser $URL
|
||||||
|
|
||||||
|
else # if not match exist open the url or search the string
|
||||||
|
echo "$INPUT" | grep -Eq "^https://|^http://|^www." && $browser $INPUT \
|
||||||
|
|| $browser "https://librex.revvy.de/search.php?q=$INPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
else # if not input exitst just exit
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
## .bookmarks example: ##
|
||||||
|
## website_1 https://website_1_example
|
||||||
|
## website_2 https://website_2_example
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
## view images with or without X server (Xorg) ##
|
||||||
|
|
||||||
|
INPUT=$1
|
||||||
|
|
||||||
|
if [ -n "$DISPLAY" ]; then
|
||||||
|
nsxiv "$INPUT"
|
||||||
|
else
|
||||||
|
fim "$INPUT"
|
||||||
|
fi
|
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# this fetch was born from the search for a simpler way to get system info. Several lines and ways of doing are the product of the exchange of ideas with other users who share my convictions.
|
||||||
|
# simplefetch by @root.sti
|
||||||
|
|
||||||
|
os=$(awk -F '"' '/PRETTY_NAME/ {print $2}' /etc/os-release)
|
||||||
|
read -r kernel < /proc/sys/kernel/osrelease
|
||||||
|
arch=$(getconf LONG_BIT)
|
||||||
|
read -r hostname < /etc/hostname
|
||||||
|
uptime=$(uptime -p)
|
||||||
|
init=$(if /sbin/openrc --version 1>/dev/null; then if /sbin/init --version 1>/dev/null; then echo sysvinit; else echo openrc; fi; fi)
|
||||||
|
cpu=$(awk -F ":" 'NR==5 {print $2}' /proc/cpuinfo)
|
||||||
|
gpu=$(lspci 2>/dev/null | awk -F ":" '/VGA/ {print $3}' | cut -c 1-56)
|
||||||
|
if [ $(echo $DISPLAY) ]; then
|
||||||
|
screen=$(xdpyinfo | grep "dimensions" | awk '{ print $2 }')
|
||||||
|
wm=$(xprop -root WM_NAME | cut -d\" -f 2)
|
||||||
|
else
|
||||||
|
screen=tty_1280x1920
|
||||||
|
wm=xless_session
|
||||||
|
fi
|
||||||
|
mem=$(free -h | grep Mem: | awk '{print $3}')
|
||||||
|
memtotal=$(awk '/MemTotal/ {print $2/1024}' /proc/meminfo)
|
||||||
|
swaptotal=$(awk '/SwapTotal/ {print $2/1024}' /proc/meminfo)
|
||||||
|
swapfree=$(awk '/SwapFree/ {print $2/1024}' /proc/meminfo)
|
||||||
|
pkg=$(dpkg-query -f '${binary:Package}\n' -W | wc -l)
|
||||||
|
shell=$(printf '%s' "$(basename "$SHELL")")
|
||||||
|
terminal=$(printf '%s' "$TERM")
|
||||||
|
font=$(awk -F ': ' '/faceName/ {print $2}' "$HOME"/.Xresources)
|
||||||
|
|
||||||
|
echo "
|
||||||
|
+ OS: .............................. ${os}
|
||||||
|
+ Linux Kernel: .............. ${kernel}-${arch}
|
||||||
|
+ Init: ............................. ${init}
|
||||||
|
+ Hostname: .................. ${hostname}
|
||||||
|
+ Uptime: ....................... ${uptime}
|
||||||
|
+ Processor (Cpu): ......... ${cpu}
|
||||||
|
+ Graphics: .................... ${gpu}
|
||||||
|
+ Screen: ........................ ${screen}
|
||||||
|
+ Ram: ........................... ${mem} / ${memtotal}Mib
|
||||||
|
+ Swap: .......................... $(echo ${swaptotal}-${swapfree} | bc)Mib / ${swaptotal}Mib
|
||||||
|
+ Packages: ................... ${pkg}
|
||||||
|
+ Window Manager: ....... ${wm}
|
||||||
|
+ Shell: ........................... ${shell}
|
||||||
|
+ Terminal: .................... ${terminal}
|
||||||
|
+ Fonts: .......................... ${font}
|
||||||
|
"
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. $HOME/.config/wms/wms_var
|
||||||
|
|
||||||
|
RTPID=$(pgrep root-tail) # root-tail pid
|
||||||
|
if [ -n "$RTPID" ]; then # if pid exist
|
||||||
|
pkill root-tail # kill'em
|
||||||
|
|
||||||
|
else # if not exist
|
||||||
|
fetch.sh > /tmp/fetch # create file
|
||||||
|
root-tail --noflicker --shade -g 1000x400+20+20 -color "#$AC" -font '-b&h-*-medium-r-*-*-20-*-*-*-*-*-*-*' /tmp/fetch -reload 10 'fetch.sh > /tmp/fetch' # launch root-tail
|
||||||
|
rm /tmp/fetch # rm file
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
xclip -out | xclip -selection clipboard
|
Loading…
Reference in New Issue