diff --git a/i3/conf/client/x380yoga/header b/i3/conf/client/x380yoga/header index 9e143ac..b07284d 100644 --- a/i3/conf/client/x380yoga/header +++ b/i3/conf/client/x380yoga/header @@ -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 diff --git a/i3/conf/common/base b/i3/conf/common/base index 21c1f11..028e028 100644 --- a/i3/conf/common/base +++ b/i3/conf/common/base @@ -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 diff --git a/i3/scripts/dmenu_bt.sh b/i3/scripts/dmenu_bt.sh index f536930..20db598 100755 --- a/i3/scripts/dmenu_bt.sh +++ b/i3/scripts/dmenu_bt.sh @@ -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 diff --git a/i3/scripts/dmenu_layouts.sh b/i3/scripts/dmenu_layouts.sh new file mode 100755 index 0000000..058f9a5 --- /dev/null +++ b/i3/scripts/dmenu_layouts.sh @@ -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