diff options
Diffstat (limited to 'home-manager/laptop/hyprland')
| -rw-r--r-- | home-manager/laptop/hyprland/cat.png | bin | 15467 -> 0 bytes | |||
| -rw-r--r-- | home-manager/laptop/hyprland/default.nix | 202 | ||||
| -rw-r--r-- | home-manager/laptop/hyprland/hyprland.conf | 214 | ||||
| -rwxr-xr-x | home-manager/laptop/hyprland/scripts/battery-level.sh | 22 | ||||
| -rwxr-xr-x | home-manager/laptop/hyprland/scripts/hshot | 45 | ||||
| -rwxr-xr-x | home-manager/laptop/hyprland/scripts/kill | 7 | ||||
| -rwxr-xr-x | home-manager/laptop/hyprland/scripts/rnew.fish | 8 | ||||
| -rwxr-xr-x | home-manager/laptop/hyprland/scripts/rofi-modes | 20 |
8 files changed, 0 insertions, 518 deletions
diff --git a/home-manager/laptop/hyprland/cat.png b/home-manager/laptop/hyprland/cat.png Binary files differdeleted file mode 100644 index 5657a78..0000000 --- a/home-manager/laptop/hyprland/cat.png +++ /dev/null diff --git a/home-manager/laptop/hyprland/default.nix b/home-manager/laptop/hyprland/default.nix deleted file mode 100644 index 62d346a..0000000 --- a/home-manager/laptop/hyprland/default.nix +++ /dev/null @@ -1,202 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - swww - brightnessctl - grimblast - cliphist - polkit_gnome - xwaylandvideobridge - ]; - - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-hyprland - ]; - configPackages = with pkgs; [ - xdg-desktop-portal-hyprland - ]; - }; - - wayland.windowManager.hyprland = { - enable = true; - package = pkgs.hyprland; - settings = { - "$scripts" = "${./scripts}"; - "$mainMod" = "SUPER"; - "$terminal" = "alacritty"; - exec-once = [ - "emacs --daemon" - "swww-daemon" - ]; - input = { - kb_layout = "us,ru"; - kb_options = "grp:win_space_toggle"; - follow_mouse = 1; - touchpad = { - natural_scroll = "yes"; - disable_while_typing = "no"; - }; - sensitivity = 0.1; - }; - general = { - gaps_in = 5; - gaps_out = 20; - border_size = 3; - "col.active_border" = "0xFF6e6a86"; - "col.inactive_border" = "0xFF363a4f"; - layout = "dwindle"; - allow_tearing = false; - }; - - decoration = { - rounding = 7; - drop_shadow = "yes"; - shadow_range = 4; - shadow_render_power = 3; - "col.shadow" = "rgba(1a1a1aee)"; - blur = { - enabled = true; - size = 3; - passes = 1; - }; - }; - - animations = { - enabled = 1; - bezier = "overshot,0.13,0.99,0.29,1.1,"; - animation = [ - "fade,1,4,default" - "workspaces,1,4,default,fade" - "windows,1,4,overshot,popin 95%" - ]; - }; - - # love the "true" variants - dwindle = { - pseudotile = "yes"; - preserve_split = "yes"; - }; - - master.new_is_master = true; - gestures.workspace_swipe = "on"; - misc.force_default_wallpaper = 1; - # - - windowrulev2 = [ - "float, title:^(Firrfox — Sharing Indicator)$" - "noborder, title:^(Firefox — Sharing Indicator)$" - "rounding 0, title:^(Firefox — Sharing Indicator)$" - "float, title:^(firefox)$, title:^(Picture-in-Picture)$" - "pin, title:^(firefox)$, title:^(Picture-in-Picture)$" - "float, title:^(Save File)$" - "pin, title:^(Save File)$" - "float, title:^(Torrent Options)$" - "pin, title:^(Torrent Options)$" - "opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$" - "noanim,class:^(xwaylandvideobridge)$" - "noinitialfocus,class:^(xwaylandvideobridge)$" - "maxsize 1 1,class:^(xwaylandvideobridge)$" - "noblur,class:^(xwaylandvideobridge)$" - "stayfocused,class:^(kompas.exe)$,title:^(RoamingWindow)$" - ]; - - layerrule = "blur, waybar"; - - bind = [ - "$mainMod, V, togglefloating, " - "$mainMod, P, pseudo," - "$mainMod, I, togglesplit," - "$mainMod, F, fullscreen, 0" - "$mainMod, M, fullscreen, 1" - "$mainMod SHIFT,F,fakefullscreen" - "$mainMod SHIFT, Q, killactive, " - "$mainMod SHIFT, E, exit," - - # Apps - "$mainMod, D, exec, killall rofi || rofi -show-icons -show drun" - "$mainMod, Q, exec, $terminal" - "$mainMod, B, exec, brave --enable-features=TouchpadOverscrollHistoryNavigation" - "$mainMod, T, exec, telegram-desktop" - "$mainMod, E, exec, emacsclient -c -a emacs" - "$mainMod CONTROL, E, exec, emacs" - - # Screenshooting - ", Print, exec, grimblast save screen" - "ALT, Print, exec, grimblast save active" - "SHIFT, Print, exec, grimblast save area" - "CONTROL, Print, exec, grimblast copy screen" - "ALT_CONTROL, Print, exec, grimblast copy active" - "CONTROL_SHIFT, Print, exec, grimblast copy area " - - # Volume - ",0x1008FF11,exec,wpctl set-volume @DEFAULT_SINK@ 5%-" - ",0x1008FF13,exec,wpctl set-volume @DEFAULT_SINK@ 5%+" - ",0x1008FF12,exec,wpctl set-mute @DEFAULT_SINK@ toggle" - ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle" - - # Brightness - ",XF86MonBrightnessUp,exec,brightnessctl s +5%" - ",XF86MonBrightnessDown,exec,brightnessctl s 5%-" - - # Windows - "$mainMod, J, movefocus, d" - "$mainMod, K, movefocus, u" - "$mainMod, H, movefocus, l" - "$mainMod, L, movefocus, r" - "SUPER_SHIFT,J,movewindow,d" - "SUPER_SHIFT,K,movewindow,u" - "SUPER_SHIFT,H,movewindow,l" - "SUPER_SHIFT,L,movewindow,r" - "$mainMod, S, togglespecialworkspace, magic" - "$mainMod SHIFT, S, movetoworkspace, special:magic" - "$mainMod, mouse_down, workspace, e+1" - "$mainMod, mouse_up, workspace, e-1" - ] ++ ( - # workspaces - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mainMod, ${ws}, workspace, ${toString (x + 1)}" - "$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" - ] - ) - 10) - ); - - bindm = [ - "$mainMod, mouse:272, movewindow" - "$mainMod, mouse:273, resizewindow" - ]; - }; - }; - - programs.swaylock = { - enable = true; - package = pkgs.swaylock-effects; - settings = { - indicator-radius = 100; - ring-color = "000000ff"; - layout-bg-color = "000000ff"; - key-hl-color = "e0c69fff"; - inside-color = "000000ff"; - layout-border-color = "e0c69fff"; - line-color = "ffffffff"; - separator-color = "000000ff"; - ring-ver-color = "000000ff"; - line-ver-color = "000000ff"; - inside-ver-color = "ffffff00"; - text-ver-color = "e0c69fff"; - inside-wrong-color = "ffffff00"; - text-wrong-color = "e0c69fff"; - ring-wrong-color = "762f20ff"; - fade-in = 1; - }; - }; -} diff --git a/home-manager/laptop/hyprland/hyprland.conf b/home-manager/laptop/hyprland/hyprland.conf deleted file mode 100644 index 1ac9473..0000000 --- a/home-manager/laptop/hyprland/hyprland.conf +++ /dev/null @@ -1,214 +0,0 @@ -monitor=,preferred,auto,1,mirror,eDP-1 - -# Execute your favorite apps at launch -exec-once = swww init - -# Set programs that you use -$terminal = alacritty -$fileManager = emacs -$menu = rofi --show drun -$scripts=~/.config/hypr/scripts - -# Some default env vars. -env = XCURSOR_SIZE,18 - -# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ -input { - kb_layout = us,ru - kb_variant = - kb_model = - kb_options = grp:win_space_toggle - kb_rules = - - follow_mouse = 1 - - touchpad { - natural_scroll = yes - disable_while_typing = no - } - - sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification. -} - -general { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - gaps_in = 5 - gaps_out = 20 - border_size = 3 - col.active_border = 0xFF6e6a86 - col.inactive_border = 0xFF363a4f - - layout = dwindle - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = false -} - -decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - rounding = 7 - - blur { - enabled = true - size = 3 - passes = 1 - } - - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) -} - -animations { - enabled = 1 - bezier = overshot,0.13,0.99,0.29,1.1, - animation = fade,1,4,default - animation = workspaces,1,4,default,fade - animation = windows,1,4,overshot,popin 95% -} - -dwindle { - # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more - pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = yes # you probably want this -} - -master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_is_master = true -} - -gestures { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - workspace_swipe = on -} - -misc { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - force_default_wallpaper = 1 # Set to 0 to disable the anime mascot wallpapers -} - -# Example windowrule v1 -# windowrule = float, ^(kitty)$ -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -windowrulev2 = float, title:^(Firrfox — Sharing Indicator)$ -windowrulev2 = noborder, title:^(Firefox — Sharing Indicator)$ -windowrulev2 = rounding 0, title:^(Firefox — Sharing Indicator)$ -windowrulev2 = float, title:^(firefox)$, title:^(Picture-in-Picture)$ -windowrulev2 = pin, title:^(firefox)$, title:^(Picture-in-Picture)$ -windowrulev2 = float, title:^(Save File)$ -windowrulev2 = pin, title:^(Save File)$ -windowrulev2 = float, title:^(Torrent Options)$ -windowrulev2 = pin, title:^(Torrent Options)$ -windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ -windowrulev2 = noanim,class:^(xwaylandvideobridge)$ -windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ -windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$ -windowrulev2 = noblur,class:^(xwaylandvideobridge)$ -layerrule = blur, waybar - -windowrulev2 = stayfocused,class:^(kompas.exe)$,title:^(RoamingWindow)$ - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Q, exec, $terminal -bind = $mainMod, V, togglefloating, -bind = SUPER, D, exec, killall rofi || rofi -show-icons -show drun -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, I, togglesplit, # dwindle -bind = $mainMod, F, fullscreen, 0 -bind = $mainMod, M, fullscreen, 1 -bind = $mainMod SHIFT,F,fakefullscreen -bind = $mainMod SHIFT, Q, killactive, -bind = $mainMod SHIFT, E, exit, - -# Apps -bind = $mainMod, B, exec, brave --enable-features=TouchpadOverscrollHistoryNavigation -bind = $mainMod, T, exec, telegram-desktop -bind = $mainMod, E, exec, emacsclient -c -a "emacs" -bind = $mainMod CONTROL, E, exec, emacs - -# Screenshooting -bind = , Print, exec, grimblast save screen -bind = ALT, Print, exec, grimblast save active -bind = SHIFT, Print, exec, grimblast save area -bind = CONTROL, Print, exec, grimblast copy screen -bind = ALT_CONTROL, Print, exec, grimblast copy active -bind = CONTROL_SHIFT, Print, exec, grimblast copy area - -# Volume -bind = ,0x1008FF11,exec,wpctl set-volume @DEFAULT_SINK@ 5%- -bind = ,0x1008FF13,exec,wpctl set-volume @DEFAULT_SINK@ 5%+ -bind = ,0x1008FF12,exec,wpctl set-mute @DEFAULT_SINK@ toggle -bind = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle - -# Brightness -bind = ,XF86MonBrightnessUp,exec,brightnessctl s +5% -bind = ,XF86MonBrightnessDown,exec,brightnessctl s 5%- - -# Move focus with mainMod + arrow keys -bind = $mainMod, J, movefocus, d -bind = $mainMod, K, movefocus, u -bind = $mainMod, H, movefocus, l -bind = $mainMod, L, movefocus, r - -# Move windows -bind = SUPER_SHIFT,J,movewindow,d -bind = SUPER_SHIFT,K,movewindow,u -bind = SUPER_SHIFT,H,movewindow,l -bind = SUPER_SHIFT,L,movewindow,r - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 -bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 -bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 -bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 -bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 -bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 -bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 -bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 -bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 -bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 - -bind = $mainMod ALT, 1, movetoworkspace, 1 -bind = $mainMod ALT, 2, movetoworkspace, 2 -bind = $mainMod ALT, 3, movetoworkspace, 3 -bind = $mainMod ALT, 4, movetoworkspace, 4 -bind = $mainMod ALT, 5, movetoworkspace, 5 -bind = $mainMod ALT, 6, movetoworkspace, 6 -bind = $mainMod ALT, 7, movetoworkspace, 7 -bind = $mainMod ALT, 8, movetoworkspace, 8 -bind = $mainMod ALT, 9, movetoworkspace, 9 -bind = $mainMod ALT, 0, movetoworkspace, 10 - - -# Example special workspace (scratchpad) -bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspace, special:magic - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow diff --git a/home-manager/laptop/hyprland/scripts/battery-level.sh b/home-manager/laptop/hyprland/scripts/battery-level.sh deleted file mode 100755 index cc2d5cd..0000000 --- a/home-manager/laptop/hyprland/scripts/battery-level.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -while true; do - # Check the battery level and charging status - battery_info=$(acpi -b) - - # Extract the battery level from the output of `acpi` - battery_level=$(echo $battery_info | grep -o "[0-9]*%" | sed "s/%//") - - # Check if the laptop is charging - if [[ $battery_info == *"Charging"* ]]; then - # If the laptop is charging, do nothing - : - else - # If the battery level is less than 15%, send a notification - if [ "$battery_level" -lt 15 ]; then - notify-send "Battery Low" "Battery level is at $battery_level%. Charge your laptop." - fi - fi - - # Sleep for 5 minutes before checking the battery level again - sleep 300 -done diff --git a/home-manager/laptop/hyprland/scripts/hshot b/home-manager/laptop/hyprland/scripts/hshot deleted file mode 100755 index 0d02b9c..0000000 --- a/home-manager/laptop/hyprland/scripts/hshot +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -declare -a cmd - -usage() { - echo -e "-m | monitor\n-s | slurp\n-w | active window\n-c | add copy" -} - -monitor() { - cmd=("grim -o \"\$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')\"") -} - -slurp() { - cmd=("grim -g \"\$(slurp)\"") -} - -window() { - cmd=("grim -g \"\$(hyprctl activewindow -j | jq -j '\"\(.at | .[0]),\(.at | .[1]) \(.size | .[0])x\(.size | .[1])\"')\"") -} - -copy() { - if [[ -n ${cmd[0]} ]]; then - cmd+=("- | wl-copy") - else - usage - fi -} - -while getopts ":mswc" opt; do - case ${opt} in - m) monitor;; - s) slurp;; - w) window;; - c) copy;; - *) usage - exit 1;; - esac -done - -if [[ -z $1 ]]; then - usage - exit 1 -fi - -bash -c "${cmd[*]}" diff --git a/home-manager/laptop/hyprland/scripts/kill b/home-manager/laptop/hyprland/scripts/kill deleted file mode 100755 index 40ab4a9..0000000 --- a/home-manager/laptop/hyprland/scripts/kill +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [[ $(hyprctl activewindow -j | jq -r '.class') =~ (kitty) ]]; then - kill $(hyprctl activewindow -j | jq '.pid') -s 9 -else - hyprctl dispatch killactive -fi diff --git a/home-manager/laptop/hyprland/scripts/rnew.fish b/home-manager/laptop/hyprland/scripts/rnew.fish deleted file mode 100755 index 743d7fd..0000000 --- a/home-manager/laptop/hyprland/scripts/rnew.fish +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env fish - -ranger $argv -set quit_cd_wd_file "$HOME/.ranger_quit_cd_wd" -if test -s "$quit_cd_wd_file" - kitty -d "$(cat $quit_cd_wd_file)" --detach - true >"$quit_cd_wd_file" -end diff --git a/home-manager/laptop/hyprland/scripts/rofi-modes b/home-manager/laptop/hyprland/scripts/rofi-modes deleted file mode 100755 index 2d52802..0000000 --- a/home-manager/laptop/hyprland/scripts/rofi-modes +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -case $(echo -e "clipboard\nemoji\ncalc" | rofi -dmenu) in - emoji) arg=emoji;; - calc) arg=calc;; - clipboard) cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy - exit;; - bitwarden) if [[ $XDG_BACKEND == "wayland" ]]; then - typer=wtype - clip=wl-copy - else - typer=xdotool - clip=xclip - fi - rofi-rbw --typer $typer --clip $clip - exit;; - *)exit;; -esac - -rofi -modi $arg -show $arg |
