diff --git a/flake.nix b/flake.nix
index 2f5ee8d..7795410 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,7 +34,6 @@ in {
pkgs.go-task
pkgs.convco
pkgs.typos
- pkgs.home-manager
];
};
});
@@ -103,8 +102,8 @@ in {
};
extraSpecialArgs = {
inherit stateVersion inputs;
- hostname = "work";
- username = "yorick-barbanneau";
+ hostname = "yorick-Latitude-7320";
+ username = "yorick";
};
modules = [
./home-manager/default.nix
diff --git a/hosts/work/home-config.nix b/hosts/yorick-Latitude-7320/home-config.nix
similarity index 100%
rename from hosts/work/home-config.nix
rename to hosts/yorick-Latitude-7320/home-config.nix
diff --git a/hosts/work/includes/home-manager.nix b/hosts/yorick-Latitude-7320/includes/home-manager.nix
similarity index 82%
rename from hosts/work/includes/home-manager.nix
rename to hosts/yorick-Latitude-7320/includes/home-manager.nix
index b8cd4e4..0a17bd4 100644
--- a/hosts/work/includes/home-manager.nix
+++ b/hosts/yorick-Latitude-7320/includes/home-manager.nix
@@ -17,6 +17,4 @@
slurp
wl-clipboard
];
- targets.genericLinux.enable = true;
- xdg.mime.enable = true;
}
diff --git a/modules/home-manager/audio/cmus/files/notify.sh b/modules/home-manager/audio/cmus/files/notify.sh
index dfc62db..d11fbff 100755
--- a/modules/home-manager/audio/cmus/files/notify.sh
+++ b/modules/home-manager/audio/cmus/files/notify.sh
@@ -9,59 +9,36 @@ process_args() {
done
}
-#
-escape(){
- local string
- string=$1
- string=${string//"<"/"<"}
- string=${string//">"/">"}
- string=${string//"&"/"&"}
- printf "%s" "$string"
-}
-
-
main() {
- options=( --app-name=cmus --transient -u low)
-
- filename=${file##*/}
+ filename=${file#*/}
image=${file%/*}/cover.jpg
-
- if [[ -f "$image" ]]; then
- options+=( -i "${image}" )
- fi
+ [ -f "$image" ] && options="$options -i \"${image}\""
- ## Get title or filename
title=${title:-$filename}
if [[ ${#title} -gt 25 ]]; then
title="${title:0:24}…"
fi
- title="$title"
if [ -n "$artist" ]
then
if [[ ${#artist} -gt 22 ]]; then
- artist="${artist:0:21}…"
+ artist="by ${artist:0:21}…"
+ fi
+ fi
+
+ if [ -n "$album" ]
+ then
+ if [[ ${#album} -gt 19 ]]; then
+ album="${album:0:18}…"
fi
- printf -v l_artist "by %s" "$(escape "$artist")"
fi
if [ -n "$date" ]
then
date="${date%%-*}"
fi
-
- # Get Album
- if [ -n "$album" ]
- then
- if [[ ${#album} -gt 19 ]]; then
- album="${album:0:19}…"
- fi
- printf -v l_album "on %-20s %s" "$(escape "$album")" "${date:-}"
- fi
-
- printf -v l_intro "cmus:%s" "$(escape "$status")"
- printf -v body "%s\n" "${l_intro:-}" "${title:-}" "${l_artist:-}" "${l_album:-}"
- notify-send "${options[@]}" "unseless" "$body"
+ printf -v body "%s\n%-19s %s" "${artist:-}" "${album:-}" "${date:-}"
+ notify-send --app-name=cmus -i "$image" "$title" "$body"
}
process_args "$@"
diff --git a/modules/home-manager/audio/cmus/files/rc b/modules/home-manager/audio/cmus/files/rc
index 2c30746..ea71c79 100644
--- a/modules/home-manager/audio/cmus/files/rc
+++ b/modules/home-manager/audio/cmus/files/rc
@@ -52,5 +52,5 @@ set color_win_inactive_sel_fg=20
set color_win_dir=default
set status_display_program=~/.config/cmus/notify.sh
-set format_current= %{?stream??} %t %{?a?by %a} %{?l?on %l}%= %y
+
add -l ~/medias/music
diff --git a/modules/home-manager/desktop/sway/includes/mako.nix b/modules/home-manager/desktop/sway/includes/mako.nix
index 7f4de74..81ddf7e 100644
--- a/modules/home-manager/desktop/sway/includes/mako.nix
+++ b/modules/home-manager/desktop/sway/includes/mako.nix
@@ -26,7 +26,6 @@ with lib;
maxIconSize = 64;
layer = "overlay";
anchor = "top-right";
- format = ''%a\n%s\n%b'';
extraConfig = ''
[urgency="high"]
border-color=#F268b3
@@ -35,10 +34,9 @@ with lib;
border-size=1
default-timeout=7000
group-by=app-name
- format=%b
[app-name="cmus" grouped]
- format=%b
+ format=%s\n%b
'';
};
};