Move zsh config to better location, disable polkit, add back playerctl and mpris in mpc's place
This commit is contained in:
parent
aded6c206e
commit
9e3678d190
23 changed files with 85 additions and 87 deletions
|
@ -8,7 +8,7 @@
|
|||
thumbnail
|
||||
];
|
||||
config = {
|
||||
volume = 55;
|
||||
volume = 60;
|
||||
loop-playlist = "inf";
|
||||
osc = "no";
|
||||
};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
|
||||
ffmpeg
|
||||
ffmpegthumbnailer
|
||||
playerctl
|
||||
puddletag
|
||||
pulsemixer
|
||||
spotdl
|
||||
|
|
|
@ -1,22 +1,16 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config = lib.mkIf config.home.desktop.enable {
|
||||
home.packages = with pkgs; [ mpc-cli ];
|
||||
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
browser_sort_mode = "name";
|
||||
user_interface = "alternative";
|
||||
};
|
||||
bindings = [
|
||||
{ key = "h"; command = "volume_down"; }
|
||||
{ key = "j"; command = "scroll_down"; }
|
||||
{ key = "k"; command = "scroll_up"; }
|
||||
{ key = "l"; command = "volume_up"; }
|
||||
];
|
||||
programs.ncmpcpp = {
|
||||
enable = config.services.mpd.enable;
|
||||
settings = {
|
||||
browser_sort_mode = "name";
|
||||
user_interface = "alternative";
|
||||
};
|
||||
|
||||
services.mpd-discord-rpc.enable = true;
|
||||
bindings = [
|
||||
{ key = "h"; command = "volume_down"; }
|
||||
{ key = "j"; command = "scroll_down"; }
|
||||
{ key = "k"; command = "scroll_up"; }
|
||||
{ key = "l"; command = "volume_up"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
|
@ -16,11 +18,11 @@
|
|||
append = true;
|
||||
ignoreAllDups = true;
|
||||
ignoreSpace = true;
|
||||
path = "$ZDOTDIR/.zsh_history";
|
||||
};
|
||||
initExtra = ''
|
||||
pfetch
|
||||
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
||||
setopt RM_STAR_WAIT
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
./easyeffects
|
||||
./gnome-keyring
|
||||
./mpd
|
||||
./playerctl
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.mpd = {
|
||||
enable = config.home.desktop.enable;
|
||||
network.startWhenNeeded = true;
|
||||
musicDirectory = "/home/${config.home.username}/Midas/storage/Music/NixBops";
|
||||
playlistDirectory = "/home/${config.home.username}/Midas/storage/Music/NixBops/Playlists";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Local Pipewire"
|
||||
}
|
||||
'';
|
||||
services = lib.mkIf config.home.desktop.enable {
|
||||
mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
musicDirectory = "${config.home.homeDirectory}/Midas/storage/Music/NixBops";
|
||||
playlistDirectory = "${config.services.mpd.musicDirectory}/Playlists";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Local Pipewire"
|
||||
}
|
||||
'';
|
||||
};
|
||||
mpd-mpris.enable = true;
|
||||
mpd-discord-rpc.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
4
modules/home/services/playerctl/default.nix
Normal file
4
modules/home/services/playerctl/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.playerctld.enable = config.home.desktop.enable;
|
||||
}
|
|
@ -10,7 +10,6 @@
|
|||
spawn-at-startup "mako"
|
||||
spawn-at-startup "rot8"
|
||||
spawn-at-startup "wlsunset" "-s" "23:00" "-S" "07:30"
|
||||
spawn-at-startup "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
|
||||
|
||||
// Foreground
|
||||
|
|
|
@ -42,11 +42,12 @@
|
|||
${secMod}+m { spawn "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||
|
||||
// MPD
|
||||
${primeMod}+Backslash { spawn "sh" "-c" "mpc toggle"; }
|
||||
${secMod}+Shift+h { spawn "sh" "-c" "mpc prev"; }
|
||||
${secMod}+Shift+j { spawn "sh" "-c" "mpc volume -3"; }
|
||||
${secMod}+Shift+k { spawn "sh" "-c" "mpc volume +3"; }
|
||||
${secMod}+Shift+l { spawn "sh" "-c" "mpc next"; }
|
||||
${primeMod}+Backslash { spawn "sh" "-c" "playerctl -p firefox play-pause"; }
|
||||
${primeMod}+Shift+Backslash { spawn "sh" "-c" "playerctl -p mpd play-pause"; }
|
||||
${secMod}+Shift+h { spawn "sh" "-c" "playerctl -p mpd previous"; }
|
||||
${secMod}+Shift+j { spawn "sh" "-c" "playerctl -p mpd volume 0.03-"; }
|
||||
${secMod}+Shift+k { spawn "sh" "-c" "playerctl -p mpd volume 0.03+"; }
|
||||
${secMod}+Shift+l { spawn "sh" "-c" "playerctl -p mpd next"; }
|
||||
|
||||
//// Miscellaneous
|
||||
|
||||
|
@ -151,7 +152,7 @@
|
|||
${primeMod}+Shift+c { center-column; }
|
||||
|
||||
// Move these into scratchpads if or when they get supported
|
||||
${primeMod}+Shift+Backslash { spawn "sh" "-c" "foot btop"; }
|
||||
${primeMod}+Shift+BackSpace { spawn "sh" "-c" "foot btop"; }
|
||||
${primeMod}+Shift+m { spawn "sh" "-c" "foot ncmpcpp"; }
|
||||
${primeMod}+Shift+v { spawn "sh" "-c" "foot pulsemixer"; }
|
||||
}
|
||||
|
|
|
@ -16,5 +16,8 @@
|
|||
warp-mouse-to-focus
|
||||
focus-follows-mouse
|
||||
}
|
||||
clipboard {
|
||||
disable-primary
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
{ command = "sunshine"; }
|
||||
{ command = "rot8"; }
|
||||
{ command = "wlsunset -s 22:30 -S 07:30"; }
|
||||
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
|
||||
|
||||
# Foreground
|
||||
{ command = "thunderbird"; }
|
||||
|
|
|
@ -46,11 +46,12 @@
|
|||
"${secMod}+m" = ''exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'';
|
||||
|
||||
# MPD
|
||||
"${primeMod}+Backslash" = ''exec mpc toggle'';
|
||||
"${secMod}+Shift+h" = ''exec mpc prev'';
|
||||
"${secMod}+Shift+j" = ''exec mpc volume -3'';
|
||||
"${secMod}+Shift+k" = ''exec mpc volume +3'';
|
||||
"${secMod}+Shift+l" = ''exec mpc next'';
|
||||
"${primeMod}+Backslash" = ''exec playerctl -p firefox play-pause'';
|
||||
"${primeMod}+Shift+Backslash" = ''exec playerctl -p mpd play-pause'';
|
||||
"${secMod}+Shift+h" = ''exec playerctl -p mpd previous'';
|
||||
"${secMod}+Shift+j" = ''exec playerctl -p mpd volume 0.03-'';
|
||||
"${secMod}+Shift+k" = ''exec playerctl -p mpd volume 0.03+'';
|
||||
"${secMod}+Shift+l" = ''exec playerctl -p mpd next'';
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
|
@ -152,7 +153,7 @@
|
|||
"${primeMod}+shift+a" = ''focus child'';
|
||||
|
||||
# Scratchpads
|
||||
"${primeMod}+Shift+Backslash" = ''[app_id="btop"] scratchpad show, move position center, resize set 1216 888'';
|
||||
"${primeMod}+Shift+BackSpace" = ''[app_id="btop"] scratchpad show, move position center, resize set 1216 888'';
|
||||
"${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657'';
|
||||
"${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue