Compare commits
No commits in common. "5d22d6aea00aa4826a24d6fd524524d01e1fdfa1" and "691e01e22c77bb250ae84515797824ee35917dfa" have entirely different histories.
5d22d6aea0
...
691e01e22c
7 changed files with 4 additions and 128 deletions
|
@ -5,7 +5,6 @@
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
};
|
};
|
||||||
audio.cmus.enable = true;
|
|
||||||
cli = {
|
cli = {
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
ghq.enable = true;
|
ghq.enable = true;
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.modules.audio.cmus;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.modules.audio.cmus= {
|
|
||||||
enable = mkEnableOption "enable cmus audio player";
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
cmus
|
|
||||||
];
|
|
||||||
home.file.".config/cmus/rc".source = ./files/rc;
|
|
||||||
home.file.".config/cmus/notify.sh".source = ./files/notify.sh;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
process_args() {
|
|
||||||
while [ "$#" -ge 2 ]
|
|
||||||
do
|
|
||||||
printf -v "$1" "%s" "$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
filename=${file#*/}
|
|
||||||
image=${file%/*}/cover.jpg
|
|
||||||
[ -f "$image" ] && options="$options -i \"${image}\""
|
|
||||||
|
|
||||||
title=${title:-$filename}
|
|
||||||
if [[ ${#title} -gt 25 ]]; then
|
|
||||||
title="${title:0:24}…"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$artist" ]
|
|
||||||
then
|
|
||||||
if [[ ${#artist} -gt 22 ]]; then
|
|
||||||
artist="<i>by</i> ${artist:0:21}…"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$album" ]
|
|
||||||
then
|
|
||||||
if [[ ${#album} -gt 19 ]]; then
|
|
||||||
album="${album:0:18}…"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$date" ]
|
|
||||||
then
|
|
||||||
date="${date%%-*}"
|
|
||||||
fi
|
|
||||||
printf -v body "%s\n%-19s <i>%s</i>" "${artist:-}" "${album:-}" "${date:-}"
|
|
||||||
notify-send --app-name=cmus -i "$image" "$title" "$body"
|
|
||||||
}
|
|
||||||
|
|
||||||
process_args "$@"
|
|
||||||
main
|
|
|
@ -1,56 +0,0 @@
|
||||||
## Base16 Default Dark
|
|
||||||
|
|
||||||
# overall background and foreground color
|
|
||||||
set color_win_fg=7
|
|
||||||
set color_win_bg=0
|
|
||||||
|
|
||||||
# bottom status line
|
|
||||||
set color_statusline_fg=20
|
|
||||||
set color_statusline_bg=19
|
|
||||||
|
|
||||||
# bottom title line
|
|
||||||
set color_titleline_fg=7
|
|
||||||
set color_titleline_bg=18
|
|
||||||
|
|
||||||
# top title area
|
|
||||||
set color_win_title_fg=20
|
|
||||||
set color_win_title_bg=19
|
|
||||||
set color_win_title_attr=bold
|
|
||||||
|
|
||||||
# command-line colors
|
|
||||||
set color_cmdline_bg=default
|
|
||||||
set color_cmdline_fg=default
|
|
||||||
set color_error=1
|
|
||||||
set color_info=6
|
|
||||||
|
|
||||||
# separator of windows
|
|
||||||
# should be black
|
|
||||||
set color_separator=16
|
|
||||||
|
|
||||||
# unselected currently playing track's text
|
|
||||||
set color_win_cur=13
|
|
||||||
|
|
||||||
# active selection for currently playing track
|
|
||||||
set color_win_cur_sel_bg=20
|
|
||||||
set color_win_cur_sel_fg=0
|
|
||||||
set color_win_cur_sel_attr=none
|
|
||||||
|
|
||||||
# inactive selection for currently playing track
|
|
||||||
set color_win_inactive_cur_sel_bg=8
|
|
||||||
set color_win_inactive_cur_sel_fg=21
|
|
||||||
|
|
||||||
# active selection
|
|
||||||
set color_win_sel_bg=6
|
|
||||||
set color_win_sel_fg=0
|
|
||||||
set color_win_sel_attr=none
|
|
||||||
|
|
||||||
# inactive selection
|
|
||||||
set color_win_inactive_sel_bg=19
|
|
||||||
set color_win_inactive_sel_fg=20
|
|
||||||
|
|
||||||
# directory listing color
|
|
||||||
set color_win_dir=default
|
|
||||||
|
|
||||||
set status_display_program=~/.config/cmus/notify.sh
|
|
||||||
|
|
||||||
add -l ~/medias/music
|
|
|
@ -34,7 +34,7 @@ in
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
python3Packages.python-lsp-server
|
python3Packages.python-lsp-server
|
||||||
shellcheck
|
shellcheck
|
||||||
# yaml-language-server
|
yaml-language-server
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
./application/gnupg
|
./application/gnupg
|
||||||
./application/imv
|
./application/imv
|
||||||
./application/zathura
|
./application/zathura
|
||||||
./audio/cmus
|
|
||||||
./cli/direnv
|
./cli/direnv
|
||||||
./cli/ghq/default.nix
|
./cli/ghq/default.nix
|
||||||
./cli/git
|
./cli/git
|
||||||
|
|
|
@ -13,7 +13,7 @@ with lib;
|
||||||
};
|
};
|
||||||
services.mako = {
|
services.mako = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font = "Fira Code Nerd Font 10";
|
font = "Fira Code 10";
|
||||||
backgroundColor = "#353535FF";
|
backgroundColor = "#353535FF";
|
||||||
borderColor = "#1CD180";
|
borderColor = "#1CD180";
|
||||||
progressColor = "over #5566AAFF";
|
progressColor = "over #5566AAFF";
|
||||||
|
@ -31,12 +31,8 @@ with lib;
|
||||||
border-color=#F268b3
|
border-color=#F268b3
|
||||||
|
|
||||||
[app-name="cmus"]
|
[app-name="cmus"]
|
||||||
border-size=1
|
border-color=#00000000
|
||||||
default-timeout=7000
|
default-timeout=10000
|
||||||
group-by=app-name
|
|
||||||
|
|
||||||
[app-name="cmus" grouped]
|
|
||||||
format=<b>%s</b>\n%b
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue