Add image-roll and clapper for pictures and videos respectively

Replace swayimg and mpv

Fix MPRIS module for waybar (needed playerctl in PATH), reorganise so
that MPRIS is in the centre and update formatting
This commit is contained in:
Evie Litherland-Smith 2024-10-25 15:20:10 +01:00
parent 77f4eba566
commit 45acedd324
4 changed files with 17 additions and 20 deletions

View file

@ -12,7 +12,11 @@
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
wl-clipboard wl-clipboard
image-roll
clapper
g4music g4music
ffmpeg
libreoffice-fresh
remmina remmina
webcord webcord
signal-desktop signal-desktop
@ -22,7 +26,6 @@
file.${config.gtk.gtk2.configLocation}.force = true; file.${config.gtk.gtk2.configLocation}.force = true;
}; };
services.syncthing.enable = true; services.syncthing.enable = true;
programs.mpv.enable = true;
gtk = { gtk = {
enable = true; enable = true;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";

View file

@ -10,11 +10,7 @@
./fuzzel.nix ./fuzzel.nix
./mako.nix ./mako.nix
]; ];
stylix.targets.hyprland.enable = false; # Use my own theme config
home.packages = [ home.packages = [
pkgs.libreoffice-fresh
pkgs.ffmpeg
pkgs.swayimg
(pkgs.writeShellScriptBin "protonmail-setup-bridge" '' (pkgs.writeShellScriptBin "protonmail-setup-bridge" ''
pkill -9 -f protonmail-bridge pkill -9 -f protonmail-bridge
PASSWORD_STORE_DIR=/dev/null ${pkgs.protonmail-bridge}/bin/protonmail-bridge -c PASSWORD_STORE_DIR=/dev/null ${pkgs.protonmail-bridge}/bin/protonmail-bridge -c
@ -207,9 +203,8 @@
smart_resizing = false; smart_resizing = false;
drop_at_cursor = true; drop_at_cursor = true;
}; };
general = with config.lib.stylix.scheme; { general = {
"col.active_border" = "rgb(${base0E})"; "col.active_border" = lib.mkForce "rgb(${config.lib.stylix.scheme.base0E})";
"col.inactive_border" = "rgb(${base04})";
gaps_in = 2.5; gaps_in = 2.5;
gaps_out = 5; gaps_out = 5;
border_size = 1; border_size = 1;
@ -218,7 +213,7 @@
}; };
decoration = { decoration = {
rounding = 5; rounding = 5;
"col.shadow" = "rgba(${config.lib.stylix.scheme.base00}0d)"; "col.shadow" = lib.mkForce "rgba(${config.lib.stylix.scheme.base00}0d)";
drop_shadow = "yes"; drop_shadow = "yes";
shadow_ignore_window = true; shadow_ignore_window = true;
shadow_range = 4; shadow_range = 4;

View file

@ -6,9 +6,9 @@ in
"inode/directory" = [ "org.gnome.Nautilus.desktop" ]; "inode/directory" = [ "org.gnome.Nautilus.desktop" ];
"inode/symlink" = [ "org.gnome.Nautilus.desktop" ]; "inode/symlink" = [ "org.gnome.Nautilus.desktop" ];
"image/jpeg" = [ "swayimg.desktop" ]; "image/jpeg" = [ "com.github.weclaw1.ImageRoll.desktop" ];
"image/png" = [ "swayimg.desktop" ]; "image/png" = [ "com.github.weclaw1.ImageRoll.desktop" ];
"video/mp4" = [ "mpv.desktop" ]; "video/mp4" = [ "com.github.rafostar.Clapper.desktop" ];
"text/plain" = emacs; "text/plain" = emacs;
"text/richtext" = emacs; "text/richtext" = emacs;

View file

@ -5,6 +5,7 @@
Description = "Home Manager System Tray"; Description = "Home Manager System Tray";
Requires = [ "graphical-session.target" ]; Requires = [ "graphical-session.target" ];
}; };
home.packages = [ pkgs.playerctl ]; # For MPRIS to work
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
@ -14,10 +15,10 @@
position = "top"; position = "top";
# Layout # Layout
"modules-left" = [ "modules-left" = [
"hyprland/workspaces"
"hyprland/window" "hyprland/window"
"mpris"
]; ];
"modules-center" = [ "hyprland/workspaces" ]; "modules-center" = [ "mpris" ];
"modules-right" = [ "modules-right" = [
"custom/notification" "custom/notification"
"pulseaudio" "pulseaudio"
@ -84,8 +85,8 @@
}; };
}; };
mpris = { mpris = {
"format" = "{player_icon} {artist} - {title} {status_icon}"; "format" = "{player_icon} {status_icon} | {album} - {artist} - {title}";
"tooltip-format" = "{player_icon} ({player}) {dynamic}"; "tooltip-format" = "{player_icon} ({player}) {status_icon} {dynamic}";
"title-len" = 64; "title-len" = 64;
"interval" = 1; "interval" = 1;
"dynamic-order" = [ "dynamic-order" = [
@ -97,9 +98,7 @@
]; ];
"player-icons" = { "player-icons" = {
"default" = "󰲸 "; "default" = "󰲸 ";
"emms" = " ";
"firefox" = "󰈹 "; "firefox" = "󰈹 ";
"mpv" = "󰦟 ";
}; };
"status-icons" = { "status-icons" = {
"playing" = "󰐊"; "playing" = "󰐊";
@ -360,8 +359,8 @@
color: ${scheme.base09}; color: ${scheme.base09};
} }
#mpris { #mpris.paused {
color: ${scheme.base04}; color: ${scheme.base03};
} }
#custom-notification { #custom-notification {