diff --git a/src/con.rs b/src/con.rs
index 5cc5233..d0ff4cd 100644
--- a/src/con.rs
+++ b/src/con.rs
@@ -149,8 +149,22 @@ impl<'a> DisplayFormat for Window<'a> {
});
fmt.replace("{id}", format!("{}", self.get_id()).as_str())
- .replace("{urgency_start}", urgency_start.as_str())
- .replace("{urgency_end}", urgency_end.as_str())
+ .replace(
+ "{urgency_start}",
+ if self.is_urgent() {
+ urgency_start.as_str()
+ } else {
+ ""
+ },
+ )
+ .replace(
+ "{urgency_end}",
+ if self.is_urgent() {
+ urgency_end.as_str()
+ } else {
+ ""
+ },
+ )
.replace("{app_name}", self.get_app_name())
.replace(
"{workspace_name}",
diff --git a/src/config.rs b/src/config.rs
index 4fdc4cc..1c8cc09 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -28,12 +28,12 @@ impl Default for Config {
}),
format: Some(Format {
window_format: Some(
- "\"{title}\"\t{app_name} on workspace {workspace_name}\t({id})"
+ "{urgency_start}“{title}”{urgency_end}\t{app_name} on workspace {workspace_name}\t({id})"
.to_string(),
),
- workspace_format: Some("Workspace {name}\t({id})".to_string()),
- urgency_start: Some(String::new()),
- urgency_end: Some(String::new())
+ workspace_format: Some("Workspace {name}\t({id})".to_string()),
+ urgency_start: Some("".to_string()),
+ urgency_end: Some("".to_string())
}),
}
}
@@ -84,13 +84,19 @@ pub fn load_config() -> Config {
save_config(Config::default());
// Tell the user that a fresh default config has been created.
std::process::Command::new("swaynag")
+ .arg("--background")
+ .arg("00FF44")
+ .arg("--text")
+ .arg("0000CC")
.arg("--message")
.arg(
- "Welcome to swayr. ".to_owned()
- + "I've created a fresh (but boring) config for you in "
+ "Welcome to swayr! ".to_owned()
+ + "I've created a fresh config for use with wofi for you in "
+ &path.to_string_lossy()
- + ".",
+ + ". Adapt it to your needs.",
)
+ .arg("--type")
+ .arg("warning")
.arg("--dismiss-button")
.arg("Thanks!")
.spawn()