From 797c660b0dfd8dbed7da46153f627a8a292137d6 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 5 Apr 2023 11:16:41 +0100 Subject: [PATCH] Start re-using i3 scripts and rofi config --- Makefile | 5 ++--- .../rofi => rofi}/catppuccin-macchiato.rasi | 0 {depracated_config/rofi => rofi}/config.rasi | 0 {depracated_config/rofi => rofi}/power-profiles.rasi | 0 {depracated_config/rofi => rofi}/powermenu.rasi | 0 {depracated_config/rofi => rofi}/rofidmenu.rasi | 0 {depracated_config/rofi => rofi}/rofikeyhint.rasi | 0 {i3_scripts => scripts}/power-profiles | 7 +++---- {i3_scripts => scripts}/powermenu | 11 +++++------ {i3_scripts => scripts_to_convert}/bandwidth2 | 0 .../battery-pinebook-pro | 0 {i3_scripts => scripts_to_convert}/battery1 | 0 {i3_scripts => scripts_to_convert}/battery2 | 0 {i3_scripts => scripts_to_convert}/blur-lock | 0 {i3_scripts => scripts_to_convert}/cpu_usage | 0 {i3_scripts => scripts_to_convert}/disk | 0 {i3_scripts => scripts_to_convert}/empty_workspace | 0 {i3_scripts => scripts_to_convert}/keyboard-layout | 0 {i3_scripts => scripts_to_convert}/keyhint | 0 {i3_scripts => scripts_to_convert}/keyhint-2 | 0 {i3_scripts => scripts_to_convert}/memory | 0 {i3_scripts => scripts_to_convert}/openweather | 0 {i3_scripts => scripts_to_convert}/openweather-city | 0 {i3_scripts => scripts_to_convert}/openweather.conf | 0 {i3_scripts => scripts_to_convert}/ppd-status | 0 {i3_scripts => scripts_to_convert}/temperature | 0 {i3_scripts => scripts_to_convert}/volume | 0 {i3_scripts => scripts_to_convert}/vpn | 0 28 files changed, 10 insertions(+), 13 deletions(-) rename {depracated_config/rofi => rofi}/catppuccin-macchiato.rasi (100%) rename {depracated_config/rofi => rofi}/config.rasi (100%) rename {depracated_config/rofi => rofi}/power-profiles.rasi (100%) rename {depracated_config/rofi => rofi}/powermenu.rasi (100%) rename {depracated_config/rofi => rofi}/rofidmenu.rasi (100%) rename {depracated_config/rofi => rofi}/rofikeyhint.rasi (100%) rename {i3_scripts => scripts}/power-profiles (96%) rename {i3_scripts => scripts}/powermenu (95%) rename {i3_scripts => scripts_to_convert}/bandwidth2 (100%) rename {i3_scripts => scripts_to_convert}/battery-pinebook-pro (100%) rename {i3_scripts => scripts_to_convert}/battery1 (100%) rename {i3_scripts => scripts_to_convert}/battery2 (100%) rename {i3_scripts => scripts_to_convert}/blur-lock (100%) rename {i3_scripts => scripts_to_convert}/cpu_usage (100%) rename {i3_scripts => scripts_to_convert}/disk (100%) rename {i3_scripts => scripts_to_convert}/empty_workspace (100%) rename {i3_scripts => scripts_to_convert}/keyboard-layout (100%) rename {i3_scripts => scripts_to_convert}/keyhint (100%) rename {i3_scripts => scripts_to_convert}/keyhint-2 (100%) rename {i3_scripts => scripts_to_convert}/memory (100%) rename {i3_scripts => scripts_to_convert}/openweather (100%) rename {i3_scripts => scripts_to_convert}/openweather-city (100%) rename {i3_scripts => scripts_to_convert}/openweather.conf (100%) rename {i3_scripts => scripts_to_convert}/ppd-status (100%) rename {i3_scripts => scripts_to_convert}/temperature (100%) rename {i3_scripts => scripts_to_convert}/volume (100%) rename {i3_scripts => scripts_to_convert}/vpn (100%) diff --git a/Makefile b/Makefile index 5840dcad..6583641f 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/depracated_config/rofi/catppuccin-macchiato.rasi b/rofi/catppuccin-macchiato.rasi similarity index 100% rename from depracated_config/rofi/catppuccin-macchiato.rasi rename to rofi/catppuccin-macchiato.rasi diff --git a/depracated_config/rofi/config.rasi b/rofi/config.rasi similarity index 100% rename from depracated_config/rofi/config.rasi rename to rofi/config.rasi diff --git a/depracated_config/rofi/power-profiles.rasi b/rofi/power-profiles.rasi similarity index 100% rename from depracated_config/rofi/power-profiles.rasi rename to rofi/power-profiles.rasi diff --git a/depracated_config/rofi/powermenu.rasi b/rofi/powermenu.rasi similarity index 100% rename from depracated_config/rofi/powermenu.rasi rename to rofi/powermenu.rasi diff --git a/depracated_config/rofi/rofidmenu.rasi b/rofi/rofidmenu.rasi similarity index 100% rename from depracated_config/rofi/rofidmenu.rasi rename to rofi/rofidmenu.rasi diff --git a/depracated_config/rofi/rofikeyhint.rasi b/rofi/rofikeyhint.rasi similarity index 100% rename from depracated_config/rofi/rofikeyhint.rasi rename to rofi/rofikeyhint.rasi diff --git a/i3_scripts/power-profiles b/scripts/power-profiles similarity index 96% rename from i3_scripts/power-profiles rename to scripts/power-profiles index feb63dc5..93d7d5c1 100755 --- a/i3_scripts/power-profiles +++ b/scripts/power-profiles @@ -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 diff --git a/i3_scripts/powermenu b/scripts/powermenu similarity index 95% rename from i3_scripts/powermenu rename to scripts/powermenu index 791a9e4a..cf5a4e5c 100755 --- a/i3_scripts/powermenu +++ b/scripts/powermenu @@ -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 diff --git a/i3_scripts/bandwidth2 b/scripts_to_convert/bandwidth2 similarity index 100% rename from i3_scripts/bandwidth2 rename to scripts_to_convert/bandwidth2 diff --git a/i3_scripts/battery-pinebook-pro b/scripts_to_convert/battery-pinebook-pro similarity index 100% rename from i3_scripts/battery-pinebook-pro rename to scripts_to_convert/battery-pinebook-pro diff --git a/i3_scripts/battery1 b/scripts_to_convert/battery1 similarity index 100% rename from i3_scripts/battery1 rename to scripts_to_convert/battery1 diff --git a/i3_scripts/battery2 b/scripts_to_convert/battery2 similarity index 100% rename from i3_scripts/battery2 rename to scripts_to_convert/battery2 diff --git a/i3_scripts/blur-lock b/scripts_to_convert/blur-lock similarity index 100% rename from i3_scripts/blur-lock rename to scripts_to_convert/blur-lock diff --git a/i3_scripts/cpu_usage b/scripts_to_convert/cpu_usage similarity index 100% rename from i3_scripts/cpu_usage rename to scripts_to_convert/cpu_usage diff --git a/i3_scripts/disk b/scripts_to_convert/disk similarity index 100% rename from i3_scripts/disk rename to scripts_to_convert/disk diff --git a/i3_scripts/empty_workspace b/scripts_to_convert/empty_workspace similarity index 100% rename from i3_scripts/empty_workspace rename to scripts_to_convert/empty_workspace diff --git a/i3_scripts/keyboard-layout b/scripts_to_convert/keyboard-layout similarity index 100% rename from i3_scripts/keyboard-layout rename to scripts_to_convert/keyboard-layout diff --git a/i3_scripts/keyhint b/scripts_to_convert/keyhint similarity index 100% rename from i3_scripts/keyhint rename to scripts_to_convert/keyhint diff --git a/i3_scripts/keyhint-2 b/scripts_to_convert/keyhint-2 similarity index 100% rename from i3_scripts/keyhint-2 rename to scripts_to_convert/keyhint-2 diff --git a/i3_scripts/memory b/scripts_to_convert/memory similarity index 100% rename from i3_scripts/memory rename to scripts_to_convert/memory diff --git a/i3_scripts/openweather b/scripts_to_convert/openweather similarity index 100% rename from i3_scripts/openweather rename to scripts_to_convert/openweather diff --git a/i3_scripts/openweather-city b/scripts_to_convert/openweather-city similarity index 100% rename from i3_scripts/openweather-city rename to scripts_to_convert/openweather-city diff --git a/i3_scripts/openweather.conf b/scripts_to_convert/openweather.conf similarity index 100% rename from i3_scripts/openweather.conf rename to scripts_to_convert/openweather.conf diff --git a/i3_scripts/ppd-status b/scripts_to_convert/ppd-status similarity index 100% rename from i3_scripts/ppd-status rename to scripts_to_convert/ppd-status diff --git a/i3_scripts/temperature b/scripts_to_convert/temperature similarity index 100% rename from i3_scripts/temperature rename to scripts_to_convert/temperature diff --git a/i3_scripts/volume b/scripts_to_convert/volume similarity index 100% rename from i3_scripts/volume rename to scripts_to_convert/volume diff --git a/i3_scripts/vpn b/scripts_to_convert/vpn similarity index 100% rename from i3_scripts/vpn rename to scripts_to_convert/vpn