move to using home-manager configured mpv

This commit is contained in:
Chris Cochrun 2024-12-25 07:07:18 -06:00
parent 1b8bee2df6
commit 18e2664c36

View file

@ -1,9 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
laptop = builtins.readFile "/etc/hostname" == "syl\n"; laptop = builtins.readFile "/etc/hostname" == ''
in syl
{ '';
in {
imports = [ imports = [
./modules/hyprland.nix ./modules/hyprland.nix
# ags.homeManagerModules.default # ags.homeManagerModules.default
@ -43,15 +44,11 @@ in
enable = true; enable = true;
config = { config = {
common = { common = {
default = [ default = [ pkgs.xdg-desktop-portal-kde ];
pkgs.xdg-desktop-portal-kde
];
"org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; "org.freedesktop.impl.portal.FileChooser" = [ "kde" ];
}; };
hyprland = { hyprland = {
default = [ default = [ "hyprland" ];
"hyprland"
];
"org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; "org.freedesktop.impl.portal.FileChooser" = [ "kde" ];
}; };
}; };
@ -136,9 +133,7 @@ in
# ''; # '';
# }; # };
programs.gpg = { programs.gpg = { enable = true; };
enable = true;
};
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
@ -148,9 +143,7 @@ in
# ''; # '';
}; };
qt = { qt = { enable = true; };
enable = true;
};
accounts.email = { accounts.email = {
maildirBasePath = "mail"; maildirBasePath = "mail";
@ -214,9 +207,7 @@ in
create = "maildir"; create = "maildir";
remove = "both"; remove = "both";
expunge = "both"; expunge = "both";
extraConfig.account = { extraConfig.account = { AuthMechs = "XOAUTH2"; };
AuthMechs = "XOAUTH2";
};
}; };
maildir.path = "office"; maildir.path = "office";
signature = { signature = {
@ -239,8 +230,7 @@ in
userEmail = "chris@cochrun.xyz"; userEmail = "chris@cochrun.xyz";
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [ ];
];
programs.mu.enable = true; programs.mu.enable = true;
@ -256,8 +246,57 @@ in
plugins = [ pkgs.obs-studio-plugins.obs-move-transition ]; plugins = [ pkgs.obs-studio-plugins.obs-move-transition ];
}; };
home.file.".config/mpv" = { # home.file.".config/mpv" = {
source = ../.config/mpv; # source = ../.config/mpv;
# };
programs.mpv = {
enable = true;
scripts = with pkgs.mpvScripts; [
thumbfast
videoclip
mpris
quality-menu
modernx
modernx-zydezu
sponsorblock
];
config = {
osc = "no";
vo = "gpu";
af = "scaletempo2";
input-ipc-server = "/tmp/mpvsocket";
hwdec = "auto";
rtsp-transport = "udp";
speed = 1.95;
gpu-context = "wayland";
ytdl-format =
"bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
};
profiles = {
fast.speed = 1.95;
slow.speed = 1;
wc = {
speed = 1;
osd-level = 0;
load-scripts = "no";
profile = "low-latency";
demuxer-lavf-format = "video4linux2";
demuxer-lavf-o-set =
"input_format=mjpeg,video_size=1920x1080,framerate=60";
fps = 60;
};
};
scriptOpts = {
videoclip = {
video_folder_path = "/home/chris/vids";
audio_folder_path = "/home/chris/music";
};
};
}; };
# home.file.".config/ags" = { # home.file.".config/ags" = {
@ -280,28 +319,39 @@ in
settings = { settings = {
devices = { devices = {
kaladin = { kaladin = {
id = (if laptop then "PMB4FRV-2CAPFCQ-UFELVNI-YAQRRHE-MMMXQ4P-RXEXBZV-QEUL6QN-KZEW5AM" else ""); id = (if laptop then
"PMB4FRV-2CAPFCQ-UFELVNI-YAQRRHE-MMMXQ4P-RXEXBZV-QEUL6QN-KZEW5AM"
else
"");
}; };
syl = { syl = {
id = (if laptop then "" else "AJMADOK-TENODAA-VSOEW2A-4RXY2XI-YNHIS7H-H3ZYAO5-3UQ64EE-O2N5BAY"); id = (if laptop then
""
else
"AJMADOK-TENODAA-VSOEW2A-4RXY2XI-YNHIS7H-H3ZYAO5-3UQ64EE-O2N5BAY");
}; };
shadow = { shadow = {
id = "B24VU6Z-URTMEXN-ZYKRWX7-XWSTHXD-XKX67EB-XSKMT4V-KWKGX7Q-W7DB2QV"; id =
"B24VU6Z-URTMEXN-ZYKRWX7-XWSTHXD-XKX67EB-XSKMT4V-KWKGX7Q-W7DB2QV";
}; };
tablet = { tablet = {
id = "4HEXCNH-MCVBZQX-LQ735TG-P2VTJ7N-CZ5MK4P-ICZAPC7-YCXVEWV-7NILMA5"; id =
"4HEXCNH-MCVBZQX-LQ735TG-P2VTJ7N-CZ5MK4P-ICZAPC7-YCXVEWV-7NILMA5";
}; };
kohlin = { kohlin = {
id = "BSWKBRR-2IJBCHA-UQY7DE7-CV2U2IL-PMFQFCJ-D5ZZJMU-FPYRUPC-MCC32QQ"; id =
"BSWKBRR-2IJBCHA-UQY7DE7-CV2U2IL-PMFQFCJ-D5ZZJMU-FPYRUPC-MCC32QQ";
}; };
dalinar = { dalinar = {
id = "MPRMA33-XHW6SRE-D2EDBCP-TSMRNGI-ZCE2TAN-FE4BMKA-PSKGYJW-CRIEJQL"; id =
"MPRMA33-XHW6SRE-D2EDBCP-TSMRNGI-ZCE2TAN-FE4BMKA-PSKGYJW-CRIEJQL";
}; };
}; };
folders = { folders = {
docs = { docs = {
path = "${config.home.homeDirectory}/docs"; path = "${config.home.homeDirectory}/docs";
devices = [ (if laptop then "kaladin" else "syl") "shadow" "dalinar" ]; devices =
[ (if laptop then "kaladin" else "syl") "shadow" "dalinar" ];
# versioning = { # versioning = {
# type = "staggered"; # type = "staggered";
# fsPath = "~/.local/share/syncthing/backup"; # fsPath = "~/.local/share/syncthing/backup";
@ -314,7 +364,8 @@ in
music = { music = {
id = "teqqy-rzvec"; id = "teqqy-rzvec";
path = "${config.home.homeDirectory}/music"; path = "${config.home.homeDirectory}/music";
devices = [ "dalinar" (if laptop then "kaladin" else "syl") "shadow" ]; devices =
[ "dalinar" (if laptop then "kaladin" else "syl") "shadow" ];
}; };
}; };
}; };
@ -430,9 +481,7 @@ in
}; };
dconf.settings = { dconf.settings = {
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; };
color-scheme = "prefer-dark";
};
}; };
gtk = { gtk = {
@ -467,9 +516,7 @@ in
}; };
}; };
services.cliphist = { services.cliphist = { enable = true; };
enable = true;
};
home.file.".config/bottom" = { home.file.".config/bottom" = {
source = ../.config/bottom; source = ../.config/bottom;
@ -484,10 +531,8 @@ in
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.firefox-wayland.override { package = pkgs.firefox-wayland.override {
nativeMessagingHosts = [ nativeMessagingHosts =
pkgs.plasma-browser-integration [ pkgs.plasma-browser-integration pkgs.tridactyl-native ];
pkgs.tridactyl-native
];
}; };
profiles.chris = { profiles.chris = {
name = "default"; name = "default";
@ -501,24 +546,21 @@ in
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
output = ["DP-1" "eDP-1"]; output = [ "DP-1" "eDP-1" ];
position = if laptop then "bottom" else "top"; position = if laptop then "bottom" else "top";
height = 35; height = 35;
width = if laptop then 1300 else 2100; width = if laptop then 1300 else 2100;
# Choose the order of the modules "custom/wintitle", # Choose the order of the modules "custom/wintitle",
modules-left = ["hyprland/workspaces" "hyprland/window"]; modules-left = [ "hyprland/workspaces" "hyprland/window" ];
modules-center = ["clock"]; modules-center = [ "clock" ];
modules-right = ["pulseaudio" "backlight" "disk" "memory" "cpu" "battery" "tray"]; modules-right =
[ "pulseaudio" "backlight" "disk" "memory" "cpu" "battery" "tray" ];
margin-top = if laptop then -5 else 5; margin-top = if laptop then -5 else 5;
margin-bottom = if laptop then 8 else 0; margin-bottom = if laptop then 8 else 0;
margin-left = 6; margin-left = 6;
margin-right = 6; margin-right = 6;
"hyprland/window" = { "hyprland/window" = { format = " <span style='italic'>{}</span>"; };
format = " <span style='italic'>{}</span>"; workspaces = { format = " {name} "; };
};
workspaces = {
format = " {name} ";
};
"hyprland/workspaces" = { "hyprland/workspaces" = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
@ -541,28 +583,26 @@ in
spacing = 10; spacing = 10;
}; };
clock = { clock = {
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
format-alt = "{:%Y-%m-%d}"; format-alt = "{:%Y-%m-%d}";
format = "{:%a %b %e, %I:%M %p}"; format = "{:%a %b %e, %I:%M %p}";
}; };
cpu = { cpu = { format = " {usage}%"; };
format = " {usage}%"; memory = { format = " {}%"; };
};
memory = {
format = " {}%";
};
temperature = { temperature = {
# "thermal-zone": 2, # "thermal-zone": 2,
# "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", # "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
critical-threshold = 80; critical-threshold = 80;
# "format-critical": "{temperatureC}°C {icon}", # "format-critical": "{temperatureC}°C {icon}",
format = "{icon} {temperatureC}°C"; format = "{icon} {temperatureC}°C";
format-icons = ["" "" ""]; format-icons = [ "" "" "" ];
}; };
backlight = { backlight = {
# "device": "acpi_video1", # "device": "acpi_video1",
format = "{icon} {PERCENT}%"; format = "{icon} {PERCENT}%";
format-icons = ["" ""]; format-icons = [ "" "" ];
}; };
disk = { disk = {
format = "󰋊 {percentage_used}%"; format = "󰋊 {percentage_used}%";
@ -580,8 +620,8 @@ in
format-alt = "{time} {icon}"; format-alt = "{time} {icon}";
format-good = "{icon} {capacity}%"; format-good = "{icon} {capacity}%";
format-full = "󰁹 {capacity}%"; format-full = "󰁹 {capacity}%";
format-icons = ["󰁺" "󰁼" "󰁾" "󰂀" "󰂂"]; format-icons = [ "󰁺" "󰁼" "󰁾" "󰂀" "󰂂" ];
format-charging-icons = ["󰢜" "󰂇" "󰢝" "󰢞" "󰂋"]; format-charging-icons = [ "󰢜" "󰂇" "󰢝" "󰢞" "󰂋" ];
}; };
network = { network = {
# "interface": "wlp2*", // (Optional) To force the use of this interface # "interface": "wlp2*", // (Optional) To force the use of this interface
@ -598,37 +638,37 @@ in
format-source = ""; format-source = "";
format-source-muted = ""; format-source-muted = "";
format-icons = { format-icons = {
headphone = ["" "" ""]; headphone = [ "" "" "" ];
phone = ""; phone = "";
portable = ""; portable = "";
car = ""; car = "";
default = ["" "" ""]; default = [ "" "" "" ];
}; };
on-click = "alacritty --class pulsemixer -e pulsemixer"; on-click = "alacritty --class pulsemixer -e pulsemixer";
ignored-sinks = ["Easy Effects Sink"]; ignored-sinks = [ "Easy Effects Sink" ];
}; };
}; };
}; };
style = '' style = ''
@define-color base00 #282a36; @define-color base00 #282a36;
@define-color base01 #34353e; @define-color base01 #34353e;
@define-color base02 #43454f; @define-color base02 #43454f;
@define-color base03 #78787e; @define-color base03 #78787e;
@define-color base04 #a5a5a9; @define-color base04 #a5a5a9;
@define-color base05 #e2e4e5; @define-color base05 #e2e4e5;
@define-color base06 #eff0eb; @define-color base06 #eff0eb;
@define-color base07 #f1f1f0; @define-color base07 #f1f1f0;
@define-color base08 #ff5c57; @define-color base08 #ff5c57;
@define-color base09 #ff9f43; @define-color base09 #ff9f43;
@define-color base0A #f3f99d; @define-color base0A #f3f99d;
@define-color base0B #5af78e; @define-color base0B #5af78e;
@define-color base0C #9aedfe; @define-color base0C #9aedfe;
@define-color base0D #57c7ff; @define-color base0D #57c7ff;
@define-color base0E #ff6ac1; @define-color base0E #ff6ac1;
@define-color base0F #b2643c; @define-color base0F #b2643c;
@define-color basetransparent rgba(40, 42, 54, 0.0); @define-color basetransparent rgba(40, 42, 54, 0.0);
@define-color backtransparent rgba(40, 42, 54, 0.7); @define-color backtransparent rgba(40, 42, 54, 0.7);
* { * {
border: 1px; border: 1px;
border-radius: 20px; border-radius: 20px;
font-family: VictorMono Nerd Font; font-family: VictorMono Nerd Font;
@ -639,15 +679,15 @@ in
transition-duration: 0s; transition-duration: 0s;
padding-top: 0px; padding-top: 0px;
padding-bottom: 0px; padding-bottom: 0px;
} }
window { window {
background: transparent; background: transparent;
/* border-radius: 20px; */ /* border-radius: 20px; */
} }
window#waybar > box { window#waybar > box {
padding-top: 5px; padding-top: 5px;
padding-bottom: 3px; padding-bottom: 3px;
padding-left: 3px; padding-left: 3px;
@ -656,80 +696,80 @@ window#waybar > box {
box-shadow: 5px 5px 4px 4px #202020; box-shadow: 5px 5px 4px 4px #202020;
margin: 12px 14px 14px 14px; margin: 12px 14px 14px 14px;
background: @backtransparent; background: @backtransparent;
} }
tooltip { tooltip {
background: @base00; background: @base00;
border: 1px solid @base0D; border: 1px solid @base0D;
} }
tooltip label { tooltip label {
padding: 10px; padding: 10px;
} }
#workspaces { #workspaces {
border-radius: 20px; border-radius: 20px;
margin-left: 10px; margin-left: 10px;
padding-right: 10px; padding-right: 10px;
background: transparent; background: transparent;
transition: none; transition: none;
color: @base0C; color: @base0C;
} }
#tags { #tags {
border-radius: 20px; border-radius: 20px;
margin-left: 6px; margin-left: 6px;
padding-right: 10px; padding-right: 10px;
background: transparent; background: transparent;
transition: none; transition: none;
} }
#workspaces button { #workspaces button {
padding: 0 0.7em; padding: 0 0.7em;
transition: none; transition: none;
color: rgba(217, 216, 216, 0.4); color: rgba(217, 216, 216, 0.4);
background: transparent; background: transparent;
} }
#tags button { #tags button {
transition: none; transition: none;
color: rgba(217, 216, 216, 0.4); color: rgba(217, 216, 216, 0.4);
background: transparent; background: transparent;
} }
#workspaces button.visible { #workspaces button.visible {
color: @base0C; color: @base0C;
} }
#tags button.occupied { #tags button.occupied {
color: rgba(217, 216, 216, 1); color: rgba(217, 216, 216, 1);
} }
#workspaces button.focused { #workspaces button.focused {
color: @base09; color: @base09;
} }
#tags button.focused { #tags button.focused {
color: @base0C; color: @base0C;
} }
#workspaces button:hover { #workspaces button:hover {
transition: none; transition: none;
box-shadow: inherit; box-shadow: inherit;
text-shadow: inherit; text-shadow: inherit;
color: @base0E; color: @base0E;
} }
#workspaces button.urgent { #workspaces button.urgent {
color: @base08; color: @base08;
} }
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #disk, #custom-weather, #custom-mail { #mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #disk, #custom-weather, #custom-mail {
margin: 0px 3px 0px 3px; margin: 0px 3px 0px 3px;
/* min-width: 25px; */ /* min-width: 25px; */
} }
#clock { #clock {
margin-left: 2px; margin-left: 2px;
margin-right: 2px; margin-right: 2px;
padding-left: 10px; padding-left: 10px;
@ -738,9 +778,9 @@ tooltip label {
transition: none; transition: none;
color: @base0B; color: @base0B;
background: transparent; background: transparent;
} }
#backlight { #backlight {
margin-left: 2px; margin-left: 2px;
margin-right: 2px; margin-right: 2px;
padding-left: 5px; padding-left: 5px;
@ -749,86 +789,86 @@ tooltip label {
transition: none; transition: none;
color: @base08; color: @base08;
background: transparent; background: transparent;
} }
#battery.warning { #battery.warning {
color: @base09; color: @base09;
} }
#battery.critical { #battery.critical {
color: @base08; color: @base08;
} }
#battery.charging { #battery.charging {
color: @base0B; color: @base0B;
} }
#pulseaudio { #pulseaudio {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base09; color: @base09;
background: transparent; background: transparent;
} }
#network { #network {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base0B; color: @base0B;
background: transparent; background: transparent;
} }
#cpu { #cpu {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base09; color: @base09;
background: transparent; background: transparent;
} }
#battery { #battery {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base0D; color: @base0D;
background: transparent; background: transparent;
} }
#battery.bat2 { #battery.bat2 {
margin-right: 10px; margin-right: 10px;
} }
#memory { #memory {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base0C; color: @base0C;
background: transparent; background: transparent;
} }
#disk { #disk {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base0E; color: @base0E;
background: transparent; background: transparent;
} }
#tray { #tray {
padding-left: 15px; padding-left: 15px;
padding-right: 5px; padding-right: 5px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base0E; color: @base0E;
background: transparent; background: transparent;
} }
''; '';
}; };
@ -853,9 +893,7 @@ tooltip label {
# source = ../.config/fish/config.fish; # source = ../.config/fish/config.fish;
# }; # };
home.file.".config/fish/functions" = { home.file.".config/fish/functions" = { source = ../.config/fish/functions; };
source = ../.config/fish/functions;
};
# programs.ags = { # programs.ags = {
# enable = true; # enable = true;
@ -869,41 +907,41 @@ tooltip label {
programs.fish = { programs.fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
function fish_greeting -d "what's up, fish?" function fish_greeting -d "what's up, fish?"
# set_color $fish_color_autosuggestion[1] # set_color $fish_color_autosuggestion[1]
# uname -npsr # uname -npsr
# uptime # uptime
# set_color normal # set_color normal
end end
function fish_title function fish_title
if [ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ] if [ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ]
printf '(%s) %s' $_ (prompt_pwd) printf '(%s) %s' $_ (prompt_pwd)
else else
printf '(%s) %s' (basename "$VIRTUAL_ENV") (prompt_pwd) printf '(%s) %s' (basename "$VIRTUAL_ENV") (prompt_pwd)
end end
end end
function _prompt_whoami -a sep_color -a color -d "Display user@host if on a SSH session" function _prompt_whoami -a sep_color -a color -d "Display user@host if on a SSH session"
if set -q SSH_TTY if set -q SSH_TTY
echo -n -s $color (whoami)@(hostnamectl --static) $sep_color '|' echo -n -s $color (whoami)@(hostnamectl --static) $sep_color '|'
end end
end end
function _git_branch_name function _git_branch_name
echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||') echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end end
function _is_git_dirty function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty 2> /dev/null) echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end end
function _git_ahead_count -a remote -a branch_name function _git_ahead_count -a remote -a branch_name
echo (command git log $remote/$branch_name..HEAD 2> /dev/null | \ echo (command git log $remote/$branch_name..HEAD 2> /dev/null | \
grep '^commit' | wc -l | tr -d ' ') grep '^commit' | wc -l | tr -d ' ')
end end
function _git_dirty_remotes -a remote_color -a ahead_color function _git_dirty_remotes -a remote_color -a ahead_color
set current_branch (command git rev-parse --abbrev-ref HEAD 2> /dev/null) set current_branch (command git rev-parse --abbrev-ref HEAD 2> /dev/null)
set current_ref (command git rev-parse HEAD 2> /dev/null) set current_ref (command git rev-parse HEAD 2> /dev/null)
@ -922,9 +960,9 @@ function _git_dirty_remotes -a remote_color -a ahead_color
end end
end end
end end
end end
function _prompt_git -a gray normal orange red yellow function _prompt_git -a gray normal orange red yellow
test "$theme_display_git" = no; and return test "$theme_display_git" = no; and return
set -l git_branch (_git_branch_name) set -l git_branch (_git_branch_name)
test -z $git_branch; and return test -z $git_branch; and return
@ -938,14 +976,14 @@ function _prompt_git -a gray normal orange red yellow
else else
echo -n -s $gray '' $yellow $git_branch $red $dirty_remotes $gray ' ' echo -n -s $gray '' $yellow $git_branch $red $dirty_remotes $gray ' '
end end
end end
function _prompt_pwd function _prompt_pwd
set_color -o cyan set_color -o cyan
printf '%s' (prompt_pwd) printf '%s' (prompt_pwd)
end end
function _prompt_status_arrows -a exit_code function _prompt_status_arrows -a exit_code
if test $exit_code -ne 0 if test $exit_code -ne 0
set arrow_colors green set arrow_colors green
else else
@ -956,9 +994,9 @@ function _prompt_status_arrows -a exit_code
set_color $arrow_color set_color $arrow_color
printf '»' printf '»'
end end
end end
function fish_prompt function fish_prompt
set -l exit_code $status set -l exit_code $status
set -l gray (set_color 666) set -l gray (set_color 666)
@ -1002,9 +1040,9 @@ function fish_prompt
printf ' ' printf ' '
set_color normal set_color normal
end end
function fish_right_prompt function fish_right_prompt
set -l exit_code $status set -l exit_code $status
if test $exit_code -ne 0 if test $exit_code -ne 0
set_color red set_color red
@ -1017,22 +1055,22 @@ function fish_right_prompt
set_color -o 777 set_color -o 777
printf '%s' (date +%H:%M:%S) printf '%s' (date +%H:%M:%S)
set_color normal set_color normal
end end
### VI MODES ### VI MODES
# Emulates vim's cursor shape behavior # Emulates vim's cursor shape behavior
# Set the normal and visual mode cursors to a block # Set the normal and visual mode cursors to a block
set fish_cursor_default block set fish_cursor_default block
# Set the insert mode cursor to a line # Set the insert mode cursor to a line
set fish_cursor_insert line set fish_cursor_insert line
# Set the replace mode cursor to an underscore # Set the replace mode cursor to an underscore
set fish_cursor_replace_one underscore set fish_cursor_replace_one underscore
# The following variable can be used to configure cursor shape in # The following variable can be used to configure cursor shape in
# visual mode, but due to fish_cursor_default, is redundant here # visual mode, but due to fish_cursor_default, is redundant here
set fish_cursor_visual block set fish_cursor_visual block
### BANG BANG FUNCTIONS ### BANG BANG FUNCTIONS
function __history_previous_command function __history_previous_command
switch (commandline -t) switch (commandline -t)
case "!" case "!"
commandline -t $history[1] commandline -t $history[1]
@ -1040,9 +1078,9 @@ function __history_previous_command
case "*" case "*"
commandline -i ! commandline -i !
end end
end end
function __history_previous_command_arguments function __history_previous_command_arguments
switch (commandline -t) switch (commandline -t)
case "!" case "!"
commandline -t "" commandline -t ""
@ -1050,17 +1088,17 @@ function __history_previous_command_arguments
case "*" case "*"
commandline -i '$' commandline -i '$'
end end
end end
### bindings ### bindings
function fish_user_key_bindings function fish_user_key_bindings
fish_vi_key_bindings fish_vi_key_bindings
bind -M insert ! __history_previous_command bind -M insert ! __history_previous_command
bind -M insert '$' __history_previous_command_arguments bind -M insert '$' __history_previous_command_arguments
end end
# starship init fish | source # starship init fish | source
''; '';
}; };
@ -1111,9 +1149,7 @@ end
start_zellij start_zellij
''; '';
}; };
environmentVariables = { environmentVariables = { EDITOR = ''"emacsclient -t"''; };
EDITOR = "\"emacsclient -t\"";
};
}; };
# home.file.".config/dunst" = { # home.file.".config/dunst" = {
@ -1153,7 +1189,9 @@ end
sort = "yes"; sort = "yes";
font = "VictorMono Nerd Font 10"; font = "VictorMono Nerd Font 10";
markup = "full"; markup = "full";
format = "<b>%s</b>\n%b"; format = ''
<b>%s</b>
%b'';
alignment = "center"; alignment = "center";
vertical_alignment = "center"; vertical_alignment = "center";
corner_radius = 18; corner_radius = 18;
@ -1180,7 +1218,6 @@ end
}; };
}; };
programs.atuin = { programs.atuin = {
enable = true; enable = true;
enableNushellIntegration = false; enableNushellIntegration = false;
@ -1229,9 +1266,7 @@ end
# source = ../.config/alacritty; # source = ../.config/alacritty;
# }; # };
home.file.".config/picom.conf" = { home.file.".config/picom.conf" = { source = ../.config/picom.conf; };
source = ../.config/picom.conf;
};
# home.file.".config/networkmanager-dmenu/config.ini" = { # home.file.".config/networkmanager-dmenu/config.ini" = {
# source = ../networkmanager-dmenu/config.ini; # source = ../networkmanager-dmenu/config.ini;
@ -1256,7 +1291,7 @@ end
sysuse = "systemctl --user"; sysuse = "systemctl --user";
myip = "curl icanhazip.com"; myip = "curl icanhazip.com";
nixs = "nix search nixpkgs"; nixs = "nix search nixpkgs";
ytd = "yt-dlp -o \"~/vids/%(title)s.%(ext)s\" $1"; ytd = ''yt-dlp -o "~/vids/%(title)s.%(ext)s" $1'';
}; };
programs.alacritty = { programs.alacritty = {
@ -1340,31 +1375,21 @@ end
show_notifications = true; show_notifications = true;
min_time_to_notify = 20000; min_time_to_notify = 20000;
}; };
time = { time = { format = "| $time"; };
format = "| $time"; status = { format = "| $status"; };
};
status = {
format = "| $status";
};
scan_timeout = 10; scan_timeout = 10;
rust = { rust = { format = "[$symbol($version )]($style)"; };
format = "[$symbol($version )]($style)";
};
cmake = { cmake = {
format = ""; format = "";
disabled = true; disabled = true;
}; };
nix_shell = { nix_shell = {
format = "[$symbol$state( \($name\))]($style) "; format = "[$symbol$state( ($name))]($style) ";
impure_msg = " "; impure_msg = " ";
pure_msg = " "; pure_msg = " ";
}; };
hostname = { hostname = { format = "@[$ssh_symbol$hostname]($style) > '"; };
format = "@[$ssh_symbol$hostname]($style) > '"; git_branch = { format = "[$symbol$branch(:$remote_branch)]($style) "; };
};
git_branch = {
format = "[$symbol$branch(:$remote_branch)]($style) ";
};
git_status = { git_status = {
format = "[\\[$all_status$ahead_behind\\]]($style) |(dimmed gray) "; format = "[\\[$all_status$ahead_behind\\]]($style) |(dimmed gray) ";
}; };
@ -1416,7 +1441,7 @@ end
suspend = "systemctl suspend"; suspend = "systemctl suspend";
sysuse = "systemctl --user"; sysuse = "systemctl --user";
myip = "curl icanhazip.com"; myip = "curl icanhazip.com";
ytd = "yt-dlp -o \"~/vids/%(title)s.%(ext)s\" $1"; ytd = ''yt-dlp -o "~/vids/%(title)s.%(ext)s" $1'';
}; };
initExtra = '' initExtra = ''
macchina macchina
@ -1430,7 +1455,13 @@ end
exec = "alacritty -e mpv --profile=slow %U"; exec = "alacritty -e mpv --profile=slow %U";
terminal = true; terminal = true;
categories = [ "Application" ]; categories = [ "Application" ];
mimeType = [ "audio/ogg" "audio/mpeg" "audio/opus" "audio/x-opus+ogg" "audio/x-wav" ]; mimeType = [
"audio/ogg"
"audio/mpeg"
"audio/opus"
"audio/x-opus+ogg"
"audio/x-wav"
];
}; };
imv-rifle = { imv-rifle = {
name = "IMV"; name = "IMV";
@ -1450,12 +1481,11 @@ end
}; };
Service = { Service = {
ExecStart = "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotools"; ExecStart =
"/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotools";
}; };
Install = { Install = { WantedBy = [ "default.target" ]; };
WantedBy = ["default.target"];
};
}; };
jellyfin-mpv-shim = { jellyfin-mpv-shim = {
@ -1464,13 +1494,9 @@ end
After = "graphical-session-pre.target"; After = "graphical-session-pre.target";
}; };
Service = { Service = { ExecStart = "/run/current-system/sw/bin/jellyfin-mpv-shim"; };
ExecStart = "/run/current-system/sw/bin/jellyfin-mpv-shim";
};
Install = { Install = { WantedBy = [ "graphical-session.target" ]; };
WantedBy = ["graphical-session.target"];
};
}; };
# nextcloud-client = { # nextcloud-client = {