Skip to content

Commit de4a686

Browse files
committed
feat: add project switcher script
1 parent 001457c commit de4a686

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

dots/config/hypr/keybindings.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $screenshot_script_path = ~/.config/hypr/scripts/screenshot.sh
33
$volume_script_path = ~/.config/hypr/scripts/volume.sh
44
$brightness_script_path = ~/.config/hypr/scripts/brightness.sh
55
$rofi_script_path = ~/.config/hypr/scripts/start_rofi.sh
6+
$project_switch_script_path = ~/.config/hypr/scripts/proj-switch.sh
67

78
# Exit the session
89
bind = $main_mod, M, exit,
@@ -28,6 +29,9 @@ bind = $main_mod, X, exec, ~/.config/hypr/scripts/powermenu.sh
2829
# Toggle waybar
2930
bindr = $main_mod, T, exec, pkill waybar || waybar
3031

32+
# Switch between projects
33+
bind = $main_mod, P, exec, pkill rofi || $project_switch_script_path
34+
3135
# Control the volume
3236
binde =, XF86AudioRaiseVolume, exec, $volume_script_path output-up 5
3337
binde =, XF86AudioLowerVolume, exec, $volume_script_path output-down 5

dots/config/hypr/scripts/powermenu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $reboot
1515
$shutdown" | rofi -dmenu\
1616
-i\
1717
-p "Power"\
18-
-theme "~/.config/rofi/powermenu.rasi")
18+
-theme "~/.config/rofi/menu.rasi")
1919
# Do something based on selected option
2020
if [ "$selected_option" == "$lock" ]
2121
then
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
DEV_DIR="$HOME/dev"
4+
5+
project=$(find "$DEV_DIR" -mindepth 1 -maxdepth 1 -type d \
6+
| sed "s|$DEV_DIR/||" \
7+
| rofi -dmenu -theme ~/.config/rofi/menu.rasi -i -p "Dev project:")
8+
9+
[ -z "$project" ] && exit 0
10+
11+
cd "$DEV_DIR/$project" || exit 1
12+
13+
alacritty --working-directory "$DEV_DIR/$project" &
14+
15+
code "$DEV_DIR/$project" &

0 commit comments

Comments
 (0)