Skip to content

Commit

Permalink
feat: move to spotify-tui
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Oct 30, 2023
1 parent 1031d16 commit 5eb3c45
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 79 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
inputs.nixpkgs-lib.follows = "nixpkgs";
};
helix = {
url = "github:SoraTenshi/helix/new-daily-driver";
# Fork of SoraTenshi's helix fork with typst support
url = "github:sioodmy/helix/add-typst";
inputs = {
nixpkgs.follows = "nixpkgs";
rust-overlay.follows = "rust-overlay";
Expand Down
2 changes: 2 additions & 0 deletions home/cli/helix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
clang-tools
nil
luajitPackages.lua-lsp
typst-lsp
nodePackages.bash-language-server
nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-langservers-extracted
Expand Down Expand Up @@ -163,6 +164,7 @@
home.packages = with pkgs; [
# some other lsp related packages / dev tools
typst
typst-lsp
shellcheck
lldb
gopls
Expand Down
2 changes: 1 addition & 1 deletion home/impermanence.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _: {
".cache/nix"
".cache/thunderbird/"
".thunderbird"
".cache/spotify"
".cache/spotifyd"
".config/spotify"
".cache/starship"
".local/share/nheko"
Expand Down
70 changes: 36 additions & 34 deletions home/rice/hyprland/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ in {
# blur
blur = {
enabled = true;
size = 4;
passes = 3;
ignore_opacity = true;
size = 3;
passes = 2;
ignore_opacity = false;
new_optimizations = 1;
xray = true;
contrast = 0.7;
Expand Down Expand Up @@ -174,9 +174,9 @@ in {
"$MOD,P,pseudo"

# scratchpads
"$MOD,Z,exec, pypr toggle term && hyprctl dispatch bringactivetotop"
"ALT,code:9,exec, pypr toggle term && hyprctl dispatch bringactivetotop"
"$MOD,B,exec, pypr toggle btm && hyprctl dispatch bringactivetotop"
"$MOD,code:172,exec,pypr toggle pavucontrol && hyprctl dispatch bringactivetotop"
"$MOD,code:61,exec,pypr toggle spotify && hyprctl dispatch bringactivetotop"
"$MOD,code:21,exec,pypr zoom"
"$MOD,code:21,exec,hyprctl reload"

Expand Down Expand Up @@ -256,11 +256,12 @@ in {
"idleinhibit focus,class:foot"

"idleinhibit fullscreen, class:^(firefox)$"
"float,title:^(Firefox — Sharing Indicator)$"
"move 0 0,title:^(Firefox — Sharing Indicator)$"
"float, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"

"workspace special silent, title:^(Firefox — Sharing Indicator)$"
''workspace special silent, title:^(.*is sharing (your screen|a window)\.)$''

"float,class:udiskie"

# pavucontrol
Expand All @@ -270,6 +271,8 @@ in {
"workspace special silent,$pavucontrol"
"opacity 0.80,$pavucontrol"

"opacity 0.80,title:^(Spotify)$"

"opacity 0.9,class:^(org.keepassxc.KeePassXC)$"

"float, class:^(imv)$"
Expand Down Expand Up @@ -325,31 +328,30 @@ in {
'';
};
home.file.".config/hypr/pyprland.json".text = ''
{
"pyprland": {
"plugins": ["scratchpads", "magnify"]
},
"scratchpads": {
"term": {
"command": "foot --title scratchpad",
"margin": 50
},
"btm": {
"command": "foot --title scratchpad -e btm",
"margin": 50
},
"geary": {
"command": "geary",
"margin": 50
},
"pavucontrol": {
"command": "pavucontrol",
"margin": 50,
"unfocus": "hide",
"animation": "fromTop"
}
}
}
'';

xdg.configFile."hypr/pyprland.json".text = builtins.toJSON {
pyprland = {
plugins = ["scratchpads" "magnify"];
};
scratchpads = {
term = {
command = "foot --title scratchpad";
margin = 50;
unfocus = "hide";
animation = "fromTop";
};
btm = {
command = "foot --title scratchpad -e btm";
margin = 50;
unfocus = "hide";
animation = "fromTop";
};
spotify = {
command = "foot --title scratchpad -e spt";
margin = 50;
unfocus = "hide";
animation = "fromTop";
};
};
};
}
74 changes: 38 additions & 36 deletions home/rice/spotify/default.nix
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
{
pkgs,
config,
inputs,
...
}: {
# themable spotify
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.hostPlatform.system}.default;
in {
enable = true;
home.packages = [pkgs.spotify-tui];
services = {
playerctld.enable = true;

theme = spicePkgs.themes.catppuccin;

colorScheme = "mocha";

enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
hidePodcasts
shuffle
skipStats
autoVolume
autoSkip
savePlaylists
phraseToPlaylist
wikify
autoSkip
copyToClipboard
history
groupSession
loopyLoop
trashbin
bookmark
keyboardShortcut
fullAppDisplayMod
# i aint paying for shit
adblock
];
enabledCustomApps = with spicePkgs.apps; [
reddit
lyrics-plus
localFiles
];
spotifyd = {
enable = true;
package = pkgs.spotifyd.override {withMpris = true;};
settings.global = {
autoplay = true;
backend = "pulseaudio";
bitrate = 320;
cache_path = "${config.xdg.cacheHome}/spotifyd";
device_type = "computer";
initial_volume = "100";
password_cmd = "head -1 /run/agenix/spotify";
use_mpris = true;
username_cmd = "tail -1 /run/agenix/spotify";
volume_normalisation = false;
};
};
};

xdg.configFile."spotify-tui/config.yml".text = ''
theme:
error_border: "243, 139, 168" # error dialog border is Red
error_text: "235, 160, 172" # error message text (e.g. "Spotify API reported error 404") is Maroon
hint: "249, 226, 175" # hint text in errors Yellow
playbar_background: "17, 17, 27" # background of progress bar "Crust"
playbar_progress: "24, 24, 37" # filled-in part of the progress bar Mantle
playbar_progress_text: "166, 227, 161" # song length and time played/left indicator in the progress bar "Green"
playbar_text: "166, 173, 200" # artist name in player pane is "Subtext 0"
inactive: "108, 112, 134" # borders of inactive panes "Overlay 0"
text: "205, 214, 244" # text in panes is "Text"
active: "203, 166, 247" # current playing song in list Mauve
banner: "245, 194, 231" # the "spotify-tui" banner on launch pink
hovered: "245, 194, 231" # hovered pane border Pink
selected: "180, 190, 254" # a) selected pane border, b) hovered item in list, & c) track title in player Lavender
header: "180, 190, 254" # header text in panes (e.g. 'Title', 'Artist', etc.) Lavender
'';
}
8 changes: 8 additions & 0 deletions secrets/secrets.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let
sioodmy = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE9ExEl6WqtCI4yCqbSAhAGmzvVp/nYADbgy/Qi4AKQy sioodmy@anthe";

anthe = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3LBESPBY559NbAJ7KL/+K4S5InhWf5YDQgl2XjT5ZxTtPg0x24IDcEmxrPi+7nKSAvMJCkneTfWHPYoRYrNA/G15a+Pqr/9w1EtuK+D054qtz2q+oUM029JdTP/0qzbKxAV/qzUXyJyrgcGRnRYhFRKmg3Sl7G7mxhYN20RIYL3ENXnpfculGrnqX8yONda7YRQfjyEQAsLUIS4aEN7pQsUGO2lGzvXueHcRGRflbatVD59REWoD5kYE984EVhgbky092HHhDR5rIFnFJygrhl9irYk7x6Un98qsvKBeRKzpNMZ1iqs8EFdSbayNdRimooSyFLx83pUhx7SY01cJXxuVmW8Rec9xgnW8rrclz2H+ArQHSZQz/T/QPH2zZgtE3A2xX5HsmQnCu/h7yOpwD6ULTyR8/xK61jHgx4AM1hLyGGrMoPailSXyvT9OGnmXuvcIrx8R2oHy7e48DGWiTHoW8+nltWURkUjdolg373ruLxT+Rqf1JFgPcFwCEVSjVxtTz33ljFD31OOKjs5O2y/9jndwcx54twlgLr+H/6Y1SWIPNeuhNO3IiGuFkH3+JLrQLXVN9UIE1/qHyOIIJpR3ONd4uW6xDsnl8SBZUWuYf468FQGHkinWZxdYdi1SlHbulXxGPTiRjqSUBeR9fB+CND2WJEvfeSJccofk29w== root@anthe";
in {
"spotify.age".publicKeys = [sioodmy anthe];
"spotify-tui.age".publicKeys = [sioodmy anthe];
}
28 changes: 28 additions & 0 deletions secrets/spotify-tui.age
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----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25u
RjNwaTE2ak1xeE5Xc25GdVFSeW12U2RuV3pjdCswQQovWTlKUEwycFNXTVB0YStz
eXZaRHdkRjlwMVpOYWFoRkU1b2dEaCtDVjdrCi0+IHZES2QtZ3JlYXNlIGlBLDgg
IV1SJjw3W2ogNGIueHkKUENaWGtTZjZwYjBQTlFBSjVHTXdkMU5Zc282bXRrREVq
eVZCL1ZadFkwTFliT1BDdklBdHZCOHNQN0xFS3RMSAozVDdxN01MVW5TY2VEYk4y
SzJjRkhCc2wKLS0tIEd4YVc1SG1xVzdwSzJ3bFFVa3MzZHJwb2dXdGJIK0g4Vm11
M1FzamhaMmcKH/KIJXfHng0MxeqscwrjzgDzFvGJNkcTuQNgiMgRfHG7ANjxlTLg
1CgLejd2tpS0Qy65xzEdfyNytGulknVpw9bckuT9E1HcMUcZYUeOfjL76pjMmO1H
rxh6JhSaG6lQQglE4nUClBvqgEp0PEbiFPqvWY83ujADZb/S1UBKYodulmTnnYMX
JUTbggflfz49/kS7VUx1EotEM3C0ExcqOXXmbVuXVZZqgkpXfw8H84ZSzp8cf+bn
GYBd3/F/vEE=
-----END AGE ENCRYPTED FILE-----
27 changes: 27 additions & 0 deletions secrets/spotify.age
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IEc2d0ltdyA1VS92
VGNiVWFDYkZKNWFNM2VBcnVpVjV0Q2tSTWRTVXZ2UXFpUmVsK0hJCkRLMnhqN0h3
WWNpL0t4VHRndE9aV3c4bGJGV1hSVmtWVHJDeEp2OTJxaXMKLT4gc3NoLXJzYSAy
OWI5aVEKRHNWRDRodzhGU0RKK2JmTXc0YkZCcTRCQ1ZGSDVwZnJtOEhPd04zU3Rr
b2p5TnNLS25WdWl2TFRMOUlRbUlldQpJYVRUQXBJY1h2OWowVExhY2tKa01oREF0
TnRxdWpDY1VXeDZqNjRMQkxpSE5Rd2F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TCwMlrk8bkcHLYiJkpe12XWFURpTT
AgklwVIBABsxv0cB0fYPFLHOohH78nF8Ww4HPTw0QwzIQA2zMcrMpmhPMFxv26xD
mTovt5AaNqJyoHkfWCONjI37sKHIZoth7eoGWyivhpcO+mMN1EUdI6asAMwQol5l
8Xqrx84mhpZD72bwNDUn9t1C5JS+GIMkf01zI8o=
-----END AGE ENCRYPTED FILE-----
23 changes: 22 additions & 1 deletion system/core/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,31 @@
"nix/flake-channels/home-manager".source = inputs.home-manager;
};

systemPackages = with pkgs; [git deadnix alejandra statix inputs.nh.packages.${pkgs.system}.default nix-output-monitor];
systemPackages = with pkgs; [
git
deadnix
alejandra
statix
inputs.nh.packages.${pkgs.system}.default
nix-output-monitor
inputs.ragenix.packages."${system}".default
];
defaultPackages = [];
};

# secrets
age.secrets.spotify = {
file = ../../secrets/spotify.age;
owner = "sioodmy";
group = "users";
};
age.secrets.spotify-tui = {
file = ../../secrets/spotify-tui.age;
path = "/home/sioodmy/.config/spotify-tui/client.yml";
owner = "sioodmy";
group = "users";
};

nh = {
enable = true;
clean.enable = true;
Expand Down

0 comments on commit 5eb3c45

Please sign in to comment.