use dmenu to run programs. also make choose-monitor script

This commit is contained in:
2026-05-25 14:33:35 +02:00
parent c4b95ff51c
commit d87db69490
3 changed files with 13 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
MONITORS=$(xrandr -q | awk '/\sconnected/ {print $1}')
CHOSEN_MONITOR=$(echo "$MONITORS" | dmenu -i -p 'choose your monitor')
if [ -z "$CHOSEN_MONITOR" ]; then
exit 1
fi
MONITORS=$(echo "$MONITORS" | sed "/^${CHOSEN_MONITOR}$/d")
echo "$MONITORS" | xargs -I {} xrandr --output {} --off
xrandr --output "$CHOSEN_MONITOR" --auto
feh --bg-max ~/.wallpaper/
+2 -1
View File
@@ -20,7 +20,8 @@ exec --no-startup-id feh --bg-max ~/.wallpaper/
# Key bindings # Key bindings
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
bindsym $mod+q kill bindsym $mod+q kill
bindsym $mod+d exec --no-startup-id rofi -show drun bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+m exec --no-startup-id just --justfile ~/.config/i3/justfile choose-monitor
# Floating modifier # Floating modifier
floating_modifier $mod floating_modifier $mod
+2
View File
@@ -0,0 +1,2 @@
choose-monitor:
sh choose-monitor.sh