summaryrefslogtreecommitdiff
path: root/src/data.h
AgeCommit message (Collapse)Author
2017-09-18Actually xrandr.name can be a simple char *Jérémie Courrèges-Anglas
2017-09-17Move utf8_locale to its own fileJérémie Courrèges-Anglas
So that we can easily use it from tests.
2017-08-28add onlyborder variableVasil Zlatanov
When onlyborder is set to 0 (default 1), borders are not displayed if there is only a single frame on a given screen. This is useful if you use (thick) coloured borders to show which is the currently focused window when using splits, but also don't want to have borders taking up space unnecessarily when running a fullscreen window. Signed-off-by: Vasil Zlatanov <v@skozl.com>
2017-02-15Merge branch 'xrandr'Jérémie Courrèges-Anglas
All the hard work on xrandr done by Mathieu OTHACEHE, thanks!
2016-12-08Store RootWindow in global_screen structureMathieu OTHACEHE
Every screen stores a copy of xrandr RootWindow even if they all share the same RootWindow. This patch stores the RootWindow in a global location for all screens. Further work is required to remove RootWindow from per screen structure.
2016-12-08Add primary screen detectionMathieu OTHACEHE
The user may specify that a screen is primary with xrandr. Save this information in ratpoison for future use. The use of XRRGetOutputPrimary forces us to bump xrandr supported revision from >=1.2 to >=1.3.
2016-12-01Fix and simplify sfrestoreJérémie Courrèges-Anglas
Use a scratch buffer for each screen, this simplifies a lot allocations and iterations, and allows restoring screens that contain more than one frame.
2016-12-01Assign a number to each screen using a numsetMathieu OTHACEHE
A number is added to rp_screen to identify every screen. The screen numbers are affected at ratpoison start, when screens are sorted. On screen addition, a new number is requested. On screen deletion, the screen number is released.
2016-11-23Keep frame undo/redo local to actions.cJérémie Courrèges-Anglas
2016-11-22Style nits, typo and non-existing functions.Jérémie Courrèges-Anglas
2016-11-17Add xrandr supportMathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
2016-11-11Introduce multiple completion styles.Mathieu OTHACEHE
The default, legacy style is named BASIC. A new completion style named SUBSTRING is added. Use SUBSTRING for window name completion in select command. Use BASIC everywhere else.
2014-02-20Make some members of struct rp_input_line size_t.Jérémie Courrèges-Anglas
2013-02-06introduce defaults.utf8_localeJérémie Courrèges-Anglas
* use nl_langinfo() to detect if locale codeset is UTF-8
2009-07-15silence warnings about signed/unsigned char mismatchBernhard R. Link
2009-07-04fix inverted text when using xftwinliststyle-row_brokenShawn Betts
Now the inverted rectangle is drawn first and the text overtop in the bg color.
2009-04-30fix 'set fgcolor' for xft. Change screen's ft_font and color slots to ↵Shawn Betts
xft_font and xft_color.
2008-10-22make history expansion an option (switched off by default)Bernhard R. Link
2008-10-22add 'set historysize' and 'set historycompaction' (defaulting to true) to ↵Bernhard R. Link
compact history
2008-10-22define different history types and use themBernhard R. Link
(implementation does not separate them yet, though)
2008-10-10add gother commandAli Gholami Rudi
2008-10-10allow window border color to be set seperately for focused and unfocused windowsKipling Inscore
2008-05-24Add xft supportMidare Kiyura
2007-03-08* src/split.c (set_active_frame): call switch_frame hooksabetts
(show_frame_indicator): only show frame indicator (set_active_frame): new arg force_indicator. all callers updated. (show_frame_indicator): new arg force. all callers updated. * src/main.c (init_defaults): init bar_in_padding * src/globals.c (rp_switch_screen_hook): new hook * src/data.h (struct rp_defaults): new slot, bar_in_padding * src/bar.c (bar_x): honour bar_in_padding setting (bar_y): likewise * src/actions.c (init_set_vars): add barinpadding (set_barinpadding): new function * src/globals.h: new global rp_switch_screen_hook
2006-11-17* src/split.c (show_frame_indicator): use defaults.frame_fmtsabetts
(show_frame_message): format frame_fmt string with format_string * src/messages.h (MESSAGE_FRAME_STRING): removed * src/main.c (init_defaults): init defaults.frame_fmt * src/data.h (struct rp_defaults): add frame_fmt * src/actions.c (set_framefmt): new function (init_set_vars): new set var "framefmt"
2006-05-15* src/manage.c (grab_top_level_keys): use defaults.top_kmap for the top kmapsabetts
* src/main.c (init_defaults): init defaults.top_kmap * src/events.c (handle_key): use defaults.top_kmap for the top kmap * src/data.h (struct rp_defaults): new field, top_kmap * src/actions.c (set_topkmap): new prototype (init_set_vars): topkmap new set variable (initialize_default_keybindings): use defaults.top_kmap for the top kmap (cmd_undefinekey): likewise (cmd_definekey): likewise (cmd_escape): likewise (cmd_delkmap): likewise (set_topkmap): new function
2006-04-20* src/split.c (show_frame_message): use XmbDrawString and XmbTextEscapementsabetts
* src/screen.c (init_screen): don't include the font in the gc * src/ratpoison.h: include Xlocale.h * src/manage.c (get_wmname): support i18n characters * src/main.c (init_defaults): call load_query_font_set and set_extents_of_fontset (main): call setlocale (clean_up): call XFreeFontSet (set_extents_of_fontset): new function (load_query_font_set): likewise * src/input.c (update_input_window): use XmbTextEscapement and XmbDrawString * src/globals.h (FONT_HEIGHT): use rp_font_ascent and rp_font_descent (MAX_FONT_WIDTH): use rp_font_width new globals rp_font_ascent, rp_font_descent, rp_font_width * src/globals.c: new globals rp_font_ascent, rp_font_descent, rp_font_width * src/data.h (struct rp_defaults): font is a XFontSet * src/bar.c (max_line_length): call XmbTextEscapement (draw_string): call XmbDrawString (get_mark_box): call XmbTextEscapement * src/actions.c (read_frame): call XmbTextEscapement (cmd_license): likewise (read_frame): call XmbDrawString (cmd_license): likewise (cmd_help): likewise (update_gc): don't include the font (set_font): call load_query_font_set
2006-03-16remove tabs and trailing whitespace.sabetts
2006-03-15(init_user_commands): add optional argument to "info"sabetts
(cmd_info): handle optional argument * src/format.c: new file * src/format.h: new file * Makefile.am (ratpoison_SOURCES): add format.c and format.h * src/actions.c (set_infofmt): new function (wingravity_to_string): char * instead of static char * because needed in format.c (cmd_info): use format_string * src/actions.h (wingravity_to_string): add prototype * src/data.h (info_fmt): new variable * src/main.c (init_defaults): set a value for defaults.info_fmt * src/ratpoison.h: include format.h * src/windows.c (get_window_list): use format_string (isdigit): remove function as the formatting is now done in format.c (concat_width): likewise (format_window_name): likewise
2006-02-26* src/window.c (add_to_window_list): only change the window'ssabetts
group and frame if window_mapped is 0. * src/data.h (struct rp_child_info): new field window_mapped * src/actions.c (spawn): init window_mapped field in child_info.
2005-10-20* src/window.c: include unistd.hsabetts
(get_child_info): new function (add_to_window_list): get the window's client's pid if possible and assign the window the appropriate group and frame. (add_to_window_list): init intended_frame_number (save_mouse_position): save the position relative to the window (give_window_focus): restore the position relative to the window (set_active_window_body): put the window in the frame contained in intended_frame_number when appropriate. * src/screen.c (screen_find_frame_by_frame): new function (init_screen): add the net_supported atom to the root window. * src/main.c (main): init netwm atoms * src/group.c (groups_find_group_by_group): new function * src/globals.c (_net_wm_pid, _net_supported): new globals * src/data.h (struct rp_window): new field intended_frame_number. (struct rp_child_info): new fields group, frame, screen. * src/actions.c (spawn): call the command directly when new argument, raw, is non zero. all callers updated. (spawn): fill in the frame, group and screen for the child.
2005-01-15 * src/actions.c (ARG_STRING): new definesabetts
(ARG): likewise (set_vars): change to a list_head. (add_set_var): new function (init_set_vars): likewise (user_commands): change to a list_head. Move command definitions to init_user_commands. (add_command): new function (init_user_commands): likewise (cmdret_new): likewise (cmdret_new_printf): likewise (cmdret_free): likewise (read_string): likewise (read_keymap): likewise (read_keydesc): likewise (read_command): likewise (read_shellcmd): likewise (read_frame): likewise (read_window): likewise (read_gravity): likewise (read_group): likewise (read_hook): likewise (read_variable): likewise (hook_completions): likewise (read_number): likewise (read_arg): likewise (parsed_input_to_args): likewise (fill_in_missing_args): likewise (parse_args): likewise (arg_array): likewise (arg_free): likewise (command): use parse_args, parsed_input_to_args, fill_in_missing_args to parse arguments and pass to command functions. (command): return cmdret* structure. prototype updated. (cmd_abort): second arg is an array of struct cmdarg*. Return cmdret*. Updated to use new parsed arguments. (cmd_addhook): likewise (cmd_alias): likewise (cmd_banish): likewise (cmd_bind): likewise (cmd_chdir): likewise (cmd_clrunmanaged): likewise (cmd_colon): likewise (cmd_curframe): likewise (cmd_delete): likewise (cmd_echo): likewise (cmd_escape): likewise (cmd_exec): likewise (cmd_fdump): likewise (cmd_focusdown): likewise (cmd_focuslast): likewise (cmd_focusleft): likewise (cmd_focusright): likewise (cmd_focusup): likewise (cmd_frestore): likewise (cmd_fselect): likewise (cmd_gdelete): likewise (cmd_getenv): likewise (cmd_gmerge): likewise (cmd_gmove): likewise (cmd_gnew): likewise (cmd_gnewbg): likewise (cmd_gnext): likewise (cmd_gprev): likewise (cmd_gravity): likewise (cmd_groups): likewise (cmd_gselect): likewise (cmd_h_split): likewise (cmd_help): likewise (cmd_info): likewise (cmd_kill): likewise (cmd_last): likewise (cmd_lastmsg): likewise (cmd_license): likewise (cmd_link): likewise (cmd_listhook): likewise (cmd_meta): likewise (cmd_msgwait): likewise (cmd_newwm): likewise (cmd_next): likewise (cmd_next_frame): likewise (cmd_nextscreen): likewise (cmd_number): likewise (cmd_only): likewise (cmd_other): likewise (cmd_prev): likewise (cmd_prev_frame): likewise (cmd_prevscreen): likewise (cmd_quit): likewise (cmd_redisplay): likewise (cmd_remhook): likewise (cmd_remove): likewise (cmd_rename): likewise (cmd_resize): likewise (cmd_restart): likewise (cmd_rudeness): likewise (cmd_select): likewise (cmd_setenv): likewise (cmd_shrink): likewise (cmd_source): likewise (cmd_startup_message): likewise (cmd_time): likewise (cmd_tmpwm): likewise (cmd_unalias): likewise (cmd_unbind): likewise (cmd_unimplemented): likewise (cmd_unmanage): likewise (cmd_unsetenv): likewise (cmd_v_split): likewise (cmd_verbexec): likewise (cmd_version): likewise (cmd_warp): likewise (cmd_windows): likewise (cmd_readkey): likewise (cmd_newkmap): likewise (cmd_delkmap): likewise (cmd_definekey): likewise (cmd_undefinekey): likewise (cmd_set): likewise (cmd_sselect): likewise (cmd_ratwarp): likewise (cmd_ratclick): likewise (cmd_ratrelwarp): likewise (cmd_rathold): likewise (cmd_cnext): likewise (cmd_cother): likewise (cmd_cprev): likewise (cmd_dedicate): likewise (cmd_describekey): likewise (cmd_inext): likewise (cmd_iother): likewise (cmd_iprev): likewise (cmd_prompt): likewise (cmd_sdump): likewise (cmd_sfdump): likewise (cmd_undo): likewise (cmd_putsel): likewise (cmd_getsel): likewise (set_resizeunit): arg is an array of struct cmdarg*. Return cmdret*. Updated to use new parsed arguments. (set_wingravity): likewise (set_transgravity): likewise (set_maxsizegravity): likewise (set_bargravity): likewise (set_font): likewise (set_padding): likewise (set_border): likewise (set_barborder): likewise (set_inputwidth): likewise (set_waitcursor): likewise (set_winfmt): likewise (set_winname): likewise (set_fgcolor): likewise (set_bgcolor): likewise (set_barpadding): likewise (set_winliststyle): likewise (set_framesels): likewise (set_maxundos): likewise * src/actions.h: include ratpoison.h (argtype): add arg_FRAME, arg_WINDOW, arg_COMMAND, arg_SHELLCMD, arg_KEYMAP, arg_KEY, arg_GRAVITY, arg_GROUP, arg_HOOK, arg_VARIABLE. (union arg_union): new union (struct cmdarg): new struct (struct argspec): likewise (struct cmdret): likewise (user_command): change func to reflect new command function args. add num_args, ni_required_args, i_required_args. (RP_CMD): new macro for prototyping command functions. all command function prototypes updated to use this macro. (init_user_commands): new prototype (cmdret_free): likewise * src/main.c (read_rc_file): handle cmdret* returned by command. (main): call init_user_commands * src/linkedlist.h (list_size): new prototype * src/linkedlist.c (list_size): new function * src/globals.h (RET_SUCCESS): new define (RET_FAILURE): new define * src/events.c (handle_key): handle the cmdret structure returned by command. (execute_remote_command): return cmdret*. (receive_command): mark the command return string as error or output before sending. * src/data.h (struct rp_action): change data element type to char* * src/communications.c (receive_command_result): print command output to stderr if marked as an error.
2004-12-13* src/sbuf.c (sbuf_concat): call sbuf_nconcat. move bulk of bodysabetts
to sbuf_nconcat. (sbuf_nconcat): new function * src/globals.c (init_globals): new function * src/main.c (main): call init_globals. * src/globals.c: include unistd.h. (x_export_selection): new function (set_nselection): likewise (set_selection): call x_export_selection (get_cut_buffer): new function (get_primary_selection): likewise (get_selection): likewise * src/editor.c (editor_kill_word): add the deleted text to the X11 selection (editor_backward_kill_word): likewise (editor_kill_line): likewise (backward_kill_line): new fuction (editor_backward_kill_line): add the deleted text to the X11 selection. call backward_kill_line. (paste_cut_buffer): remove function (paste_primary_selection): likewise (editor_paste_selection): call get_selection to get the X11 selection. (editor_complete): call backward_kill_line instead of editor_backward_kill_line. * src/ratpoison.h: Include string.h. Include X11/XAtom.h. * src/globals.c (selection): new global (set_selection): new function * src/events.c: include X11/Xmd.h (selection_request): new function (selection_clear): new function (delegate_event): call selection_request and selection_clear for SelectionRequest and SelectionClear events. * src/actions.c (user_commands): remove duplicate focusprev entry. Add putsel. Add getsel. (cmd_putsel): new function (cmd_getsel): new function * contrib/genrpbindings: add a missing paren to the elisp bindings.
2004-12-04update copyright.sabetts
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-05-20* src/input.c (rp_mask_to_x11_mask): handle the shift modifiersabetts
(x11_mask_to_rp_mask): likewise (keysym_to_keycode_mod): Make sure lower != keysym before adding the shift mask. (keysym_to_string): handle the shift modifier. use 's' for super instead of 'S' (cook_keycode): keep the shift modifier if XLookupString didn't gobble it. * src/data.h (RP_SHIFT_MASK): new define * src/actions.c (parse_keydesc): parse the shift modifier change super to 's' from 'S'.
2004-04-24* src/data.h (struct rp_defaults): new members, font_string,sabetts
fgcolor_string, bgcolor_string. * src/actions.c (set_font): return defaults.font_string when data is NULL (set_fgcolor): likewise for fgcolor_string (set_bgcolor): likewise for bgcolor_string * src/manage.c (ungrab_top_level_keys): properly grab capital letters. * src/main.c (init_defaults): init fgcolor_string, bgcolor_string, and font_string * src/input.c (grab_key): change keysym type to KeySym. convert keysym to keycode. All callers updated.
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.
2004-02-27* src/window.c (give_window_focus): save the mouse position beforesabetts
checking if win is NULL. (give_window_focus): set rp_current_screen to xine_screen_num of the window's screen. (set_active_window): when using xinerama get the frame from the current screen. * src/split.c (set_frames_window): update the window's scr attribute to point to the frame's screen. (find_window_for_frame): when xinerama is being used search all windows. (set_active_frame): update rp_current_screen to point to the frame's screen. * src/screen.h (init_screens): new prototype (is_rp_window_for_screen): likewise * src/screen.c: include string.h and X11/cursorfont.h (init_screens): new function (is_rp_window_for_screen): new function. (init_screen): fill in xine_screen_num when using xinerama. * src/ratpoison.h: include xinerama.h * src/manage.c (current_screen): use xine_screen_num to find the current screen. (scanwins): use is_rp_window_for_screen to skip over ratpoison windows. (scanwins): when using xinerama only manage windows inside the viewable area. * src/main.c (main): call init_xinerama and init_screens. Move screen initing code to these functions. (init_rat_cursor): move to screen.c (init_screen): likewise (find_screen): likewise (clean_up): call free_xinerama * src/group.c (group_last_window): only check windows in the current screen, unless xinerama is being used in which case all windows are accessible. (group_next_window): likewise (group_prev_window): likewise * src/globals.h: new globals rp_have_xinerama, xine_screen_num. * src/events.c (new_window): when using xinerama, the new window's screen is the current screen. (key_press): when using xinerama, use the current screen. * src/data.h (struct rp_screen): remove root_attr and add left, top, width, height. All dependant code updated. Add xine_screen_num. * src/actions.c (cmd_remove): show the frame indicator in the new current frame after removing the frame. * src/Makefile.am (ratpoison_SOURCES): add xinerama.c and xinerama.h
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-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-27* src/editor.c (saved_command): new local globalsabetts
(edit_binding): new typedef (edit_binding): new struct (edit_bindings): new local global (input_line_new): new function (input_line_free): likewise (execute_edit_action): likewise (editor_forward_char): likewise (editor_backward_char): likewise (editor_forward_word): likewise (editor_backward_word): likewise (editor_beginning_of_line): likewise (editor_end_of_line): likewise (editor_delete_char): likewise (editor_backward_delete_char): likewise (editor_kill_word): likewise (editor_backward_kill_word): likewise (editor_kill_line): likewise (editor_backward_kill_line): likewise (editor_history_previous): likewise (editor_history_next): likewise (editor_abort): likewise (editor_no_action): likewise (editor_insert): likewise (editor_enter): likewise (paste_cut_buffer): likewise (paste_primary_selection): likewise (editor_paste_selection): likewise (editor_complete): likewise (editor_forward_char): new prototype (editor_backward_char): likewise (editor_forward_word): likewise (editor_backward_word): likewise (editor_beginning_of_line): likewise (editor_end_of_line): likewise (editor_delete_char): likewise (editor_backward_delete_char): likewise (editor_kill_word): likewise (editor_backward_kill_word): likewise (editor_kill_line): likewise (editor_paste_selection): likewise (editor_abort): likewise (editor_no_action): likewise (editor_enter): likewise (editor_history_previous): likewise (editor_history_next): likewise (editor_complete): likewise (editor_backward_kill_line): likewise * src/sbuf.h (sbuf): add node field. * src/main.c (xrealloc): don't print debugger output (init_defaults): init history_size (main): initialize rp_selection (main): load history (clean_up): save history * src/linkedlist.h (list_first): new macro * src/input.h (free_history): remove prototype (ring_bell): new function * src/input.c: include unistd.h (input_history): remove (input_num_history_entries): likewise (update_input_window): remove prompt, input, and input_len arguments. add line argument. (update_input_window): use line argument. (ring_bell): new function (get_input): take completion_fn argument. prototype and callers updated. (free_history): remove function (get_more_input): take completion_fn argument. prototype and callers updated. use line structure and its functionality. * src/globals.h (MAX_FONT_WIDTH): new define (rp_selection): new extern * src/globals.c (rp_selection): new global * src/completions.h (completions_new): new prototype (completions_free): likewise (completions_assign): likewise (completions_update): likewise (completions_next_completion): likewise * src/completions.c (completions_new): new function (completions_free): likewise (completions_assign): likewise (completions_update): likewise (completions_next_completion): likewise * src/Makefile.am (ratpoison_SOURCES): add editor.c editor.h history.h and history.c * src/data.h (rp_completions): new typedef (rp_input_line): likewise (completion_fn): likewise (rp_defaults): new field, history_size (rp_completions): new struct (rp_input_line): new struct * src/conf.h (MAX_HISTORY_SIZE): new define (HISTORY_FILE): likewise (VISUAL_BELL): likewise (MODIFIER_PREFIX): set to RP_CONTROL_MASK (INPUT_ABORT_MODIFIER): likewise (INPUT_PREV_HISTORY_MODIFIER): likewise (INPUT_NEXT_HISTORY_MODIFIER): likewise (RESIZE_VGROW_MODIFIER): likewise (RESIZE_VSHRINK_MODIFIER): likewise (RESIZE_HGROW_MODIFIER): likewise (RESIZE_HSHRINK_MODIFIER): likewise * src/actions.c (trivial_completions): new function (window_completions): likewise (colon_completions): likewise (exec_completions): likewise (cmd_select): pass window_completions to get_input (cmd_rename): pass trivial_completions to get_input (cmd_colon): pass colon_completions to get_input and get_more_input (cmd_exec): pass exec_completions to get_input (cmd_newwm): pass trivial_completions to get_input (cmd_resize): convert the keysym modifier to something ratpoison understands.
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-15* src/data.h (struct rp_frame): renamed from rp_window_frame. Allsabetts
dependant code updated. * src/main.c: remove child_info global. Add rp_children global. (chld_handler): update the terminated and status fields of any terminated children. * src/events.c (handle_signals): loop through each child process and remove them from the list. Print a message for any child that doesn't return a 0 status. * src/data.h (rp_child_info): new fields, terminated and node. remove child_info global. Add rp_children global. * src/actions.c (spawn): Add the command to the list of children.
2003-05-15(struct rp_screen): rename fromsabetts
screen_info. Dependant code updated.
2003-04-11* src/window.c (window_name): use WIN_NAME_* defines for possiblesabetts
defaults.win_name values. (window_name): remove case WIN_NAME_TITLE and glob it with the default switch. * src/main.c (init_defaults): use WIN_NAME_* defines for possible defaults.win_name values. * src/actions.c (cmd_defwinname): use WIN_NAME_* defines for possible defaults.win_name values. (cmd_defwinname): likewise * src/data.h (WIN_NAME_TITLE): new define (WIN_NAME_RES_CLASS): new define (WIN_NAME_RES_NAME): new define * src/window.c (add_to_window_list): use xstrdup to create the default value for user_name.
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