Commits

Tim Heap committed 2dbf972

i3: Add shortcut for floating terminal

Useful if you just want to run a single quick command, such as `cal`

  • Participants
  • Parent commits 57d4512

Comments (0)

Files changed (2)

 
 # start a terminal
 bindsym $mod+slash $exec_cwd urxvt
+bindsym $mod+shift+slash $exec_cwd urxvt -geometry 80x25 -name 'popup' -title 'popup'
 # Make all urxvts use a 1-pixel border
 # for_window [class="URxvt"] border 1pixel
 
 for_window [class="Pavucontrol"] floating enable # PulseAudio volume control
 for_window [class="Steam" title="* - Properties"] floating enable
 for_window [class="Steam"] new_float pixel 1
+for_window [class="URxvt" title="popup"] floating enable
 for_window [window_role="pop-up"] floating enable
 
 assign [class="Steam"] → 🚂
 # i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152
 
 CMD=${1:-x-terminal-emulator}
+shift 1
 CWD=''
 
 # Get window ID
 fi
 
 if [ -n "$CWD" ]; then
-  cd $CWD && exec $CMD
+  cd $CWD && exec $CMD "$@"
 else
-  exec $CMD
+  cd ~ && exec $CMD "$@"
 fi