playing with rofi
This commit is contained in:
parent
9ee4b287e3
commit
c9451dd7b6
|
|
@ -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
|
||||||
|
|
@ -31,12 +31,12 @@ COMMANDS["lock"]="exec betterlockscreen --lock dim"
|
||||||
LABELS["lock"]=""
|
LABELS["lock"]=""
|
||||||
|
|
||||||
# mpd
|
# mpd
|
||||||
COMMANDS["mpd"]="~/.config/Scripts/rofi-mpd -a"
|
#COMMANDS["mpd"]="~/.config/Scripts/rofi-mpd -a"
|
||||||
LABELS["mpd"]=""
|
#LABELS["mpd"]=""
|
||||||
|
|
||||||
# googler
|
# googler
|
||||||
COMMANDS["googler"]="~/.config/Scripts/rofi-googler.sh"
|
#COMMANDS["googler"]="~/.config/Scripts/rofi-googler.sh"
|
||||||
LABELS["googler"]=""
|
#LABELS["googler"]=""
|
||||||
|
|
||||||
# open bookmarks
|
# open bookmarks
|
||||||
COMMANDS["bookmarks"]="~/.config/Scripts/rofi-surfraw-bookmarks.sh"
|
COMMANDS["bookmarks"]="~/.config/Scripts/rofi-surfraw-bookmarks.sh"
|
||||||
|
|
@ -56,8 +56,8 @@ LABELS["workspace"]=""
|
||||||
|
|
||||||
# show clipboard history
|
# show clipboard history
|
||||||
# source: https://github.com/erebe/greenclip
|
# source: https://github.com/erebe/greenclip
|
||||||
COMMANDS["clipboard"]='rofi -modi "clipboard:greenclip print" -show clipboard'
|
#COMMANDS["clipboard"]='rofi -modi "clipboard:greenclip print" -show clipboard'
|
||||||
LABELS["clipboard"]=""
|
#LABELS["clipboard"]=""
|
||||||
|
|
||||||
# references --------------------------
|
# references --------------------------
|
||||||
#COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""
|
#COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ search () {
|
||||||
case $sel in
|
case $sel in
|
||||||
"") exit ;;
|
"") exit ;;
|
||||||
"More") search $query $(expr $index + 15) ;;
|
"More") search $query $(expr $index + 15) ;;
|
||||||
*) chromium --new-tab $sel ;;
|
*) google-chrome-stable --new-tab $sel ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,6 @@
|
||||||
# surfraw https://www.youtube.com/playlist?list=PLqv94xWU9zZ2e-lDbmBpdASA6A6JF4Nyz
|
# surfraw https://www.youtube.com/playlist?list=PLqv94xWU9zZ2e-lDbmBpdASA6A6JF4Nyz
|
||||||
|
|
||||||
# set your browser (uncomment if needed, some GUI does not detect browser variable)
|
# 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: ")
|
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: ")
|
||||||
|
|
|
||||||
|
|
@ -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+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3-msg exit"
|
||||||
|
|
||||||
bindsym $mod+BackSpace exec $flash
|
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:
|
# Show selection:
|
||||||
bindsym $mod+Insert exec --no-startup-id showclip
|
bindsym $mod+Insert exec --no-startup-id showclip
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ rofi.hide-scrollbar: true
|
||||||
rofi.width: 30
|
rofi.width: 30
|
||||||
rofi.modi: window,run,ssh,drun,i3:~/.config/Scripts/i3_switch_workspace.sh
|
rofi.modi: window,run,ssh,drun,i3:~/.config/Scripts/i3_switch_workspace.sh
|
||||||
rofi.sidebar-mode: true
|
rofi.sidebar-mode: true
|
||||||
rofi.terminal: urxvt
|
rofi.terminal: st
|
||||||
rofi.levenshtein-sort: true
|
rofi.levenshtein-sort: true
|
||||||
rofi.separator-style: dash
|
rofi.separator-style: dash
|
||||||
rofi.show-icons: true
|
rofi.show-icons: true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue