Compare commits

..

No commits in common. "b922d15f989efb2b7707ee8cb1a7bde22e51235d" and "20a0c15caa18e9147acc71fb15ef7127e148f2ee" have entirely different histories.

3 changed files with 10 additions and 21 deletions

View File

@ -98,7 +98,6 @@ typedef enum {
prettify,
save_uri_to_txt,
open_uri_in_brave,
} func;
static struct {
@ -134,9 +133,8 @@ static struct {
{ CTRL, KEY(f), show_finder },
{ CTRL, KEY(n), finder_next },
{ CTRL, KEY(N), finder_prev },
{ CTRL, KEY(Up), halve_window },
{ CTRL, KEY(Down), rebig_window },
{ CTRL, KEY(Left), halve_window },
{ CTRL, KEY(Right), rebig_window },
{ CTRL, KEY(p), prettify },
{ CTRL, KEY(s), save_uri_to_txt },
{ CTRL, KEY(b), open_uri_in_brave }
{ CTRL, KEY(s), save_uri_to_txt }
};

View File

@ -19,10 +19,10 @@ int libre_redirect(const char* uri, char* output)
"https://www.reddit.com",
"https://vitalik.ca",
"https://www.youtube.com",
// "https://google.com",
"https://google.com",
"https://medium.com",
"https://translate.google.com",
// "https://www.bloomberg.com",
"https://www.bloomberg.com",
"https://www.royalroad.com",
"https://genius.com",
// "https://twitter.com"
@ -31,15 +31,15 @@ int libre_redirect(const char* uri, char* output)
};
char* alternatives[] = {
"https://redlib.tux.pizza",
"https://redlib.ducks.party",
// previously: "https://old.reddit.com", "https://teddit.nunosempere.com",
// https://github.com/redlib-org/redlib-instances/blob/main/instances.md
"https://vitalik.eth.limo",
"https://invidious.private.coffee",
// "https://search.nunosempere.com",
"https://search.nunosempere.com",
"https://scribe.rip",
"https://translate.riverside.rocks",
// "https://archive.ph/https://www.bloomberg.com",
"https://archive.ph/https://www.bloomberg.com",
"https://royalread.nunosempere.com",
"https://dumb.vern.cc",
"https://example.com"

View File

@ -245,7 +245,7 @@ void handle_signal_bar_press_enter(GtkEntry* self, GtkNotebook* notebook) /* con
WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | WEBKIT_FIND_OPTIONS_WRAP_AROUND,
G_MAXUINT);
gtk_widget_set_visible(GTK_WIDGET(bar.widget), 0);
gtk_widget_hide(GTK_WIDGET(bar.widget));
}
/* Shortcuts */
@ -374,19 +374,10 @@ int handle_shortcut(func id)
if (f == NULL) {
printf("Error opening /opt/rosenrot/uris.txt");
} else {
fprintf(f, "%s\n", uri);
fprintf(f, "%s", uri);
fclose(f);
webkit_web_view_evaluate_javascript(view, "alert('Saved current uri to /opt/rosenrot/uris.txt')", -1, NULL, "rosenrot-alert-numtabs", NULL, NULL, NULL);
}
break;
}
case open_uri_in_brave: {
const char* uri = webkit_web_view_get_uri(view);
const char* brave_command = "brave-browser --app=%s --new-window --start-fullscreen &";
char cmd[strlen(brave_command) + strlen(uri) + 2];
snprintf(cmd, sizeof(cmd) + 1, brave_command, uri);
system(cmd);
break;
}
}