From c4ddee1d29a5f47f333f09e72c9c39672e77ab78 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Mon, 15 Jul 2024 20:34:59 -0400 Subject: [PATCH] update configs!!!!! --- .gitignore | 5 - .scripts/switch-wallpaper.sh | 7 +- Caprine/config.json | 43 ------- Caprine/custom.css | 227 ----------------------------------- home-manager/audio.nix | 10 ++ home-manager/hyprland.nix | 33 +++++ home-manager/nvim.nix | 29 +++++ home-manager/terminal.nix | 22 +++- nixos/audio.nix | 2 +- nixos/hyprland.nix | 12 +- nixos/nixos.nix | 32 +---- 11 files changed, 107 insertions(+), 315 deletions(-) delete mode 100644 Caprine/config.json delete mode 100644 Caprine/custom.css create mode 100644 home-manager/audio.nix create mode 100644 home-manager/hyprland.nix create mode 100644 home-manager/nvim.nix diff --git a/.gitignore b/.gitignore index 6f60943..82671f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,4 @@ -# Caprine -Caprine/** -!Caprine/config.json -!Caprine/custom.css - # Cava ./cava/config cava/config diff --git a/.scripts/switch-wallpaper.sh b/.scripts/switch-wallpaper.sh index 4e84c73..3812fc0 100644 --- a/.scripts/switch-wallpaper.sh +++ b/.scripts/switch-wallpaper.sh @@ -2,10 +2,9 @@ wal -i ~/Wallpapers/ -n # Using feh to tile the wallpaper now. -# We grab the wallpaper location from wal's cache so +# We grab the wallpaper location from wal's cache so # that this works even when a directory is passed. -swww img "$(< "${HOME}/.cache/wal/wal")" --transition-type wipe --transition-angle 45 --transition-fps 90 +swww img "$(<"${HOME}/.cache/wal/wal")" --transition-type wipe --transition-angle 45 --transition-fps 90 # Copy cava and update config -cp ~/.cache/wal/cava-config ~/dotfiles/cava/config && pkill -USR2 cava - +cp ~/.cache/wal/cava-config ~/.config/cava/config && pkill -USR2 cava diff --git a/Caprine/config.json b/Caprine/config.json deleted file mode 100644 index 50e04ac..0000000 --- a/Caprine/config.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "theme": "system", - "privateMode": false, - "showPrivateModePrompt": true, - "vibrancy": "none", - "zoomFactor": 1, - "lastWindowState": { - "x": 513, - "y": 594, - "width": 1244, - "height": 1358, - "isMaximized": false - }, - "menuBarMode": false, - "showDockIcon": true, - "showTrayIcon": true, - "alwaysOnTop": false, - "showAlwaysOnTopPrompt": true, - "bounceDockOnMessage": false, - "showUnreadBadge": true, - "showMessageButtons": true, - "launchMinimized": false, - "flashWindowOnMessage": true, - "notificationMessagePreview": true, - "block": { - "chatSeen": false, - "typingIndicator": false, - "deliveryReceipt": false - }, - "emojiStyle": "facebook-3-0", - "useWorkChat": false, - "sidebar": "default", - "autoHideMenuBar": true, - "autoUpdate": true, - "notificationsMuted": false, - "callRingtoneMuted": false, - "hardwareAcceleration": true, - "quitOnWindowClose": false, - "keepMeSignedIn": true, - "autoplayVideos": true, - "isSpellCheckerEnabled": true, - "spellCheckerLanguages": [] -} \ No newline at end of file diff --git a/Caprine/custom.css b/Caprine/custom.css deleted file mode 100644 index 45f4d2f..0000000 --- a/Caprine/custom.css +++ /dev/null @@ -1,227 +0,0 @@ -:root { - --base: #1e1e2e; - --base-ninety: rgb(255 255 255 / 90%); - --base-seventy-five: rgb(255 255 255 / 75%); - --base-seventy: rgb(255 255 255 / 70%); - --base-fifty: rgb(255 255 255 / 50%); - --base-fourty: rgb(255 255 255 / 40%); - --base-thirty: rgb(255 255 255 / 30%); - --base-twenty: rgb(255 255 255 / 20%); - --base-ten: rgb(255 255 255 / 10%); - --base-nine: rgb(255 255 255 / 9%); - --base-five: rgb(255 255 255 / 5%); - --container-color: #11111b; - --container-dark-color: #181825; - --list-header-color: #1e1e2e; - --blue: #89b4fa; - --white: #fff; -} - -html.__fb-dark-mode { - --icon-primary-color: #f38ba8; - --messenger-card-background: var(--container-dark-color); -} - -div.__fb-dark-mode { - --messenger-card-background: var(--list-header-color); -} - -html.__fb-dark-mode-mode body { - color: var(--base-seventy); - background: var(--container-color) !important; -} - -/* Fixes appearance of "Verify Account" screen text */ -html.__fb-dark-mode-mode ._3-mr ._3-mt, -html.__fb-dark-mode-mode ._3-mr ._3-mu { - color: #fff; -} - -html.__fb-dark-mode-mode ._3v_o, /* Login screen */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut ._li, /* 2FA screen */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut ._4-u5 /* 2FA screen */ { - background-color: var(--container-dark-color); -} - -/* Login title and names */ -html.__fb-dark-mode-mode ._5hy4, -html.__fb-dark-mode-mode ._3403 { - color: var(--base-fourty) !important; -} - -/* Login inputs */ -html.__fb-dark-mode-mode ._3v_o ._55r1 { - background: var(--base-five); - color: var(--base-seventy); -} -html.__fb-dark-mode-mode ._3v_o ._55r1::-webkit-input-placeholder { - color: var(--base-thirty) !important; -} - -/* "Keep me signed in" checkbox */ -html.__fb-dark-mode-mode .uiInputLabelInput { - filter: opacity(70%); -} - -/* "Keep me signed in" text */ -html.__fb-dark-mode-mode .uiInputLabelLabel { - color: var(--base-fourty) !important; -} - -/* 2FA screen modal */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut ._4-u8 { - background: var(--container-color); - border-color: var(--base-five) !important; -} - -/* 2FA screen modal title */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut ._2e9n { - border-color: var(--base-five); - color: #fff; -} - -/* 2FA screen modal separator */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut ._p0k ._5hzs { - border-color: var(--base-five); -} - -/* 2FA screen modal separators */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut a { - color: var(--blue); -} - -/* 2FA screen modal input */ -html.__fb-dark-mode-mode body.UIPage_LoggedOut input { - background: var(--base-ten); - border-color: var(--base-ten); - color: var(--base-ninety); -} - -/* Cookies notification: background */ -html.__fb-dark-mode-mode ._9o-w ._9o-c { - background: var(--container-color) !important; -} -/* Cookies notification: text */ -html.__fb-dark-mode-mode ._9o-g { - color: var(--base-seventy) !important; -} -/* Cookies notification: collapsible headers */ -html.__fb-dark-mode-mode ._9o-l { - color: var(--base-seventy) !important; -} -/* Cookies notification: subheaders */ -html.__fb-dark-mode-mode ._9si- { - color: var(--base-seventy) !important; -} -/* Cookies notification: hamburger menu */ -html.__fb-dark-mode-mode - ._42ft._4jy0._55pi._2agf._4o_4._9o-e._p._4jy3._517h._51sy { - background: var(--container-color) !important; -} -/* Cookies notification: hamburger menu background */ -html.__fb-dark-mode-mode ._54ng { - background: var(--container-color) !important; -} -/* Cookies notification: hamburger menu text */ -html.__fb-dark-mode-mode ._54nh { - color: var(--base-seventy) !important; -} -/* Cookies notification: hamburger menu column borders */ -html.__fb-dark-mode-mode ._54nc { - border-color: var(--container-color) !important; -} -/* Cookies notification: icons */ -html.__fb-dark-mode-mode .img.sp_ng1YXMZLXub { - filter: invert(0.66); -} -/* Cookies notification: rectangular boxes */ -html.__fb-dark-mode-mode .pam._9o-n.uiBoxGray { - background-color: var(--base-ten) !important; -} -html.__fb-dark-mode-mode ._9xq0 { - color: var(--base-seventy) !important; -} - -/* Top bar: App menu button color */ -/* Top bar: New message button color */ -.j83agx80.pfnyh3mw .ozuftl9m .a8c37x1j.ms05siws.hwsy1cff.b7h9ocf4 { - fill: currentcolor; - color: var(--primary-text); -} - -/* Chat list: Mute icon */ -.bp9cbjyn.j83agx80.btwxx1t3 .dlv3wnog.lupvgy83 .a8c37x1j { - fill: #11111b; - color: var(--primary-text); -} - -/* Right sidebar: icons */ -.x1qhmfi1.x14yjl9h.xudhj91.x18nykt9.xww2gxu.x1fgtraw.x1264ykn.x78zum5.x6s0dn4.xl56j7k - svg - path { - fill: currentcolor; - color: var(--primary-text); -} - -/* Contact list: delivered icon color */ -.aahdfvyu [role="grid"] .a8c37x1j.ms05siws.hwsy1cff.b7h9ocf4 { - fill: currentcolor; - color: var(--primary-text); -} - -/* Messenger settings: Privacy & safety icon color */ -.x1lliihq.x1k90msu.x2h7rmj.x1qfuztq.x198g3q0.xxk0z11.xvy4d1p { - fill: currentcolor; - color: var(--primary-text); -} - -/* Removing top gap */ -/* TODO: Remove when fixed by fb */ -.__fb-dark-mode { - --header-height: 0 !important; -} - -/* Message list: fix for received messages text color in dark mode */ -/* TODO: Remove when fixed by fb */ -.__fb-dark-mode .__fb-light-mode { - --primary-text: #cdd6f4; -} - -/* Radio buttons */ -.x14yjl9h.xudhj91.x18nykt9.xww2gxu.x13fuv20.xu3j5b3.x1q0q8m5.x26u7qi.xamhcws.xol2nv.xlxy82.x19p7ews.x9f619.x1rg5ohu.x2lah0s.x1n2onr6.x1tz4bnf.xmds5ef.x25epmt.x11y6y4w.xxk0z11.xvy4d1p { - --accent: var(--primary-text); -} - -/* Backgrounds of various buttons ("Join room", "Visit Group", Audio call, etc.) */ -/* TODO: Remove when fixed by fb, since -floating should not be here */ -html.__fb-dark-mode-mode - .x14yjl9h.xudhj91.x18nykt9.xww2gxu.x6s0dn4.x972fbf.xcfux6l.x1qhh985.xm0m39n.x9f619.x3nfvp2.xl56j7k.x1n2onr6.x1qhmfi1.xc9qbxq.x14qfxbe, -html.__fb-dark-mode-mode - .x1n2onr6.x1ja2u2z.x78zum5.x2lah0s.xl56j7k.x6s0dn4.xozqiw3.x1q0g3np.xi112ho.x17zwfj4.x585lrc.x1403ito.x972fbf.xcfux6l.x1qhh985.xm0m39n.x9f619.xn6708d.x1ye3gou.x1qhmfi1.x1r1pt67 { - background-color: var(--secondary-button-background-floating) !important; -} - -/* Search results: Close button */ -/* TODO: Remove when fixed by fb, since --always-white is not good here */ -html.__fb-dark-mode-mode .x14hiurz.x1r1pt67 { - background-color: var(--secondary-button-background) !important; -} - -/* Attachment background color in Chat Box */ -/* TODO: Remove when fixed by fb, since #d6d9dd is too bright here */ -/* Current Background-Color is same style as add attachment button */ -html.__fb-dark-mode-mode .x1ybostu { - background-color: rgba(134 142 153 / 25%); -} - -/* Recipient Pills in new message form */ -/* TODO: Remove when fixed by fb, since #f3f3f4 is too bright here */ -/* It seems FB uses shades of blue here */ -html.__fb-dark-mode-mode .x4noic3 { - background-color: var(--secondary-button-background); -} - -/* Create room icon color */ -html.__fb-dark-mode-mode .x1p6odiv { - color: var(--primary-icon); -} diff --git a/home-manager/audio.nix b/home-manager/audio.nix new file mode 100644 index 0000000..6708bfc --- /dev/null +++ b/home-manager/audio.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + cava + spotify + ]; + programs.cava = { + enable = true; + }; +} diff --git a/home-manager/hyprland.nix b/home-manager/hyprland.nix new file mode 100644 index 0000000..498103d --- /dev/null +++ b/home-manager/hyprland.nix @@ -0,0 +1,33 @@ +{ ... }: +{ + xdg.configFile = { + "gtk-3.0" = { + source = ../gtk-3.0; + recursive = true; + }; + "gtk-4.0" = { + source = ../gtk-4.0; + recursive = true; + }; + hypr = { + source = ../hypr; + recursive = true; + }; + rofi = { + source = ../rofi; + recursive = true; + }; + swaync = { + source = ../swaync; + recursive = true; + }; + wal = { + source = ../wal; + recursive = true; + }; + waybar = { + source = ../waybar; + recursive = true; + }; + }; +} diff --git a/home-manager/nvim.nix b/home-manager/nvim.nix new file mode 100644 index 0000000..f8395cf --- /dev/null +++ b/home-manager/nvim.nix @@ -0,0 +1,29 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + python3 + nodejs + bun + rustc + go + cargo + ripgrep + xclip + fzf + nixfmt-rfc-style + lazygit + ]; + + xdg.configFile.nvim = { + source = ../nvim; + recursive = true; + }; + + programs.neovim = { + enable = true; + }; + + home.sessionVariables = { + EDITOR = "nvim"; + }; +} diff --git a/home-manager/terminal.nix b/home-manager/terminal.nix index 112db00..3bd5345 100644 --- a/home-manager/terminal.nix +++ b/home-manager/terminal.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { - programs.kitty = { enable = true; shellIntegration.enableZshIntegration = true; @@ -22,12 +21,16 @@ enableCompletion = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; - initExtra = "neofetch --ascii ~/dotfiles/aperture.txt"; + initExtra = '' + neofetch --ascii ~/dotfiles/aperture.txt + ''; shellAliases = { rebuild = "sudo nixos-rebuild switch"; + clean = "nix-store --gc"; dotfiles = "cd ~/dotfiles/"; nv = "nvim"; + pywal = "bash ~/dotfiles/.scripts/switch-wallpaper.sh"; }; oh-my-zsh = { @@ -41,7 +44,7 @@ }; history = { - path = "~/.histfile"; + path = "${config.xdg.dataHome}/zsh/history"; size = 10000; }; }; @@ -51,7 +54,16 @@ add_newline = false; }; }; + programs.btop = { + enable = true; + settings = { + theme = "system"; + }; + }; fonts.fontconfig.enable = true; - home.packages = [ (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ]; + home.packages = with pkgs; [ + neofetch + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + ]; } diff --git a/nixos/audio.nix b/nixos/audio.nix index 62bcb0e..bfe3cc8 100644 --- a/nixos/audio.nix +++ b/nixos/audio.nix @@ -1,10 +1,10 @@ { ... }: { - # Audio services.pipewire = { enable = true; pulse.enable = true; alsa.enable = true; wireplumber.enable = true; }; + services.playerctld.enable = true; } diff --git a/nixos/hyprland.nix b/nixos/hyprland.nix index bac9b85..c76c7b2 100644 --- a/nixos/hyprland.nix +++ b/nixos/hyprland.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs.hyprland = { enable = true; @@ -8,5 +8,15 @@ services.hypridle.enable = true; programs.thunar.enable = true; + environment.systemPackages = with pkgs; [ + hyprcursor + waybar + rofi-wayland + swaynotificationcenter + swww + pywal + emote + ]; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; } diff --git a/nixos/nixos.nix b/nixos/nixos.nix index 262aa1e..0a2905b 100644 --- a/nixos/nixos.nix +++ b/nixos/nixos.nix @@ -25,27 +25,9 @@ in isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ - # Development - nodejs - bun - rustc - go - cargo - python3 - # Music - playerctl - cava - spotify # Git git gh - # Neovim - neovim - lazygit - ripgrep - xclip - fzf - nixfmt-rfc-style # Apps firefox discord @@ -65,6 +47,9 @@ in home.username = username; home.homeDirectory = "/home/${username}"; imports = [ + ../home-manager/audio.nix + ../home-manager/hyprland.nix + ../home-manager/nvim.nix ../home-manager/terminal.nix ./home.nix ]; @@ -86,17 +71,6 @@ in killall brightnessctl fd - btop - neofetch - # Hyprland - hyprcursor - ags - waybar - swaynotificationcenter - swww - pywal - rofi-wayland - emote # Screenshots grim slurp