#
# Ion configuration file
#

# Look and other settings for screen 0
screen 0 {
	# Used for resize units
	term_font "7x13"

	include "look-greyviolet.conf"
	
}

#dblclick_delay 250
#resize_delay 1500
#opaque_resize FALSE

# Key and pointer bindings
# (You may want to use bindings-sun.conf on SunOS).
# Modified key and button bindings for Ion
#

bindings{
	set_mod "Mod1"
#	kpress "S", "split_vert"
	
	kpress "N", "goto_below"
	kpress "P", "goto_above"
	kpress "Tab", "goto_right"
	
	kpress "1", "switch_ws_nth", 0
	kpress "2", "switch_ws_nth", 1
	kpress "3", "switch_ws_nth", 2
	kpress "4", "switch_ws_nth", 3
	kpress "5", "switch_ws_nth", 4
	kpress "6", "switch_ws_nth", 5
	kpress "7", "switch_ws_nth", 6
	kpress "8", "switch_ws_nth", 7
	kpress "9", "switch_ws_nth", 8
	kpress "0", "switch_ws_nth", 9
	

	submap "N" {
		set_mod "AnyModifier"
		kpress "A", "query_attachclient"
	kpress "z", "query_gotoclient"

	kpress "N", "switch_next"
		kpress "P", "switch_prev"
		kpress "K", "goto_previous"
		kpress "S", "split_horiz"
		kpress "H", "maximize_horiz"
		kpress "V", "maximize_vert" 
                kpress "Tab", "goto_left"
		kpress "X", "destroy_frame"
		kpress "K", "kill"

		kpress "1", "switch_nth", 0
		kpress "2", "switch_nth", 1
		kpress "3", "switch_nth", 2
		kpress "4", "switch_nth", 3
		kpress "5", "switch_nth", 4
		kpress "6", "switch_nth", 5
		kpress "7", "switch_nth", 6
		kpress "8", "switch_nth", 7
		kpress "9", "switch_nth", 8
		kpress "0", "switch_nth", 9
	}
        
        submap "o" {
                set_mod "AnyModifier"
                kpress "F1", "query_runwith", "Manual page:", "ion-man"
                kpress "Mod1+F1", "exec", "ion-man ion"
	kpress "F2", "exec", "rxvt -bg black -fg green"
	kpress "E", "query_exec"
	kpress "Mod1+F3", "query_function"
	kpress "s", "query_runwith", "SSH to:", "ion-ssh"
	
	kpress "F5", "query_runfile", "Edit file:", "ion-edit"
	kpress "F6", "query_runfile", "View file:", "ion-view"
	
	kpress "F9", "query_workspace"
	kpress "Mod1+F9", "query_workspace_with"
	kpress "F11", "query_yesno", "Restart Ion (y/n)?", "restart"
	kpress "F12", "query_yesno", "Exit Ion (y/n)?", "exit"
	kpress "V", "resize_vert"
	kpress "H", "resize_horiz"
	
        }
	
	mdrag "Button3", "p_resize"
}


tab_bindings{
	mclick "Button1", "switch_tab"
	mdrag "Button1", "p_tabdrag"
	mdrag "Button3", "p_resize"
}


input_bindings{
	set_mod "Control"
	kpress "F", "forward"
	kpress "B", "back"
	kpress "E", "eol"
	kpress "A", "bol"
	kpress "Z", "bskip_word"
	kpress "X", "skip_word"

	kpress "D", "delete"
	kpress "H", "backspace"
	kpress "J", "kill_to_eol"
	kpress "Y", "kill_line"
	kpress "W", "kill_word"
	kpress "O", "bkill_word"

#	kpress "U", "scrollup"
	kpress "V", "scrolldown"
	kpress "P", "history_prev"
	kpress "N", "history_next"

	kpress "M", "finish"
	kpress "C", "cancel"
	
	submap "K" {
		set_mod "AnyModifier"
		kpress "B", "set_mark"
		kpress "Y", "cut"
		kpress "K", "copy"
		kpress "C", "paste"
	}

	set_mod ""
	kpress "Return", "finish"
	kpress "Delete", "delete"
	kpress "BackSpace", "backspace"
	kpress "Home", "bol"
	kpress "End", "eol"
	kpress "Tab", "complete"
	kpress "Up", "history_prev"
	kpress "Down", "history_next"
	kpress "Right", "forward"
	kpress "Left", "back"
	kpress "Escape", "cancel"
	kpress "Page_Up", "scrollup"
	kpress "Page_Down", "scrolldown"

	mclick "Button2", "paste"
}


moveres_bindings{
	set_mod "AnyModifier"
	kpress "Escape", "cancel_resize"
	kpress "Return", "end_resize"
	kpress "V", "grow"
	kpress "H", "grow"
	kpress "S", "shrink"
}


