mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-08-17 03:40:38 +03:00
Added dev arg for ignoring packaged CSS
Good for development where the packaged CSS file (/etc/...) would still be used
This commit is contained in:
parent
dfaed0eeb2
commit
9a4937c3b8
@ -57,12 +57,14 @@ namespace SwayNotificationCenter {
|
||||
int css_priority = ConfigModel.instance.cssPriority.get_priority ();
|
||||
|
||||
// Load packaged CSS as backup
|
||||
string system_css = get_style_path (null, true);
|
||||
system_css_provider.load_from_path (system_css);
|
||||
Gtk.StyleContext.add_provider_for_display (
|
||||
Gdk.Display.get_default (),
|
||||
system_css_provider,
|
||||
css_priority);
|
||||
if (!no_base_css) {
|
||||
string system_css = get_style_path (null, true);
|
||||
system_css_provider.load_from_path (system_css);
|
||||
Gtk.StyleContext.add_provider_for_display (
|
||||
Gdk.Display.get_default (),
|
||||
system_css_provider,
|
||||
css_priority);
|
||||
}
|
||||
|
||||
// Load user CSS
|
||||
string user_css = get_style_path (style_path);
|
||||
|
@ -1,7 +1,10 @@
|
||||
namespace SwayNotificationCenter {
|
||||
static SwayncDaemon swaync_daemon;
|
||||
// Args
|
||||
static string ? style_path;
|
||||
static string ? config_path;
|
||||
// Dev args
|
||||
static bool no_base_css = false;
|
||||
|
||||
static uint layer_shell_protocol_version = 3;
|
||||
|
||||
@ -16,6 +19,16 @@ namespace SwayNotificationCenter {
|
||||
case "--style":
|
||||
style_path = args[++i];
|
||||
break;
|
||||
case "-D":
|
||||
string dev_arg = args[++i];
|
||||
switch (dev_arg) {
|
||||
case "no-base-css":
|
||||
no_base_css = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "-c":
|
||||
case "--config":
|
||||
config_path = args[++i];
|
||||
|
Loading…
Reference in New Issue
Block a user