diff --git a/home-manager/arch/hypridle.nix b/home-manager/arch/hypridle.nix new file mode 100644 index 0000000..ad00b6a --- /dev/null +++ b/home-manager/arch/hypridle.nix @@ -0,0 +1,28 @@ +{ ... }: { + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + }; + listener = [ + { + timeout = 300; + on-timeout = "loginctl lock-session"; + } + { + timeout = 330; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + { + + timeout = 1800; # 30min + on-timeout = "systemctl suspend"; # suspend pc + } + ]; + }; + }; +} diff --git a/home-manager/arch/hyprland.nix b/home-manager/arch/hyprland.nix new file mode 100644 index 0000000..93d73e3 --- /dev/null +++ b/home-manager/arch/hyprland.nix @@ -0,0 +1,297 @@ +{ pkgs, ... }: + +{ + wayland.windowManager.hyprland = { + enable = false; + package = null; + settings = { + monitor = ",1920x1200,auto,1,bitdepth,8"; + xwayland = { force_zero_scaling = true; }; + + # Set programs that you use + "$terminal " = "wezterm"; + "$browser " = "firefox"; + "$fileManager " = "dolphin"; + "$appMenu " = "rofi -show drun"; + + env = [ + "XCURSOR_SIZE,10" + "HYPRCURSOR_SIZE,10" + "LIBVA_DRIVER_NAME,nvidia" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + "AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1" + # Force all apps to use Wayland + "GDK_BACKEND,wayland" + "QT_QPA_PLATFORM,wayland" + "QT_STYLE_OVERRIDE,kvantum" + "SDL_VIDEODRIVER,wayland" + "MOZ_ENABLE_WAYLAND,1" + "ELECTRON_OZONE_PLATFORM_HINT,wayland" + "OZONE_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,qt6ct" # for Qt apps# Theme + + # Make Chromium use XCompose and all Wayland + '' + CHROMIUM_FLAGS,"--enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4"'' + + ]; + + misc = { + # Set to 0 or 1 to disable the anime mascot wallpapers + force_default_wallpaper = 0; + # If true disables the random hyprland logo / anime girl background. :( + disable_hyprland_logo = true; + initial_workspace_tracking = 1; + }; + + input = { + kb_layout = "us"; + kb_variant = ""; + kb_model = ""; + kb_options = ""; + kb_rules = ""; + + follow_mouse = 1; + # -1.0 - 1.0, 0 means no modification. + sensitivity = 0; + + touchpad = { natural_scroll = true; }; + }; + + gestures = { + workspace_swipe = true; + workspace_swipe_distance = 100; + workspace_swipe_forever = true; + workspace_swipe_fingers = 4; + }; + + general = { + gaps_in = 4; + gaps_out = "8, 4, 4, 4"; + + border_size = 0; + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + "col.active_border" = "rgba(FFFFFF40)"; + "col.inactive_border" = "rgba(59595940)"; + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = true; + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false; + + layout = "dwindle"; + + no_focus_fallback = true; + }; + + # https://wiki.hyprland.org/Configuring/Variables/#decoration + decoration = { + rounding = 8; + rounding_power = 1; + + # Change transparency of focused and unfocused windows + active_opacity = 1.0; + inactive_opacity = 1.0; + + dim_inactive = true; + dim_strength = 0.15; + + shadow = { + enabled = false; + range = 4; + render_power = 3; + color = "rgba(1a1a1aee)"; + }; + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur = { + enabled = false; + size = 4; + passes = 1; + }; + }; + + # https://wiki.hyprland.org/Configuring/Variables/#animations + animations = { + enabled = true; + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = [ + "easeOutQuint,0.23,1,0.32,1" + "easeInOutCubic,0.65,0.05,0.36,1" + "linear,0,0,1,1" + "almostLinear,0.5,0.5,0.75,1.0" + "quick,0.15,0,0.1,1" + ]; + + animation = [ + + "global, 1, 10, default" + "border, 1, 5.39, easeOutQuint" + "windows, 1, 4.79, easeOutQuint" + "windowsIn, 0, 4.1, easeOutQuint, popin 87%" + "windowsOut, 0, 1.49, linear, popin 87%" + "fadeIn, 1, 1.73, almostLinear" + "fadeOut, 1, 1.46, almostLinear" + "fade, 1, 3.03, quick" + "layers, 1, 3.81, easeOutQuint" + "layersIn, 1, 4, easeOutQuint, fade" + "layersOut, 1, 1.5, linear, fade" + "fadeLayersIn, 1, 1.79, almostLinear" + "fadeLayersOut, 1, 1.39, almostLinear" + "workspaces, 1, 1.94, almostLinear, fade" + "workspacesIn, 1, 1.21, almostLinear, fade" + "workspacesOut, 1, 1.94, almostLinear, fade" + ]; + + }; + + dwindle = { + # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + pseudotile = true; + preserve_split = true; + }; + + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + master = { new_status = "master"; }; + + exec-once = [ + #for libadwaita gtk4 apps you can use this command: + "gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'" # for GTK4 apps + + #for gtk3 apps you need to install adw-gtk3 theme (in arch linux sudo pacman -S adw-gtk-theme) + "gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'" # for GTK3 apps + + #for kde apps you need to install: sudo pacman -S qt5ct qt6ct kvantum kvantum breeze-icons + #you will need to set dark theme for qt apps from kde more difficult thans with gnome :D: + "hypridle" + "swww-daemon &" + "$HOME/.config/scripts/wallpapers.sh" + "waybar " + "dunst" + + # Bluetooth autoconnect + "bluetoothctl trust D0:56:FB:42:9F:5A" + "bluetoothctl power on" + "bluetoothctl connect D0:56:FB:42:9F:5A" + + ]; + + # Sets "Windows" key as main modifier + "$mainMod" = "SUPER"; + # Sets "Alt" key as secondary modifier + "$secondaryMod" = "Alt"; + + binds = { + workspace_back_and_forth = true; + allow_workspace_cycles = true; + }; + bind = [ + + "$mainMod, Q, exec, $terminal" + "$mainMod, T, exec, $terminal start btop" + "$mainMod, B, exec, $browser" + "$mainMod, C, killactive" + "$mainMod, Escape, exec, hyprlock" + "$mainMod, M, exit" + "$mainMod, E, exec, $fileManager" + "$mainMod, V, togglefloating" + "$mainMod, V, centerwindow, 1" + "ALT, space, exec, $appMenu" + "$mainMod, P, pseudo, # dwindle" + "$mainMod, J, togglesplit, # dwindle" + + # Move focus with mainMod + arrow keys + "$secondaryMod, h, movefocus, l" + "$secondaryMod, j, movefocus, d" + "$secondaryMod, k, movefocus, u" + "$secondaryMod, l, movefocus, r" + + "$mainMod, h, movewindow, l" + "$mainMod, l, movewindow, r" + "$mainMod, j, movewindow, d" + "$mainMod, k, movewindow, u" + + # Switch workspaces with mainMod + [0-9] + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "$mainMod SHIFT, 1, movetoworkspacesilent, 1" + "$mainMod SHIFT, 2, movetoworkspacesilent, 2" + "$mainMod SHIFT, 3, movetoworkspacesilent, 3" + "$mainMod SHIFT, 4, movetoworkspacesilent, 4" + "$mainMod SHIFT, 5, movetoworkspacesilent, 5" + "$mainMod SHIFT, 6, movetoworkspacesilent, 6" + "$mainMod SHIFT, 7, movetoworkspacesilent, 7" + "$mainMod SHIFT, 8, movetoworkspacesilent, 8" + "$mainMod SHIFT, 9, movetoworkspacesilent, 9" + "$mainMod SHIFT, 0, movetoworkspacesilent, 10" + + # Example special workspace (scratchpad) + "$mainMod, S, togglespecialworkspace, magic" + "$mainMod SHIFT, S, movetoworkspacesilent, special:magic" + + # Scroll through existing workspaces with mainMod + scroll + "$secondaryMod, TAB, cyclenext, hist next" + "$secondaryMod, TAB, alterzorder, top" + + "$secondaryMod SHIFT, TAB, cyclenext, hist prev " + "$secondaryMod SHIFT, TAB, alterzorder, top " + + "$mainMod, TAB, workspace, e+1" + "$mainMod SHIFT, TAB, workspace, e-1" + + "$mainMod SHIFT, up, fullscreenstate, 1" + "$mainMod SHIFT, left, resizeactive, exact 100% 100%" + "$mainMod SHIFT, left, moveactive, exact 0 4" + "$mainMod SHIFT, right, resizeactive, exact 100% 100%" + "$mainMod SHIFT, right, moveactive, exact 0 4" + + "$mainMod, P, pin" + ]; + + bindm = [ + # Move/resize windows with mainMod + LMB/RMB and dragging + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + + bindel = [ + # Laptop multimedia keys for volume and LCD brightness + ",XF86AudioRaiseVolume, exec, sh $HOME/.config/scripts/volume.sh up" + ",XF86AudioLowerVolume, exec, sh $HOME/.config/scripts/volume.sh down" + ",XF86AudioMute, exec, sh $HOME/.config/scripts/volume.sh mute" + ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ",XF86MonBrightnessUp, exec, sh $HOME/.config/scripts/brightness.sh up" + ",XF86MonBrightnessDown, exec, sh $HOME/.config/scripts/brightness.sh down" + ]; + + bindl = [ + ", XF86AudioNext, exec, playerctl next" + ", XF86AudioPause, exec, playerctl play-pause" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ]; + + windowrule = [ + # Ignore maximize requests from apps. You'll probably like this. + "suppressevent maximize, class:.*" + # Fix some dragging issues with XWayland + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" + ]; + + }; + }; +} diff --git a/home-manager/arch/hyprlock.nix b/home-manager/arch/hyprlock.nix new file mode 100644 index 0000000..38cb497 --- /dev/null +++ b/home-manager/arch/hyprlock.nix @@ -0,0 +1,92 @@ +{ config, pkgs, ... }: { + programs.hyprlock = { + enable = true; + package = (config.lib.nixGL.wrap pkgs.hyprlock); + + settings = { + "$font" = "Monospace"; + + general = { + hide_cursor = false; + fail_timeout = 500; + screencopy_mode = 1; + }; + + animations = { enabled = false; }; + + background = { + monitor = ""; + path = "screenshot"; + blur_passes = 3; + }; + + input-field = { + monitor = ""; + size = "20%, 5%"; + outline_thickness = 2; + inner_color = "rgba(0, 0, 0, 0.0)"; # no fill + + outer_color = "rgba(d65d0eee)"; + check_color = "rgba(cc241dee)"; + fail_color = "rgba(98971aee)"; + + font_color = "rgb(143, 143, 143)"; + fade_on_empty = false; + rounding = 8; + + font_family = "$font"; + placeholder_text = "Input password..."; + fail_text = "$PAMFAIL"; + + # uncomment to use a letter instead of a dot to indicate the typed password + # dots_text_format = * + # dots_size = 0.4 + dots_spacing = 0.3; + + # uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator) + # hide_input = true + + position = "0, -20"; + halign = "center"; + valign = "center"; + }; + + # TIME + label = [ + { + monitor = ""; + text = + "$TIME12"; # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90; + font_family = "$font"; + + position = "-30, 0"; + halign = "right"; + valign = "top"; + } + { + monitor = ""; + text = '' + cmd[update:60000] date +"%A, %d %B %Y"''; # update every 60 seconds + font_size = 25; + font_family = "$font"; + + position = "-30, -150"; + halign = "right"; + valign = "top"; + } + { + monitor = ""; + text = "$LAYOUT[en,ru]"; + font_size = 24; + + position = "250, -20"; + halign = "center"; + valign = "center"; + } + ]; + + }; + + }; +} diff --git a/home-manager/arch/niri.nix b/home-manager/arch/niri.nix new file mode 100644 index 0000000..abccb5d --- /dev/null +++ b/home-manager/arch/niri.nix @@ -0,0 +1,14 @@ +{ pkgs, config, ... }: + +{ + programs.niri.enable = true; + + home.file = { + ".config/niri/" = { + source = ../../niri; + recursive = true; + force = true; + }; + }; + +} diff --git a/home-manager/arch/scripts.nix b/home-manager/arch/scripts.nix new file mode 100644 index 0000000..b411e47 --- /dev/null +++ b/home-manager/arch/scripts.nix @@ -0,0 +1,9 @@ +{ + home.file = { + ".config/scripts/" = { + source = ../../scripts; + recursive = true; + force = true; + }; + }; +} diff --git a/home-manager/arch/waybar.nix b/home-manager/arch/waybar.nix new file mode 100644 index 0000000..562b411 --- /dev/null +++ b/home-manager/arch/waybar.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + home.file = { + ".config/waybar/" = { + source = ../../waybar; + recursive = true; + }; + }; + + programs.waybar.enable = true; +} diff --git a/home-manager/flake.lock b/home-manager/flake.lock index 18ba42e..25fa307 100644 --- a/home-manager/flake.lock +++ b/home-manager/flake.lock @@ -1,5 +1,94 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1769428758, + "narHash": "sha256-0G/GzF7lkWs/yl82bXuisSqPn6sf8YGTnbEdFOXvOfU=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "def5e74c97370f15949a67c62e61f1459fcb0e15", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -7,11 +96,11 @@ ] }, "locked": { - "lastModified": 1748737919, - "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=", + "lastModified": 1769872935, + "narHash": "sha256-07HMIGQ/WJeAQJooA7Kkg1SDKxhAiV6eodvOwTX6WKI=", "owner": "nix-community", "repo": "home-manager", - "rev": "5675a9686851d9626560052a032c4e14e533c1fa", + "rev": "f4ad5068ee8e89e4a7c2e963e10dd35cd77b37b7", "type": "github" }, "original": { @@ -20,13 +109,548 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1753964049, + "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1769284023, + "narHash": "sha256-xG34vwYJ79rA2wVC8KFuM8r36urJTG6/csXx7LiiSYU=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "13c536659d46893596412d180449353a900a1d31", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprgraphics_2": { + "inputs": { + "hyprutils": [ + "hyprlock", + "hyprutils" + ], + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1763733840, + "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1769866762, + "narHash": "sha256-RlZMgFz666Bc5ZxLUd+poTfs5RBIVKawuNRSkf5MyJ4=", + "ref": "refs/heads/main", + "rev": "db6114c6c53edc4a60695a12d7f857308b6cd6cd", + "revCount": 6852, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/hyprland" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/hyprland" + } + }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1767023960, + "narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1765214753, + "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1767983607, + "narHash": "sha256-8C2co8NYfR4oMOUEsPROOJ9JHrv9/ktbJJ6X1WsTbXc=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "d4037379e6057246b408bbcf796cf3e9838af5b2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { + "inputs": { + "hyprutils": [ + "hyprlock", + "hyprutils" + ], + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1764612430, + "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "0d00dc118981531aa731150b6ea551ef037acddd", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlock": { + "inputs": { + "hyprgraphics": "hyprgraphics_2", + "hyprlang": "hyprlang_2", + "hyprutils": "hyprutils_2", + "hyprwayland-scanner": "hyprwayland-scanner_2", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1766230281, + "narHash": "sha256-Vk23viKuhcP5O5uIXXZopDZgd/TT5FgsfZ3ZoRp8k58=", + "owner": "hyprwm", + "repo": "hyprlock", + "rev": "ef3017f5efba0db0960474a74d519a19816057fb", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlock", + "type": "github" + } + }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1764592794, + "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1766253372, + "narHash": "sha256-1+p4Kw8HdtMoFSmJtfdwjxM4bPxDK9yg27SlvUMpzWA=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "51a4f93ce8572e7b12b7284eb9e6e8ebf16b4be9", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1766160771, + "narHash": "sha256-roINUGikWRqqgKrD4iotKbGj3ZKJl3hjMz5l/SyKrHw=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "5ac060bfcf2f12b3a6381156ebbc13826a05b09f", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1763640274, + "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwayland-scanner_2": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1763640274, + "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1769202094, + "narHash": "sha256-gdJr/vWWLRW85ucatSjoBULPB2dqBJd/53CZmQ9t91Q=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "a45ca05050d22629b3c7969a926d37870d7dd75c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwire", + "type": "github" + } + }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1769714858, + "narHash": "sha256-IHHAKi8yMonZZmVHUQxew1V9UfLBG8Um9PLbNPx3OA4=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "dfbb02586582d5332d0c06653583b9d743bce081", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1769577126, + "narHash": "sha256-v9vz9Rj4MGwPuhGELdvpRKl2HH+xvkgat6VwL0L86Fg=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "f30db163b5748e8cf95c05aba77d0d3736f40543", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762090880, + "narHash": "sha256-fbRQzIGPkjZa83MowjbD2ALaJf9y6KMDdJBQMKFeY/8=", + "owner": "nix-community", + "repo": "nixGL", + "rev": "b6105297e6f0cd041670c3e8628394d4ee247ed5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixGL", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1748460289, - "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { @@ -36,11 +660,173 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1769598131, + "narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fa83fd837f3098e3e678e6cf017b2b36102c7211", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769069492, + "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", + "hyprland": "hyprland", + "hyprlock": "hyprlock", + "niri": "niri", + "nixgl": "nixgl", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1761431178, + "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1769713942, + "narHash": "sha256-0BtCSO2qzYK/akRDsERqRVLknCYD3FYErc+szreSHUo=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "37ec78ee26e158b71f42e113e0e7dd9d5eb6bdb0", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/home-manager/flake.nix b/home-manager/flake.nix index 3fecf22..83cc0bf 100644 --- a/home-manager/flake.nix +++ b/home-manager/flake.nix @@ -4,18 +4,56 @@ inputs = { # Specify the source of Home Manager and Nixpkgs. nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixgl = { + url = "github:nix-community/nixGL"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland = { + type = "git"; + url = "https://github.com/hyprwm/hyprland"; + submodules = true; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + hyprlock = { + url = "github:hyprwm/hyprlock"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; - outputs = { nixpkgs, home-manager, ... }@inputs: + # nix = { settings.experimental-features = [ "nix-command" "flakes" ]; }; + + outputs = { self, nixpkgs, niri, nixgl, home-manager, ... }@inputs: let system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; + inherit (self) outputs; + pkgs = import nixpkgs { + inherit system; + overlays = [ (import ./overlays.nix) nixgl.overlay ]; + config.allowUnfree = true; + }; + + HomeConfiguration = args: + home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ ./home/home.nix ] ++ args.modules or [ ]; + extraSpecialArgs = { + inherit (args) nixpkgs; + inherit nixgl; + } // args.extraSpecialArgs; + }; in { nix.extraOptions = '' @@ -23,15 +61,54 @@ experimental-features = nix-command flakes ''; - homeConfigurations."dev-rb" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + homeConfigurations = { + "arch" = HomeConfiguration { + extraSpecialArgs = { + vars = { + name = "arch"; + username = "devrb"; + }; + inherit inputs outputs; + }; + services.pipewire.enable = true; + services.pipewire.audio.enable = true; + services.pipewire.pulse.enable = true; + services.pipewire.alsa.enable = true; + services.pipewire.wireplumber.enable = true; + modules = [ + { + targets.genericLinux.nixGL.packages = nixgl.packages; + targets.genericLinux.nixGL.defaultWrapper = "mesa"; + targets.genericLinux.nixGL.installScripts = [ "mesa" ]; + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (pkg: true); + }; + }; + } + niri.homeModules.niri + ./arch/hyprland.nix + ./arch/hypridle.nix + ./arch/hyprlock.nix + ./arch/niri.nix + ./arch/waybar.nix + ./arch/scripts.nix + ]; + }; - # Specify your home configuration modules here, for example, - # the path to your home.nix. - modules = [ ./home/home.nix ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix + "wsl" = HomeConfiguration { + extraSpecialArgs = { + vars = { + name = "wsl"; + username = "dev-rb"; + }; + }; + modules = [ ]; + }; }; + + inherit home-manager; + inherit (home-manager) packages; }; } diff --git a/home-manager/home/home.nix b/home-manager/home/home.nix index 42d8642..7d8ea0f 100644 --- a/home-manager/home/home.nix +++ b/home-manager/home/home.nix @@ -1,10 +1,8 @@ -{ config, pkgs, ... }: +{ vars, ... }: { - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "dev-rb"; - home.homeDirectory = "/home/dev-rb"; + home.username = vars.username; + home.homeDirectory = "/home/${vars.username}"; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release @@ -15,49 +13,16 @@ # release notes. home.stateVersion = "24.05"; # Please read the comment before changing. - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # users.users.defaultUserShell = pkgs.zsh; - + fonts.fontconfig.enable = true; imports = [ ./packages.nix ./programs/general.nix ./programs/zsh.nix ./programs/neovim.nix + ./programs/git.nix ]; - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. These will be explicitly sourced when using a - # shell provided by Home Manager. If you don't want to manage your shell - # through Home Manager then you have to manually source 'hm-session-vars.sh' - # located at either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/dev-rb/etc/profile.d/hm-session-vars.sh - # - home.sessionVariables = { - EDITOR = "nvim"; - }; + home.sessionVariables = { EDITOR = "nvim"; }; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/home-manager/home/packages.nix b/home-manager/home/packages.nix index 0aa0af5..bd0fa93 100644 --- a/home-manager/home/packages.nix +++ b/home-manager/home/packages.nix @@ -10,7 +10,16 @@ extraOptions = [ "--group-directories-first" ]; }; + # fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + nerd-fonts.iosevka-term + nerd-fonts.jetbrains-mono + noto-fonts + noto-fonts-cjk-sans + noto-fonts-color-emoji + adwaita-fonts + # cli bat eza @@ -20,34 +29,27 @@ jless ripgrep wget + jq + btop + oh-my-posh # javascript/typescript - pnpm fnm + bun # LSPs lua-language-server tailwindcss-language-server #unocss-language-server typescript-language-server + nil + + tree-sitter # formatters - nixfmt-rfc-style + nixfmt stylua - - # # It is sometimes useful to fine-tune packages, for example, by applying - # # overrides. You can do that directly here, just don't forget the - # # parentheses. Maybe you want to install Nerd Fonts with a limited number of - # # fonts? - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') - + biome ]; } diff --git a/home-manager/home/programs/general.nix b/home-manager/home/programs/general.nix index c762f8b..e6d6d96 100644 --- a/home-manager/home/programs/general.nix +++ b/home-manager/home/programs/general.nix @@ -1,7 +1,22 @@ -{ pkgs, ... }: +{ ... }: { - programs.zoxide.enable = true; + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; programs.wezterm.enableZshIntegration = true; + + programs.yazi = { + enable = true; + enableZshIntegration = true; + + settings = { + preview = { + max_width = 10000; + max_height = 10000; + }; + }; + }; } diff --git a/home-manager/home/programs/git.nix b/home-manager/home/programs/git.nix new file mode 100644 index 0000000..d65f4c5 --- /dev/null +++ b/home-manager/home/programs/git.nix @@ -0,0 +1,30 @@ +{ ... }: + +{ + programs.git = { + enable = true; + settings = { + init.defaultBranch = "main"; + push = { + autoSetupRemote = true; + default = "simple"; + }; + user = { + email = "43100342+dev-rb@users.noreply.github.com"; + name = "dev-rb"; + }; + core.editor = "nvim"; + core.pager = "bat"; + }; + }; + + programs.zsh.shellAliases = { + gcf = "git checkout $(git branch --sort=committerdate | fzf --tac --exact)"; + gcrf = '' + git checkout $(git branch --remote --sort=-committerdate | fzf | sed 's/[[:alnum:]_]\{1,\}\///') + ''; + gs = "git status"; + gds = "git diff --staged"; + gd = "git diff"; + }; +} diff --git a/home-manager/home/programs/neovim.nix b/home-manager/home/programs/neovim.nix index d29925c..314eba0 100644 --- a/home-manager/home/programs/neovim.nix +++ b/home-manager/home/programs/neovim.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { programs.neovim.enable = true; @@ -8,7 +8,8 @@ source = ../../../nvim; recursive = true; force = true; - onChange = "install -Dm777 ~/dotfiles/nvim/lua/chadrc.lua ~/.config/nvim/lua/chadrc.lua"; + onChange = + "install -Dm777 ~/dotfiles/nvim/lua/chadrc.lua ~/.config/nvim/lua/chadrc.lua"; }; }; } diff --git a/home-manager/home/programs/zsh.nix b/home-manager/home/programs/zsh.nix index e05df00..0f2eb6d 100644 --- a/home-manager/home/programs/zsh.nix +++ b/home-manager/home/programs/zsh.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ vars, ... }: { programs.zsh = { @@ -14,55 +14,57 @@ ignoreSpace = true; }; - plugins = [ - # { - # name = "fzf-tab"; - # src = pkgs.fetchFromGitHub { - # owner = "Aloxaf"; - # repo = "fzf-tab"; - # rev = "v1.1.2"; - # sha256 = "7fed01afba9392b6392408b9a0cf888522ed7a10"; - # }; - # } - ]; shellAliases = { ls = "eza --icons=always"; cat = "bat"; + } // (if vars.name == "wsl" then { + # Windows path for explorer explorer = "/mnt/c/Windows/explorer.exe"; - wezterm = "/mnt/c/Program\\ Files/WezTerm/wezterm.exe"; - gcf = "git checkout $(git branch --list | fzf)"; - gs = "git status"; - }; + wezterm = "$WEZTERM"; + } else + { }); defaultKeymap = "emacs"; # zprof.enable = true; - completionInit = " + completionInit = '' autoload -Uz compinit for dump in ~/.zcompdump(N.mh+24); do compinit done compinit -C - "; + ''; - initExtra = '' + initContent = '' eval "$(oh-my-posh init zsh --config ~/dotfiles/pure.omp.json)" bindkey '^p' history-search-backward bindkey '^n' history-search-forward - export GOPATH="/home/dev-rb/go" - export PATH="/home/dev-rb/.local/share/fnm:$PATH" + export GOPATH="$HOME/go" + + export PATH="$HOME/.local/share/fnm:$PATH" export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin - export PATH=$PATH:"/mnt/c/Program Files/WezTerm/" + export BUN_INSTALL="$HOME/.bun" + export PAGER=less + export BAT_PAGING=always + export PATH="$BUN_INSTALL/bin:$PATH" + + export ANDROID_HOME="$HOME/Android/Sdk" + export PATH=$PATH:$ANDROID_HOME/emulator + export PATH=$PATH:$ANDROID_HOME/platform-tools + + + + export PATH="$BUN_INSTALL/bin:$PATH" eval "`fnm env`" - export PNPM_HOME="/home/dev-rb/.local/share/pnpm" + export PNPM_HOME="$HOME/.local/share/pnpm" case ":$PATH:" in *":$PNPM_HOME:"*) ;; *) export PATH="$PNPM_HOME:$PATH" ;; @@ -71,11 +73,15 @@ alias air='$(go env GOPATH)/bin/air' source ~/wezterm.sh - ''; + '' + (if vars.name == "wsl" then + ''export WEZTERM="$(fd wezterm.exe /mnt --max-results 1)"'' + else + ""); }; programs.oh-my-posh = { enable = true; enableZshIntegration = true; + configFile = "~/dotfiles/pure.omp.json"; }; } diff --git a/home-manager/overlays.nix b/home-manager/overlays.nix new file mode 100644 index 0000000..9917c10 --- /dev/null +++ b/home-manager/overlays.nix @@ -0,0 +1,12 @@ +(self: super: + let + patchedPam = super.linux-pam.overrideAttrs (old: { + # Replace upstream patch, this is fragile and may break in the future + # https://github.com/nix-community/home-manager/issues/7027 + postPatch = '' + substituteInPlace modules/module-meson.build \ + --replace-fail "sbindir / 'unix_chkpwd'" "'/usr/bin/unix_chkpwd'" + ''; + }); + + in { hyprlock = super.hyprlock.override { pam = patchedPam; }; }) diff --git a/niri/config.kdl b/niri/config.kdl new file mode 100644 index 0000000..a6d0676 --- /dev/null +++ b/niri/config.kdl @@ -0,0 +1,166 @@ +spawn-at-startup "waybar" +spawn-at-startup "dunst" +spawn-at-startup "swww-daemon" +spawn-sh-at-startup "vicinae server" +spawn-sh-at-startup "gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'" // for GTK4 apps +spawn-sh-at-startup "gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'" // for GTK3 apps +spawn-sh-at-startup "~/.config/scripts/wallpapers.sh" + + +prefer-no-csd +hotkey-overlay { + skip-at-startup +} +input { + keyboard { + xkb { + layout "" + model "" + rules "" + variant "" + } + repeat-delay 300 + repeat-rate 50 + track-layout "global" + } + touchpad { + left-handed + tap + dwt + natural-scroll + click-method "clickfinger" + } + mouse { left-handed; } + trackpoint { left-handed; } + trackball { left-handed; } + focus-follows-mouse +} +output "eDP-1" { + scale 1.0 + transform "normal" +} + +layer-rule { + match namespace="^swww-daemon$" + place-within-backdrop true +} + +layout { + background-color "transparent" + gaps 16 + struts { + left 0 + right 0 + top 0 + bottom 0 + } + focus-ring { + width 2; + active-color "rgba(255 255 255 0.4)"; + inactive-color "rgba(59 59 59 0.4)"; + } + border { off; } + default-column-width + center-focused-column "never" +} +cursor { + xcursor-theme "default" + xcursor-size 24 + hide-after-inactive-ms 5000 +} +binds { + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + Mod+B { spawn "firefox"; } + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+C { center-column; } + Mod+Comma { consume-window-into-column; } + Mod+Ctrl+Down { focus-monitor-down; } + Mod+Ctrl+H { focus-monitor-left; } + Mod+Ctrl+J { focus-monitor-down; } + Mod+Ctrl+K { focus-monitor-up; } + Mod+Ctrl+L { focus-monitor-right; } + Mod+Ctrl+Left { focus-monitor-left; } + Mod+Ctrl+R { reset-window-height; } + Mod+Ctrl+Right { focus-monitor-right; } + Mod+Ctrl+Shift+Down { move-column-to-monitor-down; } + Mod+Ctrl+Shift+H { move-column-to-monitor-left; } + Mod+Ctrl+Shift+J { move-column-to-monitor-down; } + Mod+Ctrl+Shift+K { move-column-to-monitor-up; } + Mod+Ctrl+Shift+L { move-column-to-monitor-right; } + Mod+Ctrl+Shift+Left { move-column-to-monitor-left; } + Mod+Ctrl+Shift+Right { move-column-to-monitor-right; } + Mod+Ctrl+Shift+Up { move-column-to-monitor-up; } + Mod+Ctrl+Up { focus-monitor-up; } + Mod+Down { focus-window-or-workspace-down; } + Mod+E { spawn "bash" "-c" "tofi-run | xargs niri msg action spawn --"; } + Mod+Equal { set-column-width "+10%"; } + Mod+F { maximize-column; } + Mod+H { focus-column-left; } + Mod+I { focus-workspace-up; } + Mod+J { focus-window-or-workspace-down; } + Mod+K { focus-window-or-workspace-up; } + Mod+L { focus-column-right; } + Mod+Left { focus-column-left; } + Mod+Minus { set-column-width "-10%"; } + Mod+Period { expel-window-from-column; } + Mod+Q { close-window; } + Mod+R { switch-preset-column-width; } + Mod+Return { spawn "wezterm"; } + Mod+Right { focus-column-right; } + Mod+Shift+1 { move-column-to-workspace 1; } + Mod+Shift+2 { move-column-to-workspace 2; } + Mod+Shift+3 { move-column-to-workspace 3; } + Mod+Shift+4 { move-column-to-workspace 4; } + Mod+Shift+5 { move-column-to-workspace 5; } + Mod+Shift+6 { move-column-to-workspace 6; } + Mod+Shift+7 { move-column-to-workspace 7; } + Mod+Shift+8 { move-column-to-workspace 8; } + Mod+Shift+9 { move-column-to-workspace 9; } + Mod+Shift+Ctrl+R { reset-window-height; } + Mod+Shift+Down { move-window-down-or-to-workspace-down; } + Mod+Shift+E { quit; } + Mod+Shift+Equal { set-window-height "+10%"; } + Mod+Shift+F { fullscreen-window; } + Mod+Shift+H { move-column-left; } + Mod+Shift+I { move-column-to-workspace-up; } + Mod+Shift+J { move-window-down-or-to-workspace-down; } + Mod+Shift+K { move-window-up-or-to-workspace-up; } + Mod+Shift+L { move-column-right; } + Mod+Shift+Left { move-column-left; } + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Shift+Right { move-column-right; } + Mod+Shift+Slash { show-hotkey-overlay; } + Mod+Shift+U { move-column-to-workspace-down; } + Mod+Shift+Up { move-window-up-or-to-workspace-up; } + Mod+Shift+V { switch-focus-between-floating-and-tiling; } + Mod+Shift+WheelScrollDown { focus-window-or-workspace-down; } + Mod+Shift+WheelScrollUp { focus-window-or-workspace-up; } + Mod+Tab { toggle-overview; } + Mod+U { focus-workspace-down; } + Mod+Up { focus-window-or-workspace-up; } + Mod+V { toggle-window-floating; } + Mod+W { toggle-column-tabbed-display; } + Mod+WheelScrollDown { focus-column-right; } + Mod+WheelScrollUp { focus-column-left; } + Mod+Escape { spawn "hyprlock"; } + Alt+Space { spawn-sh "vicinae toggle"; } + Print { screenshot-screen; } + Mod+Shift+S { screenshot; } + XF86AudioLowerVolume { spawn-sh "sh $HOME/.config/scripts/volume.sh down"; } + XF86AudioRaiseVolume { spawn-sh "sh $HOME/.config/scripts/volume.sh up"; } + XF86AudioMute { spawn-sh "$HOME/.config/scripts/volume.sh mute"; } + XF86Favorites { toggle-overview; } + XF86HangupPhone { toggle-overview; } + XF86MonBrightnessDown { spawn-sh "sh $HOME/.config/scripts/brightness.sh down"; } + XF86MonBrightnessUp { spawn-sh "sh $HOME/.config/scripts/brightness.sh up"; } +} diff --git a/nvim/init.lua b/nvim/init.lua index 447946a..1a8e0d9 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -21,11 +21,6 @@ require("lazy").setup({ branch = "v2.5", import = "nvchad.plugins", }, - { - "NvChad/base46", - lazy = false, - branch = "v3.0", - }, { import = "plugins" }, }, lazy_config) diff --git a/nvim/lua/autocmd.lua b/nvim/lua/autocmd.lua index 2110dd5..2c2df98 100644 --- a/nvim/lua/autocmd.lua +++ b/nvim/lua/autocmd.lua @@ -13,3 +13,22 @@ vim.api.nvim_create_autocmd("VimEnter", { end, nested = true, }) + +-- Resizes +vim.api.nvim_create_user_command("Vr", function(opts) + local usage = "Usage: [VerticalResize] :Vr {number (%)}" + if not opts.args or not string.len(opts.args) == 2 then + print(usage) + return + end + vim.cmd(":vertical resize " .. vim.opt.columns:get() * (opts.args / 100.0)) +end, { nargs = "*" }) + +vim.api.nvim_create_user_command("Hr", function(opts) + local usage = "Usage: [HorizontalResize] :Hr {number (%)}" + if not opts.args or not string.len(opts.args) == 2 then + print(usage) + return + end + vim.cmd(":resize " .. ((vim.opt.lines:get() - vim.opt.cmdheight:get()) * (opts.args / 100.0))) +end, { nargs = "*" }) diff --git a/nvim/lua/chadrc.lua b/nvim/lua/chadrc.lua index f2f96d7..32c53bb 100755 --- a/nvim/lua/chadrc.lua +++ b/nvim/lua/chadrc.lua @@ -9,12 +9,24 @@ M.base46 = { theme = "onedark", hl_override = { + NormalFloat = { bg = "darker_black" }, IblScopeChar = { underline = false, link = "Visual" }, }, hl_add = { - ["IlluminatedWordText"] = { link = "Visual", underline = false }, - ["IlluminatedWordRead"] = { link = "Visual", underline = false }, - ["IlluminatedWordWrite"] = { link = "Visual", underline = false }, + MiniCursorword = { link = "Visual", underline = false }, + SnacksPickerInput = { link = "TelescopeNormal" }, + SnacksPickerDir = { link = "TelescopeNormal" }, + SnacksPickerPreview = { link = "TelescopeNormal" }, + SnacksPickerList = { link = "TelescopeNormal" }, + SnacksPickerListTitle = { link = "TelescopePromptTitle" }, + SnacksPickerInputTitle = { link = "TelescopePromptTitle" }, + SnacksPickerInputSearch = { link = "TelescopeNormal" }, + SnacksPickerBorder = { link = "TelescopeBorder" }, + SnacksNormal = { link = "TelescopePromptTitle" }, + SnacksNormalNC = { link = "TelescopePromptTitle" }, + SnacksPickerFooter = { link = "TelescopePromptTitle" }, + SnacksPickerCol = { link = "Text" }, + SnacksPickerTitle = { link = "TelescopePromptTitle" }, }, } diff --git a/nvim/lua/configs/lspconfig.lua b/nvim/lua/configs/lspconfig.lua index ffc59af..95ecf03 100644 --- a/nvim/lua/configs/lspconfig.lua +++ b/nvim/lua/configs/lspconfig.lua @@ -1,130 +1,112 @@ --- load defaults i.e lua_lsp require("nvchad.configs.lspconfig").defaults() -local lspconfig = require "lspconfig" - --- EXAMPLE -local servers = { "html", "cssls", "gopls" } -local nvlsp = require "nvchad.configs.lspconfig" - --- lsps with default config -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - } -end - --- configuring single server, example: typescript -lspconfig.ts_ls.setup { - enabled = false, -} - -lspconfig.jsonls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, -} - --- lspconfig.tsserver.setup { --- enabled = false, --- } - --- https://github.com/yioneko/vtsls --- npm install -g @vtsls/language-server --- pnpm add -g @vtsls/language-server -lspconfig.vtsls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - }, - settings = { - typescript = { - maxTsServerMemory = 8192, - useSeparateSyntaxServer = false, - useSyntaxServer = "never", - }, - vtsls = { +local servers = { + -- "basedpyright", + biome = {}, + cssls = {}, + eslint = { + settings = { + codeAction = { + disableRuleComment = { + enable = true, + location = "separateLine", + }, + showDocumentation = { + enable = true, + }, + }, experimental = { - completion = { - enableServerSideFuzzyMatch = true, + useFlatConfig = false, + }, + format = false, + nodePath = "", + onIgnoredFiles = "off", + problems = { + shortenToSingleLine = false, + }, + quiet = false, + rulesCustomizations = {}, + run = "onSave", + useESLintClass = false, + validate = "on", + workingDirectory = { + mode = "location", + }, + }, + }, + gopls = {}, + html = {}, + jsonls = {}, + nil_ls = {}, + prettierd = {}, + -- pylsp = {}, + tailwindcss = { + settings = { + tailwindCSS = { + experimental = { + classRegex = { + { "cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]" }, + { "cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)" }, + }, }, }, }, }, -} - -lspconfig.tailwindcss.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - settings = { - tailwindCSS = { - experimental = { - classRegex = { - { "cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]" }, - { "cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)" }, + unocss = { + filetypes = { "html", "javascriptreact", "rescript", "typescriptreact", "vue", "svelte", "typescript.tsx" }, + settings = { + root_dir = function(fname) + return require("vim.lsp.config.util").root_pattern( + "unocss.config.js", + "unocss.config.ts", + "uno.config.js", + "uno.config.ts" + )(fname) + end, + }, + }, + vtsls = { + -- https://github.com/yioneko/vtsls + -- npm install -g @vtsls/language-server + -- pnpm add -g @vtsls/language-server + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, + settings = { + typescript = { + tsdk = "./node_modules/typescript/lib", + maxTsServerMemory = 8192, + useSeparateSyntaxServer = false, + useSyntaxServer = "never", + preferences = { + importModuleSpecifier = "non-relative", + updateImportsOnFileMove = { + enabled = "always", + }, + suggest = { + completeFunctionCalls = true, + }, }, }, + -- vtsls = { + -- autoUseWorkspaceTsdk = true, + -- experimental = { + -- completion = { + -- enableServerSideFuzzyMatch = true, + -- }, + -- }, + -- }, }, }, } --- lspconfig.eslint.setup { --- on_init = nvlsp.on_init, --- capabilities = nvlsp.capabilities, --- on_attach = nvlsp.on_attach, --- settings = { --- codeAction = { --- disableRuleComment = { --- enable = true, --- location = "separateLine", --- }, --- showDocumentation = { --- enable = true, --- }, --- }, --- experimental = { --- useFlatConfig = false, --- }, --- format = false, --- nodePath = "", --- onIgnoredFiles = "off", --- problems = { --- shortenToSingleLine = false, --- }, --- quiet = false, --- rulesCustomizations = {}, --- run = "onSave", --- useESLintClass = false, --- validate = "on", --- workingDirectory = { --- mode = "location", --- }, --- }, --- } - -lspconfig.unocss.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - filetypes = { "html", "javascriptreact", "rescript", "typescriptreact", "vue", "svelte", "typescript.tsx" }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "unocss.config.js", - "unocss.config.ts", - "uno.config.js", - "uno.config.ts" - )(fname) - end, -} +for name, opts in pairs(servers) do + vim.lsp.config(name, opts) +end -lspconfig.biome.setup {} +vim.lsp.enable(vim.tbl_keys(servers)) diff --git a/nvim/lua/configs/snacks.lua b/nvim/lua/configs/snacks.lua new file mode 100644 index 0000000..900d73d --- /dev/null +++ b/nvim/lua/configs/snacks.lua @@ -0,0 +1,23 @@ +local options = { + quickfile = { enabled = true }, + picker = { + win = { + input = { + keys = { + [""] = { "focus_preview", mode = { "i", "n" } }, + }, + b = { + minimove_disable = true, + }, + }, + preview = { + keys = { + [""] = { "focus_input", mode = { "i", "n" } }, + }, + }, + }, + }, + zen = {}, +} + +return options diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua index 26fe1fc..e54d25c 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/lua/mappings.lua @@ -1,10 +1,6 @@ require "nvchad.mappings" --- add yours here - local map = vim.keymap.set -vim.keymap.del("n", "") -vim.keymap.del("n", "") map({ "n", "i", "v" }, "", " w ") @@ -48,7 +44,366 @@ map("n", "f", function() vim.diagnostic.open_float { border = "rounded" } end) -map("n", "zn", function() - require("focus").toggle {} - require("focus").toggle_zen {} -end) +map("n", "ca", vim.lsp.buf.code_action) +map("n", "K", vim.lsp.buf.hover) + +map("n", "1", " Vr 10 ") +map("n", "2", " Vr 20 ") +map("n", "3", " Vr 30 ") +map("n", "4", " Vr 40 ") +map("n", "5", " Vr 50 ") +map("n", "6", " Vr 60 ") +map("n", "7", " Vr 70 ") +map("n", "8", " Vr 80 ") +map("n", "9", " Vr 90 ") + +local snacks = { + { + "sf", + function() + Snacks.picker.smart() + end, + desc = "Smart Find Files", + }, + { + "fw", + function() + Snacks.picker.grep() + end, + desc = "Grep", + }, + { + "fch", + function() + Snacks.picker.command_history() + end, + desc = "Command History", + }, + -- find + { + "fb", + function() + Snacks.picker.buffers() + end, + desc = "Buffers", + }, + { + "fC", + function() + Snacks.picker.files { cwd = vim.fn.stdpath "config" } + end, + desc = "Find Config File", + }, + { + "ff", + function() + Snacks.picker.files() + end, + desc = "Find Files", + }, + { + "fg", + function() + Snacks.picker.git_files() + end, + desc = "Find Git Files", + }, + { + "fp", + function() + Snacks.picker.projects() + end, + desc = "Projects", + }, + { + "fr", + function() + Snacks.picker.recent() + end, + desc = "Recent", + }, + -- git + { + "gb", + function() + Snacks.picker.git_branches() + end, + desc = "Git Branches", + }, + { + "gl", + function() + Snacks.picker.git_log() + end, + desc = "Git Log", + }, + { + "gL", + function() + Snacks.picker.git_log_line() + end, + desc = "Git Log Line", + }, + { + "gs", + function() + Snacks.picker.git_status() + end, + desc = "Git Status", + }, + { + "gS", + function() + Snacks.picker.git_stash() + end, + desc = "Git Stash", + }, + { + "gd", + function() + Snacks.picker.git_diff() + end, + desc = "Git Diff (Hunks)", + }, + { + "gf", + function() + Snacks.picker.git_log_file() + end, + desc = "Git Log File", + }, + -- gh + { + "gi", + function() + Snacks.picker.gh_issue() + end, + desc = "GitHub Issues (open)", + }, + { + "gI", + function() + Snacks.picker.gh_issue { state = "all" } + end, + desc = "GitHub Issues (all)", + }, + { + "gp", + function() + Snacks.picker.gh_pr() + end, + desc = "GitHub Pull Requests (open)", + }, + { + "gP", + function() + Snacks.picker.gh_pr { state = "all" } + end, + desc = "GitHub Pull Requests (all)", + }, + -- Grep + { + "sb", + function() + Snacks.picker.lines() + end, + desc = "Buffer Lines", + }, + { + "sB", + function() + Snacks.picker.grep_buffers() + end, + desc = "Grep Open Buffers", + }, + { + "sw", + function() + Snacks.picker.grep_word() + end, + desc = "Visual selection or word", + mode = { "n", "x" }, + }, + -- search + { + 's"', + function() + Snacks.picker.registers() + end, + desc = "Registers", + }, + { + "s/", + function() + Snacks.picker.search_history() + end, + desc = "Search History", + }, + { + "sb", + function() + Snacks.picker.lines() + end, + desc = "Buffer Lines", + }, + { + "sc", + function() + Snacks.picker.command_history() + end, + desc = "Command History", + }, + { + "sC", + function() + Snacks.picker.commands() + end, + desc = "Commands", + }, + { + "sd", + function() + Snacks.picker.diagnostics() + end, + desc = "Diagnostics", + }, + { + "sD", + function() + Snacks.picker.diagnostics_buffer() + end, + desc = "Buffer Diagnostics", + }, + { + "sh", + function() + Snacks.picker.help() + end, + desc = "Help Pages", + }, + { + "sH", + function() + Snacks.picker.highlights() + end, + desc = "Highlights", + }, + { + "si", + function() + Snacks.picker.icons() + end, + desc = "Icons", + }, + { + "sj", + function() + Snacks.picker.jumps() + end, + desc = "Jumps", + }, + { + "sk", + function() + Snacks.picker.keymaps() + end, + desc = "Keymaps", + }, + { + "sl", + function() + Snacks.picker.loclist() + end, + desc = "Location List", + }, + { + "sm", + function() + Snacks.picker.marks() + end, + desc = "Marks", + }, + { + "sM", + function() + Snacks.picker.man() + end, + desc = "Man Pages", + }, + { + "sq", + function() + Snacks.picker.qflist() + end, + desc = "Quickfix List", + }, + { + "sR", + function() + Snacks.picker.resume() + end, + desc = "Resume", + }, + { + "su", + function() + Snacks.picker.undo() + end, + desc = "Undo History", + }, + -- LSP + { + "gd", + function() + Snacks.picker.lsp_definitions() + end, + desc = "Goto Definition", + }, + { + "gD", + function() + Snacks.picker.lsp_declarations() + end, + desc = "Goto Declaration", + }, + { + "gr", + function() + Snacks.picker.lsp_references() + end, + nowait = true, + desc = "References", + }, + { + "gI", + function() + Snacks.picker.lsp_implementations() + end, + desc = "Goto Implementation", + }, + { + "gy", + function() + Snacks.picker.lsp_type_definitions() + end, + desc = "Goto T[y]pe Definition", + }, + { + "ls", + function() + Snacks.picker.lsp_symbols() + end, + desc = "LSP Symbols", + }, + { + "lws", + function() + Snacks.picker.lsp_workspace_symbols() + end, + desc = "LSP Workspace Symbols", + }, +} + +for _, val in pairs(snacks) do + map("n", val[1], val[2], { desc = val.desc }) +end diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua index fcbb20d..4746475 100644 --- a/nvim/lua/options.lua +++ b/nvim/lua/options.lua @@ -13,4 +13,4 @@ o.foldlevelstart = 99 o.foldenable = true o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]] -vim.g.skip_ts_context_commentstring_module = true +vim.opt.sessionoptions = "buffers,curdir,help,tabpages,winsize" diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index 99e0fe5..4c5dc85 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -1,49 +1,39 @@ return { { - "stevearc/conform.nvim", - event = "BufWritePre", -- uncomment for format on save - config = require("configs.conform").setup, + "OXY2DEV/markview.nvim", + event = "VeryLazy", + dependencies = { "saghen/blink.cmp" }, }, - - -- These are some examples, uncomment them if you want to see them work! + { import = "nvchad.blink.lazyspec" }, { "neovim/nvim-lspconfig", config = function() require "configs.lspconfig" end, }, + { + "stevearc/conform.nvim", + event = "BufWritePre", + config = require("configs.conform").setup, + }, { "kylechui/nvim-surround", version = "*", -- Use for stability; omit to use `main` branch for the latest features event = "VeryLazy", config = function() - require("nvim-surround").setup { - -- Configuration here, or leave empty to use defaults - } + require("nvim-surround").setup {} end, }, { "folke/persistence.nvim", - event = "BufReadPre", -- this will only start session saving when an actual file was opened - opts = { - -- add any custom options here - }, - }, - - { - "cdmill/focus.nvim", - cmd = { "Focus", "Zen", "Narrow" }, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, + event = "BufReadPre", + opts = {}, }, { "mrjones2014/smart-splits.nvim", - lazy = false, + event = "VeryLazy", config = function() require("smart-splits").setup { at_edge = "stop", @@ -54,6 +44,7 @@ return { { "nvim-tree/nvim-tree.lua", + event = "VeryLazy", opts = require "configs.nvim-tree", config = function(_, opts) require("nvim-tree").setup(opts) @@ -68,8 +59,6 @@ return { config = require("configs.ufo").setup, }, - { "akinsho/git-conflict.nvim", version = "*", config = true }, - { "numToStr/Comment.nvim", event = "BufReadPre", @@ -78,7 +67,7 @@ return { { "windwp/nvim-ts-autotag", - lazy = false, + event = "VeryLazy", config = function(_, opts) require("nvim-ts-autotag").setup(opts) end, @@ -86,44 +75,58 @@ return { { "nvim-treesitter/nvim-treesitter", - dependencies = { - { - "JoosepAlviste/nvim-ts-context-commentstring", - config = function() - require("ts_context_commentstring").setup {} - end, - }, - "nvim-treesitter/nvim-treesitter-textobjects", - }, - opts = { - ensure_installed = { + lazy = false, + event = "BufRead", + branch = "main", + build = ":TSUpdate", + config = function() + require("nvim-treesitter").setup { + install_dir = vim.fn.stdpath "data" .. "/site", + } + + local parsers = { + "bash", "css", + "diff", + "editorconfig", + "git_config", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", "html", "javascript", + "jsdoc", + "json", "lua", + "make", + "markdown", + "markdown_inline", "python", - "scss", + "query", + "regex", + "toml", "tsx", "typescript", - }, - highlight = { - enable = true, - use_languagetree = true, - }, - textobjects = { - move = { - enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, - }, - }, - }, - }, + "typst", + "vim", + "vimdoc", + "xml", + "yaml", + } + vim.api.nvim_create_autocmd("User", { + pattern = "LazyDone", + once = true, + callback = function() + require("nvim-treesitter").install(parsers) + end, + }) + end, + }, { "lukas-reineke/indent-blankline.nvim", + event = "VeryLazy", opts = { scope = { enabled = false }, }, @@ -132,9 +135,11 @@ return { { "nvim-telescope/telescope-ui-select.nvim", version = "*", + enabled = false, }, { "nvim-telescope/telescope.nvim", + enabled = false, dependencies = { "nvim-telescope/telescope-ui-select.nvim", }, @@ -155,36 +160,23 @@ return { end, }, { - "RRethy/vim-illuminate", - event = { "CursorHold", "CursorHoldI" }, - dependencies = "nvim-treesitter", - config = function() - require("illuminate").configure { - under_cursor = true, - max_file_lines = nil, - delay = 100, - providers = { - "lsp", - "treesitter", - "regex", - }, - filetypes_denylist = { - "NvimTree", - "Trouble", - "Outline", - "TelescopePrompt", - "Empty", - "dirvish", - "fugitive", - "alpha", - "packer", - "neogitstatus", - "spectre_panel", - "toggleterm", - "DressingSelect", - "aerial", - }, - } - end, + "nvim-mini/mini.cursorword", + event = "VeryLazy", + version = false, + opts = {}, + }, + -- { "nvim-mini/mini.ai", event = "VeryLazy", version = false, opts = { search_method = "cover_or_nearest" } }, + { "nvim-mini/mini.move", event = "VeryLazy", version = false, opts = {} }, + { + "folke/snacks.nvim", + priority = 1000, + event = "VeryLazy", + opts = require "configs.snacks", + }, + { + "windwp/nvim-autopairs", + opts = { + disable_filetype = { "snacks_picker_input" }, + }, }, } diff --git a/scripts/brightness.sh b/scripts/brightness.sh new file mode 100644 index 0000000..22d60ac --- /dev/null +++ b/scripts/brightness.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +send_notification() { + brightness=$(printf "%.0f\n" "$(brillo -G)") + space=$(printf "%64s"); + dunstify -a "Backlight" -u low -r 9992 -h int:value:"$brightness" -i "brightness" "Brightness $space $brightness%" "\n" -t 1000 +} + +case $1 in + up) + brillo -q -A 2 + send_notification "$1" + ;; + down) + brillo -q -U 2 + send_notification "$1" + ;; +esac diff --git a/scripts/volume.sh b/scripts/volume.sh new file mode 100644 index 0000000..be83846 --- /dev/null +++ b/scripts/volume.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +case $1 in + up) + wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 + wpctl set-volume -l 2.0 @DEFAULT_AUDIO_SINK@ 5%+ + ;; + down) + wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 + wpctl set-volume -l 2.0 @DEFAULT_AUDIO_SINK@ 5%- + ;; + mute) + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + ;; +esac + +VOLUME=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tr -dc '0-9' | sed 's/^0*//') + +space=$(printf "%70s"); + +send_notification() { + if [ "$1" = "mute" ]; then ICON="mute"; elif [ "$VOLUME" -lt 33 ]; then ICON="low"; elif [ "$VOLUME" -lt 66 ]; then ICON="medium"; else ICON="high"; fi + if [ "$1" = "mute" ]; then TEXT="Muted"; else TEXT="$space ${VOLUME}%"; fi + + dunstify -a "Volume" -u low -r 9993 -h int:value:"$VOLUME" -i "volume-$ICON" "Volume $TEXT" -t 2000 +} + +case $1 in + mute) + case "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" in + *MUTED* ) send_notification mute;; + * ) send_notification;; + esac;; + *) + send_notification;; +esac diff --git a/scripts/wallpapers.sh b/scripts/wallpapers.sh new file mode 100644 index 0000000..8a27950 --- /dev/null +++ b/scripts/wallpapers.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Favorites +# wallhaven-vq7ve5.jpg +# wallhaven-ly93ry.png +# wallhaven-3qkggv.jpg +# wallhaven-ex5jql.jpg +# wallhaven-3lvgg6.jpg + +dir=${HOME}/wallpapers +img=wallhaven-3qkggv.jpg + +swww img ${dir}/$img --transition-type=wipe diff --git a/waybar/colors.css b/waybar/colors.css new file mode 100644 index 0000000..2e02451 --- /dev/null +++ b/waybar/colors.css @@ -0,0 +1,20 @@ +@define-color foreground #D9E0EE; +@define-color background #0B0A10; +@define-color cursor #D9E0EE; + +@define-color color0 #1E1E2E; +@define-color color1 #F28FAD; +@define-color color2 #ABE9B3; +@define-color color3 #F9E2AF; +@define-color color4 #A7C7E7; +@define-color color5 #F5BDE6; +@define-color color6 #B5E8E0; +@define-color color7 #D9E0EE; +@define-color color8 #6E6A86; +@define-color color9 #F28FAD; +@define-color color10 #ABE9B3; +@define-color color11 #F9E2AF; +@define-color color12 #A7C7E7; +@define-color color13 #F5BDE6; +@define-color color14 #B5E8E0; +@define-color color15 #C0CAF5; diff --git a/waybar/config.jsonc b/waybar/config.jsonc new file mode 100644 index 0000000..58f258c --- /dev/null +++ b/waybar/config.jsonc @@ -0,0 +1,30 @@ +{ + "layer": "bottom", + "position": "top", + "margin": "0 0 0 0", + "fixed-center": true, + "reload_style_on_change": true, + // "mode": "overlay", + "passtrough": true, + + "include": ["~/.config/waybar/modules.jsonc"], + + "modules-left": [ + "niri/window", + "group/apps" + + ], + + "modules-center": [ + // "group/info", + "niri/workspaces" + // "group/utils" + + ], + + "modules-right": [ + "group/video", + "clock", + "group/power" + ] + } diff --git a/waybar/modules.jsonc b/waybar/modules.jsonc new file mode 100644 index 0000000..57e9b97 --- /dev/null +++ b/waybar/modules.jsonc @@ -0,0 +1,275 @@ +{ + "niri/window": { + "format": "", + + "format-alt": "{title}", + "max-length": 80, + "separate-outputs": false, + "rewrite": { + "^.*( — Firefox|Firefox)$": "󰈹 Firefox", + "^.*( — Chromium|Chromium)$": "󰈹 Chromium", + "^.*v( .*|$)": " Neovim", + "^.*(- Spotify|Spotify)$": "󰏤 Spotify" + } + }, + + "niri/workspaces": { + "format": "{icon}", + "on-click": "activate", + "all-outputs": false, + "separate-outputs": true, + "format-icons": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "0" + } + }, + + "clock": { + "format": "{:%A %m/%d %I:%M %p}", + "format-alt": "{:%A %m/%d}", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "on-scroll": 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } + }, + + "group/info": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": true }, + "modules": [ + "custom/arrow-left", + "custom/playerlabel", + "custom/updates" + ] + }, + + "group/apps": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": true }, + "modules": [ + "custom/arrow-right", + "wlr/taskbar", + "cpu", + "memory", + "disk" + ] + }, + + "group/video": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": false }, + "modules": [ + "custom/arrow-left", + "group/control-center" + ] + }, + + "group/control-center": { + "orientation": "inherit", + "modules": ["group/audio", "group/connection"] + }, + + "group/audio": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": false }, + "modules": ["pulseaudio"] // "pulseaudio/slider" + }, + + "group/connection": { + "orientation": "inherit", + "modules": ["group/network"] + }, + + "group/network": { + "orientation": "inherit", + "drawer": { "transition-duration": 10000, "transition-left-to-right": true }, + "modules": ["network"] + }, + + "group/bluetooth": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": true }, + "modules": ["bluetooth", "bluetooth#status"] + }, + + "group/utils": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": false }, + "modules": [ + "custom/arrow-right", + "tray", + "custom/notifications", + "custom/weather" + ] + }, + + "group/power": { + "orientation": "inherit", + "drawer": { "transition-duration": 300, "transition-left-to-right": false }, + "modules": ["battery", "power-profiles-daemon"] + }, + + "cpu": { "format": "󰘚 {usage}󱉸" }, + "memory": { "format": " {:2}󱉸" }, + "disk": { "interval": 600, "format": "󰆼 {percentage_used}󱉸", "path": "/" }, + + "battery": { + "states": { "good": 95, "warning": 30, "critical": 15 }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-icons": ["","","","",""], + "tooltip-format": "{timeTo} {capacity} % | {power} W" + }, + + "pulseaudio": { + "format": "{volume}% {icon}", + "format-bluetooth": "{icon}", + "format-muted": "󰖁", + "tooltip": false, + "format-icons": { + "headphones": "󰋌","handsfree": "󰋌","headset": "󰋌", + "phone": "","portable": "","car": " ", + "default": ["󰕿","󰖀","󰕾"] + }, + "on-click": "sh ~/.config/scripts/volume.sh mute", + "on-click-middle": "pavucontrol", + "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +5%", + "on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -5%", + "smooth-scrolling-threshold": 1 + }, + + "network": { + "format": "{icon} ", + "format-icons": { "wifi": ["󰤨"], "ethernet": ["󰈁"], "disconnected": [""] }, + "format-wifi": "󰤨", + "format-ethernet": "󰈁", + "format-disconnected": "󰖪", + "interval": 5, + "tooltip": true, + "tooltip-format": "{ipaddr}", + "tooltip-format-wifi": "{essid} ({signalStrength}%) \n{ipaddr} | {frequency} MHz{icon}", + "tooltip-format-ethernet": "{ifname} 󰈀\n{ipaddr} | {frequency} MHz{icon}", + "tooltip-format-disconnected": "Not Connected to any type of Network" + }, + + "network#speed": { + "format": "{bandwidthDownBits} ", + "interval": 5, + "tooltip": false + }, + + "bluetooth": { + "format":"", + "format-on": "", + "format-off": "󰂲", + "format-disabled": "", + "format-connected": "", + "tooltip": false + }, + + "bluetooth#status": { + "format-connected": "{num_connections}", + "format-connected-battery": "{device_battery_percentage}%", + "tooltip-format": "{controller_alias} {controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias} {controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias} {device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias} {device_address} {device_battery_percentage}%" + }, + + //"custom/arrow-left": { "format": "󰁒", "tooltip": false }, + //"custom/arrow-right": { "format": "󰁙", "tooltip": false }, + + "custom/arrow-left": { "format": "<", "tooltip": false }, + "custom/arrow-right": { "format": ">", "tooltip": false }, + + "custom/playerlabel": { + "format": "{}", + "return-type": "json", + "max-length": 50, + "exec": "playerctl -p spotify metadata --format '{\"text\": \"{{artist}} : {{markup_escape(title)}}\", \"tooltip\": \"Spotify : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", + "on-click": "bash -c 'player=$(playerctl -l | grep -E \"spotify|cider\" | head -n 1); playerctl -p \"$player\" previous'", + "on-click-middle": "bash -c 'player=$(playerctl -l | grep -E \"spotify|cider\" | head -n 1); playerctl -p \"$player\" play-pause'", + "on-click-right": "bash -c 'player=$(playerctl -l | grep -E \"spotify|cider\" | head -n 1); playerctl -p \"$player\" next'", + "tooltip": false + }, + + "custom/notifications": { + "format": "{} {icon}", + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true, + "tooltip": false, + "format-icons": { + "notification": "󱅫", + "dnd-notification": "󰂛", + "none": "󰂚", + "dnd-none": "󰂛", + "inhibited-notification": "󰂚", + "inhibited-none": "󰂚", + "dnd-inhibited-notification": "󰂛", + "dnd-inhibited-none": "󰂛" + } + }, + + "custom/weather": { + "format": "{}", + "tooltip": true, + "interval": 3600, + "exec": "wttrbar --custom-indicator '{ICON}{temp_C}°C'", + "return-type": "json" + }, + + + "custom/icon": { "format": "󰣇" }, + +/* ─────────────── TASKBAR AND POWER PROFILES ───────────────────────────────── */ + + "wlr/taskbar": { + "format": "{icon}", + "icon-size": 20, + "all-outputs": true, + "tooltip-format": "{title}", + "on-click": "activate", + "on-click-middle": "close", + "ignore-list": ["wofi", "rofi", "swaylock"] + }, + + "power-profiles-daemon": { + "format": "{icon}", + "tooltip": true, + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "format-icons": { + "default": "", + "balanced": "", + "power-saver": "" + } + }, + + "tray": { "spacing": 8 } +} + diff --git a/waybar/other.css b/waybar/other.css new file mode 100644 index 0000000..ad743eb --- /dev/null +++ b/waybar/other.css @@ -0,0 +1,107 @@ +@define-color foreground #e2e2e2; +@define-color back #131313; +@define-color cursor #D9E0EE; + +/*-----All Colors--------*/ + +@define-color background #131313; + +@define-color error #ffb4ab; + +@define-color error_container #93000a; + +@define-color inverse_on_surface #303030; + +@define-color inverse_primary #5e5e5e; + +@define-color inverse_surface #e2e2e2; + +@define-color on_background #e2e2e2; + +@define-color on_error #690005; + +@define-color on_error_container #ffdad6; + +@define-color on_primary #1b1b1b; + +@define-color on_primary_container #000000; + +@define-color on_primary_fixed #ffffff; + +@define-color on_primary_fixed_variant #e2e2e2; + +@define-color on_secondary #1b1b1b; + +@define-color on_secondary_container #e2e2e2; + +@define-color on_secondary_fixed #1b1b1b; + +@define-color on_secondary_fixed_variant #3b3b3b; + +@define-color on_surface #e2e2e2; + +@define-color on_surface_variant #c6c6c6; + +@define-color on_tertiary #1b1b1b; + +@define-color on_tertiary_container #000000; + +@define-color on_tertiary_fixed #ffffff; + +@define-color on_tertiary_fixed_variant #e2e2e2; + +@define-color outline #919191; + +@define-color outline_variant #474747; + +@define-color primary #ffffff; + +@define-color primary_container #d4d4d4; + +@define-color primary_fixed #5e5e5e; + +@define-color primary_fixed_dim #474747; + +@define-color scrim #000000; + +@define-color secondary #c6c6c6; + +@define-color secondary_container #474747; + +@define-color secondary_fixed #c6c6c6; + +@define-color secondary_fixed_dim #ababab; + +@define-color shadow #000000; + +@define-color source_color #6b242f; + +@define-color surface #131313; + +@define-color surface_bright #393939; + +@define-color surface_container #1f1f1f; + +@define-color surface_container_high #2a2a2a; + +@define-color surface_container_highest #353535; + +@define-color surface_container_low #1b1b1b; + +@define-color surface_container_lowest #0e0e0e; + +@define-color surface_dim #131313; + +@define-color surface_tint #c6c6c6; + +@define-color surface_variant #474747; + +@define-color tertiary #e2e2e2; + +@define-color tertiary_container #919191; + +@define-color tertiary_fixed #5e5e5e; + +@define-color tertiary_fixed_dim #474747; + + diff --git a/waybar/reload.sh b/waybar/reload.sh new file mode 100644 index 0000000..10b7699 --- /dev/null +++ b/waybar/reload.sh @@ -0,0 +1,4 @@ +#!/bin/bash +waybar& +trap "killall waybar" EXIT +while inotifywait -r -e create,modify ~/.config/waybar/*; do killall -SIGUSR2 waybar; done diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..4c7b701 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,179 @@ + @import "./other.css"; + + * { + font: bold 10px "JetBrainsMono Nerd Font Propo"; + border: none; + border-radius: 0px; + box-shadow: none; + text-shadow: none; + } + + window#waybar { + background: alpha(@surface_container_lowest, 0); + /* border: 1px solid alpha(@secondary, 0.25); */ + /* border-radius: 4px; */ + } + + tooltip { + background: alpha(@surface_container_lowest, 0.8); + border: 2px solid alpha(@primary_fixed_dim, 1); + border-radius: 10px; + color: @on_tertiary_container; + } + + tooltip label { + color: @foreground; + } + + #window { + margin: 0px 0px 2px 0px; + padding: 2px 0px 2px 10px; + background: transparent; + border-radius: 10px; + color: lighter(@main-color); + } + + #custom-arrow-right, + #custom-arrow-left { + margin: 0px 4px 2px 4px; + color: alpha(@on_secondary_container, .3); + } + + #cpu, + #memory, + #disk, + #custom-updates, + #custom-playerlabel, + #custom-cava, + #custom-notifications, + #tray, + #custom-theme-switcher, + #power-profiles-daemon, + #control-center { + margin: 6px 4px; + /* 6 vertical, 4 horizontal */ + padding: 0px 8px; + background: alpha(@tertiary_container, 0.8); + color: @on_tertiary_container; + border-radius: 10px; + } + + #custom-section, + #custom-stop, + #custom-record { + margin: 6px 0px; + /* 6 vertical, 4 horizontal */ + padding: 0px 8px; + background: alpha(@tertiary_container, 0.8); + color: @on_tertiary_container; + border-radius: 10px; + } + + #custom-section { + border-radius: 0 0 0 0; + } + + #custom-stop { + border-radius: 0 10px 10px 0; + } + + #custom-record { + border-radius: 10px 0 0 10px; + } + + #workspaces { + margin: 0px 8px 0px 8px; + padding: 0px 12px 0px 12px; + background: black; + color: alpha(@on_secondary_container, 1); + border-radius: 0 0 10px 10px; + } + + #workspaces button { + font-size: 20px; + margin: 0 4px; + padding: 0 0px; + color: alpha(@on_secondary_container, 0.45); + border-radius: 10px; + } + + #workspaces button.active { + margin: 0 4px; + background: alpha(@primary, 0); + color: alpha(@primary, 1); + } + + + + #workspaces button:hover, + #workspaces button.urgent { + background: alpha(@background, 0.5); + color: alpha(@primary, 1); + } + + /* ======= Audio ======= */ + #pulseaudio, + #network, + #bluetooth { + margin: 0 2px; + padding: 0 4px; + background: alpha(@surface_container_highest, 0); + color: @on_tertiary_container; + border-radius: 10px; + } + + #pulseaudio-slider { + margin: 10px; + } + + #pulseaudio-slider slider, + #pulseaudio-slider highlight { + background: transparent; + border: none; + box-shadow: none; + border-radius: 8px; + } + + #clock { + margin: 0px 4px 2px 4px; + padding: 0; + background: alpha(@background, 0); + border-radius: 10px; + color: lighter(@main-color); + } + + #power { + margin: 0px 4px 2px 4px; + background: transparent; + color: @on_surface; + border-radius: 10px; + } + + #battery { + margin: 0px 4px 0px 4px; + padding: 0 8px; + } + + #taskbar { + margin: 0 4px; + padding: 0 8px; + border-radius: 10px; + background: transparent; + color: @on_tertiary_container; + } + + #taskbar button:hover { + background: alpha(@tertiary_container, 0.8); + } + + #taskbar button.active { + background: transparent; + } + + #custom-weather { + padding: 0 4px; + } + + #bluetooth { + margin-left: 7px; + }