summaryrefslogtreecommitdiff
path: root/src/update_i3.py
diff options
context:
space:
mode:
authorChandler J <cjustice2000@gmail.com>2024-04-06 21:53:25 -0600
committerChandler J <cjustice2000@gmail.com>2024-04-06 21:53:25 -0600
commit2564189a769a5bd3de63086bb62dc3532d1b07b9 (patch)
tree107220eb1593bb33738d3317fd86c1184327dc7c /src/update_i3.py
parentb09d6a0a2d9887b5560a3b49cb8a603a33ec4828 (diff)
added menubutton bind for i3, refactoring
Diffstat (limited to 'src/update_i3.py')
-rw-r--r--src/update_i3.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/update_i3.py b/src/update_i3.py
index 1d4b792..3fc8858 100644
--- a/src/update_i3.py
+++ b/src/update_i3.py
@@ -12,12 +12,13 @@ def updatei3Theme(
update_i3_lock: bool,
dmenu: bool,
lock_img_path: str,
+ menu_keybind: str,
) -> None:
print('[bold red]Updating i3 color scheme')
- update_i3_colors(config_path, colors, compliments, dmenu, img_path)
+ update_i3_colors(config_path, colors, compliments, dmenu, img_path, menu_keybind)
if update_i3_lock:
change_i3_lock_img(img_path, lock_img_path)
@@ -49,7 +50,8 @@ def update_i3_colors(
colors: list,
compliments: list,
dmenu: bool,
- img_path: str
+ img_path: str,
+ menu_keybind: str,
) -> None:
data = ''
with open(config_path, 'r') as file:
@@ -72,10 +74,10 @@ def update_i3_colors(
if "set $bgimage" in line:
data[i] = 'set $bgimage ' + img_path + '\n'
# update i3 lock image
- if "bindsym $mod+d exec --no-startup-id dmenu_run" in line:
+ if f"bindsym {menu_keybind} exec --no-startup-id dmenu_run" in line:
if dmenu:
print('[bold red]Updating Dmenu color scheme')
- data[i] = f"bindsym $mod+d exec --no-startup-id dmenu_run -nb '{colors[0]}' -sf '{compliments[0]}' -sb '{colors[1]}' -nf '{compliments[1]}'\n"
+ data[i] = f"bindsym {menu_keybind} exec --no-startup-id dmenu_run -nb '{colors[0]}' -sf '{compliments[0]}' -sb '{colors[1]}' -nf '{compliments[1]}'\n"
with open(config_path, 'w') as file: