From bd691049dcc368908aacf65756faeccd52c94333 Mon Sep 17 00:00:00 2001 From: Mark Riedesel Date: Sun, 4 Aug 2019 19:51:25 -0500 Subject: [PATCH] add launcher script and binding --- _bin/launcher | 48 ++++++++++++++++++++++++++++++++++++++++ _config/i3/config | 1 + _config/polybar/bars.ini | 10 --------- 3 files changed, 49 insertions(+), 10 deletions(-) create mode 100755 _bin/launcher delete mode 100644 _config/polybar/bars.ini diff --git a/_bin/launcher b/_bin/launcher new file mode 100755 index 0000000..e0eac7e --- /dev/null +++ b/_bin/launcher @@ -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; }" + diff --git a/_config/i3/config b/_config/i3/config index baf00e2..2587a6b 100644 --- a/_config/i3/config +++ b/_config/i3/config @@ -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 diff --git a/_config/polybar/bars.ini b/_config/polybar/bars.ini deleted file mode 100644 index aaec7cf..0000000 --- a/_config/polybar/bars.ini +++ /dev/null @@ -1,10 +0,0 @@ -[module/volume] - format-volume = - format-muted = - label-volume = %percentage%% - - ramp-volume-0 =  - ramp-volume-1 =  - ramp-volume-2 =  - ramp-volume-3 =  - ramp-volume-4 = 