Compare commits
No commits in common. "b922d15f989efb2b7707ee8cb1a7bde22e51235d" and "20a0c15caa18e9147acc71fb15ef7127e148f2ee" have entirely different histories.
b922d15f98
...
20a0c15caa
8
config.h
8
config.h
|
@ -98,7 +98,6 @@ typedef enum {
|
||||||
|
|
||||||
prettify,
|
prettify,
|
||||||
save_uri_to_txt,
|
save_uri_to_txt,
|
||||||
open_uri_in_brave,
|
|
||||||
} func;
|
} func;
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
@ -134,9 +133,8 @@ static struct {
|
||||||
{ CTRL, KEY(f), show_finder },
|
{ CTRL, KEY(f), show_finder },
|
||||||
{ CTRL, KEY(n), finder_next },
|
{ CTRL, KEY(n), finder_next },
|
||||||
{ CTRL, KEY(N), finder_prev },
|
{ CTRL, KEY(N), finder_prev },
|
||||||
{ CTRL, KEY(Up), halve_window },
|
{ CTRL, KEY(Left), halve_window },
|
||||||
{ CTRL, KEY(Down), rebig_window },
|
{ CTRL, KEY(Right), rebig_window },
|
||||||
{ CTRL, KEY(p), prettify },
|
{ CTRL, KEY(p), prettify },
|
||||||
{ CTRL, KEY(s), save_uri_to_txt },
|
{ CTRL, KEY(s), save_uri_to_txt }
|
||||||
{ CTRL, KEY(b), open_uri_in_brave }
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,10 +19,10 @@ int libre_redirect(const char* uri, char* output)
|
||||||
"https://www.reddit.com",
|
"https://www.reddit.com",
|
||||||
"https://vitalik.ca",
|
"https://vitalik.ca",
|
||||||
"https://www.youtube.com",
|
"https://www.youtube.com",
|
||||||
// "https://google.com",
|
"https://google.com",
|
||||||
"https://medium.com",
|
"https://medium.com",
|
||||||
"https://translate.google.com",
|
"https://translate.google.com",
|
||||||
// "https://www.bloomberg.com",
|
"https://www.bloomberg.com",
|
||||||
"https://www.royalroad.com",
|
"https://www.royalroad.com",
|
||||||
"https://genius.com",
|
"https://genius.com",
|
||||||
// "https://twitter.com"
|
// "https://twitter.com"
|
||||||
|
@ -31,15 +31,15 @@ int libre_redirect(const char* uri, char* output)
|
||||||
};
|
};
|
||||||
|
|
||||||
char* alternatives[] = {
|
char* alternatives[] = {
|
||||||
"https://redlib.tux.pizza",
|
"https://redlib.ducks.party",
|
||||||
// previously: "https://old.reddit.com", "https://teddit.nunosempere.com",
|
// previously: "https://old.reddit.com", "https://teddit.nunosempere.com",
|
||||||
// https://github.com/redlib-org/redlib-instances/blob/main/instances.md
|
// https://github.com/redlib-org/redlib-instances/blob/main/instances.md
|
||||||
"https://vitalik.eth.limo",
|
"https://vitalik.eth.limo",
|
||||||
"https://invidious.private.coffee",
|
"https://invidious.private.coffee",
|
||||||
// "https://search.nunosempere.com",
|
"https://search.nunosempere.com",
|
||||||
"https://scribe.rip",
|
"https://scribe.rip",
|
||||||
"https://translate.riverside.rocks",
|
"https://translate.riverside.rocks",
|
||||||
// "https://archive.ph/https://www.bloomberg.com",
|
"https://archive.ph/https://www.bloomberg.com",
|
||||||
"https://royalread.nunosempere.com",
|
"https://royalread.nunosempere.com",
|
||||||
"https://dumb.vern.cc",
|
"https://dumb.vern.cc",
|
||||||
"https://example.com"
|
"https://example.com"
|
||||||
|
|
13
rosenrot4.c
13
rosenrot4.c
|
@ -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,
|
WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | WEBKIT_FIND_OPTIONS_WRAP_AROUND,
|
||||||
G_MAXUINT);
|
G_MAXUINT);
|
||||||
|
|
||||||
gtk_widget_set_visible(GTK_WIDGET(bar.widget), 0);
|
gtk_widget_hide(GTK_WIDGET(bar.widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Shortcuts */
|
/* Shortcuts */
|
||||||
|
@ -374,19 +374,10 @@ int handle_shortcut(func id)
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
printf("Error opening /opt/rosenrot/uris.txt");
|
printf("Error opening /opt/rosenrot/uris.txt");
|
||||||
} else {
|
} else {
|
||||||
fprintf(f, "%s\n", uri);
|
fprintf(f, "%s", uri);
|
||||||
fclose(f);
|
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);
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user