diff --git a/config/profiles/graphical/default.nix b/config/profiles/graphical/default.nix index 73f5b23..0023224 100644 --- a/config/profiles/graphical/default.nix +++ b/config/profiles/graphical/default.nix @@ -2,7 +2,10 @@ imports = [ inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix + ./files.nix + ./hyprland.nix ./nixvim.nix + ./waybar.nix ]; kyouma.machine-type.graphical = true; @@ -89,411 +92,6 @@ variant = "neo_qwerty"; }; - home.file.".local/bin/hypr/playerctl.sh" = let - playerctl = "${pkgs.playerctl}/bin/playerctl"; - title = "$(${playerctl} metadata --format '{{markup_escape(title)}}')"; - artist = "$(${playerctl} metadata --format '{{markup_escape(artist)}}')"; - status = "$(${playerctl} status 2> /dev/null)"; - in { - enable = true; - executable = true; - text = '' - #!${pkgs.bash}/bin/bash - if [ "${status}" = "Playing" ]; then - echo -e " ${title}\nPlaying: ${artist} - ${title}\nplaying" - elif [ "${status}" = "Paused" ]; then - echo -e " ${title}\nPaused: ${artist} - ${title}\npaused" - else - echo -e "" - fi - ''; - }; - home.file."./local/bin/hypr/colorpicker.sh" = { - enable = true; - executable = true; - source = pkgs.writeShellApplication { - name = "colorpicker"; - text = builtins.readFile ./files/scripts/colorpicker.sh; - runtimeInputs = with pkgs; [ coreutils grim slurp imagemagick_light wl-clipboard libnotify ]; - }; - }; - home.file."./local/bin/hypr/rofi_powermenu.sh" = { - enable = true; - executable = true; - source = pkgs.writeShellApplication { - name = "rofi-powermenu"; - text = builtins.readFile ./files/scripts/rofi_powermenu.sh; - runtimeInputs = with pkgs; [ rofi hyprlock coreutils-full toybox xdg-user-dirs ]; - }; - }; - home.file."./local/bin/hypr/rofi_screenshot.sh" = { - enable = true; - executable = true; - source = pkgs.writeShellApplication { - name = "rofi-screenshot"; - text = builtins.readFile ./files/scripts/rofi_screenshot.sh; - runtimeInputs = with pkgs; [ coreutils grim hyprland imv slurp wl-clipboard libnotify pulseaudio toybox rofi xdg-user-dirs ]; - }; - }; - home.file."./local/bin/hypr/screenshot.sh" = { - enable = true; - executable = true; - source = pkgs.writeShellApplication { - name = "screenshot"; - text = builtins.readFile ./files/scripts/screenshot.sh; - runtimeInputs = with pkgs; [ coreutils grim imv slurp wl-clipboard libnotify pulseaudio ]; - }; - }; - home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = { - enable = true; - source = config.stylix.image; - }; - home.file."Pictures/wallpapers/lockscreen.png" = { - enable = true; - source = config.stylix.image; - }; - wayland.windowManager.hyprland = { - enable = true; - settings = let - kitty = "${pkgs.kitty}/bin/kitty"; - pactl = "${pkgs.pulseaudio}/bin/pactl"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; - notifysend = "${pkgs.libnotify}/bin/notify-send"; - dolphin = "${pkgs.libsForQt5.dolphin}/bin/dolphin"; - firefox = "${pkgs.firefox}/bin/firefox"; - brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; - screenshot = "~/.local/bin/hypr/screenshot.sh"; - rofi = "${pkgs.rofi-wayland}/bin/rofi"; - in { - general = { - border_size = 1; - gaps_in = 4; - gaps_out = 8; - "col.active_border" = "0xFFB4A1DB 0xFFD04E9D 45deg"; - "col.inactive_border" = "1e2030 1e2030 45deg"; - cursor_inactive_timeout = 30; - layout = "dwindle"; - }; - decoration = { - rounding = 8; - shadow_range = 10; - "col.shadow" = "0x66000000"; - "col.shadow_inactive" = "0x66000000"; - blur = { - enabled = true; - passes = 2; - }; - }; - dwindle.no_gaps_when_only = 1; - animations = { - bezier = [ - "wind, 0.2, 0.9, 0.2, 1.05" - "winMov, 0.2, 0.9, 0.2, 1.08" - "winIn, 0.2, 0.9, 0.2, 1.08" - "winOut, 0.2, 0, 0.9, 0.2" - "liner, 1, 1, 1, 1" - ]; - animation = [ - "windows, 1, 6, wind, slide" - "windowsIn, 1, 6, winIn, slide" - "windowsOut, 1, 6, winOut, slide" - "windowsMove, 1, 6, winMov, slide" - "border, 1, 1, liner" - "borderangle, 1, 30, liner, loop" - "fade, 1, 10, default" - "fadeOut, 1, 12, default" - "workspaces, 1, 8, wind" - ]; - }; - - input = { - kb_layout = "de"; - kb_variant = "neo_qwerty"; - kb_options = "grp:alt_shift_toggle"; - accel_profile = "adaptive"; - scroll_method = "2fg"; - float_switch_override_focus = 2; - touchpad = { - natural_scroll = true; - tap-to-click = false; - drag_lock = true; - }; - }; - gestures = { - workspace_swipe = true; - workspace_swipe_distance = 3200; - workspace_swipe_min_speed_to_force = 40; - workspace_swipe_cancel_ratio = 0.15; - workspace_swipe_forever = true; - }; - group = { - "col.border_inactive" = "0xFFDB695B"; - "col.border_active" = "0xFF4BC66D"; - groupbar = { - render_titles = false; - }; - }; - xwayland = { - force_zero_scaling = true; - use_nearest_neighbor = false; - }; - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; - vrr = 1; - }; - device = [ - { - name = "syna8013:00-06cb:ce69-touchpad"; - sensitivity = 0.3; - } - { - name = "logitech-m705"; - sensitivity = 0.1; - accel_profile = "flat"; - } - { - name = "tpps/2-ibm-trackpoint"; - sensitivity = 0.2; - scroll_method = "on_button_down"; - accel_profile = "flat"; - } - { - name = "tpps/2-elan-trackpoint"; - sensitivity = 0; - scroll_method = "on_button_down"; - accel_profile = "flat"; - } - ]; - layerrule = [ "blur, waybar" ]; - monitor = [ - "eDP-1, 3840x2400@60, 0x0, 1, bitdepth, 10" - #"eDP-1, 2560x1600@60, 0x0, 1, bitdepth, 10" - #"eDP-1, 1920x1200@60, 0x0, 1, bitdepth, 10" - "desc:Dell Inc. AW3225QF FXK2YZ3, 3840x2160@120,5280x0,1, bitdepth,10, vrr,2" - "desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455, 2560x1440@144,3840x-350,1, bitdepth,10, transform,1" - ",preferred,auto,1" - ]; - workspace = [ - "1, monitor:desc:Dell Inc. AW3225QF FXK2YZ3, default:true" - "2, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" - "3, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" - "4, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" - "5, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" - "6, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" - "7, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455" - "8, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455" - "9, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455" - "10,monitor:desc:Dell Inc. AW3225QF FXK2YZ3" - ]; - windowrule = [ - "float, foot-float" - "float, yad|nm-connection-editor|pavucontrol" - "float, xfce-polkit|kvantummanager|qt5ct|zenity|waypaper" - "float, feh|com.github.weclaw1.ImageRoll|Gpicview|Gimp|MPlayer" - "float, VirtualBox Manager|qemu|Qemu-system-x86_64|PacketTracer" - "float, title:File Operation Progress|Open Files|Media viewer" - "float, title:Confirm to replace files" - "size 60% 64%, com.github.weclaw1.ImageRoll " - "center, com.github.weclaw1.ImageRoll" - "animation slide down,foot-full" - "animation slide up,Rofi" - ]; - - "$mod" = "SUPER"; - "$notifycmd" = "${notifysend} -h string:x-canonical-private-synchronous:hypr-cfg -u low"; - bind = [ - "$mod, Return, exec, ${kitty}" - "$mod, F1, exec, ${dolphin}" - "$mod, F2, exec, ${firefox}" - - # Rofi - "$mod, D, exec, ${rofi} -show drun -theme ~/.config/rofi/launcher.rasi" - "$mod, R, exec, ${rofi} -show run -theme ~/.config/rofi/runner.rasi" - "$mod, A, exec, ~/.local/bin/hypr/rofi_screenshot.sh" - "$mod, X, exec, ~/.local/bin/hypr/rofi_powermenu.sh" - - # Misc - "$mod, C, exec, ~/.local/bin/hypr/colorpicker.sh" - "CTRL_ALT, L, exec, ${pkgs.systemd}/bin/loginctl lock-session" - - # Function keys - ", XF86AudioMute, exec, ${pactl} set-sink-mute @DEFAULT_SINK@ toggle" - ", XF86AudioMicMute, exec, ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle" - ", XF86AudioNext, exec, ${playerctl} next" - ", XF86AudioPrev, exec, ${playerctl} previous" - ", XF86AudioPlay, exec, ${playerctl} play" - ", XF86AudioStop, exec, ${playerctl} pause" - - # Scratchpad - "$mod SHIFT, MINUS, movetoworkspace,special" - "$mod, MINUS, togglespecialworkspace," - - # Screenshots - ", Print, exec, ${screenshot} --now" - "ALT, Print, exec, ${screenshot} --in5" - "SHIFT, Print, exec, ${screenshot} --in10" - "$mod, Print, exec, ${screenshot} --area" - - # Hyprland - "$mod SHIFT, Q, killactive," - "CTRL_ALT, Delete, exit," - "$mod, F, fullscreen, 0" - "$mod, F, exec, $notifycmd 'Fullscreen Mode'" - "$mod, S, pseudo," - "$mod, S, exec, $notifycmd 'Pseudo Mode'" - "$mod SHIFT, Space, togglefloating," - "$mod SHIFT, Space, centerwindow," - - # windowgroup - "$mod, G, togglegroup" - "$mod, G, exec, $notifycmd 'Toggled Group Mode'" - "$mod, H, changegroupactive, b" - "$mod, L, changegroupactive, f" - - # Change Focusconfig - "$mod, left, movefocus, l" - "$mod, H, movefocus, l" - "$mod, right, movefocus, r" - "$mod, L, movefocus, r" - "$mod, up, movefocus, u" - "$mod, K, movefocus, u" - "$mod, down, movefocus, d" - "$mod, J, movefocus, d" - - # Move Active - "$mod SHIFT, left, movewindow, l" - "$mod SHIFT, H, movewindow, l" - "$mod SHIFT, right, movewindow, r" - "$mod SHIFT, L, movewindow, r" - "$mod SHIFT, up, movewindow, u" - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, down, movewindow, d" - "$mod SHIFT, J, movewindow, d" - - # Switch between windows - "$mod,Tab,cyclenext," - "$mod,Tab,bringactivetotop," - - # Workspaces - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" - "$mod, 0, workspace, 10" - - # Send to Workspaces - "$mod SHIFT, 1, movetoworkspace, 1" - "$mod SHIFT, 2, movetoworkspace, 2" - "$mod SHIFT, 3, movetoworkspace, 3" - "$mod SHIFT, 4, movetoworkspace, 4" - "$mod SHIFT, 5, movetoworkspace, 5" - "$mod SHIFT, 6, movetoworkspace, 6" - "$mod SHIFT, 7, movetoworkspace, 7" - "$mod SHIFT, 8, movetoworkspace, 8" - "$mod SHIFT, 9, movetoworkspace, 9" - "$mod SHIFT, 0, movetoworkspace, 10" - - # Change Workspace Mode - "$mod CTRL, F, workspaceopt, allfloat" - "$mod CTRL, F, exec, $notifycmd 'Toggled All Float Mode'" - "$mod CTRL, S, workspaceopt, allpseudo" - "$mod CTRL, S, exec, $notifycmd 'Toggled All Pseudo Mode'" - - # Misc - "$mod SHIFT, P, pin," - "$mod SHIFT, P, exec, $notifycmd 'Toggled Pin'" - "$mod SHIFT, S, swapnext" - "$mod SHIFT, O, toggleopaque" - ]; - binde = [ - # Function keys repeat - ", XF86MonBrightnessUp, exec, ${brightnessctl} s +10%" - ", XF86MonBrightnessDown, exec, ${brightnessctl} s 10%-" - ", XF86AudioRaiseVolume, exec, ${pactl} set-sink-volume @DEFAULT_SINK@ +5%" - ", XF86AudioLowerVolume, exec, ${pactl} set-sink-volume @DEFAULT_SINK@ -5%" - # Resize Active - "$mod CTRL, left, resizeactive, -20 0" - "$mod CTRL, H, resizeactive, -20 0" - "$mod CTRL, right, resizeactive, 20 0" - "$mod CTRL, L, resizeactive, 20 0" - "$mod CTRL, up, resizeactive, 0 -20" - "$mod CTRL, K, resizeactive, 0 -20" - "$mod CTRL, down, resizeactive, 0 20" - "$mod CTRL, J, resizeactive, 0 20" - - # Move Active (Floating Only) - "$mod ALT, left, moveactive, -80 0" - "$mod ALT, H, moveactive, -80 0" - "$mod ALT, right, moveactive, 80 0" - "$mod ALT, L, moveactive, 80 0" - "$mod ALT, up, moveactive, 0 -80" - "$mod ALT, K, moveactive, 0 -80" - "$mod ALT, down, moveactive, 0 80" - "$mod ALT, J, moveactive, 0 80" - ]; - bindl = [ - ",switch:on:Lid Switch,exec, lsusb -d 17ef:30b4 && hyprctl keyword monitor 'eDP-1, disable'" - ",switch:off:Lid Switch,exec, hyprctl keyword monitor 'eDP-1, 3840x2400@60, 0x0, 1, bitdepth,10'" - ]; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - exec-once = [ - "${pkgs.wpaperd}/bin/wpaperd" - ]; - }; - }; - - programs.hyprlock = { - enable = true; - settings = { - general = { - grace = 1; - hide_cursor = true; - disable_loading_bar = true; - }; - background = [{ - path = "screenshot"; - #path = "$HOME/Pictures/wallpapers/lockscreen.png"; - blur_passes = 3; - contrast = 1.25; - }]; - input-field = [{ - size = "250, 60"; - outline_thickness = 2; - dots_size = 0.2; - dots_spacing = 0.2; - dots_center = true; - outer_color = "rgba(0, 0, 0, 0)"; - inner_color = "rgba(0, 0, 0, 0.5)"; - font_color = "rgb(200, 200, 200)"; - fade_on_empty = true; - fade_timeout = 5000; - font_family = "JetBrains Mono Nerd Font Mono"; - fail_text = "$FAIL $ATTEMPTS"; - position = "0, 200"; - halign = "center"; - valign = "bottom"; - }]; - label = [{ - text = "cmd[update:250] date +%X"; - color = "rgba(255, 255, 255, 0.6)"; - font_size = "100"; - font_family = "JetBrains Mono Nerd Font Mono ExtraBold"; - position = "0, -300"; - halign = "center"; - valign = "top"; - }]; - }; - }; - programs.imv.enable = true; programs.wpaperd = { @@ -504,127 +102,6 @@ sorting = "random"; }; }; - programs.waybar = { - enable = true; - style = ./files/waybar-style.css; - systemd = { - enable = true; - target = "hyprland-session.target"; - }; - settings = { - hyprbar = { - layer = "top"; - position = "top"; - #output = "eDP-1"; - margin = "0 0 0 0"; - modules-left = [ "hyprland/workspaces" "custom/playerctl" "tray" ]; - modules-center = [ "clock" ]; - modules-right = [ "backlight" "pulseaudio" "temperature" "cpu" "memory" "battery" "network" ]; - - "hyprland/workspaces" = { - format = "{icon}"; - sort-by-number = true; - active-only = false; - on-click = "activate"; - format-icons = { - "1" = "1"; - "2" = "2"; - "3" = "3"; - "4" = "4"; - "5" = "5"; - "6" = "6"; - "7" = "7"; - "8" = "8"; - "9" = "9"; - "10" = "0"; - urgent = ""; - focused = ""; - default = ""; - }; - }; - idle_inhibitor = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - }; - tray = { - icon-size = 18; - spacing = 8; - }; - clock = { - #tooltip-format = "{:%A %d %B | %H:%M}"; - format = " {:%Y-%m-%d  %H:%M:%OS}"; - format-alt = " {:%Y %b %d %a  %H:%M:%OS}"; - interval = 1; - }; - cpu = { - format = " {usage:02}"; - interval = 2; - on-click = "${pkgs.kitty}/bin/kitty -e ${pkgs.htop}/bin/htop"; - }; - memory = { - format = " {used:0.2f}"; - on-click = "${pkgs.kitty}/bin/kitty -e ${pkgs.htop}/bin/htop"; - }; - temperature = { - hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input"; - critical-threshold = 80; - format = " {temperatureC}°C"; - }; - backlight = { - format = "{icon} {percent: >3}%"; - format-icons = ["" ""]; - on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 1%-"; - on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set +1%"; - }; - battery = { - states = { - good = 90; - warning = 30; - critical = 15; - }; - format = ""; - format-discharging = "{icon} {capacity: >3}% {power:0.1f}W"; - format-charging = " {capacity: >3}% {power:0.1f}W"; - interval = 3; - format-icons = ["" "" "" "" ""]; - }; - network = { - format = "⚠ Disabled"; - format-wifi = " {essid}"; - format-ethernet = " Wired"; - format-disconnected = "⚠ Disconnected"; - on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; - }; - pulseaudio = { - scroll-step = 5; - format = "{icon} {volume: >3}%"; - format-bluetooth = "{icon} {volume: >3}%"; - format-muted = " muted"; - format-icons = { - headphones = ""; - handsfree = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" ""]; - }; - on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; - }; - "custom/playerctl" = { - interval = 1; - exec = "~/.local/bin/hypr/playerctl.sh"; - on-click-middle = "${pkgs.playerctl}/bin/playerctl play-pause"; - on-click-right = "${pkgs.playerctl}/bin/playerctl next"; - on-click = "${pkgs.playerctl}/bin/playerctl previous"; - escape = true; - }; - }; - }; - }; programs.kitty = { enable = true; font.size = 13; @@ -725,19 +202,6 @@ enableSshSupport = true; pinentryPackage = pkgs.pinentry-gnome3; }; - - services.swayidle = - let - hyprlock = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; - in { - enable = true; - systemdTarget = "hyprland-session.target"; - events = [ - { event = "before-sleep"; command = hyprlock; } - { event = "lock"; command = hyprlock; } - ]; - }; - services.syncthing = { enable = true; tray.enable = true; @@ -752,33 +216,5 @@ Restart = "on-failure"; RestartSec = "1s"; }; - systemd.user.targets.tray.Unit = { - BindsTo = "waybar.service"; - After = "waybar.service"; - }; - xdg.configFile."mako-icons" = { - enable = true; - recursive = true; - source = ./files/icons; - }; - xdg.configFile."rofi" = { - enable = true; - recursive = true; - source = ./files/rofi; - }; - xdg.userDirs = - let - home = config.home-manager.users.emily.home.homeDirectory; - in { - enable = true; - desktop = null; - documents = "${home}/docs"; - download = "${home}/Downloads"; - music = "${home}/music"; - pictures = "${home}/Pictures"; - publicShare = null; - templates = null; - videos = "${home}/videos"; - }; }; } diff --git a/config/profiles/graphical/files.nix b/config/profiles/graphical/files.nix new file mode 100644 index 0000000..8f30906 --- /dev/null +++ b/config/profiles/graphical/files.nix @@ -0,0 +1,91 @@ +{ config, pkgs, ... }: { + home-manager.users.emily = { + home.file.".local/bin/hypr/playerctl.sh" = let + playerctl = "${pkgs.playerctl}/bin/playerctl"; + title = "$(${playerctl} metadata --format '{{markup_escape(title)}}')"; + artist = "$(${playerctl} metadata --format '{{markup_escape(artist)}}')"; + status = "$(${playerctl} status 2> /dev/null)"; + in { + enable = true; + executable = true; + text = '' + #!${pkgs.bash}/bin/bash + if [ "${status}" = "Playing" ]; then + echo -e " ${title}\nPlaying: ${artist} - ${title}\nplaying" + elif [ "${status}" = "Paused" ]; then + echo -e " ${title}\nPaused: ${artist} - ${title}\npaused" + else + echo -e "" + fi + ''; + }; + home.file."./local/bin/hypr/colorpicker.sh" = { + enable = true; + executable = true; + source = pkgs.writeShellApplication { + name = "colorpicker"; + text = builtins.readFile ./files/scripts/colorpicker.sh; + runtimeInputs = with pkgs; [ coreutils grim slurp imagemagick_light wl-clipboard libnotify ]; + }; + }; + home.file."./local/bin/hypr/rofi_powermenu.sh" = { + enable = true; + executable = true; + source = pkgs.writeShellApplication { + name = "rofi-powermenu"; + text = builtins.readFile ./files/scripts/rofi_powermenu.sh; + runtimeInputs = with pkgs; [ rofi hyprlock coreutils-full toybox xdg-user-dirs ]; + }; + }; + home.file."./local/bin/hypr/rofi_screenshot.sh" = { + enable = true; + executable = true; + source = pkgs.writeShellApplication { + name = "rofi-screenshot"; + text = builtins.readFile ./files/scripts/rofi_screenshot.sh; + runtimeInputs = with pkgs; [ coreutils grim hyprland imv slurp wl-clipboard libnotify pulseaudio toybox rofi xdg-user-dirs ]; + }; + }; + home.file."./local/bin/hypr/screenshot.sh" = { + enable = true; + executable = true; + source = pkgs.writeShellApplication { + name = "screenshot"; + text = builtins.readFile ./files/scripts/screenshot.sh; + runtimeInputs = with pkgs; [ coreutils grim imv slurp wl-clipboard libnotify pulseaudio ]; + }; + }; + home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = { + enable = true; + source = config.stylix.image; + }; + home.file."Pictures/wallpapers/lockscreen.png" = { + enable = true; + source = config.stylix.image; + }; + xdg.configFile."mako-icons" = { + enable = true; + recursive = true; + source = ./files/icons; + }; + xdg.configFile."rofi" = { + enable = true; + recursive = true; + source = ./files/rofi; + }; + xdg.userDirs = + let + home = config.home-manager.users.emily.home.homeDirectory; + in { + enable = true; + desktop = null; + documents = "${home}/docs"; + download = "${home}/Downloads"; + music = "${home}/music"; + pictures = "${home}/Pictures"; + publicShare = null; + templates = null; + videos = "${home}/videos"; + }; + }; +} diff --git a/config/profiles/graphical/hyprland.nix b/config/profiles/graphical/hyprland.nix new file mode 100644 index 0000000..4f2d49e --- /dev/null +++ b/config/profiles/graphical/hyprland.nix @@ -0,0 +1,354 @@ +{ pkgs, ... }: { + home-manager.users.emily = { + programs.hyprlock = { + enable = true; + settings = { + general = { + hide_cursor = true; + disable_loading_bar = true; + }; + background = [{ + path = "screenshot"; + #path = "$HOME/Pictures/wallpapers/lockscreen.png"; + blur_passes = 3; + contrast = 1.25; + }]; + input-field = [{ + size = "250, 60"; + outline_thickness = 2; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + outer_color = "rgba(0, 0, 0, 0)"; + inner_color = "rgba(0, 0, 0, 0.5)"; + font_color = "rgb(200, 200, 200)"; + fade_on_empty = true; + fade_timeout = 5000; + font_family = "JetBrains Mono Nerd Font Mono"; + fail_text = "$FAIL $ATTEMPTS"; + position = "0, 200"; + halign = "center"; + valign = "bottom"; + }]; + label = [{ + text = "cmd[update:250] date +%X"; + color = "rgba(255, 255, 255, 0.6)"; + font_size = "100"; + font_family = "JetBrains Mono Nerd Font Mono ExtraBold"; + position = "0, -300"; + halign = "center"; + valign = "top"; + }]; + }; + }; + services.swayidle = + let + hyprlock = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; + in { + enable = true; + systemdTarget = "hyprland-session.target"; + events = [ + { event = "before-sleep"; command = hyprlock; } + { event = "lock"; command = hyprlock; } + ]; + }; + wayland.windowManager.hyprland = { + enable = true; + settings = let + kitty = "${pkgs.kitty}/bin/kitty"; + pactl = "${pkgs.pulseaudio}/bin/pactl"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; + notifysend = "${pkgs.libnotify}/bin/notify-send"; + dolphin = "${pkgs.libsForQt5.dolphin}/bin/dolphin"; + firefox = "${pkgs.firefox}/bin/firefox"; + brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; + screenshot = "~/.local/bin/hypr/screenshot.sh"; + rofi = "${pkgs.rofi-wayland}/bin/rofi"; + in { + general = { + border_size = 1; + gaps_in = 4; + gaps_out = 8; + "col.active_border" = "0xFFB4A1DB 0xFFD04E9D 45deg"; + "col.inactive_border" = "1e2030 1e2030 45deg"; + cursor_inactive_timeout = 30; + layout = "dwindle"; + }; + decoration = { + rounding = 8; + shadow_range = 10; + "col.shadow" = "0x66000000"; + "col.shadow_inactive" = "0x66000000"; + blur = { + enabled = true; + passes = 2; + }; + }; + dwindle.no_gaps_when_only = 1; + animations = { + bezier = [ + "wind, 0.2, 0.9, 0.2, 1.05" + "winMov, 0.2, 0.9, 0.2, 1.08" + "winIn, 0.2, 0.9, 0.2, 1.08" + "winOut, 0.2, 0, 0.9, 0.2" + "liner, 1, 1, 1, 1" + ]; + animation = [ + "windows, 1, 6, wind, slide" + "windowsIn, 1, 6, winIn, slide" + "windowsOut, 1, 6, winOut, slide" + "windowsMove, 1, 6, winMov, slide" + "border, 1, 1, liner" + "borderangle, 1, 30, liner, loop" + "fade, 1, 10, default" + "fadeOut, 1, 12, default" + "workspaces, 1, 8, wind" + ]; + }; + + input = { + kb_layout = "de"; + kb_variant = "neo_qwerty"; + kb_options = "grp:alt_shift_toggle"; + accel_profile = "adaptive"; + scroll_method = "2fg"; + float_switch_override_focus = 2; + touchpad = { + natural_scroll = true; + tap-to-click = false; + drag_lock = true; + }; + }; + gestures = { + workspace_swipe = true; + workspace_swipe_distance = 3200; + workspace_swipe_min_speed_to_force = 40; + workspace_swipe_cancel_ratio = 0.15; + workspace_swipe_forever = true; + }; + group = { + "col.border_inactive" = "0xFFDB695B"; + "col.border_active" = "0xFF4BC66D"; + groupbar = { + render_titles = false; + }; + }; + xwayland = { + force_zero_scaling = true; + use_nearest_neighbor = false; + }; + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + vrr = 1; + }; + device = [ + { + name = "syna8013:00-06cb:ce69-touchpad"; + sensitivity = 0.3; + } + { + name = "logitech-m705"; + sensitivity = 0.1; + accel_profile = "flat"; + } + { + name = "tpps/2-ibm-trackpoint"; + sensitivity = 0.2; + scroll_method = "on_button_down"; + accel_profile = "flat"; + } + { + name = "tpps/2-elan-trackpoint"; + sensitivity = 0; + scroll_method = "on_button_down"; + accel_profile = "flat"; + } + ]; + layerrule = [ "blur, waybar" ]; + monitor = [ + "eDP-1, 3840x2400@60, 0x0, 1, bitdepth, 10" + #"eDP-1, 2560x1600@60, 0x0, 1, bitdepth, 10" + #"eDP-1, 1920x1200@60, 0x0, 1, bitdepth, 10" + "desc:Dell Inc. AW3225QF FXK2YZ3, 3840x2160@120,5280x0,1, bitdepth,10, vrr,2" + "desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455, 2560x1440@144,3840x-350,1, bitdepth,10, transform,1" + ",preferred,auto,1" + ]; + workspace = [ + "1, monitor:desc:Dell Inc. AW3225QF FXK2YZ3, default:true" + "2, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" + "3, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" + "4, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" + "5, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" + "6, monitor:desc:Dell Inc. AW3225QF FXK2YZ3" + "7, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455" + "8, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455" + "9, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455" + "10,monitor:desc:Dell Inc. AW3225QF FXK2YZ3" + ]; + windowrule = [ + "float, foot-float" + "float, yad|nm-connection-editor|pavucontrol" + "float, xfce-polkit|kvantummanager|qt5ct|zenity|waypaper" + "float, feh|com.github.weclaw1.ImageRoll|Gpicview|Gimp|MPlayer" + "float, VirtualBox Manager|qemu|Qemu-system-x86_64|PacketTracer" + "float, title:File Operation Progress|Open Files|Media viewer" + "float, title:Confirm to replace files" + "size 60% 64%, com.github.weclaw1.ImageRoll " + "center, com.github.weclaw1.ImageRoll" + "animation slide down,foot-full" + "animation slide up,Rofi" + ]; + + "$mod" = "SUPER"; + "$notifycmd" = "${notifysend} -h string:x-canonical-private-synchronous:hypr-cfg -u low"; + bind = [ + "$mod, Return, exec, ${kitty}" + "$mod, F1, exec, ${dolphin}" + "$mod, F2, exec, ${firefox}" + + # Rofi + "$mod, D, exec, ${rofi} -show drun -theme ~/.config/rofi/launcher.rasi" + "$mod, R, exec, ${rofi} -show run -theme ~/.config/rofi/runner.rasi" + "$mod, A, exec, ~/.local/bin/hypr/rofi_screenshot.sh" + "$mod, X, exec, ~/.local/bin/hypr/rofi_powermenu.sh" + + # Misc + "$mod, C, exec, ~/.local/bin/hypr/colorpicker.sh" + "CTRL_ALT, L, exec, ${pkgs.systemd}/bin/loginctl lock-session" + + # Function keys + ", XF86AudioMute, exec, ${pactl} set-sink-mute @DEFAULT_SINK@ toggle" + ", XF86AudioMicMute, exec, ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle" + ", XF86AudioNext, exec, ${playerctl} next" + ", XF86AudioPrev, exec, ${playerctl} previous" + ", XF86AudioPlay, exec, ${playerctl} play" + ", XF86AudioStop, exec, ${playerctl} pause" + + # Scratchpad + "$mod SHIFT, MINUS, movetoworkspace,special" + "$mod, MINUS, togglespecialworkspace," + + # Screenshots + ", Print, exec, ${screenshot} --now" + "ALT, Print, exec, ${screenshot} --in5" + "SHIFT, Print, exec, ${screenshot} --in10" + "$mod, Print, exec, ${screenshot} --area" + + # Hyprland + "$mod SHIFT, Q, killactive," + "CTRL_ALT, Delete, exit," + "$mod, F, fullscreen, 0" + "$mod, F, exec, $notifycmd 'Fullscreen Mode'" + "$mod, S, pseudo," + "$mod, S, exec, $notifycmd 'Pseudo Mode'" + "$mod SHIFT, Space, togglefloating," + "$mod SHIFT, Space, centerwindow," + + # windowgroup + "$mod, G, togglegroup" + "$mod, G, exec, $notifycmd 'Toggled Group Mode'" + "$mod, H, changegroupactive, b" + "$mod, L, changegroupactive, f" + + # Change Focusconfig + "$mod, left, movefocus, l" + "$mod, H, movefocus, l" + "$mod, right, movefocus, r" + "$mod, L, movefocus, r" + "$mod, up, movefocus, u" + "$mod, K, movefocus, u" + "$mod, down, movefocus, d" + "$mod, J, movefocus, d" + + # Move Active + "$mod SHIFT, left, movewindow, l" + "$mod SHIFT, H, movewindow, l" + "$mod SHIFT, right, movewindow, r" + "$mod SHIFT, L, movewindow, r" + "$mod SHIFT, up, movewindow, u" + "$mod SHIFT, K, movewindow, u" + "$mod SHIFT, down, movewindow, d" + "$mod SHIFT, J, movewindow, d" + + # Switch between windows + "$mod,Tab,cyclenext," + "$mod,Tab,bringactivetotop," + + # Workspaces + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + "$mod, 0, workspace, 10" + + # Send to Workspaces + "$mod SHIFT, 1, movetoworkspace, 1" + "$mod SHIFT, 2, movetoworkspace, 2" + "$mod SHIFT, 3, movetoworkspace, 3" + "$mod SHIFT, 4, movetoworkspace, 4" + "$mod SHIFT, 5, movetoworkspace, 5" + "$mod SHIFT, 6, movetoworkspace, 6" + "$mod SHIFT, 7, movetoworkspace, 7" + "$mod SHIFT, 8, movetoworkspace, 8" + "$mod SHIFT, 9, movetoworkspace, 9" + "$mod SHIFT, 0, movetoworkspace, 10" + + # Change Workspace Mode + "$mod CTRL, F, workspaceopt, allfloat" + "$mod CTRL, F, exec, $notifycmd 'Toggled All Float Mode'" + "$mod CTRL, S, workspaceopt, allpseudo" + "$mod CTRL, S, exec, $notifycmd 'Toggled All Pseudo Mode'" + + # Misc + "$mod SHIFT, P, pin," + "$mod SHIFT, P, exec, $notifycmd 'Toggled Pin'" + "$mod SHIFT, S, swapnext" + "$mod SHIFT, O, toggleopaque" + ]; + binde = [ + # Function keys repeat + ", XF86MonBrightnessUp, exec, ${brightnessctl} s +10%" + ", XF86MonBrightnessDown, exec, ${brightnessctl} s 10%-" + ", XF86AudioRaiseVolume, exec, ${pactl} set-sink-volume @DEFAULT_SINK@ +5%" + ", XF86AudioLowerVolume, exec, ${pactl} set-sink-volume @DEFAULT_SINK@ -5%" + # Resize Active + "$mod CTRL, left, resizeactive, -20 0" + "$mod CTRL, H, resizeactive, -20 0" + "$mod CTRL, right, resizeactive, 20 0" + "$mod CTRL, L, resizeactive, 20 0" + "$mod CTRL, up, resizeactive, 0 -20" + "$mod CTRL, K, resizeactive, 0 -20" + "$mod CTRL, down, resizeactive, 0 20" + "$mod CTRL, J, resizeactive, 0 20" + + # Move Active (Floating Only) + "$mod ALT, left, moveactive, -80 0" + "$mod ALT, H, moveactive, -80 0" + "$mod ALT, right, moveactive, 80 0" + "$mod ALT, L, moveactive, 80 0" + "$mod ALT, up, moveactive, 0 -80" + "$mod ALT, K, moveactive, 0 -80" + "$mod ALT, down, moveactive, 0 80" + "$mod ALT, J, moveactive, 0 80" + ]; + bindl = [ + ",switch:on:Lid Switch,exec, lsusb -d 17ef:30b4 && hyprctl keyword monitor 'eDP-1, disable'" + ",switch:off:Lid Switch,exec, hyprctl keyword monitor 'eDP-1, 3840x2400@60, 0x0, 1, bitdepth,10'" + ]; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + exec-once = [ + "${pkgs.wpaperd}/bin/wpaperd" + ]; + }; + }; + }; +} diff --git a/config/profiles/graphical/waybar.nix b/config/profiles/graphical/waybar.nix new file mode 100644 index 0000000..0e56520 --- /dev/null +++ b/config/profiles/graphical/waybar.nix @@ -0,0 +1,129 @@ +{ pkgs, ... }: { + home-manager.users.emily = { + programs.waybar = { + enable = true; + style = ./files/waybar-style.css; + systemd = { + enable = true; + target = "hyprland-session.target"; + }; + settings = { + hyprbar = { + layer = "top"; + position = "top"; + #output = "eDP-1"; + margin = "0 0 0 0"; + modules-left = [ "hyprland/workspaces" "custom/playerctl" "tray" ]; + modules-center = [ "clock" ]; + modules-right = [ "backlight" "pulseaudio" "temperature" "cpu" "memory" "battery" "network" ]; + + "hyprland/workspaces" = { + format = "{icon}"; + sort-by-number = true; + active-only = false; + on-click = "activate"; + format-icons = { + "1" = "1"; + "2" = "2"; + "3" = "3"; + "4" = "4"; + "5" = "5"; + "6" = "6"; + "7" = "7"; + "8" = "8"; + "9" = "9"; + "10" = "0"; + urgent = ""; + focused = ""; + default = ""; + }; + }; + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + tray = { + icon-size = 18; + spacing = 8; + }; + clock = { + #tooltip-format = "{:%A %d %B | %H:%M}"; + format = " {:%Y-%m-%d  %H:%M:%OS}"; + format-alt = " {:%Y %b %d %a  %H:%M:%OS}"; + interval = 1; + }; + cpu = { + format = " {usage:02}"; + interval = 2; + on-click = "${pkgs.kitty}/bin/kitty -e ${pkgs.htop}/bin/htop"; + }; + memory = { + format = " {used:0.2f}"; + on-click = "${pkgs.kitty}/bin/kitty -e ${pkgs.htop}/bin/htop"; + }; + temperature = { + hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input"; + critical-threshold = 80; + format = " {temperatureC}°C"; + }; + backlight = { + format = "{icon} {percent: >3}%"; + format-icons = ["" ""]; + on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 1%-"; + on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set +1%"; + }; + battery = { + states = { + good = 90; + warning = 30; + critical = 15; + }; + format = ""; + format-discharging = "{icon} {capacity: >3}% {power:0.1f}W"; + format-charging = " {capacity: >3}% {power:0.1f}W"; + interval = 3; + format-icons = ["" "" "" "" ""]; + }; + network = { + format = "⚠ Disabled"; + format-wifi = " {essid}"; + format-ethernet = " Wired"; + format-disconnected = "⚠ Disconnected"; + on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; + }; + pulseaudio = { + scroll-step = 5; + format = "{icon} {volume: >3}%"; + format-bluetooth = "{icon} {volume: >3}%"; + format-muted = " muted"; + format-icons = { + headphones = ""; + handsfree = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = ["" ""]; + }; + on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; + }; + "custom/playerctl" = { + interval = 1; + exec = "~/.local/bin/hypr/playerctl.sh"; + on-click-middle = "${pkgs.playerctl}/bin/playerctl play-pause"; + on-click-right = "${pkgs.playerctl}/bin/playerctl next"; + on-click = "${pkgs.playerctl}/bin/playerctl previous"; + escape = true; + }; + }; + }; + }; + systemd.user.targets.tray.Unit = { + BindsTo = "waybar.service"; + After = "waybar.service"; + }; + }; +}