Created
February 19, 2017 09:09
-
-
Save Chimrod/48d56dbe4ceb8b3247331d9e3b1c0880 to your computer and use it in GitHub Desktop.
Rofi scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ]; then | |
sqlite3 ~/.mozilla/firefox/${profile}/places.sqlite 'SELECT url from moz_places order by frecency desc' | grep -vE "google.com/search|google.com/url|duckduckgo" | |
else | |
i3-msg "exec firejail firefox --new-tab \"$*\"" > /dev/null | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here are two scripts for rofi. | |
`rofi_locate.sh` use rofi for finding files in the home path with locate, and run `xdg-open`. | |
Usage : enter your patterns and validate the search. You can start a new search by selecting the first line (empty). | |
`firefoxhistory.sh` load all the visited pages in firefox, and open the selected in a new tab. | |
Configuration : | |
You have to define the path to the sqlite database by editing the value `${profile}`. | |
The script use `i3-msg` and `firejail`, but you can run firefox directly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ]; then | |
echo "" | |
else | |
if [ -e "$1" ]; then | |
xdg-open "$1" | |
else | |
echo "" | |
locate -A ~ $* | grep -v "/\." | |
fi | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment