diff --git a/flake.nix b/flake.nix index 3ee6e56..1f1a684 100644 --- a/flake.nix +++ b/flake.nix @@ -41,8 +41,8 @@ } @ inputs: let system = "x86_64-linux"; username = "pagedmov"; - wallpaper = "${self}/media/wallpapers/cabin-2.jpg"; - base16scheme = "chalk"; # can be easily changed with the chscheme script + wallpaper = "${self}/media/wallpapers/nord-balloons.png"; + base16scheme = "nord"; # can be easily changed with the chscheme script # Map colors from yaml to attribute set # Extracting colors into a set here allows them to be propagated across the entire config diff --git a/media/wallpapers/nord-balloons.png b/media/wallpapers/nord-balloons.png new file mode 100644 index 0000000..747c737 Binary files /dev/null and b/media/wallpapers/nord-balloons.png differ diff --git a/modules/home/environment/waybar/settings.nix b/modules/home/environment/waybar/settings.nix index adbb226..e3faa4c 100644 --- a/modules/home/environment/waybar/settings.nix +++ b/modules/home/environment/waybar/settings.nix @@ -1,136 +1,87 @@ -{...}: +{ +pkgs, +... +}: +# Grocery list: +# Clock +# CPU/MEM meters +# Home folder and Nix store storage tracking? +# Workspaces (per monitor would be nice) +# A separate bar for both monitors +# secondary monitor will have a vertical bar on the left side +# Can contain more info with two bars +let + workspaces = { + format = "{icon}"; + format-icons = { + "1" = "一"; + "2" = "二"; + "3" = "三"; + "4" = "四"; + "5" = "五"; + "6" = "六"; + }; + persistent-workspaces = { + "HDMI-A-1" = [ 1 2 3 ]; + "DP-1" = [ 4 5 6 ]; + }; + }; + +in { programs.waybar.settings.mainBar = { - layer = "top"; - position = "left"; - mod = "dock"; - margin-left = 4; - margin-right = 0; - margin-top = 4; - margin-bottom = 4; - exclusive = true; - passthrough = false; - "gtk-layer-shell" = true; - reload_style_on_change = true; + layer = "bottom"; + output = "DP-1"; + position = "top"; + name = "mainBar"; + mode = "dock"; modules-left = [ - "custom/spacer" "hyprland/workspaces" - "custom/spacer" + "cava" ]; - - modules-right = [ - "group/expand" - "group/expand-3" - "network" + modules-center = [ "clock" - "upower" - "custom/notification" + ]; + modules-right = [ + "custom/disk-icon" + "memory" + "cpu" + "group/powerbtns" ]; - "custom/led" = { - format = "󰍿"; - format-alt = "󰍿"; - on-click = "~/mouse.sh"; - rotate = 90; - tooltip = false; + "hyprland/workspaces" = workspaces; + + cava = { + framerate = 30; + autosens = 1; + sensitivity = 1; + bars = 14; + lower_cutoff_freq = 50; + higher_cutoff_freq = 10000; + method = "pulse"; + source = "auto"; + stereo = true; + reverse = true; + bar_delimiter = 0; + monstercat = false; + waves = false; + noise_reduction = 0.77; + input_delay = 2; + format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ]; }; - "group/expand-3" = { - orientation = "vertical"; - drawer = { - "transition-duration" = 600; - "children-class" = "not-power"; - "transition-to-left" = false; - "click-to-reveal" = false; - }; - modules = [ - "pulseaudio" - "pulseaudio/slider" - ]; - }; - - clock = { - format = "{:%I\n%M}"; - interval = 1; - rotate = 0; - on-click = "/usr/local/bin/ags -t ActivityCenter"; - tooltip-format = "{calendar}"; - - calendar = { - mode = "month"; - "mode-mon-col" = 3; - "on-scroll" = 1; - "on-click-right" = "mode"; - format = { - months = "{}"; - weekdays = "{}"; - today = "{}"; - }; - }; - - actions = { - "on-click-right" = "mode"; - "on-click-forward" = "tz_up"; - "on-click-backward" = "tz_down"; - "on-scroll-up" = "shift_up"; - "on-scroll-down" = "shift_down"; - }; - }; - - upower = { - icon-size = 20; - format = ""; - on-click = "/home/anik/battery.sh"; - tooltip = true; - rotate = 0; - tooltip-spacing = 20; - on-click-right = "pkill waybar & hyprctl dispatch exec waybar"; - }; - - "upower#headset" = { - format = " {percentage}"; - "native-path" = "/org/freedesktop/UPower/devices/headset_dev_A6_98_9A_0D_D3_49"; - "show-icon" = false; - tooltip = false; - }; - - "group/expand-4" = { - orientation = "horizontal"; - drawer = { - "transition-duration" = 600; - "children-class" = "not-power"; - "transition-to-left" = true; - "click-to-reveal" = true; - }; - modules = ["upower" "upower/headset"]; - }; - - network = { - tooltip = true; - format-wifi = "{icon} "; - format-icons = ["󰤟" "󰤢" "󰤥"]; - rotate = 0; - format-ethernet = "󰈀 "; - tooltip-format = '' - Network: {essid}\n - Signal strength: {signaldBm}dBm ({signalStrength}%)\n - Frequency: {frequency}MHz\n - Interface: {ifname}\n - IP: {ipaddr}/{cidr}\n - Gateway: {gwaddr}\n - Netmask: {netmask} + "custom/disk-icon" = { + exec = '' + df /dev/disk/by-partlabel/disk-main-home | awk '$6 == "/home" {printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %.1fGB / %.1fTB\", \"percentage\": \"%.0f\"}\n", $3 / 1024 / 1024, $2 / 1024 / 1024 / 1024, $5}' | jq --unbuffered --compact-output ''; - format-linked = "󰈀 {ifname} (No IP)"; - format-disconnected = ""; - tooltip-format-disconnected = "Disconnected"; - on-click = "/usr/local/bin/ags -t ControlPanel"; - interval = 2; - }; - - "custom/smallspacer" = { - format = " "; - rotate = 0; + interval = 300; + return-type = "json"; + rotate = 270; + format = "{icon}"; + format-icons = [ + "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" + ]; }; memory = { @@ -145,157 +96,97 @@ cpu = { interval = 1; - format = "{icon}"; rotate = 270; + format = "{icon}"; format-icons = [ "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ]; }; - "mpris" = { - format = "󰝚 {player_icon}"; - rotate = 90; - "format-paused" = "󰝚 {status_icon}"; - "max-length" = 6; - "player-icons" = { - default = "󰏤"; - mpv = "󰝚"; - }; - "status-icons" = { - paused = "󰐊"; - }; - }; - - tray = { - "icon-size" = 16; - rotate = 0; - spacing = 3; - }; - - "group/expand" = { - orientation = "vertical"; - drawer = { - "transition-duration" = 600; - "children-class" = "not-power"; - "transition-to-left" = true; - }; - modules = ["custom/menu" "custom/spacer" "tray"]; - }; - - "custom/menu" = { - format = "󰅃"; - rotate = 0; - }; - - "custom/notification" = { - tooltip = false; - rotate = 0; - format = "{icon}"; - format-icons = { - notification = "󱅫"; - none = "󰂚"; - "dnd-notification" = "󱅫"; - "dnd-none" = "󰂚"; - "inhibited-notification" = "󱅫"; - "inhibited-none" = "󰂚"; - "dnd-inhibited-notification" = "󱅫"; - "dnd-inhibited-none" = "󰂚"; - }; - "return-type" = "json"; - "exec-if" = "which swaync-client"; - exec = "swaync-client -swb"; - "on-click-right" = "swaync-client -d -sw"; - "on-click" = "swaync-client -t -sw"; - escape = true; - }; - - "hyprland/window" = { - format = "{class}"; - "on-click-right" = "pkill waybar & hyprctl dispatch exec waybar"; - rotate = 90; - "max-length" = 120; - icon = false; - "icon-size" = 13; - }; - "custom/power" = { - format = "@{}"; - rotate = 0; - "on-click" = "ags -t ControlPanel"; - "on-click-right" = "pkill ags"; - tooltip = true; + on-click = "shutdown now"; + tooltip = false; + format = " "; }; - "custom/spacer" = { - format = "|"; - rotate = 90; + "custom/logout" = { + on-click = "hyprctl dispatch exit"; + tooltip = false; + format = "󰗽 "; }; - "hyprland/workspaces" = { - format = "{icon}"; - "format-icons" = { - default = ""; - active = ""; + "custom/reboot" = { + on-click = "reboot"; + tooltip = false; + format = " "; + }; + + "group/powerbtns" = { + orientation = "horizontal"; + drawer = { + transition-duration = 500; + children-class = "power-drawer"; + transition-left-to-right = false; }; + modules = [ + "custom/power" + "custom/logout" + "custom/reboot" + ]; }; - "wlr/workspaces" = { - "persistent-workspaces" = { - "1" = ["HDMI-A-1"]; - "2" = ["HDMI-A-1"]; - "3" = ["HDMI-A-1"]; - "4" = ["DP-1"]; - "5" = ["DP-1"]; - "6" = ["DP-1"]; - }; - }; - pulseaudio = { - format = "{icon}"; - rotate = 0; - format-muted = "婢"; - tooltip-format = "{icon} {desc} // {volume}%"; - scroll-step = 5; - format-icons = { - headphone = " "; - "hands-free" = " "; - headset = " "; - phone = " "; - portable = " "; - car = " "; - default = ["" " " " "]; - }; - }; - "pulseaudio/slider" = { - min = 5; - max = 100; - rotate = 0; - device = "pulseaudio"; - scroll-step = 1; +}; + +# ------------------------------------------ + + programs.waybar.settings.sideBar = { + layer = "bottom"; + output = "HDMI-A-1"; + position = "right"; + name = "sideBar"; + mode = "dock"; + + modules-left = [ + "hyprland/workspaces" + ]; + modules-center = [ + "tray" + ]; + modules-right = [ + "pulseaudio/slider" + "pulseaudio" + "network" + ]; + + "hyprland/workspaces" = workspaces; + + "pulseaudio/slider" = { orientation = "vertical"; }; - cava = { - "cava_config" = "~/.config/cava/config"; - framerate = 60; - autosens = 1; - bars = 14; - "lower_cutoff_freq" = 50; - "higher_cutoff_freq" = 10000; - method = "pulse"; - source = "auto"; - stereo = true; - reverse = false; - "bar_delimiter" = 0; - monstercat = false; - waves = false; - "noise_reduction" = 0.77; - "input_delay" = 2; - "format-icons" = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; - actions = { - "on-click-right" = "mode"; + pulseaudio = { + format = "{icon}"; + format-muted = " "; + format-icons = { + default = [ + " " + " " + ]; }; + on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + on-click-right = "hyprctl dispatch exec '[float;size 40% 55%] pavucontrol'"; + }; + + network = { + interval = 30; + format-wifi = "󰖩 "; + tooltip-format-wifi = "{essid} ({signalStrength}%)"; + format-ethernet = " "; + tooltip-format-ethernet = "{ifname}"; + format-disconnected = "󰖪 "; + tooltip-format-disconnected = "Disconnected"; + on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'"; }; }; } - diff --git a/modules/home/environment/waybar/style.nix b/modules/home/environment/waybar/style.nix index 1cffef3..54cf0f0 100644 --- a/modules/home/environment/waybar/style.nix +++ b/modules/home/environment/waybar/style.nix @@ -1,7 +1,7 @@ { scheme, ... -}: +}: let bg = { @@ -29,181 +29,5 @@ let in { programs.waybar.style = '' - * { - font-family: "JetBrains Mono Nerd Font"; - font-weight: bold; - font-size: 14; - } - - #battery { - font-weight: normal; - font-size: 22px; - color: #a6d189; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - #tray menu * { - font-weight: bold; - font-size: 13px; - color: #FBF1C7; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - #taskbar button { - box-shadow: none; - font-size: 4px; - border-radius: 9px; - color: #A1BDCE; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - tooltip { - background: #${bg.darkester}; - color: #${fg.lighter}; - font-size: 13px; - border-radius: 7px; - border: 2px solid #${bg.dark}; - background: #${bg.darkest}; - } - - window#waybar { - opacity: 0.85; - background: #${bg.darkester}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - #workspaces { - font-weight: normal; - color: transparent; - margin-left: -5px; - margin-top: 0px; - border: 0px; - border-radius: 6px; - } - - - - #backlight-slider slider, - #pulseaudio-slider slider { - background: #${colors.color3}; - background-color: transparent; - box-shadow: none; - } - - #backlight-slider trough, - #pulseaudio-slider trough { - min-width: 9px; - min-height: 90px; - border-radius: 8px; - background: #343434; - } - - #backlight-slider highlight, - #pulseaudio-slider highlight { - border-radius: 8px; - background-color: #2096C0; - } - - #pulseaudio { - font-weight: normal; - font-size: 18px; - color: #${colors.color3}; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - margin: 4px; - margin-bottom: 0px; - border: 2px solid @unfocused_borders; - border-bottom: 2px solid #151515; - border-radius: 6px; - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; - } - - #network { - font-size: 19px; - color: #${colors.color4}; - background: #${bg.darkest}; - margin: 4px; - margin-top: 0; - border: 2px solid @unfocused_borders; - border-top: 2px solid #151515; - border-radius: 6px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; - } - - #clock { - color: #${colors.color6}; - font-size: 15px; - font-weight: 900; - font-family: "CaskaydiaCove Nerd Font Mono"; - background: #${bg.darkest}; - margin: 4px; - border-radius: 6px; - border: 2px solid @unfocused_borders; - border-radius: 6px; - } - - #custom-notification { - font-family: "JetBrains Mono Nerd Font"; - font-size: 21px; - color: #${colors.color7}; - background: #${bg.darkest}; - margin: 4px; - border: 2px solid @unfocused_borders; - border-radius: 6px; - } - - #custom-power { - font-size: 15px; - color: #FFFFFF; - background: rgba(22, 19, 32, 0.9); - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - #backlight { - color: #${fg.lighter}; - font-weight: normal; - font-size: 19px; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - #custom-spacer { - opacity: 0.0; - } - - #tray menu separator { - min-height: 10px; - } - - - #cpu { - font-weight: normal; - font-size: 22px; - color: #${fg.lighter}; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } - - #memory { - font-weight: normal; - font-size: 22px; - color: #${fg.lighter}; - background: #${bg.darkest}; - border: 2px solid #${bg.dark}; - border-radius: 6px; - } ''; } diff --git a/modules/sys/software/nixvim/autocmd.nix b/modules/sys/software/nixvim/autocmd.nix index 9508ca0..26c892a 100644 --- a/modules/sys/software/nixvim/autocmd.nix +++ b/modules/sys/software/nixvim/autocmd.nix @@ -26,7 +26,7 @@ desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)"; } { - command = "setlocal textwidth = 135"; + command = "setlocal textwidth=135"; event = ["BufWinEnter" "BufEnter"]; pattern = ["*.md" "*.wiki" "*.txt"]; desc = "Set automatic linebreaks in plain text file formats";