diff --git a/home/home.nix b/home/home.nix index d11a27f..c06499e 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,9 +1,10 @@ { config, lib, pkgs, ... }: let - laptop = builtins.readFile "/etc/hostname" == "syl\n"; -in -{ + laptop = builtins.readFile "/etc/hostname" == '' + syl + ''; +in { imports = [ ./modules/hyprland.nix # ags.homeManagerModules.default @@ -40,92 +41,88 @@ in videos = "${config.home.homeDirectory}/vids"; }; portal = { - enable = true; - config = { - common = { - default = [ - pkgs.xdg-desktop-portal-kde - ]; - "org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; + enable = true; + config = { + common = { + default = [ pkgs.xdg-desktop-portal-kde ]; + "org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; + }; + hyprland = { + default = [ "hyprland" ]; + "org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; + }; }; - hyprland = { - default = [ - "hyprland" - ]; - "org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; - }; - }; - extraPortals = [ pkgs.xdg-desktop-portal-kde ]; + extraPortals = [ pkgs.xdg-desktop-portal-kde ]; }; mimeApps = { - enable = true; - associations.added = { - "video/mp4" = "mpv.desktop"; - "video/webm" = "mpv.desktop"; - "video/mkv" = "mpv.desktop"; - "video/x-matroska" = "mpv.desktop"; - "video/quicktime" = "mpv.desktop"; - "video/mpeg" = "mpv.desktop"; - "video/ogg" = "mpv.desktop"; - "video/VP9" = "mpv.desktop"; - "video/VP8" = "mpv.desktop"; - "video/AV1" = "mpv.desktop"; - "video/H265" = "mpv.desktop"; - "video/H264" = "mpv.desktop"; - "video/vnd.youtube.yt" = "mpv.desktop"; - "inode/directory" = "dolphin.desktop"; - "image/gif" = "imv-rifle.desktop"; - "image/jpeg" = "imv-rifle.desktop"; - "image/heif" = "imv-rifle.desktop"; - "image/png" = "imv-rifle.desktop"; - "image/webp" = "imv-rifle.desktop"; - "audio/vorbis" = "mpv-slow.desktop"; - "audio/mp3" = "mpv-slow.desktop"; - "audio/m4a" = "mpv-slow.desktop"; - "audio/flac" = "mpv-slow.desktop"; - "audio/wav" = "mpv-slow.desktop"; - "audio/opus" = "mpv-slow.desktop"; - "audio/x-opus" = "mpv-slow.desktop"; - "audio/x-opus+ogg" = "mpv-slow.desktop"; - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "text/html" = "firefox.desktop"; - "x-scheme-handler/about" = "firefox.desktop"; - "x-scheme-handler/unknown" = "firefox.desktop"; - }; - defaultApplications = { - "video/mp4" = "mpv.desktop"; - "video/webm" = "mpv.desktop"; - "video/mkv" = "mpv.desktop"; - "video/x-matroska" = "mpv.desktop"; - "video/quicktime" = "mpv.desktop"; - "video/mpeg" = "mpv.desktop"; - "video/ogg" = "mpv.desktop"; - "video/VP9" = "mpv.desktop"; - "video/VP8" = "mpv.desktop"; - "video/AV1" = "mpv.desktop"; - "video/H265" = "mpv.desktop"; - "video/H264" = "mpv.desktop"; - "video/vnd.youtube.yt" = "mpv.desktop"; - "inode/directory" = "dolphin.desktop"; - "image/gif" = "imv-rifle.desktop"; - "image/jpeg" = "imv-rifle.desktop"; - "image/heif" = "imv-rifle.desktop"; - "image/png" = "imv-rifle.desktop"; - "image/webp" = "imv-rifle.desktop"; - "audio/vorbis" = "mpv-slow.desktop"; - "audio/mp3" = "mpv-slow.desktop"; - "audio/m4a" = "mpv-slow.desktop"; - "audio/flac" = "mpv-slow.desktop"; - "audio/wav" = "mpv-slow.desktop"; - "audio/opus" = "mpv-slow.desktop"; - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "text/html" = "firefox.desktop"; - "x-scheme-handler/about" = "firefox.desktop"; - "x-scheme-handler/unknown" = "firefox.desktop"; - }; - }; + enable = true; + associations.added = { + "video/mp4" = "mpv.desktop"; + "video/webm" = "mpv.desktop"; + "video/mkv" = "mpv.desktop"; + "video/x-matroska" = "mpv.desktop"; + "video/quicktime" = "mpv.desktop"; + "video/mpeg" = "mpv.desktop"; + "video/ogg" = "mpv.desktop"; + "video/VP9" = "mpv.desktop"; + "video/VP8" = "mpv.desktop"; + "video/AV1" = "mpv.desktop"; + "video/H265" = "mpv.desktop"; + "video/H264" = "mpv.desktop"; + "video/vnd.youtube.yt" = "mpv.desktop"; + "inode/directory" = "dolphin.desktop"; + "image/gif" = "imv-rifle.desktop"; + "image/jpeg" = "imv-rifle.desktop"; + "image/heif" = "imv-rifle.desktop"; + "image/png" = "imv-rifle.desktop"; + "image/webp" = "imv-rifle.desktop"; + "audio/vorbis" = "mpv-slow.desktop"; + "audio/mp3" = "mpv-slow.desktop"; + "audio/m4a" = "mpv-slow.desktop"; + "audio/flac" = "mpv-slow.desktop"; + "audio/wav" = "mpv-slow.desktop"; + "audio/opus" = "mpv-slow.desktop"; + "audio/x-opus" = "mpv-slow.desktop"; + "audio/x-opus+ogg" = "mpv-slow.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "text/html" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + defaultApplications = { + "video/mp4" = "mpv.desktop"; + "video/webm" = "mpv.desktop"; + "video/mkv" = "mpv.desktop"; + "video/x-matroska" = "mpv.desktop"; + "video/quicktime" = "mpv.desktop"; + "video/mpeg" = "mpv.desktop"; + "video/ogg" = "mpv.desktop"; + "video/VP9" = "mpv.desktop"; + "video/VP8" = "mpv.desktop"; + "video/AV1" = "mpv.desktop"; + "video/H265" = "mpv.desktop"; + "video/H264" = "mpv.desktop"; + "video/vnd.youtube.yt" = "mpv.desktop"; + "inode/directory" = "dolphin.desktop"; + "image/gif" = "imv-rifle.desktop"; + "image/jpeg" = "imv-rifle.desktop"; + "image/heif" = "imv-rifle.desktop"; + "image/png" = "imv-rifle.desktop"; + "image/webp" = "imv-rifle.desktop"; + "audio/vorbis" = "mpv-slow.desktop"; + "audio/mp3" = "mpv-slow.desktop"; + "audio/m4a" = "mpv-slow.desktop"; + "audio/flac" = "mpv-slow.desktop"; + "audio/wav" = "mpv-slow.desktop"; + "audio/opus" = "mpv-slow.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "text/html" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + }; }; @@ -136,9 +133,7 @@ in # ''; # }; - programs.gpg = { - enable = true; - }; + programs.gpg = { enable = true; }; services.gpg-agent = { enable = true; @@ -148,9 +143,7 @@ in # ''; }; - qt = { - enable = true; - }; + qt = { enable = true; }; accounts.email = { maildirBasePath = "mail"; @@ -166,11 +159,11 @@ in realName = "Chris Cochrun"; signature = { text = '' - Praising God in all things, - Chris Cochrun + Praising God in all things, + Chris Cochrun ''; delimiter = '' - *** + *** ''; showSignature = "append"; }; @@ -214,18 +207,16 @@ in create = "maildir"; remove = "both"; expunge = "both"; - extraConfig.account = { - AuthMechs = "XOAUTH2"; - }; + extraConfig.account = { AuthMechs = "XOAUTH2"; }; }; maildir.path = "office"; signature = { text = '' - Praising God in all things, - Chris Cochrun + Praising God in all things, + Chris Cochrun ''; delimiter = '' - *** + *** ''; showSignature = "append"; }; @@ -239,8 +230,7 @@ in userEmail = "chris@cochrun.xyz"; }; - home.packages = with pkgs; [ - ]; + home.packages = with pkgs; [ ]; programs.mu.enable = true; @@ -256,8 +246,57 @@ in plugins = [ pkgs.obs-studio-plugins.obs-move-transition ]; }; - home.file.".config/mpv" = { - source = ../.config/mpv; + # home.file.".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" = { @@ -280,28 +319,39 @@ in settings = { devices = { 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 = { - 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 = { - id = "B24VU6Z-URTMEXN-ZYKRWX7-XWSTHXD-XKX67EB-XSKMT4V-KWKGX7Q-W7DB2QV"; + id = + "B24VU6Z-URTMEXN-ZYKRWX7-XWSTHXD-XKX67EB-XSKMT4V-KWKGX7Q-W7DB2QV"; }; tablet = { - id = "4HEXCNH-MCVBZQX-LQ735TG-P2VTJ7N-CZ5MK4P-ICZAPC7-YCXVEWV-7NILMA5"; + id = + "4HEXCNH-MCVBZQX-LQ735TG-P2VTJ7N-CZ5MK4P-ICZAPC7-YCXVEWV-7NILMA5"; }; kohlin = { - id = "BSWKBRR-2IJBCHA-UQY7DE7-CV2U2IL-PMFQFCJ-D5ZZJMU-FPYRUPC-MCC32QQ"; + id = + "BSWKBRR-2IJBCHA-UQY7DE7-CV2U2IL-PMFQFCJ-D5ZZJMU-FPYRUPC-MCC32QQ"; }; dalinar = { - id = "MPRMA33-XHW6SRE-D2EDBCP-TSMRNGI-ZCE2TAN-FE4BMKA-PSKGYJW-CRIEJQL"; + id = + "MPRMA33-XHW6SRE-D2EDBCP-TSMRNGI-ZCE2TAN-FE4BMKA-PSKGYJW-CRIEJQL"; }; }; folders = { 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 = { # type = "staggered"; # fsPath = "~/.local/share/syncthing/backup"; @@ -314,7 +364,8 @@ in music = { id = "teqqy-rzvec"; path = "${config.home.homeDirectory}/music"; - devices = [ "dalinar" (if laptop then "kaladin" else "syl") "shadow" ]; + devices = + [ "dalinar" (if laptop then "kaladin" else "syl") "shadow" ]; }; }; }; @@ -374,53 +425,53 @@ in # programs.tofi.enable = true; - #services.espanso = { - # enable = true; - # settings = { - # toggle_key = "RIGHT_CTRL"; - # matches = [ - # { # dates - # trigger = ":date"; - # replace = "{{mydate}}"; - # vars = [{ + #services.espanso = { + # enable = true; + # settings = { + # toggle_key = "RIGHT_CTRL"; + # matches = [ + # { # dates + # trigger = ":date"; + # replace = "{{mydate}}"; + # vars = [{ - # name = "mydate"; - # type = "date"; - # params = {format = "%m/%d/%Y";}; - # }]; - # } - # { # Shell commands - # trigger = ":shell"; - # replace = "{{output}}"; - # vars = [{ - # name = "output"; - # type = "shell"; - # params = { cmd = "echo Hello from your shell";}; - # }]; - # } - # { # simple text - # trigger = ":gml"; - # replace = "ccochrun21@gmail.com"; - # } - # { - # trigger = ":otl"; - # replace = "chris.cochrun@outlook.com"; - # } - # { - # trigger = ":tfcml"; - # replace = "chris@tfcconnection.org"; - # } - # { - # trigger = ":name"; - # replace = "Chris Cochrun"; - # } - # { - # trigger = ":cn"; - # replace = "A Giant Gummy Lizard"; - # } - # ]; - # }; - #}; + # name = "mydate"; + # type = "date"; + # params = {format = "%m/%d/%Y";}; + # }]; + # } + # { # Shell commands + # trigger = ":shell"; + # replace = "{{output}}"; + # vars = [{ + # name = "output"; + # type = "shell"; + # params = { cmd = "echo Hello from your shell";}; + # }]; + # } + # { # simple text + # trigger = ":gml"; + # replace = "ccochrun21@gmail.com"; + # } + # { + # trigger = ":otl"; + # replace = "chris.cochrun@outlook.com"; + # } + # { + # trigger = ":tfcml"; + # replace = "chris@tfcconnection.org"; + # } + # { + # trigger = ":name"; + # replace = "Chris Cochrun"; + # } + # { + # trigger = ":cn"; + # replace = "A Giant Gummy Lizard"; + # } + # ]; + # }; + #}; home.pointerCursor = { gtk.enable = true; @@ -430,9 +481,7 @@ in }; dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; + "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; }; }; gtk = { @@ -467,9 +516,7 @@ in }; }; - services.cliphist = { - enable = true; - }; + services.cliphist = { enable = true; }; home.file.".config/bottom" = { source = ../.config/bottom; @@ -484,10 +531,8 @@ in programs.firefox = { enable = true; package = pkgs.firefox-wayland.override { - nativeMessagingHosts = [ - pkgs.plasma-browser-integration - pkgs.tridactyl-native - ]; + nativeMessagingHosts = + [ pkgs.plasma-browser-integration pkgs.tridactyl-native ]; }; profiles.chris = { name = "default"; @@ -501,24 +546,21 @@ in settings = { mainBar = { layer = "top"; - output = ["DP-1" "eDP-1"]; + output = [ "DP-1" "eDP-1" ]; position = if laptop then "bottom" else "top"; height = 35; width = if laptop then 1300 else 2100; # Choose the order of the modules "custom/wintitle", - modules-left = ["hyprland/workspaces" "hyprland/window"]; - modules-center = ["clock"]; - modules-right = ["pulseaudio" "backlight" "disk" "memory" "cpu" "battery" "tray"]; + modules-left = [ "hyprland/workspaces" "hyprland/window" ]; + modules-center = [ "clock" ]; + modules-right = + [ "pulseaudio" "backlight" "disk" "memory" "cpu" "battery" "tray" ]; margin-top = if laptop then -5 else 5; margin-bottom = if laptop then 8 else 0; margin-left = 6; margin-right = 6; - "hyprland/window" = { - format = " {}"; - }; - workspaces = { - format = " {name} "; - }; + "hyprland/window" = { format = " {}"; }; + workspaces = { format = " {name} "; }; "hyprland/workspaces" = { format = "{icon}"; format-icons = { @@ -541,28 +583,26 @@ in spacing = 10; }; clock = { - tooltip-format = "{:%Y %B}\n{calendar}"; + tooltip-format = '' + {:%Y %B} + {calendar}''; format-alt = "{:%Y-%m-%d}"; format = "{:%a %b %e, %I:%M %p}"; }; - cpu = { - format = " {usage}%"; - }; - memory = { - format = " {}%"; - }; + cpu = { format = " {usage}%"; }; + memory = { format = " {}%"; }; temperature = { # "thermal-zone": 2, # "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", critical-threshold = 80; # "format-critical": "{temperatureC}°C {icon}", format = "{icon} {temperatureC}°C"; - format-icons = ["" "" ""]; + format-icons = [ "" "" "" ]; }; backlight = { # "device": "acpi_video1", format = "{icon} {PERCENT}%"; - format-icons = ["" ""]; + format-icons = [ "" "" ]; }; disk = { format = "󰋊 {percentage_used}%"; @@ -580,8 +620,8 @@ in format-alt = "{time} {icon}"; format-good = "{icon} {capacity}%"; format-full = "󰁹 {capacity}%"; - format-icons = ["󰁺" "󰁼" "󰁾" "󰂀" "󰂂"]; - format-charging-icons = ["󰢜" "󰂇" "󰢝" "󰢞" "󰂋"]; + format-icons = [ "󰁺" "󰁼" "󰁾" "󰂀" "󰂂" ]; + format-charging-icons = [ "󰢜" "󰂇" "󰢝" "󰢞" "󰂋" ]; }; network = { # "interface": "wlp2*", // (Optional) To force the use of this interface @@ -598,237 +638,237 @@ in format-source = ""; format-source-muted = ""; format-icons = { - headphone = ["" "" ""]; + headphone = [ "" "" "" ]; phone = ""; portable = ""; car = ""; - default = ["" "" ""]; + default = [ "" "" "" ]; }; on-click = "alacritty --class pulsemixer -e pulsemixer"; - ignored-sinks = ["Easy Effects Sink"]; + ignored-sinks = [ "Easy Effects Sink" ]; }; }; }; style = '' -@define-color base00 #282a36; -@define-color base01 #34353e; -@define-color base02 #43454f; -@define-color base03 #78787e; -@define-color base04 #a5a5a9; -@define-color base05 #e2e4e5; -@define-color base06 #eff0eb; -@define-color base07 #f1f1f0; -@define-color base08 #ff5c57; -@define-color base09 #ff9f43; -@define-color base0A #f3f99d; -@define-color base0B #5af78e; -@define-color base0C #9aedfe; -@define-color base0D #57c7ff; -@define-color base0E #ff6ac1; -@define-color base0F #b2643c; -@define-color basetransparent rgba(40, 42, 54, 0.0); -@define-color backtransparent rgba(40, 42, 54, 0.7); -* { - border: 1px; - border-radius: 20px; - font-family: VictorMono Nerd Font; - font-size: 15px; - font-weight: normal; - box-shadow: none; - text-shadow: none; - transition-duration: 0s; - padding-top: 0px; - padding-bottom: 0px; -} + @define-color base00 #282a36; + @define-color base01 #34353e; + @define-color base02 #43454f; + @define-color base03 #78787e; + @define-color base04 #a5a5a9; + @define-color base05 #e2e4e5; + @define-color base06 #eff0eb; + @define-color base07 #f1f1f0; + @define-color base08 #ff5c57; + @define-color base09 #ff9f43; + @define-color base0A #f3f99d; + @define-color base0B #5af78e; + @define-color base0C #9aedfe; + @define-color base0D #57c7ff; + @define-color base0E #ff6ac1; + @define-color base0F #b2643c; + @define-color basetransparent rgba(40, 42, 54, 0.0); + @define-color backtransparent rgba(40, 42, 54, 0.7); + * { + border: 1px; + border-radius: 20px; + font-family: VictorMono Nerd Font; + font-size: 15px; + font-weight: normal; + box-shadow: none; + text-shadow: none; + transition-duration: 0s; + padding-top: 0px; + padding-bottom: 0px; + } -window { - background: transparent; - /* border-radius: 20px; */ -} + window { + background: transparent; + /* border-radius: 20px; */ + } -window#waybar > box { - padding-top: 5px; - padding-bottom: 3px; - padding-left: 3px; - padding-right: 10px; - color: @base05; - box-shadow: 5px 5px 4px 4px #202020; - margin: 12px 14px 14px 14px; - background: @backtransparent; -} + window#waybar > box { + padding-top: 5px; + padding-bottom: 3px; + padding-left: 3px; + padding-right: 10px; + color: @base05; + box-shadow: 5px 5px 4px 4px #202020; + margin: 12px 14px 14px 14px; + background: @backtransparent; + } -tooltip { - background: @base00; - border: 1px solid @base0D; -} + tooltip { + background: @base00; + border: 1px solid @base0D; + } -tooltip label { - padding: 10px; -} + tooltip label { + padding: 10px; + } -#workspaces { - border-radius: 20px; - margin-left: 10px; - padding-right: 10px; - background: transparent; - transition: none; - color: @base0C; -} + #workspaces { + border-radius: 20px; + margin-left: 10px; + padding-right: 10px; + background: transparent; + transition: none; + color: @base0C; + } -#tags { - border-radius: 20px; - margin-left: 6px; - padding-right: 10px; - background: transparent; - transition: none; -} + #tags { + border-radius: 20px; + margin-left: 6px; + padding-right: 10px; + background: transparent; + transition: none; + } -#workspaces button { - padding: 0 0.7em; - transition: none; - color: rgba(217, 216, 216, 0.4); - background: transparent; -} + #workspaces button { + padding: 0 0.7em; + transition: none; + color: rgba(217, 216, 216, 0.4); + background: transparent; + } -#tags button { - transition: none; - color: rgba(217, 216, 216, 0.4); - background: transparent; -} + #tags button { + transition: none; + color: rgba(217, 216, 216, 0.4); + background: transparent; + } -#workspaces button.visible { - color: @base0C; -} + #workspaces button.visible { + color: @base0C; + } -#tags button.occupied { - color: rgba(217, 216, 216, 1); -} + #tags button.occupied { + color: rgba(217, 216, 216, 1); + } -#workspaces button.focused { - color: @base09; -} + #workspaces button.focused { + color: @base09; + } -#tags button.focused { - color: @base0C; -} + #tags button.focused { + color: @base0C; + } -#workspaces button:hover { - transition: none; - box-shadow: inherit; - text-shadow: inherit; - color: @base0E; -} + #workspaces button:hover { + transition: none; + box-shadow: inherit; + text-shadow: inherit; + color: @base0E; + } -#workspaces button.urgent { - color: @base08; -} + #workspaces button.urgent { + color: @base08; + } -#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #disk, #custom-weather, #custom-mail { - margin: 0px 3px 0px 3px; - /* min-width: 25px; */ -} + #mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #disk, #custom-weather, #custom-mail { + margin: 0px 3px 0px 3px; + /* min-width: 25px; */ + } -#clock { - margin-left: 2px; - margin-right: 2px; - padding-left: 10px; - padding-right: 10px; - border-radius: 20px; - transition: none; - color: @base0B; - background: transparent; -} + #clock { + margin-left: 2px; + margin-right: 2px; + padding-left: 10px; + padding-right: 10px; + border-radius: 20px; + transition: none; + color: @base0B; + background: transparent; + } -#backlight { - margin-left: 2px; - margin-right: 2px; - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base08; - background: transparent; -} + #backlight { + margin-left: 2px; + margin-right: 2px; + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base08; + background: transparent; + } -#battery.warning { - color: @base09; -} + #battery.warning { + color: @base09; + } -#battery.critical { - color: @base08; -} + #battery.critical { + color: @base08; + } -#battery.charging { - color: @base0B; -} + #battery.charging { + color: @base0B; + } -#pulseaudio { - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base09; - background: transparent; -} + #pulseaudio { + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base09; + background: transparent; + } -#network { - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base0B; - background: transparent; -} + #network { + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base0B; + background: transparent; + } -#cpu { - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base09; - background: transparent; -} + #cpu { + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base09; + background: transparent; + } -#battery { - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base0D; - background: transparent; -} + #battery { + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base0D; + background: transparent; + } -#battery.bat2 { - margin-right: 10px; -} + #battery.bat2 { + margin-right: 10px; + } -#memory { - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base0C; - background: transparent; -} + #memory { + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base0C; + background: transparent; + } -#disk { - padding-left: 5px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base0E; - background: transparent; -} + #disk { + padding-left: 5px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base0E; + background: transparent; + } -#tray { - padding-left: 15px; - padding-right: 5px; - border-radius: 20px; - transition: none; - color: @base0E; - background: transparent; -} + #tray { + padding-left: 15px; + padding-right: 5px; + border-radius: 20px; + transition: none; + color: @base0E; + background: transparent; + } ''; }; @@ -853,9 +893,7 @@ tooltip label { # source = ../.config/fish/config.fish; # }; - home.file.".config/fish/functions" = { - source = ../.config/fish/functions; - }; + home.file.".config/fish/functions" = { source = ../.config/fish/functions; }; # programs.ags = { # enable = true; @@ -869,198 +907,198 @@ tooltip label { programs.fish = { enable = true; interactiveShellInit = '' -function fish_greeting -d "what's up, fish?" - # set_color $fish_color_autosuggestion[1] - # uname -npsr - # uptime - # set_color normal -end + function fish_greeting -d "what's up, fish?" + # set_color $fish_color_autosuggestion[1] + # uname -npsr + # uptime + # set_color normal + end -function fish_title - if [ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ] - printf '(%s) %s' $_ (prompt_pwd) - else - printf '(%s) %s' (basename "$VIRTUAL_ENV") (prompt_pwd) - end -end + function fish_title + if [ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ] + printf '(%s) %s' $_ (prompt_pwd) + else + printf '(%s) %s' (basename "$VIRTUAL_ENV") (prompt_pwd) + end + end -function _prompt_whoami -a sep_color -a color -d "Display user@host if on a SSH session" - if set -q SSH_TTY - echo -n -s $color (whoami)@(hostnamectl --static) $sep_color '|' - end -end + function _prompt_whoami -a sep_color -a color -d "Display user@host if on a SSH session" + if set -q SSH_TTY + echo -n -s $color (whoami)@(hostnamectl --static) $sep_color '|' + end + end -function _git_branch_name - echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||') -end + function _git_branch_name + echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||') + end -function _is_git_dirty - echo (command git status -s --ignore-submodules=dirty 2> /dev/null) -end + function _is_git_dirty + echo (command git status -s --ignore-submodules=dirty 2> /dev/null) + end -function _git_ahead_count -a remote -a branch_name - echo (command git log $remote/$branch_name..HEAD 2> /dev/null | \ - grep '^commit' | wc -l | tr -d ' ') -end + function _git_ahead_count -a remote -a branch_name + echo (command git log $remote/$branch_name..HEAD 2> /dev/null | \ + grep '^commit' | wc -l | tr -d ' ') + end -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_ref (command git rev-parse HEAD 2> /dev/null) + 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_ref (command git rev-parse HEAD 2> /dev/null) - for remote in (git remote | grep 'origin\|upstream') + for remote in (git remote | grep 'origin\|upstream') - set -l git_ahead_count (_git_ahead_count $remote $current_branch) + set -l git_ahead_count (_git_ahead_count $remote $current_branch) - set remote_branch "refs/remotes/$remote/$current_branch" - set remote_ref (git for-each-ref --format='%(objectname)' $remote_branch) - if test "$remote_ref" != \'\' - if test "$remote_ref" != $current_ref - if [ $git_ahead_count != 0 ] - echo -n "$remote_color!" - echo -n "$ahead_color+$git_ahead_count$normal" - end - end - end - end -end + set remote_branch "refs/remotes/$remote/$current_branch" + set remote_ref (git for-each-ref --format='%(objectname)' $remote_branch) + if test "$remote_ref" != \'\' + if test "$remote_ref" != $current_ref + if [ $git_ahead_count != 0 ] + echo -n "$remote_color!" + echo -n "$ahead_color+$git_ahead_count$normal" + end + end + end + end + end -function _prompt_git -a gray normal orange red yellow - test "$theme_display_git" = no; and return - set -l git_branch (_git_branch_name) - test -z $git_branch; and return - if test "$theme_display_git_dirty" = no - echo -n -s $gray '‹' $yellow $git_branch $gray '› ' - return - end - set dirty_remotes (_git_dirty_remotes $red $orange) - if [ (_is_git_dirty) ] - echo -n -s $gray '‹' $yellow $git_branch $red '*' $dirty_remotes $gray '› ' - else - echo -n -s $gray '‹' $yellow $git_branch $red $dirty_remotes $gray '› ' - end -end + function _prompt_git -a gray normal orange red yellow + test "$theme_display_git" = no; and return + set -l git_branch (_git_branch_name) + test -z $git_branch; and return + if test "$theme_display_git_dirty" = no + echo -n -s $gray '‹' $yellow $git_branch $gray '› ' + return + end + set dirty_remotes (_git_dirty_remotes $red $orange) + if [ (_is_git_dirty) ] + echo -n -s $gray '‹' $yellow $git_branch $red '*' $dirty_remotes $gray '› ' + else + echo -n -s $gray '‹' $yellow $git_branch $red $dirty_remotes $gray '› ' + end + end -function _prompt_pwd - set_color -o cyan - printf '%s' (prompt_pwd) -end + function _prompt_pwd + set_color -o cyan + printf '%s' (prompt_pwd) + end -function _prompt_status_arrows -a exit_code - if test $exit_code -ne 0 - set arrow_colors green - else - set arrow_colors green - end + function _prompt_status_arrows -a exit_code + if test $exit_code -ne 0 + set arrow_colors green + else + set arrow_colors green + end - for arrow_color in $arrow_colors - set_color $arrow_color - printf '»' - end -end + for arrow_color in $arrow_colors + set_color $arrow_color + printf '»' + end + end -function fish_prompt - set -l exit_code $status + function fish_prompt + set -l exit_code $status - set -l gray (set_color 666) - set -l blue (set_color blue) - set -l red (set_color red) - set -l normal (set_color normal) - set -l yellow (set_color yellow) - set -l orange (set_color ff9900) - set -l green (set_color green) + set -l gray (set_color 666) + set -l blue (set_color blue) + set -l red (set_color red) + set -l normal (set_color normal) + set -l yellow (set_color yellow) + set -l orange (set_color ff9900) + set -l green (set_color green) - printf $gray'[' + printf $gray'[' - _prompt_whoami $gray $green + _prompt_whoami $gray $green - if test "$theme_display_pwd_on_second_line" != yes - _prompt_pwd - printf '%s' $gray - end + if test "$theme_display_pwd_on_second_line" != yes + _prompt_pwd + printf '%s' $gray + end - printf '%s] ⚡️ %0.3fs' $gray (math $CMD_DURATION / 1000) + printf '%s] ⚡️ %0.3fs' $gray (math $CMD_DURATION / 1000) - if set -q SCORPHISH_GIT_INFO_ON_FIRST_LINE - set theme_display_git_on_first_line - end + if set -q SCORPHISH_GIT_INFO_ON_FIRST_LINE + set theme_display_git_on_first_line + end - if set -q theme_display_git_on_first_line - _prompt_git $gray $normal $orange $red $yellow - end + if set -q theme_display_git_on_first_line + _prompt_git $gray $normal $orange $red $yellow + end - if test "$theme_display_pwd_on_second_line" = yes - printf $gray'\n‹' - _prompt_pwd - printf $gray'›' - end + if test "$theme_display_pwd_on_second_line" = yes + printf $gray'\n‹' + _prompt_pwd + printf $gray'›' + end - printf '\n' - if not set -q theme_display_git_on_first_line - _prompt_git $gray $normal $orange $red $yellow - end - _prompt_status_arrows $exit_code - printf ' ' + printf '\n' + if not set -q theme_display_git_on_first_line + _prompt_git $gray $normal $orange $red $yellow + end + _prompt_status_arrows $exit_code + printf ' ' - set_color normal -end + set_color normal + end -function fish_right_prompt - set -l exit_code $status - if test $exit_code -ne 0 - set_color red - else - set_color green - end - printf '%d' $exit_code - set_color -o 666 - echo '|' - set_color -o 777 - printf '%s' (date +%H:%M:%S) - set_color normal -end + function fish_right_prompt + set -l exit_code $status + if test $exit_code -ne 0 + set_color red + else + set_color green + end + printf '%d' $exit_code + set_color -o 666 + echo '|' + set_color -o 777 + printf '%s' (date +%H:%M:%S) + set_color normal + end -### VI MODES -# Emulates vim's cursor shape behavior -# Set the normal and visual mode cursors to a block -set fish_cursor_default block -# Set the insert mode cursor to a line -set fish_cursor_insert line -# Set the replace mode cursor to an underscore -set fish_cursor_replace_one underscore -# The following variable can be used to configure cursor shape in -# visual mode, but due to fish_cursor_default, is redundant here -set fish_cursor_visual block + ### VI MODES + # Emulates vim's cursor shape behavior + # Set the normal and visual mode cursors to a block + set fish_cursor_default block + # Set the insert mode cursor to a line + set fish_cursor_insert line + # Set the replace mode cursor to an underscore + set fish_cursor_replace_one underscore + # The following variable can be used to configure cursor shape in + # visual mode, but due to fish_cursor_default, is redundant here + set fish_cursor_visual block -### BANG BANG FUNCTIONS -function __history_previous_command - switch (commandline -t) - case "!" - commandline -t $history[1] - commandline -f repaint - case "*" - commandline -i ! - end -end + ### BANG BANG FUNCTIONS + function __history_previous_command + switch (commandline -t) + case "!" + commandline -t $history[1] + commandline -f repaint + case "*" + commandline -i ! + end + end -function __history_previous_command_arguments - switch (commandline -t) - case "!" - commandline -t "" - commandline -f history-token-search-backward - case "*" - commandline -i '$' - end -end + function __history_previous_command_arguments + switch (commandline -t) + case "!" + commandline -t "" + commandline -f history-token-search-backward + case "*" + commandline -i '$' + end + end -### bindings -function fish_user_key_bindings - fish_vi_key_bindings - bind -M insert ! __history_previous_command - bind -M insert '$' __history_previous_command_arguments -end + ### bindings + function fish_user_key_bindings + fish_vi_key_bindings + bind -M insert ! __history_previous_command + bind -M insert '$' __history_previous_command_arguments + end -# starship init fish | source -''; + # starship init fish | source + ''; }; @@ -1084,36 +1122,34 @@ end }; configFile = { text = '' - let fish_completer = {|spans| - fish --command $'complete "--do-complete=($spans | str join " ")"' - | $"value(char tab)description(char newline)" + $in - | from tsv --flexible --no-infer - } + let fish_completer = {|spans| + fish --command $'complete "--do-complete=($spans | str join " ")"' + | $"value(char tab)description(char newline)" + $in + | from tsv --flexible --no-infer + } - $env.config = { - show_banner: false - } + $env.config = { + show_banner: false + } - def start_zellij [] { - if 'ZELLIJ' not-in ($env | columns) { - if 'ZELLIJ_AUTO_ATTACH' in ($env | columns) and $env.ZELLIJ_AUTO_ATTACH == 'true' { - zellij attach -c - } else { - zellij - } - - if 'ZELLIJ_AUTO_EXIT' in ($env | columns) and $env.ZELLIJ_AUTO_EXIT == 'true' { - exit + def start_zellij [] { + if 'ZELLIJ' not-in ($env | columns) { + if 'ZELLIJ_AUTO_ATTACH' in ($env | columns) and $env.ZELLIJ_AUTO_ATTACH == 'true' { + zellij attach -c + } else { + zellij + } + + if 'ZELLIJ_AUTO_EXIT' in ($env | columns) and $env.ZELLIJ_AUTO_EXIT == 'true' { + exit + } } } - } - - start_zellij + + start_zellij ''; }; - environmentVariables = { - EDITOR = "\"emacsclient -t\""; - }; + environmentVariables = { EDITOR = ''"emacsclient -t"''; }; }; # home.file.".config/dunst" = { @@ -1153,7 +1189,9 @@ end sort = "yes"; font = "VictorMono Nerd Font 10"; markup = "full"; - format = "%s\n%b"; + format = '' + %s + %b''; alignment = "center"; vertical_alignment = "center"; corner_radius = 18; @@ -1171,7 +1209,7 @@ end timeout = 10; }; - urgency_critical = { + urgency_critical = { background = "#282a36"; foreground = "#ff5c57"; frame_color = "#ff0000"; @@ -1180,7 +1218,6 @@ end }; }; - programs.atuin = { enable = true; enableNushellIntegration = false; @@ -1210,10 +1247,10 @@ end recursive = true; }; - #home.file.".config/awesome" = { - # source = ../awesome; - # recursive = true; - #}; + #home.file.".config/awesome" = { + # source = ../awesome; + # recursive = true; + #}; home.file.".config/awesome/bling" = { source = ../.config/awesome/bling; @@ -1229,9 +1266,7 @@ end # source = ../.config/alacritty; # }; - home.file.".config/picom.conf" = { - source = ../.config/picom.conf; - }; + home.file.".config/picom.conf" = { source = ../.config/picom.conf; }; # home.file.".config/networkmanager-dmenu/config.ini" = { # source = ../networkmanager-dmenu/config.ini; @@ -1256,7 +1291,7 @@ end sysuse = "systemctl --user"; myip = "curl icanhazip.com"; 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 = { @@ -1340,31 +1375,21 @@ end show_notifications = true; min_time_to_notify = 20000; }; - time = { - format = "| $time"; - }; - status = { - format = "| $status"; - }; + time = { format = "| $time"; }; + status = { format = "| $status"; }; scan_timeout = 10; - rust = { - format = "[$symbol($version )]($style)"; - }; + rust = { format = "[$symbol($version )]($style)"; }; cmake = { format = ""; disabled = true; }; nix_shell = { - format = "[$symbol$state( \($name\))]($style) "; + format = "[$symbol$state( ($name))]($style) "; impure_msg = " "; pure_msg = " "; }; - hostname = { - format = "@[$ssh_symbol$hostname]($style) > '"; - }; - git_branch = { - format = "[$symbol$branch(:$remote_branch)]($style) "; - }; + hostname = { format = "@[$ssh_symbol$hostname]($style) > '"; }; + git_branch = { format = "[$symbol$branch(:$remote_branch)]($style) "; }; git_status = { format = "[\\[$all_status$ahead_behind\\]]($style) |(dimmed gray) "; }; @@ -1378,21 +1403,21 @@ end programs.bash = { enable = true; bashrcExtra = '' - # export ENV_EFI_CODE_SECURE=/run/libvirt/nix-ovmf/OVMF_CODE.fd ENV_EFI_VARS_SECURE=/run/libvirt/nix-ovmf/OVMF_VARS.fd - case "$-" in - *i*) - source $(blesh-share)/ble.sh - ble-face auto_complete="fg=238" - eval "$(starship init bash)" - macchina;; - esac - # export LESS_TERMCAP_mb=$'\e[1;32m' - # export LESS_TERMCAP_md=$'\e[1;32m' - # export LESS_TERMCAP_me=$'\e[0m' - # export LESS_TERMCAP_se=$'\e[0m' - # export LESS_TERMCAP_so=$'\e[01;33m' - # export LESS_TERMCAP_ue=$'\e[0m' - # export LESS_TERMCAP_us=$'\e[1;4;31m' + # export ENV_EFI_CODE_SECURE=/run/libvirt/nix-ovmf/OVMF_CODE.fd ENV_EFI_VARS_SECURE=/run/libvirt/nix-ovmf/OVMF_VARS.fd + case "$-" in + *i*) + source $(blesh-share)/ble.sh + ble-face auto_complete="fg=238" + eval "$(starship init bash)" + macchina;; + esac + # export LESS_TERMCAP_mb=$'\e[1;32m' + # export LESS_TERMCAP_md=$'\e[1;32m' + # export LESS_TERMCAP_me=$'\e[0m' + # export LESS_TERMCAP_se=$'\e[0m' + # export LESS_TERMCAP_so=$'\e[01;33m' + # export LESS_TERMCAP_ue=$'\e[0m' + # export LESS_TERMCAP_us=$'\e[1;4;31m' ''; }; @@ -1416,7 +1441,7 @@ end suspend = "systemctl suspend"; sysuse = "systemctl --user"; 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 = '' macchina @@ -1430,7 +1455,13 @@ end exec = "alacritty -e mpv --profile=slow %U"; terminal = true; 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 = { name = "IMV"; @@ -1448,14 +1479,13 @@ end Description = "An auto-input utility for wayland"; Documentation = [ "man:ydotool(1)" "man:ydotoold(8)" ]; }; - + Service = { - ExecStart = "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotools"; + ExecStart = + "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotools"; }; - Install = { - WantedBy = ["default.target"]; - }; + Install = { WantedBy = [ "default.target" ]; }; }; jellyfin-mpv-shim = { @@ -1463,14 +1493,10 @@ end Description = "Play Jellyfin media in mpv"; After = "graphical-session-pre.target"; }; - - Service = { - ExecStart = "/run/current-system/sw/bin/jellyfin-mpv-shim"; - }; - Install = { - WantedBy = ["graphical-session.target"]; - }; + Service = { ExecStart = "/run/current-system/sw/bin/jellyfin-mpv-shim"; }; + + Install = { WantedBy = [ "graphical-session.target" ]; }; }; # nextcloud-client = {