Command changed

pull/68/head
Ivan Yartsev 1 month ago
parent 99d275edc5
commit bcf6239f72

@ -801,7 +801,7 @@ void on_add_open(GtkWidget *, main_window *widgets){
void on_information_chosen_changed(GtkWidget *self, main_window *widgets){
const char *chosen = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(self));
if (chosen){
char *command = yon_char_unite(get_information_command, (char*)chosen," --no-pager",NULL);
char *command = get_information_command((char*)chosen);
main_config.last_info = yon_char_new((char*)chosen);
vte_terminal_reset(VTE_TERMINAL(widgets->InformationTerminal),1,1);
yon_terminal_integrated_start(widgets->InformationTerminal, command);
@ -824,7 +824,7 @@ void on_information(GtkWidget *, main_window *widgets){
}
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->TargetCombo),yon_gtk_combo_box_text_find(widgets->TargetCombo,name));
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->TargetCombo),on_information_chosen_changed,widgets);
char *command = yon_char_unite(get_information_command, (char*)name," --no-pager",NULL);
char *command = get_information_command((char*)name);
main_config.last_info = yon_char_new((char*)name);
vte_terminal_reset(VTE_TERMINAL(widgets->InformationTerminal),1,1);
yon_terminal_integrated_start(widgets->InformationTerminal, command);
@ -835,7 +835,7 @@ void on_information(GtkWidget *, main_window *widgets){
}
void on_information_update(GtkWidget *, main_window *widgets){
char *command = yon_char_unite(get_information_command, main_config.last_info," --no-pager",NULL);
char *command = get_information_command(main_config.last_info);
vte_terminal_reset(VTE_TERMINAL(widgets->InformationTerminal),1,1);
yon_terminal_integrated_start(widgets->InformationTerminal, command);
}
@ -1169,6 +1169,7 @@ gboolean on_dispatcher_update(GtkWidget *,main_window *widgets){
char* str_second = yon_char_from_int(interval);
char *command = yon_char_unite(get_dispatcher_command," -d ",str_second,NULL);
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->DispatcherUpdateCheck))) command = yon_char_append(command," -n 1");
vte_terminal_reset(VTE_TERMINAL(widgets->DispatcherTerminal),1,1);
yon_terminal_integrated_start_shell(widgets->DispatcherTerminal, command,NULL,NULL);
free(str_second);
GValue *val = g_malloc0(sizeof(GValue));

@ -39,10 +39,10 @@
// #define remove_command "ubconfig remove security "
// #define remove_global_command "ubconfig --target global --noexecute remove security "
// #define remove_local_command "ubconfig --target system remove security "
#define get_devices_command "findmnt -lo source,target,fstype,label,size -t ext4 |grep -vE \"zram|\\]|\\[|SOURCE\""
#define get_devices_command "clear;findmnt -lo source,target,fstype,label,size -t ext4 |grep -vE \"zram|\\]|\\[|SOURCE\""
#define get_processes_tree_command "clear; systemd-cgls --no-page"
#define get_dispatcher_command "clear; systemd-cgtop"
#define get_information_command "systemctl status "
#define get_dispatcher_command "clear; systemd-cgtop -c"
#define get_information_command(target) yon_char_unite("systemctl status ",target,".slice --no-pager",NULL)
#define get_processes_command "systemd-cgls --no-pager |grep -oE \"[-0-9A-Za-z.:]{1,}.service\""
#define get_slices_command "systemd-cgls --no-pager |grep -oE \"[-0-9A-Za-z.:]{1,}.slice\""

Loading…
Cancel
Save