mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-19 17:28:49 +02:00
chore: Improve formatting
This commit is contained in:
parent
1f1670ac54
commit
46f778107b
12
flake.nix
12
flake.nix
@ -60,14 +60,22 @@
|
||||
value =
|
||||
let
|
||||
directory = replaceStrings flakeOutputs flakeDirectories attributeName;
|
||||
|
||||
attributeValue = (listToAttrs
|
||||
(map
|
||||
(file: {
|
||||
name = replaceStrings [ ".nix" ] [ "" ] file;
|
||||
value = if directory == packageDirectory then callPackage ./${directory}/${file} { } else import ./${directory}/${file};
|
||||
value =
|
||||
if directory == packageDirectory
|
||||
then callPackage ./${directory}/${file} { }
|
||||
else import ./${directory}/${file};
|
||||
})
|
||||
(attrNames (readDir ./${directory}))));
|
||||
attributeSet = if directory == packageDirectory then { x86_64-linux = attributeValue; } else attributeValue;
|
||||
|
||||
attributeSet =
|
||||
if directory == packageDirectory
|
||||
then { x86_64-linux = attributeValue; }
|
||||
else attributeValue;
|
||||
in
|
||||
(attributeSet);
|
||||
})
|
||||
|
@ -3,9 +3,10 @@
|
||||
let
|
||||
inherit (config.home) homeDirectory;
|
||||
inherit (config.xdg.userDirs) download documents music pictures videos;
|
||||
inherit (pkgs) eww;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ eww ];
|
||||
home.packages = [ eww ];
|
||||
|
||||
xdg.configFile."eww/eww.yuck".text = /* yuck */ ''
|
||||
(defwidget icons []
|
||||
|
@ -1,7 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (pkgs) gsettings-desktop-schemas prisma-engines gtk3;
|
||||
in
|
||||
{
|
||||
xdg.configFile."fish/config.fish".text = with pkgs; /* fish */ ''
|
||||
xdg.configFile."fish/config.fish".text = /* fish */ ''
|
||||
set -U fish_greeting ""
|
||||
|
||||
export PATH="$HOME/.deno/bin:$HOME/.cargo/bin:$HOME/.yarn/bin:$HOME/.local/bin:$HOME/.go/bin:$PATH"
|
||||
@ -33,31 +36,31 @@
|
||||
|
||||
# Convert unnecessarily large wav files to flac
|
||||
function wav2flac
|
||||
set ORIGINAL_SIZE (du -hs | cut -f1)
|
||||
set ORIGINAL_SIZE (du -hs | cut -f1)
|
||||
|
||||
fd -e wav -x ffmpeg -i "{}" -loglevel quiet -stats "{.}.flac"
|
||||
fd -e wav -X trash
|
||||
fd -e wav -x ffmpeg -i "{}" -loglevel quiet -stats "{.}.flac"
|
||||
fd -e wav -X trash
|
||||
|
||||
set NEW_SIZE (du -hs | cut -f1)
|
||||
set NEW_SIZE (du -hs | cut -f1)
|
||||
|
||||
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
||||
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
||||
end
|
||||
|
||||
# Convert wav/flac to opus
|
||||
function opus
|
||||
set ORIGINAL_SIZE (du -hs | cut -f1)
|
||||
set ORIGINAL_SIZE (du -hs | cut -f1)
|
||||
|
||||
fd -e wav -e flac -x ffmpeg -i "{}" -c:a libopus -b:a 128K -loglevel quiet -stats "{.}.opus"
|
||||
fd -e wav -e flac -X rm -I
|
||||
fd -e wav -e flac -x ffmpeg -i "{}" -c:a libopus -b:a 128K -loglevel quiet -stats "{.}.opus"
|
||||
fd -e wav -e flac -X rm -I
|
||||
|
||||
set NEW_SIZE (du -hs | cut -f1)
|
||||
set NEW_SIZE (du -hs | cut -f1)
|
||||
|
||||
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
||||
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
||||
end
|
||||
|
||||
# Always use kitty ssh since it's our default terminal
|
||||
if string match -qe -- "/dev/pts/" (tty)
|
||||
alias ssh="kitty +kitten ssh"
|
||||
alias ssh="kitty +kitten ssh"
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
@ -1,12 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) attrValues;
|
||||
inherit (pkgs) tig mgitstatus;
|
||||
in
|
||||
{
|
||||
home.packages = attrValues {
|
||||
inherit (pkgs) tig mgitstatus;
|
||||
};
|
||||
home.packages = [ tig mgitstatus ];
|
||||
|
||||
xdg.configFile."tig/config".text = ''
|
||||
color cursor black green bold
|
||||
|
@ -1,11 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (pkgs) hyprdim hyprnome hypridle hyprlock swww grimblast polkit_gnome;
|
||||
|
||||
opacity = "0.95";
|
||||
super = "SUPER";
|
||||
|
||||
raiseVolumeScript = "hypr/raise-volume.fish";
|
||||
lowerVolumeScript = "hypr/lower-volume.fish";
|
||||
gapsScript = "hypr/gaps.sh";
|
||||
randomBackgroundScript = "hypr/random-bg.fish";
|
||||
swapBackgroundScript = "hypr/swap-bg.fish";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
home.packages = [
|
||||
hyprdim
|
||||
hyprnome
|
||||
hypridle
|
||||
@ -49,11 +57,11 @@ in
|
||||
"ironbar"
|
||||
"fcitx5"
|
||||
"hyprctl dispatch workspace 5000000"
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
"${polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
"hyprdim --no-dim-when-only --persist --ignore-leaving-special --dialog-dim"
|
||||
"hypridle"
|
||||
"sleep 1 && eww open desktop-icons"
|
||||
"~/.config/hypr/random-bg.fish"
|
||||
"~/.config/${randomBackgroundScript}"
|
||||
];
|
||||
|
||||
input = {
|
||||
@ -180,15 +188,15 @@ in
|
||||
bind = [
|
||||
"${super}_SHIFT, Return, exec, kitty"
|
||||
"${super}_SHIFT, Q, killactive"
|
||||
"${super}, W, exec, ~/.config/hypr/random-bg.fish"
|
||||
"${super}_SHIFT, W, exec, ~/.config/hypr/swap-bg.fish"
|
||||
"${super}, W, exec, ~/.config/${randomBackgroundScript}"
|
||||
"${super}_SHIFT, W, exec, ~/.config/${swapBackgroundScript}"
|
||||
"${super}, P, exec, dunstify --icon=$(grimblast save screen) Screenshot Captured."
|
||||
", Print, exec, grimblast --freeze copy area"
|
||||
"${super}_ALT, delete, exit"
|
||||
"${super}, T, exec, tessen"
|
||||
"${super}, V, togglefloating"
|
||||
"${super}, B, centerwindow"
|
||||
"${super}, U, exec, ~/.config/hypr/gaps.sh"
|
||||
"${super}, U, exec, ~/.config/${gapsScript}"
|
||||
"${super}, X, pin"
|
||||
"${super}, F, fullscreen"
|
||||
"${super}, S, swapactiveworkspaces, 0 1"
|
||||
@ -245,8 +253,8 @@ in
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 \"Muted\" \"$(wpctl get-volume @DEFAULT_AUDIO_SINK@)\""
|
||||
", XF86AudioRaiseVolume, exec, ~/.config/hypr/raise-volume.fish"
|
||||
", XF86AudioLowerVolume, exec, ~/.config/hypr/lower-volume.fish"
|
||||
", XF86AudioRaiseVolume, exec, ~/.config/${raiseVolumeScript}"
|
||||
", XF86AudioLowerVolume, exec, ~/.config/${lowerVolumeScript}"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 \"Decreased brightness to\" \"$(brightnessctl get)\""
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 \"Increased brightness to\" \"$(brightnessctl get)\""
|
||||
];
|
||||
@ -260,7 +268,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/gaps.sh" = {
|
||||
xdg.configFile.${gapsScript} = {
|
||||
executable = true;
|
||||
text = /* bash */ ''
|
||||
#!/usr/bin/env bash
|
||||
@ -271,7 +279,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/raise-volume.fish" = {
|
||||
xdg.configFile.${raiseVolumeScript} = {
|
||||
executable = true;
|
||||
text = /* fish */ ''
|
||||
#!/usr/bin/env fish
|
||||
@ -284,7 +292,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/lower-volume.fish" = {
|
||||
xdg.configFile.${lowerVolumeScript} = {
|
||||
executable = true;
|
||||
text = /* fish */ ''
|
||||
#!/usr/bin/env fish
|
||||
@ -323,7 +331,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/random-bg.fish" = {
|
||||
xdg.configFile.${randomBackgroundScript} = {
|
||||
executable = true;
|
||||
text = /* fish */ ''
|
||||
#!/usr/bin/env fish
|
||||
@ -336,7 +344,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/swap-bg.fish" = {
|
||||
xdg.configFile.${swapBackgroundScript} = {
|
||||
executable = true;
|
||||
text = /* fish */ ''
|
||||
#!/usr/bin/env fish
|
||||
|
Loading…
x
Reference in New Issue
Block a user