i3: Add bluetooth and layouts dmenu

This commit is contained in:
Tobias Manske 2021-11-18 14:45:01 +01:00
parent ab5284e4dd
commit 86c259deb5
Signed by: tobias
GPG Key ID: D5914DC71F2F9352
4 changed files with 14 additions and 14 deletions

View File

@ -28,6 +28,9 @@
bindsym --release Control+Shift+Print exec flameshot gui
bindsym --release Control+Print exec flameshot screen -c
bindsym $mod+b exec ~/.dotfiles/i3/scripts/dmenu_bt.sh
bindsym $mod+Shift+m exec ~/.dotfiles/i3/scripts/dmenu_layouts.sh
# {{{ VARIABLES }}}
set $mod Mod4

View File

@ -51,12 +51,6 @@ floating_modifier $mod
bindsym $mod+Return exec $TERMINAL
bindsym $mod+Shift+Return exec $TERMINAL -name forced_term
# bluetooth dmenu
bindsym $mod+b exec ~/.dotfiles/i3/scripts/dmenu_bt.sh
# pdf favourites dmenu
bindsym $mod+p exec ~/.dotfiles/i3/scripts/dir_dmenu.sh ~/.local/favpdf
# kill focused window
bindsym $mod+Shift+q kill
@ -130,13 +124,6 @@ floating_modifier $mod
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# BIND DROPDOWN TERMINAL TO F1
bindsym F1 [instance="dropdown"] scratchpad show; [instance="dropdown"] move position center
bindsym $mod+s [class="Toggl Desktop"] scratchpad show;
# Ranger Terminal
bindsym $mod+F2 exec "urxvt -name ranger -e ranger"
# Urgent window
bindsym $mod+x [urgent=latest] focus

View File

@ -32,7 +32,7 @@ if [ $POWERED -eq 1 ]; then
fi
RETVAL=$(for index in "${!menu[@]}"; do echo "${menu[$index]}"; done | dmenu -l 5 -p "Bluetooth")
if [ $? ]; then
if [ ! -z "$RETVAL" ]; then
RETCMD=${commands["$RETVAL"]}
echo $RETCMD | bash
fi

10
i3/scripts/dmenu_layouts.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
declare -a menu
declare -A commands
RETVAL=$(find ~/.dotfiles/i3/layouts -type f -exec basename {} \; | dmenu -l 5 -p "Layout")
if [ ! -z "$RETVAL" ]; then
# RETCMD=${commands["$RETVAL"]}
i3-msg append_layout "~/.dotfiles/i3/layouts/$RETVAL"
fi