trying to get mpd working
This commit is contained in:
parent
46665f83d1
commit
12f1b97f1c
11 changed files with 333 additions and 22 deletions
|
@ -4,7 +4,7 @@ _: {
|
|||
formatOnSave = true;
|
||||
lspkind.enable = true;
|
||||
lsplines.enable = true;
|
||||
lightbulb.enable = true;
|
||||
lightbulb.enable = false;
|
||||
lspsaga.enable = false;
|
||||
lspSignature.enable = true;
|
||||
nvimCodeActionMenu.enable = true;
|
||||
|
|
|
@ -20,7 +20,6 @@ in {
|
|||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||
applications
|
||||
dictionary
|
||||
# kidex
|
||||
rink
|
||||
shell
|
||||
# symbols
|
||||
|
@ -33,25 +32,51 @@ in {
|
|||
hidePluginInfo = true;
|
||||
closeOnClick = true;
|
||||
showResultsImmediately = true;
|
||||
maxEntries = 50;
|
||||
maxEntries = 10;
|
||||
width.fraction = 0.3;
|
||||
y.absolute = 15;
|
||||
};
|
||||
extraCss = builtins.readFile (./. + "/style.css");
|
||||
extraCss = builtins.readFile ./style.css;
|
||||
|
||||
extraConfigFiles."applications.ron".text = ''
|
||||
Config(
|
||||
desktop_actions: false,
|
||||
extraConfigFiles = {
|
||||
"applications.ron".text = ''
|
||||
Config(
|
||||
desktop_actions: true,
|
||||
max_entries: 10,
|
||||
terminal: Some("foot"),
|
||||
)
|
||||
'';
|
||||
"websearch.ron".text = ''
|
||||
Config(
|
||||
prefix: "?",
|
||||
engines: [DuckDuckGo]
|
||||
)
|
||||
'';
|
||||
|
||||
"symbols.ron".text = ''
|
||||
Config(
|
||||
// The prefix that the search needs to begin with to yield symbol results
|
||||
prefix: ":sy",
|
||||
|
||||
// Custom user defined symbols to be included along the unicode symbols
|
||||
symbols: {
|
||||
// "name": "text to be copied"
|
||||
"shrug": "¯\\_(ツ)_/¯",
|
||||
},
|
||||
|
||||
// The number of entries to be displayed
|
||||
max_entries: 5,
|
||||
terminal: Some("foot"),
|
||||
)
|
||||
'';
|
||||
extraConfigFiles."websearch.ron".text = ''
|
||||
Config(
|
||||
prefix: "?",
|
||||
engines: [DuckDuckGo]
|
||||
)
|
||||
'';
|
||||
)
|
||||
'';
|
||||
|
||||
"translate.ron".text = ''
|
||||
Config(
|
||||
prefix: ":tr",
|
||||
language_delimiter: ">",
|
||||
max_entries: 3,
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ in {
|
|||
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
|
||||
};
|
||||
cursor = {
|
||||
style = "beam";
|
||||
style = "block";
|
||||
blink = "true";
|
||||
};
|
||||
mouse = {
|
||||
|
|
208
modules/runners/rofi/default.nix
Normal file
208
modules/runners/rofi/default.nix
Normal file
|
@ -0,0 +1,208 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf optionals;
|
||||
inherit (config.modules.other.system) username;
|
||||
cfg = config.modules.programs.rofi;
|
||||
|
||||
rofiPackage = with pkgs; rofi-wayland;
|
||||
in {
|
||||
config = mkIf env.programs.launchers.rofi.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = rofiPackage.override {
|
||||
plugins = [
|
||||
pkgs.rofi-rbw
|
||||
];
|
||||
};
|
||||
font = "Iosevka Nerd Font 14";
|
||||
extraConfig = {
|
||||
modi = "drun,filebrowser,calc,emoji";
|
||||
drun-display-format = " {name} ";
|
||||
sidebar-mode = true;
|
||||
matching = "prefix";
|
||||
scroll-method = 0;
|
||||
disable-history = false;
|
||||
show-icons = true;
|
||||
|
||||
display-drun = " Run";
|
||||
display-run = " Run";
|
||||
display-filebrowser = " Files";
|
||||
display-calc = " Calculator";
|
||||
display-emoji = "💀 Emoji";
|
||||
};
|
||||
|
||||
theme = let
|
||||
inherit (osConfig.modules.style.colorScheme) colors;
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background = mkLiteral "#${colors.base02}";
|
||||
background-alt = mkLiteral "#${colors.base02}";
|
||||
foreground = mkLiteral "#${colors.base05}";
|
||||
selected = mkLiteral "#${colors.base00}";
|
||||
active = mkLiteral "#${colors.base0D}";
|
||||
urgent = mkLiteral "#${colors.base00}";
|
||||
};
|
||||
"window" = {
|
||||
transparency = "real";
|
||||
location = mkLiteral "center";
|
||||
anchor = mkLiteral "center";
|
||||
fullscreen = mkLiteral "false";
|
||||
width = mkLiteral "600px";
|
||||
x-offset = mkLiteral "0px";
|
||||
y-offset = mkLiteral "0px";
|
||||
enabled = mkLiteral "true";
|
||||
border-radius = mkLiteral "20px";
|
||||
border = mkLiteral "4px";
|
||||
border-color = mkLiteral "#${colors.base02}";
|
||||
cursor = "default";
|
||||
background-color = mkLiteral "@background";
|
||||
};
|
||||
"mainbox" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "0px";
|
||||
background-color = mkLiteral "transparent";
|
||||
orientation = mkLiteral "vertical";
|
||||
children = mkLiteral "[inputbar,listbox]";
|
||||
};
|
||||
"listbox" = {
|
||||
spacing = mkLiteral "10px";
|
||||
padding = mkLiteral "10px 10px 10px 15px";
|
||||
background-color = mkLiteral "transparent";
|
||||
orientation = mkLiteral "vertical";
|
||||
children = mkLiteral "[message,listview]";
|
||||
};
|
||||
"inputbar" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "10px";
|
||||
padding = mkLiteral "30px 20px 30px 20px";
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
orientation = mkLiteral "horizontal";
|
||||
children = mkLiteral "[prompt,entry]";
|
||||
};
|
||||
"entry" = {
|
||||
enabled = true;
|
||||
expand = true;
|
||||
width = mkLiteral "300px";
|
||||
padding = mkLiteral "12px 15px";
|
||||
border-radius = mkLiteral "15px";
|
||||
background-color = mkLiteral "@background-alt";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "text";
|
||||
placeholder = "Search";
|
||||
placeholder-color = mkLiteral "inherit";
|
||||
};
|
||||
"prompt" = {
|
||||
width = mkLiteral "64px";
|
||||
font = "Iosevka Nerd Font 13";
|
||||
padding = mkLiteral "10px 20px 10px 20px";
|
||||
border-radius = mkLiteral "15px";
|
||||
background-color = mkLiteral "@background-alt";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"mode-switcher" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "10px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"button" = {
|
||||
width = mkLiteral "48px";
|
||||
font = "Iosevka Nerd Font 14";
|
||||
padding = mkLiteral "8px 5px 8px 8px";
|
||||
border-radius = mkLiteral "15px";
|
||||
background-color = mkLiteral "@background-alt";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"button selected" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"listview" = {
|
||||
enabled = true;
|
||||
columns = 2;
|
||||
lines = 7;
|
||||
cycle = true;
|
||||
dynamic = true;
|
||||
srollbar = false;
|
||||
layout = mkLiteral "vertical";
|
||||
reverse = false;
|
||||
fixed-height = true;
|
||||
fixed-columns = false;
|
||||
spacing = mkLiteral "5px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
cursor = mkLiteral "default";
|
||||
};
|
||||
"element" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "15px";
|
||||
padding = mkLiteral "7px";
|
||||
border-radius = mkLiteral "100%";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"element normal.normal" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
"element normal.urgent" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"element normal.active" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@active";
|
||||
};
|
||||
"element selected.normal" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"element selected.urgent" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"element selected.active" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@active";
|
||||
};
|
||||
"element-icon" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
size = mkLiteral "32px";
|
||||
cursor = mkLiteral "inherit";
|
||||
};
|
||||
"element-text" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "inherit";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
};
|
||||
"message" = {background-color = mkLiteral "transparent";};
|
||||
"textbox" = {
|
||||
padding = mkLiteral "12px";
|
||||
border-radius = mkLiteral "100%";
|
||||
background-color = mkLiteral "@background-alt";
|
||||
text-color = mkLiteral "@foreground";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
};
|
||||
"error-message" = {
|
||||
padding = mkLiteral "12px";
|
||||
border-radius = mkLiteral "20px";
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1 +1 @@
|
|||
_: {imports = [./pipewire.nix ./ssh.nix ./greetd.nix ./dunst.nix];}
|
||||
_: {imports = [./pipewire.nix ./ssh.nix ./greetd.nix ./dunst.nix ./mpd.nix];}
|
||||
|
|
61
modules/services/mpd.nix
Normal file
61
modules/services/mpd.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.modules.services.mpd;
|
||||
inherit (config.modules.other.system) username;
|
||||
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
inherit (lib.types) str;
|
||||
in {
|
||||
options.modules.services.mpd = {
|
||||
enable = mkEnableOption "mpd";
|
||||
musicDirectory = mkOption {
|
||||
description = "music directory for mpd";
|
||||
type = str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
services = {
|
||||
mpd = {
|
||||
enable = true;
|
||||
inherit (cfg) musicDirectory;
|
||||
extraConfig = ''
|
||||
user "${username}"
|
||||
restore_paused "yes"
|
||||
|
||||
follow_outside_symlinks "yes"
|
||||
follow_inside_symlinks "yes"
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "PipeWire Sound Server"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "FIFO"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
'';
|
||||
};
|
||||
mpd-mpris = {
|
||||
enable = true;
|
||||
mpd = {
|
||||
host = "127.0.0.1";
|
||||
network = "unix";
|
||||
port = 6600;
|
||||
useLocal = true;
|
||||
};
|
||||
};
|
||||
|
||||
playerctld = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,20 +6,21 @@
|
|||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.programs.ncmpcpp;
|
||||
username = config.modules.other.system.username;
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
options.modules.programs.ncmpcpp.enable = mkEnableOption "ncmpcpp";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
xdg.configFile."ncmpcpp/config".source = ./config;
|
||||
#xdg.configFile."ncmpcpp/config".source = ./config;
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
|
||||
mpdMusicDir = "/home/vali/Nextcloud/Media/Music";
|
||||
mpdMusicDir = "/home/${username}/Nextcloud/Media/Music";
|
||||
settings = {
|
||||
mpd_host = "127.0.0.1";
|
||||
mpd_port = "6600";
|
||||
/*
|
||||
alternative_header_first_line_format = "$5{$b%t$/b}$9";
|
||||
alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}";
|
||||
song_list_format = "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)";
|
||||
|
@ -71,7 +72,6 @@ in {
|
|||
mouse_list_scroll_whole_page = "no";
|
||||
show_hidden_files_in_local_browser = "no";
|
||||
startup_screen = "playlist";
|
||||
execute_on_song_change = "/home/dobbie/.bin/np";
|
||||
connected_message_on_startup = "no";
|
||||
playlist_separate_albums = "no";
|
||||
allow_for_physical_item_deletion = "no";
|
||||
|
@ -79,6 +79,7 @@ in {
|
|||
visualizer_data_source = "/tmp/mpd.fifo";
|
||||
visualizer_type = "wave_filled";
|
||||
visualizer_look = "▉▋";
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -173,6 +173,9 @@ in {
|
|||
|
||||
debug.disable_logs = false;
|
||||
|
||||
cursor = {
|
||||
hide_on_key_press = true;
|
||||
};
|
||||
misc = {
|
||||
enable_swallow = true;
|
||||
swallow_regex = "foot";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue