playing with rofi

This commit is contained in:
Harri Lahtinen 2019-05-16 01:41:44 +03:00
parent 9ee4b287e3
commit c9451dd7b6
6 changed files with 44 additions and 10 deletions

34
.config/Scripts/on Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# to edit themes in place with live reload:
# ag -l | entr -r $HOME/.config/rofi/on
# use -normal-window flag on rofi if you want to not have to close rofi to get
# back to your editor.
# https://www.reddit.com/r/qtools/comments/amswu9/autoloading_rofi_for_quick_themeing_experience/
options="  lock
 logout
 sleep
 hibernate
 reboot
 shutdown"
themes_dir=$HOME/.config/rofi
theme=${1:-$themes_dir/colors-rofi-dark.rasi}
selection=$(echo -e "${options}" | rofi -dmenu -config ~/.config/rofi/config $theme -columns 6 -lines 1 -width 800)
echo "This is your selection: $selection"
case "${selection}" in
"  lock")
betterlockscreen -l dim;;
"  logout")
i3-msg exit;;
"  sleep")
betterlockscreen -l dim && systemctl suspend;;
"  hibernate")
betterlockscreen -l dim && systemctl hibernate;;
"  reboot")
systemctl reboot;;
"  shutdown")
systemctl poweroff -i;;
esac

View File

@ -31,12 +31,12 @@ COMMANDS["lock"]="exec betterlockscreen --lock dim"
LABELS["lock"]=""
# mpd
COMMANDS["mpd"]="~/.config/Scripts/rofi-mpd -a"
LABELS["mpd"]=""
#COMMANDS["mpd"]="~/.config/Scripts/rofi-mpd -a"
#LABELS["mpd"]=""
# googler
COMMANDS["googler"]="~/.config/Scripts/rofi-googler.sh"
LABELS["googler"]=""
#COMMANDS["googler"]="~/.config/Scripts/rofi-googler.sh"
#LABELS["googler"]=""
# open bookmarks
COMMANDS["bookmarks"]="~/.config/Scripts/rofi-surfraw-bookmarks.sh"
@ -56,8 +56,8 @@ LABELS["workspace"]=""
# show clipboard history
# source: https://github.com/erebe/greenclip
COMMANDS["clipboard"]='rofi -modi "clipboard:greenclip print" -show clipboard'
LABELS["clipboard"]=""
#COMMANDS["clipboard"]='rofi -modi "clipboard:greenclip print" -show clipboard'
#LABELS["clipboard"]=""
# references --------------------------
#COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""

View File

@ -11,7 +11,7 @@ search () {
case $sel in
"") exit ;;
"More") search $query $(expr $index + 15) ;;
*) chromium --new-tab $sel ;;
*) google-chrome-stable --new-tab $sel ;;
esac
}

View File

@ -17,6 +17,6 @@
# surfraw https://www.youtube.com/playlist?list=PLqv94xWU9zZ2e-lDbmBpdASA6A6JF4Nyz
# set your browser (uncomment if needed, some GUI does not detect browser variable)
BROWSER=chromium
BROWSER=google-chrome-stable
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: ")

View File

@ -135,7 +135,7 @@ bindsym $mod+Escape workspace prev
bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3-msg exit"
bindsym $mod+BackSpace exec $flash
bindsym $mod+Shift+BackSpace exec ~/.config/Scripts/power-menu.sh
bindsym $mod+Shift+BackSpace exec ~/.config/Scripts/on
# Show selection:
bindsym $mod+Insert exec --no-startup-id showclip

View File

@ -13,7 +13,7 @@ rofi.hide-scrollbar: true
rofi.width: 30
rofi.modi: window,run,ssh,drun,i3:~/.config/Scripts/i3_switch_workspace.sh
rofi.sidebar-mode: true
rofi.terminal: urxvt
rofi.terminal: st
rofi.levenshtein-sort: true
rofi.separator-style: dash
rofi.show-icons: true