rofi scripts
parent
8c18beb153
commit
7df2bd320d
@ -0,0 +1,52 @@
|
||||
# Rofi-Bangs
|
||||
a script to launch other rofi scripts
|
||||
|
||||
* tutorial video: [Link](https://www.youtube.com/watch?v=kxJClZIXSnM)
|
||||
* offical website: [Link](https://www.youtube.com/user/gotbletu)
|
||||
|
||||
### install requirements
|
||||
rofi
|
||||
|
||||
### rofi matrix theme
|
||||
vim ~/.Xresources && xrdb -load ~/.Xresources
|
||||
|
||||
|
||||
! ------------------------------------------------------------------------------
|
||||
! ROFI Color theme
|
||||
! ------------------------------------------------------------------------------
|
||||
! https://davedavenport.github.io/rofi/p11-Generator.html
|
||||
rofi.color-enabled: true
|
||||
rofi.color-window: #000000, #000000, #000000
|
||||
rofi.color-normal: #000000, #b3e774, #000000, #b3e774, #000000
|
||||
rofi.color-active: #000000, #b3e774, #000000, #b3e774, #000000
|
||||
rofi.color-urgent: #000000, #b3e774, #000000, #b3e774, #000000
|
||||
|
||||
|
||||
### rofi-bangs script and collections
|
||||
Download at [rofi-scripts-collection](rofi-scripts-collection)
|
||||
|
||||
### hotkey
|
||||
bind **rofi-bangs.sh** to a hotkey
|
||||
|
||||
### references
|
||||
- Special Thanks to MoreChannelNoise https://www.youtube.com/user/MoreChannelNoise
|
||||
- rofi-bangs: https://www.youtube.com/watch?v=kxJClZIXSnM
|
||||
- rofi playlist: https://www.youtube.com/playlist?list=PLqv94xWU9zZ0LVP1SEFQsLEYjZC_SUB3m
|
||||
- surfraw playlist: https://www.youtube.com/playlist?list=PLqv94xWU9zZ2e-lDbmBpdASA6A6JF4Nyz
|
||||
|
||||
### contact
|
||||
|
||||
_ _ _ _
|
||||
__ _ ___ | |_| |__ | | ___| |_ _ _
|
||||
/ _` |/ _ \| __| '_ \| |/ _ \ __| | | |
|
||||
| (_| | (_) | |_| |_) | | __/ |_| |_| |
|
||||
\__, |\___/ \__|_.__/|_|\___|\__|\__,_|
|
||||
|___/
|
||||
|
||||
- http://www.youtube.com/user/gotbletu
|
||||
- https://twitter.com/gotbletu
|
||||
- https://plus.google.com/+gotbletu
|
||||
- https://github.com/gotbletu
|
||||
- gotbletu@gmail.com
|
||||
|
||||
|
@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env bash
|
||||
# author: unknown
|
||||
# sentby: MoreChannelNoise (https://www.youtube.com/user/MoreChannelNoise)
|
||||
# editby: gotbletu (https://www.youtube.com/user/gotbletu)
|
||||
|
||||
# demo: https://www.youtube.com/watch?v=kxJClZIXSnM
|
||||
# info: this is a script to launch other rofi scripts,
|
||||
# saves us the trouble of binding multiple hotkeys for each script,
|
||||
# when we can just use one hotkey for everything.
|
||||
|
||||
declare -A LABELS
|
||||
declare -A COMMANDS
|
||||
|
||||
###
|
||||
# List of defined 'bangs'
|
||||
|
||||
# launch programs
|
||||
COMMANDS["apps"]="rofi -combi-modi window,drun -show combi"
|
||||
LABELS["apps"]=""
|
||||
|
||||
# open bookmarks
|
||||
COMMANDS["bookmarks"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-bookmarks.sh"
|
||||
LABELS["bookmarks"]=""
|
||||
|
||||
# search local files
|
||||
COMMANDS["locate"]="~/.scripts/rofi-scripts-collection/rofi-locate.sh"
|
||||
LABELS["locate"]=""
|
||||
|
||||
# open custom web searches
|
||||
COMMANDS["websearch"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-websearch.sh"
|
||||
LABELS["websearch"]=""
|
||||
|
||||
# show clipboard history
|
||||
# source: https://bitbucket.org/pandozer/rofi-clipboard-manager/overview
|
||||
# COMMANDS["clipboard"]='rofi -modi "clipboard:~/.bin/rofi-clipboard-manager/mclip.py menu" -show clipboard && ~/.bin/rofi-clipboard-manager/mclip.py paste'
|
||||
# LABELS["clipboard"]=""
|
||||
|
||||
# references --------------------------
|
||||
# COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""
|
||||
# LABELS[";sr2"]=""
|
||||
|
||||
# COMMANDS[";piratebay"]="chromium --disk-cache-dir=/tmp/cache http://thepiratebay.org/search/\" \${input}\""
|
||||
# LABELS[";piratebay"]=""
|
||||
|
||||
# COMMANDS[".bin"]="spacefm -r '/home/dka/bin'"
|
||||
# LABELS[".bin"]=".bin"
|
||||
|
||||
# COMMANDS["#screenshot"]='/home/dka/bin/screenshot-scripts/myscreenshot.sh'
|
||||
# LABELS["#screenshot"]="screenshot"
|
||||
|
||||
################################################################################
|
||||
# do not edit below
|
||||
################################################################################
|
||||
##
|
||||
# Generate menu
|
||||
##
|
||||
function print_menu()
|
||||
{
|
||||
for key in ${!LABELS[@]}
|
||||
do
|
||||
echo "$key ${LABELS}"
|
||||
# echo "$key ${LABELS[$key]}"
|
||||
# my top version just shows the first field in labels row, not two words side by side
|
||||
done
|
||||
}
|
||||
##
|
||||
# Show rofi.
|
||||
##
|
||||
function start()
|
||||
{
|
||||
# print_menu | rofi -dmenu -p "?=>"
|
||||
print_menu | rofi -dmenu -mesg ">>> launch your collection of rofi scripts" -i -p "rofi-bangs: "
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Run it
|
||||
value="$(start)"
|
||||
|
||||
# Split input.
|
||||
# grab upto first space.
|
||||
choice=${value%%\ *}
|
||||
# graph remainder, minus space.
|
||||
input=${value:$((${#choice}+1))}
|
||||
|
||||
##
|
||||
# Cancelled? bail out
|
||||
##
|
||||
if test -z ${choice}
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
# check if choice exists
|
||||
if test ${COMMANDS[$choice]+isset}
|
||||
then
|
||||
# Execute the choice
|
||||
eval echo "Executing: ${COMMANDS[$choice]}"
|
||||
eval ${COMMANDS[$choice]}
|
||||
else
|
||||
eval $choice | rofi
|
||||
# prefer my above so I can use this same script to also launch apps like geany or leafpad etc (DK)
|
||||
# echo "Unknown command: ${choice}" | rofi -dmenu -p "error"
|
||||
fi
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# _ _ _ _
|
||||
# __ _ ___ | |_| |__ | | ___| |_ _ _
|
||||
# / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
|
||||
#| (_| | (_) | |_| |_) | | __/ |_| |_| |
|
||||
# \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
|
||||
# |___/
|
||||
# https://www.youtube.com/user/gotbletu
|
||||
# https://twitter.com/gotbletu
|
||||
# https://plus.google.com/+gotbletu
|
||||
# https://github.com/gotbletu
|
||||
# gotbleu@gmail.com
|
||||
|
||||
# info: rofi-locate is a script to search local files and folders on your computer using the locate command and the updatedb database
|
||||
# requirements: rofi mlocate
|
||||
# playlist: rofi https://www.youtube.com/playlist?list=PLqv94xWU9zZ0LVP1SEFQsLEYjZC_SUB3m
|
||||
|
||||
xdg-open "$(locate home media | rofi -threads 0 -width 100 -dmenu -i -p "locate:")"
|
||||
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# _ _ _ _
|
||||
# __ _ ___ | |_| |__ | | ___| |_ _ _
|
||||
# / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
|
||||
#| (_| | (_) | |_| |_) | | __/ |_| |_| |
|
||||
# \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
|
||||
# |___/
|
||||
# https://www.youtube.com/user/gotbletu
|
||||
# https://twitter.com/gotbletu
|
||||
# https://plus.google.com/+gotbletu
|
||||
# https://github.com/gotbletu
|
||||
# gotbleu@gmail.com
|
||||
|
||||
# info: rofi-surfraw-bookmarks is a script to open your saved surfraw bookmarks with the rofi launcher
|
||||
# requirements: rofi surfraw
|
||||
# playlist: rofi https://www.youtube.com/playlist?list=PLqv94xWU9zZ0LVP1SEFQsLEYjZC_SUB3m
|
||||
# surfraw https://www.youtube.com/playlist?list=PLqv94xWU9zZ2e-lDbmBpdASA6A6JF4Nyz
|
||||
|
||||
surfraw -browser=$BROWSER "$(cat ~/.config/surfraw/bookmarks | sed '/^$/d' | sed '/^#/d' | sed '/^\//d' | sort -n | rofi -dmenu -mesg ">>> Edit to add new bookmarks at ~/.config/surfraw/bookmarks" -i -p "rofi-surfraw-bookmarks: ")"
|
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# _ _ _ _
|
||||
# __ _ ___ | |_| |__ | | ___| |_ _ _
|
||||
# / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
|
||||
#| (_| | (_) | |_| |_) | | __/ |_| |_| |
|
||||
# \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
|
||||
# |___/
|
||||
# https://www.youtube.com/user/gotbletu
|
||||
# https://twitter.com/gotbletu
|
||||
# https://plus.google.com/+gotbletu
|
||||
# https://github.com/gotbletu
|
||||
# gotbleu@gmail.com
|
||||
|
||||
# info: rofi-surfraw-websearch is a script to do internet searches from different websites, all from the rofi launcher
|
||||
# requirements: rofi surfraw
|
||||
# playlist: rofi https://www.youtube.com/playlist?list=PLqv94xWU9zZ0LVP1SEFQsLEYjZC_SUB3m
|
||||
# surfraw https://www.youtube.com/playlist?list=PLqv94xWU9zZ2e-lDbmBpdASA6A6JF4Nyz
|
||||
|
||||
surfraw -browser=$BROWSER $(sr -elvi | awk -F'-' '{print $1}' | sed '/:/d' | awk '{$1=$1};1' | rofi -kb-row-select "Tab" -kb-row-tab "Control+space" -dmenu -mesg ">>> Tab = Autocomplete" -i -p "rofi-surfraw-websearch: ")
|
||||
|
Loading…
Reference in New Issue