Start re-using i3 scripts and rofi config

This commit is contained in:
Evie Litherland-Smith 2023-04-05 11:16:41 +01:00
parent d6a66e17fe
commit 797c660b0d
28 changed files with 10 additions and 13 deletions

View file

@ -24,13 +24,12 @@ directories: $(CONFIG_DIR) $(SSH_DIR)
$(CONFIG_DIR) $(SSH_DIR):
mkdir -p $@
link: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc $(HOME)/.i3_scripts
link: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
$(SSH_DIR)/config.d: $(SSH_DIR)/%: ssh/%
$(HOME)/.inputrc: $(HOME)/%: %
$(HOME)/.i3_scripts: $(HOME)/.%: %
$(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc $(HOME)/.i3_scripts:
$(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc:
ln -s $(PWD)/$? $@
install: $(LAZY_DIR)

View file

@ -46,7 +46,7 @@ BORDER_COLOR="#222222"
#ROFI_TEXT=":"
#ROFI_OPTIONS=(-width -11 -location 0 -hide-scrollbar -bw 30 -color-window "#dd310027,#dd0310027,#dd310027" -padding 5)
#ROFI_OPTIONS=(-width -18 -location 4 -hide-scrollbar -color-window "#cc310027,#00a0009a,#cc310027" -padding 5 -font "Sourcecode Pro Regular 10, FontAwesome 9")
ROFI_OPTIONS=(-theme ~/.config/rofi/power-profiles.rasi)
ROFI_OPTIONS=(-theme ~/.dotfiles/rofi/power-profiles.rasi)
# Zenity options
ZENITY_TITLE="Power Profiles"
ZENITY_TEXT="Set Profiles:"
@ -71,7 +71,6 @@ where:
This script depends on:
- systemd,
- i3,
- rofi or zenity."
# Check whether the user-defined launcher is valid
@ -176,7 +175,7 @@ function ask_confirmation() {
fi
if [ "${confirmed}" == 0 ]; then
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
"${menu[${selection}]}"
fi
}
@ -185,6 +184,6 @@ if [[ $? -eq 0 && ! -z ${selection} ]]; then
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
ask_confirmation
else
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
"${menu[${selection}]}"
fi
fi

View file

@ -39,7 +39,7 @@ HLBG_COLOR="#bbbbbb"
BORDER_COLOR="#222222"
# Options not related to colors (most rofi options do not work anymore)
ROFI_OPTIONS=(-theme ~/.config/rofi/powermenu.rasi)
ROFI_OPTIONS=(-theme ~/.dotfiles/rofi/powermenu.rasi)
# Zenity options
ZENITY_TITLE="Power Menu"
ZENITY_TEXT="Action:"
@ -64,7 +64,6 @@ where:
This script depends on:
- systemd,
- i3,
- rofi or zenity."
# Check whether the user-defined launcher is valid
@ -118,8 +117,8 @@ menu=(
[ Reboot]="systemctl reboot"
[ Suspend]="systemctl suspend"
[ Hibernate]="systemctl hibernate"
[ Lock]="~/.config/i3/scripts/blur-lock"
[ Logout]="i3-msg exit"
[ Lock]="xflock"
[ Logout]="xfce4-session-logout"
[ Cancel]=""
)
@ -172,7 +171,7 @@ function ask_confirmation() {
fi
if [ "${confirmed}" == 0 ]; then
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
"${menu[${selection}]}"
fi
}
@ -181,6 +180,6 @@ if [[ $? -eq 0 && ! -z ${selection} ]]; then
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
ask_confirmation
else
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
"${menu[${selection}]}"
fi
fi