add launcher script and binding

This commit is contained in:
Mark Riedesel 2019-08-04 19:51:25 -05:00
parent 2af44fe39f
commit bd691049dc
3 changed files with 49 additions and 10 deletions

48
_bin/launcher Executable file
View file

@ -0,0 +1,48 @@
#!/bin/sh
function prepend_alpha() {
_rgb=$1
_alpha=$2
echo ${_rgb//\#/\#${_alpha}}
}
function color() {
_index=$1
_alpha=${2:-}
_color=${colors[$_index]}
if [ "$_alpha" != "" ]; then
echo $(prepend_alpha $_color $_alpha)
else
echo $_color
fi
}
# read colors from wal into array 'colors'
if [ -f ~/.cache/wal/colors ]; then
IFS=$'\n' read -d '' -r -a colors < ~/.cache/wal/colors
fi
_bg=$(color 0 "aa")
_bg2=$(color 0 "55")
_fg=${colors[5]}
_fg2=${colors[8]}
_clear="#00000000"
rofi -show drun -modi drun \
-color-window "$_bg, $_bg, $_fg" \
-color-normal "$_clear, $_fg, $_bg2, $_fg, $_bg" \
-color-active "$_clear, $_fg, $_clear, $_fg, $_clear" \
-opacity 10 \
-width 80 \
-padding 20 \
-bw 2 \
-separator-style none \
-line-padding 3 \
-icon-theme "Paper" \
-location 0 \
-hide-scrollbar \
-show-icons true \
-font "Abel 11" \
-display-run ">" \
-theme-str "#prompt-colon { enabled: false; }"

View file

@ -5,6 +5,7 @@ set $mod Mod4
bindsym $mod+Return exec alacritty
bindsym $mod+Home exec thunar
bindsym $mod+c exec chromium
bindsym $mod+d exec --no-startup-id ~/bin/launcher
# i3 actions
bindsym $mod+Shift+c reload

View file

@ -1,10 +0,0 @@
[module/volume]
format-volume = <ramp-volume> <bar-volume>
format-muted = <label-muted>
label-volume = %percentage%%
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
ramp-volume-4 =