summaryrefslogtreecommitdiff
path: root/src/actions.h
AgeCommit message (Collapse)Author
2004-12-02Updated copyright notices.sabetts
2004-11-19* src/actions.c (set_vars): add maxundossabetts
(push_frame_undo): new function (pop_frame_undo): likewise (initialize_default_keybindings): add binding for "undo" (initialize_default_keybindings): add def alias for maxundos (cmd_other): call set_active_window_force instead of set_active_window (cmd_v_split): push the frame set (cmd_h_split): likewise (cmd_only): likewise (cmd_remove): likewise (cmd_shrink): likewise (cmd_tmpwm): likewise (cmd_license): update copyright. Add build date and time. (cmd_fselect): simplify code that returns the frame selected. (fdump): new function (cmd_fdump): call fdump to dump the screen's frame set. (frestore): new function (cmd_frestore): call frestore to restore the screen's frame set. (cmd_sfdump): new function (cmd_sdump): likewise (set_maxundos): likewise (cmd_cnext): likewise (cmd_cprev): likewise (cmd_inext): likewise (cmd_iprev): likewise (cmd_cother): likewise (cmd_iother): likewise (cmd_undo): likewise (cmd_prompt): likewise (cmd_describekey): likewise (cmd_dedicate): likewise * src/main.c (init_defaults): init maxundos to 20 (clean_up): free the undo history lists * src/window.h (set_active_window_body): new function (set_active_window_force): likewise * src/window.c (set_active_window): new function (set_active_window_force): likewise (set_active_window_body): renamed from set_active_window (set_active_window_body): Add code to handle dedicated frames. * src/screen.h (screen_dump): new prototype * src/screen.c (screen_dump): new function * src/linkedlist.h (list_last): new macro * src/group.h (group_last_window_by_class_complement): new prototype (group_last_window_by_class): likewise * src/group.c (group_last_window_by_class): new function (group_last_window_by_class_complement): likewise * src/globals.h (rp_frame_undos): new extern. (rp_num_frame_undos): likewise * src/globals.c (rp_frame_undos): new list. (rp_num_frame_undos): new global * src/frame.c (frame_new): init f->dedicated to 0. * src/data.h (struct rp_frame): add dedicated member. (struct rp_defaults): add maxundos member. (struct rp_frame_undo): new struct. * src/actions.c: new commands, cnext, cother, cprev,
2004-11-17*** empty log message ***sabetts
2004-11-12* src/actions.c (cmd_ratclick): new functionsabetts
(cmd_ratrelwarp): likewise (cmd_ratwarp): likewise (user_commands): new commands ratclick, ratrelwarp, ratwarp. * contrib/genrpbindings: add common lisp bindings
2004-10-05new command, sselectsabetts
(cmd_sselect): new function. added prototype.
2004-04-19* src/messages.h (MESSAGE_PROMPT_SELECT_VAR): new definesabetts
(MESSAGE_PROMPT_VAR_VALUE): likewise * src/actions.h (cmd_set): new prototype * src/actions.c (user_commands): remove all def* commands. Add 'set' command. rename all cmd_def* commands to set_*. Add prototypes for set_* commands. (struct set_var): new struct (set_vars): new static global (cmd_set): new function (var_completions): new function (initialize_default_keybindings): add aliases for def* commands
2004-04-04* src/main.c (init_defaults): init frame_selectors.sabetts
* src/data.h (struct rp_defaults): new field, frame_selectors. * src/actions.h (cmd_defframesels): new prototype * src/actions.c (user_commands): new command defframesels (frame_selector): new function (frame_selector_match): likewise (cmd_defframesels): likewise (cmd_fselect): use default.frame_selectors to select a frame.
2003-09-02* src/main.c (show_welcome_message): search the root keymap forsabetts
the help binding. (clean_up): call free_keymaps and not free_keybindings. * src/events.c (handle_key): call cmd_readkey to hand actually reading a key from the keyboard. * src/data.h (typedef rp_keymap): new typedef (struct rp_keymap): new struct * src/conf.h (ROOT_KEYMAP): new define * src/actions.h (cmd_readkey): new prototype (cmd_newkmap): likewise (cmd_delkmap): likewise (cmd_definekey): likewise (find_keymap): likewise (keymap_free): likewise (free_keymaps): likewise * src/actions.c (rp_keymaps): new global. remove globals key_actions, key_actions_last, and key_actions_table_size. (user_commands): remove bind and unbind. New commands readkey, newkmap, delkmap, and definekey. (find_keybinding_by_action): take a rp_keymap argument and operate on it. All callers updated. (find_keybinding): likewise (find_command_by_keydesc): likewise (resolve_command_from_keydesc): likewise (add_keybinding): likewise (remove_keybinding): likewise (cmd_definekey): new function (cmd_newkmap): likewise (cmd_delkmap): likewise (keymap_new): likewise (keymap_free): likewise (find_keymap): likewise (free_keymaps): likewise (cmd_bind): remove function. Prototype removed. (cmd_unbind): likewise (initialize_default_keybindings): add aliases for unbind and bind. (ungrab_rat): moved from events.c (grab_rat): likewise
2003-08-23* src/split.c (remove_all_splits): only hide the windows in thesabetts
current screen. * src/group.h (group_delete_group): new prototype * src/group.c (group_last_window): find the last window in the current screen. (group_next_window): find next window in current screen. (group_prev_window): find previous window in current screen. * src/manage.c (force_maximize): call XSync() after first resize. * src/globals.h (GROUP_DELETE_GROUP_OK): new define (GROUP_DELETE_GROUP_NONEMPTY): likewise * src/actions.h (cmd_gdelete): new prototype * src/actions.c (user_commands): new command gdelete (cmd_gdelete): new command
2003-08-10* src/actions.h (cmd_listhook): new prototypesabetts
* src/actions.c (use_commands): new command listhook (cmd_remhook): fix error messages (hook_completions): new function (cmd_listhook): likewise
2003-07-17* src/window.c (set_active_window): run the switch window hook.sabetts
* src/split.c (set_active_frame): run the switch frame hook. * src/ratpoison.h: include hook.h * src/group.h (set_current_group): new prototype * src/group.c (set_current_group): new function * src/globals.h (rp_prefix_hook): new extern (rp_switch_win_hook): likewise (rp_switch_frame_hook): likewise (rp_switch_group_hook): likewise (rp_hook_db): likewise * src/globals.c (rp_prefix_hook): new hook (rp_switch_win_hook): likewise (rp_switch_frame_hook): likewise (rp_switch_group_hook): likewise (rp_hook_db): new global * src/events.c (handle_key): call the prefix hook. * src/data.h (struct rp_hook_db_entry): new struct * src/actions.h (cmd_addhook): new prototype (cmd_remhook): likewise * src/actions.c (user_commands): add commands addhook and remhook. (cmd_windows): show the window bar no matter what if the bar timeout is > 0. (cmd_gnext): call set_current_group (cmd_gprev): likewise (cmd_gnew): likewise (cmd_gselect): likewise (cmd_addhook): new function (cmd_remhook): likewise * src/Makefile.am (ratpoison_SOURCES): add hook.c and hook.h
2003-05-25* src/actions.c (cmd_gmerge): show a message if the groupsabetts
specified by the user could not be found.
2003-05-25* src/window.c: do not include ctype.hsabetts
* src/ratpoison.h (str_comp): new prototype * src/messages.h (MESSAGE_PROMPT_SWITCH_TO_GROUP): new define * src/main.c: include ctype.h (str_comp): moved from window.c * src/group.h (groups_find_group_by_name): new prototype. (groups_find_group_by_number): likewise. (groups_merge): likewise (group_move_window): likewise * src/group.c: include string.h (group_new): new argument, name. All callers updated. prototype updated. (init_groups): create the first group with DEFAULT_GROUP_NAME as its name. (group_new): new argument, name. All callers updated. Prototype updated. (group_free): free the group's name. (group_add_new_group): new argument, name. All callers updated. Prototype updated. (groups_find_group_by_name): new function (groups_find_group_by_number): likewise (group_move_window): likewise (groups_merge): likewise * src/conf.h (DEFAULT_GROUP_NAME): new define * src/actions.h (cmd_gselect): new prototype (cmd_groups): likewise (cmd_gmove): likewise (cmd_gmerge): likewise (cmd_gnewbg): likewise * src/actions.c (user_commands): new commands gselect, groups, gmove, gmerge, gnewbg. (cmd_gnewbg): new function (find_group): likewise (cmd_gselect): likewise (cmd_groups): likewise (cmd_gmove): likewise (cmd_gmerge): likewise
2003-05-16* src/window.c (add_to_window_list): add the window to the currentsabetts
group. (find_window_name): search the current group for a matching window. (find_window_other): likewise. (format_window_name): take a rp_window_elem as an argument, not an rp_window. Print the group window's number, not the window's internal number. (get_window_list): loop through the current group. * src/split.c (find_window_for_frame): search the current group for a window to fit in the frame. * src/ratpoison.h: include globals.h and group.h * src/manage.c (unmanage): remove the window from any groups it was in. (map_window): map the window in any groups it is in. (withdraw_window): unmap the window in any groups it is in. * src/main.c: Move all globals to globals.h (main): initialize the group functions. * src/data.h: Move all defines and extern globals to globals.h (struct rp_window_elem): new struct (struct rp_group): likewise * src/actions.h (cmd_gnext): new prototype (cmd_gprev): likewise (cmd_gnew): likewise * src/actions.c (user_commands): new commands gnext, gprev, and gnew (cmd_prev): fix to work with new group code. (cmd_next): likewise (cmd_gnext): new function (cmd_gprev): likewise (cmd_gnew): likewise * src/Makefile.am (ratpoison_SOURCES): add files globals.h, globals.c, group.h and group.c
2003-05-09* src/manage.h (clear_unmanaged_list): new prototypesabetts
(list_unmanaged_windows): likewise (add_unmanaged_window): likewise * src/manage.c (unmanaged_window_list): no longer a const. (num_unmanaged_windows): new static global (clear_unmanaged_list): new function (list_unmanaged_windows): likewise (add_unmanaged_window): likewise (unmanaged_window): use num_unmanaged_windows to tell how many elements are in the unmanaged list. * src/actions.h (cmd_unmanage): new prototype (cmd_clrunmanaged): likewise * src/actions.c (user_commands): new commands unmanage, clrunmanaged. (cmd_unmanage): new function (cmd_clrunmanaged): likewise * src/bar.c (BAR_IS_HIDDEN): new define. (update_bar): new function. * src/actions.c (cmd_frestore): call update_bar() instead of update_window_names(). * src/actions.c (cmd_frestore): update the window list after restoring the frames.
2003-04-07* src/actions.h: All cmd_* functions take char* instead ofsabetts
void*. All callers updated. * src/actions.c (cmd_number): update any frames pointing to the windows that have changed.
2003-04-06* src/window.c (get_window_list): if window_list_style is STYLE_COLUMN thensabetts
the end of the mark is the length of the buffer minus the start of the mark. * src/main.c (init_defaults): init window_list_style to STYLE_ROW. * src/data.h (struct rp_defaults): new member, window_list_style. * src/bar.c (bar_y): new argument, height. All callers updated. (bar_y): use height in calculations. (update_window_names): print a column of windows if defaults.window_list_style is in column mode. (count_lines): new function (max_line_length): likewise (pos_in_line): likewise (line_beginning): likewise (marked_wrapped_message): likewise * src/actions.c (user_commands): new commands 'verbexec' and 'defwinliststyle'. Move @end take to after the def* commands. (cmd_verbexec): new function. Added prototype. (cmd_defwinliststyle): likewise
2003-04-05* src/window.c (get_window_list): if wrap_window_list is on thensabetts
the end of the mark is the length of the buffer minus the start of the mark. * src/main.c (init_defaults): init wrap_window_list to 0. * src/input.c (update_input_window): store the height in a variable. * src/data.h (struct rp_defaults): new member, wrap_window_list. * src/bar.h [message]: wrap msg arg in parens. (marked_wrapped_message): new prototype * src/bar.c (bar_y): new argument, height. All callers updated. (bar_y): use height in calculations. (update_window_names): print a column of windows if defaults.wrap_window_list is on. (count_lines): new function (max_line_length): likewise (pos_in_line): likewise (line_beginning): likewise (marked_wrapped_message): likewise * src/actions.c (user_commands): new commands 'verbexec' and 'defwrapwinlist'. Move @end take to after the def* commands. (cmd_verbexec): new function. Added prototype. (cmd_defwrapwinlist): likewise
2003-04-04* src/actions.c (cmd_setenv): properly parse the environment namesabetts
and value using strtok. * src/window.c (add_to_window_list): init the window's frame_number to EMPTY. * src/number.h (numset_clear): new prototype * src/manage.c (unmanage)[AUTO_CLOSE]: code update for new globals. * src/frame.c (frame_new): init f->last_access to 0. (frame_dump): dump the X11 window ID, not the window number. (frame_read): new function * src/events.c (destroy_window): just unmanage the window. * src/actions.h (cmd_fdump): new prototype (cmd_frestore): likewise * src/actions.c (user_commands): new commands "fdump" and "frestore". (cmd_fdump): new function (cmd_frestore): likewise * src/number.c (numset_clear): new function.
2003-03-07* src/split.h (find_frame_number): new prototypesabetts
* src/split.c (create_initial_frame): give a number to the initial frame (split_frame): give the new frame a unique number (split_frame): add the new frame after the current frame (remove_all_splits): return the frame's number when deleting it. (remove_frame): likewise (find_frame_number): new function * src/main.c (init_screen): initialize the frames_numset member (free_screen): free the frames_numset member * src/data.h (struct screen_info): new member, frames_numset * src/actions.h (cmd_fselect): new prototype * src/actions.c (user_commands): new command "fselect" (cmd_fselect): new function
2003-02-27* src/main.c (free_screen): new functionsabetts
(clean_up): call free_screen on each screen. free the screen array. free defaults.window_fmt. * src/number.h (free_numbers): new prototype * src/number.c (free_numbers): new function * src/manage.c (get_wmname): use XGetWindowProperty to get the window name. (unmanaged_window): free wname after using it. * src/main.c (wm_name): new global (main): internalize WM_NAME atom. (clean_up): free data structures for keybindings, aliases, the bar, window numbers, and input history. * src/input.h (free_history): new prototype * src/input.c (free_history): new function * src/events.c (execute_remote_command): free properties returned by XGetWindowProperty(). * src/data.h (wm_name): new extern * src/communications.c (recieve_command_result): free properties returned by XGetWindowProperty(). * src/bar.h (free_bar): new prototype * src/bar.c (update_window_names): bar_buffer is not static. (update_window_names): free bar_buffer after using it. (marked_message): free the GC after using it. (free_bar): new function. * src/actions.h (free_keybindings): new prototype (free_aliases): likewise * src/actions.c (free_keybindings): new function (free_aliases): likewise (cmd_tmpwm): unmap the key window before calling the new wm, and remap it afterwards.
2003-02-24* src/split.h (cleanup_frame): new protoypesabetts
* src/manage.c (scanwins): added better debugging output * src/events.c (cleanup_frame): move to split.c (handle_key): ungrab the rat right after we read the key. * src/actions.h (cmd_tmpwm): new prototype. * src/actions.c (spawn): return the pid of the child process. prototype updated. (cmd_tmpwm): new function (user_commands): new command, tmp_wm.
2003-02-10* src/split.h (num_frames): new prototypesabetts
(resize_shrink_to_window): likewise (resize_frame_vertically): likewise (resize_frame_horizontally): likewise * src/split.c (num_frames): no longer a static function (resize_shrink_to_window): new function (resize_frame_vertically): likewise (resize_frame_horizontally): likewise * src/main.c (init_defaults): init frame_resize_unit. * src/data.h (struct rp_defaults): new member frame_resize_unit. * src/conf.h (RESIZE_VGROW_KEY): new define (RESIZE_VGROW_MODIFIER): likewise (RESIZE_VSHRINK_KEY): likewise (RESIZE_VSHRINK_MODIFIER): likewise (RESIZE_HGROW_KEY): likewise (RESIZE_HGROW_MODIFIER): likewise (RESIZE_HSHRINK_KEY): likewise (RESIZE_HSHRINK_MODIFIER): likewise (RESIZE_SHRINK_TO_WINDOW_KEY): likewise (RESIZE_SHRINK_TO_WINDOW_MODIFIER): likewise (RESIZE_END_KEY): likewise (RESIZE_END_MODIFIER): likewise * src/actions.h (cmd_shrink): new prototype (cmd_resize): likewise (cmd_defresizeunit): likewise * src/actions.c (user_commands): add commands cmd_resize and cmd_shrink, and cmd_defresizeunit. (cmd_shrink): new function (cmd_resize): likewise (cmd_defresizeunit): likewise
2002-11-20* src/main.c (init_defaults): set pointer warping to on bysabetts
default. * src/list.c (give_window_focus): only warp the pointer if the warp setting is turned on. * src/data.h (struct rp_defaults): new member, warp. * src/actions.h (cmd_ward): new prototype * src/actions.c (user_command): new command "warp" (cmd_warp): new function
2002-03-24* src/actions.c (command): look for the command in the aliasessabetts
before looking in the command list. * src/actions.h (cmd_unalias): new prototype * src/actions.c (user_commands): new command unalias (cmd_unalias): new function
2002-03-13* src/split.c (set_active_frame): fix to operate properly withsabetts
multiple screens. * src/data.h (struct rp_window_frame): new data member 'number'. * src/actions.h (cmd_prevscreen): new prototype (cmd_nextscreen): likewise * src/actions.c (user_commands): new commands "nextscreen" and "prevscreen" (cmd_nextscreen): new function (cmd_prevscreen): likewise
2002-02-01* src/actions.c (command): bail out if alias recursion gets too deep.sabetts
* src/conf.h (MAX_ALIAS_RECURSIVE_DEPTH): new define * src/bar.c (bar_x): update to work with all X11 gravity values. (bar_y): likewise * src/actions.c (cmd_defbargravity): Rename from cmd_defbarloc. Dependant code updated. (cmd_defbargravity): accept all gravity arguments.
2002-01-24* src/messages.h (MESSAGE_FRAME_STRING): Pad the string withsabetts
spaces on both sides. * src/main.c (init_screen): Create the frame, input, and bar windows with a border width of defaults.bar_border_width. (init_defaults): initialize defaults.bar_border_width * src/bar.c (bar_x): Incorporate defaults.bar_border_width into calculations. (bar_y): likewise * src/actions.h (cmd_defbarborder): new prototype * src/actions.c (user_commands): new command "defbarborder" (cmd_defbarborder): new function * src/main.c (init_screen): create the help window with a 0 border width.
2001-12-21* src/actions.h (cmd_alias): new prototypesabetts
* src/actions.c (user_commands): remove "license" from the unimplemented section. (user_commands): new command "alias" (cmd_alias): new function (command): handle aliases (initialize_default_keybindings): initialize the alias list (struct cmd_alias): new struct (alias_list): new static global (alias_list_size): likewise (alias_list_last): likewise
2001-12-21* src/actions.h (cmd_license): new prototypesabetts
* src/actions.c (cmd_license): new function (user_commands): new command "license" (initialize_default_keybindings): bind "license" to V and C-V
2001-12-21* src/input.c (update_input_window): Draw the cursor in the right place.sabetts
* src/actions.h (cmd_defbarpadding): new prototype * src/actions.c (user_commands): new command entry "defbarpadding" (cmd_defbarpadding): new function
2001-12-05(cmd_getenv): New function.rcyeske
2001-10-18* src/split.c (show_frame_indicator): call XSync after clearing the window.sabetts
* src/input.c (get_more_input): clear the window after it is raised. Call XSync aftwards. * src/conf.h (MAX_LINK_DEPTH): new define * src/bar.c (marked_message): clear the window after it is raised. Call XSync aftwards. * src/actions.h (cmd_link): new prototype * src/actions.c (user_command): new command 'link' (find_command_by_keydesc): new function (resolve_command_from_keydesc): likewise (cmd_link): likewise
2001-10-18* src/split.h (find_last_frame): new prototypesabetts
* src/split.c (update_last_access): new function (find_last_frame): likewise (split_frame): update the new frame's last_access field (set_active_frame): update the new current frame's last_access field * src/input.h (x11_mask_to_rp_mask): new prototype (rp_mask_to_x11_mask): likewise * src/input.c (x11_mask_to_rp_mask): new function (rp_mask_to_x11_mask): likewise * src/events.c (handle_key): convert X11 modifier masks to rp modifier masks where appropriate. * src/actions.h (cmd_focuslast): new prototype * src/actions.c (initialize_default_keybindings): new keybinding for "focuslast" (cmd_focuslast): new function (user_command): new command "focuslast"
2001-09-21* src/split.h (find_frame_up): new prototypesabetts
(find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise * src/split.c (find_frame_up): new function (find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise * src/manage.c (move_window): use x11 gravity constants to denote gravity. * src/main.c (ratpoison_longopts): remove --kill and --restart. Dependant code updated. (init_defaults): use x11 gravity constants to denote gravity. (main): only display the startup message if defaults.startup_message is on. * src/list.c (update_window_gravity): rename from update_window_position. dependant code updated * src/events.c (client_msg): don't test for restart or kill client messages. (client_msg): properly handle iconify requests. (get_event): kill and restart the process here. * src/data.h (TOP_LEFT): remove define (TOP_CENTER): likewise (TOP_RIGHT): likewise (CENTER_LEFT): likewise (CENTER_CENTER): likewise (CENTER_RIGHT): likewise (BOTTOM_LEFT): likewise (BOTTOM_CENTER): likewise (BOTTOM_RIGHT): likewise (struct rp_window): rename field to position to gravity. (struct rp_defaults): rename win_pos to win_gravity, trans_pos to trans_gravity and maxsize_pos to maxsize_gravity. (rp_restart): remove global variable (rp_kill): likewise * src/communications.h (send_kill): remove prototype (send_restart): likewise * src/communications.c (send_restart): remove function. obsolete. (send_kill): likewise * src/bar.c (bar_x): Use X11 gravity constants to denote location. (bar_y): likewise * src/actions.h (cmd_focusup): new prototype (cmd_focusdown): likewise (cmd_focusleft): likewise (cmd_focusright): likewise (cmd_startup_message): likewise (cmd_restart): likewise * src/actions.c (cmd_quit): just set the kill_signalled variable. (parse_wingravity): use compass directions to describe the gravity (parse_wingravity): renamed from parse_winpos. dependant code updated. (cmd_gravity): renamed from cmd_pos. dependant code updated. (cmd_defwingravity): renamed from cmd_defwinpos. dependant code updated. (cmd_deftransgravity): renamed from cmd_deftranspos. dependant code updated. (cmd_defmaxsizegravity): renamed from cmd_defmaxsizepos. dependant code updated. (cmd_focusup): new function (cmd_focusdown): likewise (cmd_focusleft): likewise (cmd_focusright): likewise (cmd_restart): likewise (cmd_startup_message): likewise (user_commands): new commands "focusup" "focusdown" "focusright" "focusleft" "startup_message" "restart".
2001-09-18* src/actions.h (cmd_info): new prototypesabetts
(cmd_lastmsg): likewise * src/bar.h (show_last_message): new prototype * src/bar.c: new static globals last_msg, lash_mark_start, and last_mark_end. (marked_message): Store the message in last_msg. (show_last_message): new function * src/actions.c (cmd_info): new function (cmd_lastmsg): likewise (user_commands): new commands "info" and "lastmsg" (initialize_default_keybindings): Add key bindings for "info" and "lastmsg".
2001-09-18* src/actions.h (cmd_unsetenv): new prototypesabetts
* src/actions.c (cmd_unsetenv): new function (user_commands): new "unsetenv" command
2001-09-18* src/ratpoison.h (xstrdup): new prototypesabetts
* src/main.c (xstrdup): new function. All calls to strdup replaced with calls to xstrdup. (main): Keep a list of all commands pasted in through the -c command-line option. (main): execute all commands pasted in through the -c command-line option. * src/actions.h (cmd_chdir): new prototype * src/actions.c (cmd_clock): rename to cmd_time. Dependant code updated. (user_commands): rename "clock" command to "time". (cmd_chdir): new function (user_commands): new command "chdir".
2001-09-18(cmd_clock): rename to cmd_time. Dependant codesabetts
updated. (user_commands): rename "clock" command to "time".
2001-09-13(command): Gobble the whitespace between thesabetts
command and the argument list. Code that did this in specific commands has been removed. (cmd_setenv): new function (cmd_meta): rename from cmd_generate. All dependant code updated. (cmd_redisplay): rename from cmd_maximize. All dependant code updated. (initialize_default_keybindings): bind "redisplay" to C-t l and C-t c-l. (cmd_msgwait): rename from cmd_defbartimeout. All dependant code updated.
2001-09-09* src/bar.c (marked_message): use the screen_info fg_color andsabetts
bg_color to create the inverse GC. * src/actions.h (cmd_deffgcolor): new prototype (cmd_defbgcolor): new prototype * src/actions.c (cmd_defbartimeout): merge the 2 ifs. (cmd_defbartimeout): verify that the number is positive. (cmd_defborder): likewise (cmd_defwinname): gobble leading whitespace. Use strings as arguments, not numbers. (cmd_windows): Use the argument as a window format string in non-interactive mode. (cmd_windows): if data is NULL use the default format string. (user_commands): new commands deffgcolor, defbgcolor. (update_gc): new function (cmd_deffgcolor): likewise (cmd_defbgcolor): likewise
2001-09-09* src/list.h (update_window_position): new prototypesabetts
(window_name): new prototype (get_window_list): update prototype * src/events.c (grab_rat): Don't wrap in an #ifdef (ungrab_rat): likewise (handle_key): record if the rat is grabbed and only ungrab it at the end if it was first grabbed. * src/actions.h (cmd_pos): new prototype (cmd_defwinpos): new prototype (cmd_deftranspos): new prototype (cmd_defmaxsizepos): new prototype (cmd_defbartimeout): new prototype (cmd_defbarloc): new prototype (cmd_deffont): new prototype (cmd_defpadding): new prototype (cmd_defborder): new prototype (cmd_definputwidth): new prototype (cmd_defwaitcursor): new prototype (cmd_defwinfmt): new prototype (cmd_defwinname): new prototype * src/messages.h (MESSAGE_FRAME_STRING): new message * src/manage.c (get_wmname): renamed from get_window_name (get_class_hints): new function (get_res_name): likewise (get_res_class): likewise (update_window_name): update the window's wm_name, res_name, and res_class fields. (update_window_name): calls functions get_wmname, get_res_name, get_res_class. (update_window_name): Don't crop the window name. (update_window_information): call update_window_position. (move_window): new function (maximize_transient): only set the window's width and height fields. (maximize_normal): likewise (maximize): call move_window (force_maximize): likewise (force_maximize): if the window has resize hints, resize it 1 resize unit. * src/main.c: new global variable, defaults. remove static variable, font, and move to defaults. Dependant code updated. (init_defaults): new function (main): call init_defaults. (init_screen): initialize the screen's fg_color to black and bg_color to white. * src/list.c (free_window): free the fields user_name, res_name, res_class, and wm_name. (update_window_position): new function (window_name): new function. Code accessing a window's name uses this function. All code updated. (add_to_window_list): call update_window_position (add_to_window_list): initialize wm_name, res_name, and res_class for the new window. (format_window_name): new function (get_window_list): Add parameter fmt. All callers updated. (get_window_list): call format_window_name. * src/conf.h: move Configuration variables to the global variable, defaults. Dependant code updated. * src/data.h (TOP_LEFT): new define (TOP_CENTER): likewise (TOP_RIGHT): likewise (CENTER_LEFT): likewise (CENTER_CENTER): likewise (CENTER_RIGHT): likewise (BOTTOM_LEFT): likewise (BOTTOM_CENTER): likewise (BOTTOM_RIGHT): likewise (struct rp_window): new fields user_name, wm_name, res_name, res_class, position. (struct rp_window): remove field name. Replaced with user_name. Dependant code updated. (struct screen_info): remove field font. dependant code updated. (struct screen_info): new fields fg_color, bg_color. (struct rp_defaults): new struct (defaults): new global * src/actions.c (parse_winpos): new function (cmd_pos): likewise (cmd_defwinpos): likewise (cmd_deftranspos): likewise (cmd_defmaxsizepos): likewise (cmd_defbartimeout): likewise (cmd_defbarloc): likewise (cmd_deffont): likewise (cmd_defpadding): likewise (cmd_defborder): likewise (cmd_definputwidth): likewise (cmd_defwaitcursor): likewise (cmd_defwinfmt): likewise (cmd_defwinname): likewise (user_commands): New commands defbarloc, defbartimeout, defborder, deffont, defintputwidth, defmaxsizepos, defpadding, deftranspos, defwaitcursor, defwinfmt, defwinname, defwinpos.
2001-09-05* src/messages.h (MESSAGE_WELCOME): The help keystroke is notsabetts
hardcoded. * src/main.c (show_welcome_message): new function (main): call show_welcome_message to show the welcome message. * src/actions.h (find_keybinding_by_action): new prototype * src/actions.c (key_actions): change to a static variable. (key_actions_last): likewise (key_actions_table_size): likewise (find_keybinding_by_action): new function
2001-09-04* src/actions.h (cmd_unbind): new prototypesabetts
* src/actions.c (find_keybinding): Change the first parameter's type to KeySym. Prototype updated. (add_keybinding): likewise (remove_keybinding): new function. (key_actions): new command 'unbind'. (key_actions): #if out the unimplemented bindings. (cmd_bind): Error messages are more accurate. (cmd_unbind): new function. (cmd_escape): update the "other" command before the "generate" command. (cmd_escape): When searching for the "other" and "generate" commands' keystrokes, verify that the located action is the right command.
2001-08-23new rudeness commandsabetts
2001-08-18commands can be called interactively and non-interactively. commands return ↵sabetts
a result string
2001-04-15* src/number.h (add_window_number): new prototypesabetts
* src/number.c (add_window_number): renamed from add_to_list. Dependant code updated. * src/messages.h (MESSAGE_WINDOW_INFORMATION): new define * src/list.h (print_window_information): new prototype * src/list.c (print_window_information): new function * src/actions.h (cmd_number): new prototype
2001-04-15* src/messages.h (MESSAGE_WELCOME): new definesabetts
* src/manage.c (scanwins): ignore the help window (hide_window): increment window's iconizing variable * src/main.c (main): display welcoming message (init_screen): create the help window (init_screen): don't map the frame indicator window (clean_up): destroy the help window * src/list.c (add_to_window_list): initialize iconizing to 0 * src/events.c (new_window): skip help_window (unmap_notify): skip normal processing if the event is from iconizing the window. (unmap_notify): clean up the window's frame if it is being withdrawn. * src/data.h (struct screen_info): new variable help_window * src/bar.c (update_window_names): only print the window list if the bar is already displaying the window list. * src/actions.h (cmd_help): new prototype (cmd_quit): likewise * src/actions.c (initialize_default_keybindings): new keybinding for "help" (cmd_quit): new function (cmd_help): likewise
2001-04-07* src/split.h (hide_frame_indicator): new prototypesabetts
(show_frame_indicator): likewise * src/split.c: include <unistd.h> (split_frame): set the new_frame's window to NULL (split_frame): calls show_frame_indicator once the split is done. (set_active_frame): only call show_frame_indicator if the frame has no window or if we switched to a different frame. (update_frame_indicator): prints FRAME_STRING in the frame indicator window. (hide_frame_indicator): new function (show_frame_indicator): likewise * src/main.c (rp_rat_bits): new variable (rp_rat_mask_bits): likewise (alrm_handler): calls hide_frame_indicator (init_rat_cursor): new function (init_screen): calls init_rat_cursor * src/events.c (unmap_notify): calls set_active_frame if the window being unmapped was in the current frame (destroy_window): calls set_active_frame if the window being destroyed was in the current frame (grab_rat): new function (grab_rat): likewise (handle_key): calls grab_rat and ungrab_rat * src/data.h (struct screen_info): new variable rat * src/conf.h (FRAME_INDICATOR_TIMEOUT): new #define (FRAME_STRING): likewise (RAT_HEIGHT): likewise (RAT_WIDTH): likewise (RAT_HOT_X): likewise (RAT_HOT_Y): likewise * src/actions.h (cmd_curframe): new prototype * src/actions.c (initialize_default_keybindings): new key binds for "curframe" (user_commands): new command "curframe" (cmd_curframe): new function * src/split.c (remove_all_splits): only maximize the current window if there is one. (maximize_frame): remove unused code to retrieve the current screen_info. * src/actions.c (cmd_h_split): calls h_split_frame on the current frame. (cmd_v_split): likewise (cmd_only): even if the current frame is empty, call remove_all_splits. * src/split.c (maximize_frame): new function (create_initial_frame): calls maximize_frame to fill in the initial frame's fields. (num_frames): comment out (remove_frame): remove special case when there is only 1 frame left. * src/split.h (h_split_frame): renamed frome h_split_window (v_split_frame): renamed frome v_split_window (split_frame): renamed frome split_window (remove_all_splits): renamed frome remove_all_frames (find_windows_frame): new prototype (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (init_frame_list): likewise (set_active_frame): likewise * src/split.c (create_initial_frame): new function (init_frame_list): likewise (find_windows_frame): likewise (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (update_frame_indicator): likewise (set_active_frame): likewise (split_frame): rename from split_window (v_split_frame): rename from v_split_window (h_split_frame): rename from h_split_window (remove_all_splits): renamed frome remove_all_frames (total_frame_area): traverses rp_window_frame list (num_frames): likewise (frame_overlaps): likewise (remove_frame): likewise (remove_frame): calls delete_frame_from_list * src/main.c (main): calls init_frame_list (init_screen): create and map the frame_window * src/events.c (new_window): the screen's frame_window is not managed (cleanup_frame): new function (unmap_notify): calls cleanup_frame if window exists in a frame (destroy_window): likewise * src/data.h (struct screen_info): remove frame field (struct rp_window_frame): new fields win, prev, next (rp_window_frame_sentinel): new global * src/actions.c (cmd_prev): jumps to last accessed window if current frame is empty. (cmd_next): likewise (cmd_remove): nothing is done if only 1 frame exists * src/data.h (struct screen_info): new field frame_window (rp_current_frame): new global (rp_current_window): removed. All dependant code updated.
2001-04-05add banish to user_commands.rcyeske
(cmd_banish): New function.