From 97f7fcbbd65f4921a26bda3648dd56365a46c8e0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 8 Feb 2020 19:10:03 +0100 Subject: [PATCH] Move scripts into respective directories Having a general script folder makes little sense if the scripts are targeted to specific applications. This commit moved every script that solely, or mainly (like ueberzug), targets a single application into that respective stow module. --- i3/.config/i3/config | 4 +-- .../.local/bin/polybar-launch | 0 {scripts => rofi}/.local/bin/rofi-bang | 0 {scripts => rofi}/.local/bin/rofi-gopass | 0 {scripts => rofi}/.local/bin/rofi-surfraw | 0 scripts/.local/bin/dmenuprompt | 15 ----------- .../.local/bin/picom_toggle_inactive_opacity | 27 ------------------- {scripts => vifm}/.local/bin/ueberzug | 0 {scripts => vifm}/.local/bin/vifmimg | 0 {scripts => vifm}/.local/bin/vifmrun | 0 10 files changed, 2 insertions(+), 44 deletions(-) rename {scripts => polybar}/.local/bin/polybar-launch (100%) rename {scripts => rofi}/.local/bin/rofi-bang (100%) rename {scripts => rofi}/.local/bin/rofi-gopass (100%) rename {scripts => rofi}/.local/bin/rofi-surfraw (100%) delete mode 100755 scripts/.local/bin/dmenuprompt delete mode 100755 scripts/.local/bin/picom_toggle_inactive_opacity rename {scripts => vifm}/.local/bin/ueberzug (100%) rename {scripts => vifm}/.local/bin/vifmimg (100%) rename {scripts => vifm}/.local/bin/vifmrun (100%) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 321b271..3b7318d 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -94,8 +94,8 @@ smart_gaps on gaps inner 0 gaps outer 0 # enable / disable gaps (g disables, G enables) -bindsym $mod+shift+g gaps inner current set 15; gaps outer current set 0; exec picom_toggle_inactive_opacity on -bindsym $mod+g gaps inner current set 0; gaps outer current set 0; exec picom_toggle_inactive_opacity off +bindsym $mod+shift+g gaps inner current set 15; gaps outer current set 0 +bindsym $mod+g gaps inner current set 0; gaps outer current set 0 # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. diff --git a/scripts/.local/bin/polybar-launch b/polybar/.local/bin/polybar-launch similarity index 100% rename from scripts/.local/bin/polybar-launch rename to polybar/.local/bin/polybar-launch diff --git a/scripts/.local/bin/rofi-bang b/rofi/.local/bin/rofi-bang similarity index 100% rename from scripts/.local/bin/rofi-bang rename to rofi/.local/bin/rofi-bang diff --git a/scripts/.local/bin/rofi-gopass b/rofi/.local/bin/rofi-gopass similarity index 100% rename from scripts/.local/bin/rofi-gopass rename to rofi/.local/bin/rofi-gopass diff --git a/scripts/.local/bin/rofi-surfraw b/rofi/.local/bin/rofi-surfraw similarity index 100% rename from scripts/.local/bin/rofi-surfraw rename to rofi/.local/bin/rofi-surfraw diff --git a/scripts/.local/bin/dmenuprompt b/scripts/.local/bin/dmenuprompt deleted file mode 100755 index 4f5c025..0000000 --- a/scripts/.local/bin/dmenuprompt +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# A dmenu binary prompt script. -# Gives a dmenu prompt labeled with $1 to perform command $2. -# For example: -# `./prompt "Do you want to shutdown?" "shutdown -h now"` - -if [[ -z $3 ]] || [[ $3 == "normal" ]]; then - [ "$(printf "No\\nYes" | dmenu -i -p "$1")" = "Yes" ] && $2 -elif [[ $3 == "success" ]]; then - [ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb webgreen -sb greenyellow -sf black -nf white )" = "Yes" ] && $2 -elif [[ $3 == "warn" ]] || [[ $3 == "warning" ]]; then - [ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb goldenrod -sb gold -sf black -nf white )" = "Yes" ] && $2 -elif [[ $3 == "danger" ]]; then - [ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2 -fi diff --git a/scripts/.local/bin/picom_toggle_inactive_opacity b/scripts/.local/bin/picom_toggle_inactive_opacity deleted file mode 100755 index e1c656e..0000000 --- a/scripts/.local/bin/picom_toggle_inactive_opacity +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# toggle the translucency of inactive windows in the picom compositor -# by substituting the true/false setting in the picom config file. -# picom will automatically reload its settings on any config file changes. -# -# scipt can be called without arguments to toggle the value; -# or with on / off to set it to translucent / opaque, respectively. - -piconf="$XDG_CONFIG_HOME"/picom/picom.conf - -line=$(grep -n "inactive-opacity-override" "$piconf") - -IFS=: read -r line text < <(grep -n "inactive-opacity-override" "$piconf") - -_replace() { # line file old new - sed -i "$1 s/$3/$4/" "$2" -} - -if [ "$1" = "off" ]; then - _replace "$line" "$piconf" "true" "false" -elif [ "$1" = "on" ]; then - _replace "$line" "$piconf" "false" "true" -elif echo "$text" | grep -q "true"; then - _replace "$line" "$piconf" "true" "false" -elif echo "$text" | grep -q "false"; then - _replace "$line" "$piconf" "false" "true" -fi diff --git a/scripts/.local/bin/ueberzug b/vifm/.local/bin/ueberzug similarity index 100% rename from scripts/.local/bin/ueberzug rename to vifm/.local/bin/ueberzug diff --git a/scripts/.local/bin/vifmimg b/vifm/.local/bin/vifmimg similarity index 100% rename from scripts/.local/bin/vifmimg rename to vifm/.local/bin/vifmimg diff --git a/scripts/.local/bin/vifmrun b/vifm/.local/bin/vifmrun similarity index 100% rename from scripts/.local/bin/vifmrun rename to vifm/.local/bin/vifmrun