Commit fd7896e5 authored by Erik Reider's avatar Erik Reider

Added --custom-system-css to specify a custom "system" CSS file

parent c4f957a4
......@@ -80,6 +80,9 @@ namespace SwayNotificationCenter {
// Load packaged CSS as backup
string system_css = get_style_path (null, true);
system_css = File.new_for_path (system_css).get_path () ?? system_css;
if (custom_packaged_css != null) {
system_css = custom_packaged_css;
}
if (!skip_packaged_css) {
message ("Loading CSS: \"%s\"", system_css);
system_css_provider.load_from_path (system_css);
......
......@@ -9,6 +9,7 @@ namespace SwayNotificationCenter {
static string ? config_path;
// Dev args
static bool skip_packaged_css = false;
static string ? custom_packaged_css;
public class Swaync : Gtk.Application {
......@@ -84,6 +85,9 @@ namespace SwayNotificationCenter {
case "--skip-system-css":
skip_packaged_css = true;
break;
case "--custom-system-css":
custom_packaged_css = args[++i];
break;
case "-c":
case "--config":
config_path = args[++i];
......@@ -131,6 +135,8 @@ namespace SwayNotificationCenter {
print ("\t -c, --config \t\t Use a custom config file\n");
print ("\t --skip-system-css \t Skip trying to parse the packaged Stylesheet file."
+ " Useful for CSS debugging\n");
print ("\t --custom-system-css \t Pick a custom CSS file to use as the \"system\" CSS."
+ " Useful for CSS debugging\n");
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment