summaryrefslogtreecommitdiff
path: root/src/actions.c
AgeCommit message (Collapse)Author
2006-04-21* src/actions.h: new command sfrestoresabetts
* src/actions.c (init_user_commands): new command sfrestore (cmd_sfrestore): 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-162006-03-15 Bernhard R. Link <brlink@debian.org>sabetts
* src/screen.c (screen_update): new function (init_screen): listen for screen resizes * src/screen.h: new prototype * src/events.c (configure_notify): new function (delegate_event): call configure_notify for ConfigureNotify events * src/frame.c (frame_dump): remember the size of the screen the frame coordinates are relative to. (frame_restore): adopt coordinates to possible screen resizes. * src/frame.h (frame_fump): take a screen argument (frame_read): likewise * src/actions.c (cmd_tmpwm): listen for screen resizes again (fdump, frestore, cmd_fdump): supply screen to frame_dump, frameread
2006-03-16* src/main.c (clean_up): use list_size not rp_num_frame_undossabetts
* src/globals.c: remove global var rp_num_frame_undos. All callers updated. * src/actions.c (push_frame_undo): use list_size, not rp_num_frame_undos (set_maxundos): likewise
2006-03-16* src/window.c (_XOPEN_SOURCE): new definesabetts
* src/screen.c (is_a_root_window): w is unsigned int (init_screen): typecast _net_wm_pid as unsigned char*. * src/main.c (read_rc_file): linesize is size_t * src/frame.c (frame_read): use a temp var when reading the :dedicated value. * src/bar.c (max_line_length): i and start are size_t (draw_string): i is size_t (get_mark_box): mark_start and mark_end are size_t * src/actions.c (find_keybinding): state is unsigned int (remove_keybinding): likewise (frame_selector): n is unsigned int (frame_selector_match): i is size_t. typecast comparison as size_t.
2006-03-16remove tabs and trailing whitespace.sabetts
2006-03-15* src/bar.c (show_bar): accept a fmt argument. all callers and prototype ↵sabetts
updated. (update_bar): just display the last message if bar isn't hidden. (update_window_names): accept a fmt argument. all callers and prototype updated. * src/actions.c (init_user_commands): add optional argument to "info" (cmd_info): handle optional argument (cmd_windows): when called interactively use the argument as the format string.
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-03-08* src/main.c (clean_up): properly free rp_frame_numsetsabetts
* src/editor.c (editor_enter): free line->buffer before setting it to the history expansion. * src/completions.c (completions_free): free the rp_completions struct too * src/actions.c (del_frame_undo): free the rp_frame_undo struct too.
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.
2006-01-03* src/number.c (numset_add_num): store the ret val ofsabetts
numset_find_empty_cell in a variable and use it as an index into the numbers_taken array. * src/actions.c (cmd_curframe): return the frame number in non-interactive mode. * src/split.c (cleanup_frame): in the maxsize windows are transients check either the width or height must be less than the screen width/height (just like in windows.c).
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-10-14(cmd_describekey): print the key name even when it's bound.sabetts
2005-08-24(cmd_addhook): remove erroneous call to free.sabetts
2005-06-11* src/main.c (clean_up): call del_frame_undo not pop_frame_undosabetts
* src/globals.h: new global prototype rp_frame_redos * src/globals.c: new global rp_frame_redos * src/actions.h: new command 'undo' (del_frame_undo): new prototype (pop_frame_undo): delete prototype * src/actions.c (init_user_commands): new command 'undo' (clear_frame_redos): new function (del_frame_undo): likewise (push_frame_undo): call del_frame_undo instead of pop_frame_undo. call clear_frame_redos. (pop_frame_list): new function (pop_frame_undo): returns the popped frame. all callers updated. (pop_frame_redo): new function (initialize_default_keybindings): bind undo to u and C-u, bind redo to U. (set_maxundos): call del_frame_undo instead of pop_frame_redo (cmd_redo): new function
2005-06-11(cmd_tmpwm): stop waiting for the child if waitpidsabetts
produced an error.
2005-04-17* src/actions.h: new prototype compatsabetts
* src/actions.c (initialize_default_keybindings): move def* aliases to cmd_compat (cmd_compat): new function
2005-04-10(cmdret_new): malloc enough for the cmdret structure.sabetts
2005-04-09(cmd_help): likewise.sabetts
(cmd_gravity): likewise (cmd_getenv): likewise (cmd_fdump): likewise (cmd_groups): likewise (cmd_listhook): likewise (cmd_sfdump): likewise (cmd_sdump): likewise (cmd_describekey): likewise (cmd_prompt): likewise (cmd_getsel): likewise (cmd_unmanage): likewise (cmd_prev): likewise (cmd_prev_frame): likewise (cmd_next): likewise (cmd_next_frame): likewise (cmd_other): likewise (cmd_version): likewise (cmd_time): likewise (cmd_cnext): likewise (cmd_cprev): likewise (cmd_inext): likewise (cmd_iprev): likewise (cmd_cother): likewise (cmd_iother): likewise
2005-04-09(cmd_set): pass the string produced when no args are passid in tosabetts
cmdret_new using "%s".
2005-04-09(init_user_commands): add KEY argument to meta command.sabetts
(cmd_meta): optionally use the KEY passed in as an argument.
2005-03-05* src/ratpoison.h (check_child_procs): new prototypesabetts
(chld_handler): likewise (set_sig_handler): likewise * src/main.c (check_child_procs): new function (chld_handler): call check_child_procs (free_screen): unselect all events on the root window. * src/actions.c: include signal.h (spawn): don't prefix the command with exec. (set_wingravity): print the setting as a string. (set_transgravity): likewise (set_maxsizegravity): likewise (set_bargravity): likewise (set_font): likewise (set_winfmt): likewise (set_fgcolor): likewise (set_bgcolor): likewise (set_framesels): likewise (cmd_tmpwm): ungrab the keys for all windows before spawning the new wm. (cmd_tmpwm): disable the sigchld handler then enabled it after the wm returns. call check_child_procs.
2005-02-26(parse_args): properly check if we've hit the argsabetts
limit.
2005-02-22* src/main.c (read_startup_files): use xsprintf when generatingsabetts
path to ratpoisonrc. * src/input.c (get_more_input): Use HAVE_HISTORY to ifdef out history_reset. * src/actions.c (command): new variable, raw, which records whether to tell parse_args not to parse the last arg. (cmd_set): likewise
2005-02-10(parse_keydesc): return a cmdret error in thesabetts
event of an error and take a point to an rp_key as an argument. Fill this argument with the parsed key. (parse_keydesc): Don't accept the keysym if it doesn't map to a keycode. (cmdret_new): renamed from cmdret_new_printf. All callers updated. (cmdret_new_printf): remove function. (arg_free): free the key member.
2005-02-06(cmd_prompt): allow prompt to be runsabetts
interactively.
2005-02-06*** empty log message ***sabetts
2005-02-04*** empty log message ***sabetts
2005-02-01*** empty log message ***sabetts
2005-01-30(cmd_undefinekey): call XSync after ungrabbing and grabbing allsabetts
keys.
2005-01-30(cmd_escape): when the escape key doesn't have asabetts
modifier give the meta key a modifier.
2005-01-22* src/actions.h (argtype): add arg_RAWsabetts
* src/actions.c (init_user_commands): make unmanage'd argument optional when called non-interactively. (init_user_commands): "title" accepts 1 argument. (init_user_commands): "echo" and "putsel" take a raw argument. (read_arg): parse arg_RAW (parse_args): take a raw argument. gobble whitespace when we've hit nargs and raw is false. callers updated. (command): don't gobble whitespace after reading the command. set nargs when the argtype is arg_RAW, too. (cmd_set): set nargs when the argtype is arg_RAW, too.
2005-01-22(init_user_commands): make unmanage'd argumentsabetts
optional when called non-interactively. (init_user_commands): "title" accepts 1 argument.
2005-01-21(init_user_commands): fix unmanage command.sabetts
2005-01-15 * src/actions.c (spawn): Prepend cmd with exec.sabetts
2005-01-15 * actions.c (cmd_focusleft,cmd_focusright,cmd_focusup,cmd_focusdown): showsabetts
currectframe if movement not possible.
2005-01-15* src/actions.c (cmd_prev): return a cmdret*. same for errorsabetts
messages. (cmd_select): likewise. (command): use cmdret* to report when alias recursion has hit the limit. (cmd_resize): return a cmdret when num frames is < 2. (set_padding): return a cmdret*, not NULL. (cmd_nextscreen): likewise (cmd_prevscreen): likewise (cmd_addhook): likewise * src/actions.c (init_user_commands): set the last argument of the following commands to arg_REST: addhook, chdir, remhook, source, tmpwm, and prompt. (command): check list_size of head when checking for too many arguments. (cmd_set): raise error if set command was passed too many arguments.
2005-01-15(command): check list_size of head when checking for too manysabetts
arguments. (cmd_set): raise error if set command was passed too many arguments.
2005-01-15(init_user_commands): set the last argument of thesabetts
following commands to arg_REST: addhook, chdir, remhook, source, tmpwm, and prompt.
2005-01-15* src/actions.c (init_user_commands): change select's argument tosabetts
arg_REST.
2005-01-15* src/globals.h (rp_exec_newwm): new extern.sabetts
* src/globals.c (rp_exec_newwm): new global. * src/actions.c (cmd_newwm): set rp_exec_newwm to the new wm. * src/events.c (listen_for_events): call XSync after delegate_event. (handle_signals): exec newwm if its not NULL. Report X11 errors (moved from listen_for_events).
2005-01-15*** empty log message ***sabetts
2005-01-15(parse_args): remove erroneous pointer dereferencesabetts
of i when gobbling whitespace. (init_user_commands): set second argument to "alias" command to arg_REST. (init_user_commands): likewise for "set" (cmd_readkey): remove useless PRINT_DEBUG (cmd_set): pass an empty string to parse_args when the args[1] is NULL. (cmd_set): call the set function if the arg list size is 0.
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.
2005-01-04(cmd_rudeness): Print rudeness to bar when calledrcyeske
interactively.
2005-01-04* src/main.c (print_help): Update mailing list.rcyeske
* src/actions.c (cmd_license): Update mailing list and website.
2004-12-13backout appendselsabetts
2004-12-13(cmd_appendsel): new functionsabetts
(user_commands): new command
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-09* src/actions.c (cmd_unmanage): fix message formattingsabetts
(cmd_ratwarp): likewise (cmd_ratrelwarp): likewise (cmd_ratclick): likewise (cmd_rathold): likewise (cmd_unsetenv): likewise (set_barpadding): likewise (cmd_fselect): likewise (cmd_addhook): likewise (cmd_remhook): likewise (cmd_listhook): likewise (cmd_gdelete): likewise (cmd_readkey): likewise (cmd_newkmap): likewise (cmd_delkmap): likewise (cmd_describekey): likewise * src/actions.c: Remove padding space on all calls to message and marked_message_printf.