Namespaced rofi scripts
This commit is contained in:
parent
78605ddd4e
commit
5b80b4c33a
8 changed files with 53 additions and 30 deletions
|
|
@ -5,17 +5,19 @@
|
||||||
super + shift + r
|
super + shift + r
|
||||||
pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
|
pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
|
||||||
|
|
||||||
# Running dmenu scripts
|
# Running dmenu/rofi scripts
|
||||||
super + d
|
super + d
|
||||||
dmenu_run
|
menu-run
|
||||||
super + D
|
super + D
|
||||||
passmenu
|
rofi-pass
|
||||||
super + S
|
super + S
|
||||||
sinkmenu
|
menu-sink
|
||||||
super + grave
|
super + grave
|
||||||
dmenuunicode
|
menu-unicode
|
||||||
super + m
|
super + M
|
||||||
layoutmenu
|
menu-layout
|
||||||
|
super + n
|
||||||
|
menu-norg
|
||||||
|
|
||||||
# Spawn programs
|
# Spawn programs
|
||||||
super + Return
|
super + Return
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
autorandr --list | dmenu -i -l 30 | xargs -I "layout" autorandr layout && feh --bg-scale --no-fehbg "$HOME/.config/wallpaper" && xset r rate 300 50
|
|
||||||
|
|
||||||
9
.local/bin/menu-layout
Executable file
9
.local/bin/menu-layout
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
layout=`autorandr | rofi -dmenu -i -p "Select layout" | awk '{print $1}'`
|
||||||
|
autorandr $layout
|
||||||
|
feh --bg-scale --no-fehbg "$HOME/.config/wallpaper"
|
||||||
|
# echo "dwm.accent: $(color-picker $WALLPAPER)" > /tmp/dwm_accent
|
||||||
|
# xrdb -override -merge /tmp/dwm_accent
|
||||||
|
# rm /tmp/dwm_accent
|
||||||
|
# kill -HUP $(pidof dwm)
|
||||||
|
|
||||||
9
.local/bin/menu-run
Executable file
9
.local/bin/menu-run
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/sh
|
||||||
|
# Script to have rofi show and run aliases
|
||||||
|
|
||||||
|
rofi -run-list-command "alias | awk -F= \"{print \\\$1}\"" \
|
||||||
|
-run-command "/usr/bin/zsh -i -c '{cmd}'" \
|
||||||
|
-rnow -show-icons -matching "prefix" \
|
||||||
|
-display-combi "Start" \
|
||||||
|
-show combi -combi-modes "drun,run"
|
||||||
|
|
||||||
23
.local/bin/menu-sink
Executable file
23
.local/bin/menu-sink
Executable file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Simple dmenu script for changing default audio sink
|
||||||
|
|
||||||
|
sinks_and_numbers=`wpctl status |
|
||||||
|
awk '/Audio/,/Video/ {print}' |
|
||||||
|
awk '/Sinks:/,/Sink endpoints:/ {print}' |
|
||||||
|
tail -n +2 | head -n -2 | cut -c 10-`
|
||||||
|
|
||||||
|
sinks=`echo "$sinks_and_numbers" |
|
||||||
|
awk -F'.' '{print $2}' |
|
||||||
|
awk -F'[' '{print $1}' |
|
||||||
|
cut -c 2-`
|
||||||
|
|
||||||
|
chosen=`echo "$sinks" | rofi -dmenu -p "Select audio sink" -i`
|
||||||
|
if [ -z "$chosen" ]; then
|
||||||
|
# Exited out of dmenu prompt
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
number=`echo "$sinks_and_numbers" | grep "$chosen" | awk '{print $1}' | sed 's/\./ /'`
|
||||||
|
|
||||||
|
wpctl set-default $number
|
||||||
|
|
||||||
|
|
@ -10,8 +10,10 @@ chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | dmenu -i -l 30 | sed "s/ .*//")
|
||||||
|
|
||||||
# If you run this command with an argument, it will automatically insert the
|
# If you run this command with an argument, it will automatically insert the
|
||||||
# character. Otherwise, show a message that the emoji has been copied.
|
# character. Otherwise, show a message that the emoji has been copied.
|
||||||
if [ -n "$1" ]; then
|
if [ "$1" = "type" ]; then
|
||||||
xdotool type "$chosen"
|
xdotool type "$chosen"
|
||||||
|
elif [ "$1" = "output" ]; then
|
||||||
|
echo "$chosen"
|
||||||
else
|
else
|
||||||
printf "%s" "$chosen" | xclip -selection clipboard
|
printf "%s" "$chosen" | xclip -selection clipboard
|
||||||
notify-send "'$chosen' copied to clipboard." &
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/sh
|
|
||||||
# Script to have rofi show and run aliases
|
|
||||||
|
|
||||||
rofi -run-list-command "alias | awk -F= \"{print \\\$1}\"" -run-command "/usr/bin/zsh -i -c '{cmd}'" -rnow -show run
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Simple dmenu script for changing default audio sink
|
|
||||||
|
|
||||||
sinks_and_numbers=`wpctl status \
|
|
||||||
| awk '/Audio/,/Video/ {print}' \
|
|
||||||
| awk '/Sinks:/,/Sink endpoints:/ {print}' \
|
|
||||||
| tail -n +2 | head -n -2 | cut -c 10-`
|
|
||||||
|
|
||||||
sinks=`echo "$sinks_and_numbers" | awk -F'.' '{print $2}' | awk -F'[' '{print $1}' | cut -c 2-`
|
|
||||||
chosen=`echo "$sinks" | dmenu -i -l 30`
|
|
||||||
number=`echo "$sinks_and_numbers" | grep "$chosen" | awk '{print $1}' | sed 's/\./ /'`
|
|
||||||
|
|
||||||
wpctl set-default $number
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue