introducting rive in flake, extending git

This commit is contained in:
nx2
2024-04-03 12:03:50 +02:00
parent 0e95c69d8c
commit 551b904c32
4 changed files with 279 additions and 186 deletions

View File

@@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, pkgs-unstable, rice, lib, ... }:
let
animation-speed = "4";
animation-speed = "2";
transparency = "0.9";
gap-size = 10;
monitors = {
@@ -17,12 +17,16 @@ let
scale = "1.0";
};
};
in
in
{
home.packages = with pkgs; [
home.packages = [
# hyprland itself is a system package
hyprland-protocols
(writeShellScriptBin "waybar_mode" ''
pkgs.hyprland-protocols
pkgs-unstable.hyprlock
pkgs-unstable.hypridle
(pkgs.writeShellScriptBin "waybar_mode" ''
#!/bin/bash
# Function to print help message
@@ -59,7 +63,7 @@ in
exit 0
'')
];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
@@ -69,38 +73,38 @@ in
settings = {
# source = /home/nx2/.config/hypr/hyprland-nosync.conf;
monitor = [
"${monitors.main.name}, ${monitors.main.resolution}, ${monitors.main.position}, ${monitors.main.scale}"
];
monitor = [
"${monitors.main.name}, ${monitors.main.resolution}, ${monitors.main.position}, ${monitors.main.scale}"
];
workspace = [
"${monitors.main.name}, 11"
"${monitors.main.name}, 12"
"${monitors.main.name}, 13"
"${monitors.main.name}, 14"
"${monitors.main.name}, 15"
"${monitors.main.name}, 16"
"${monitors.main.name}, 17"
"${monitors.main.name}, 18"
"${monitors.main.name}, 19"
"${monitors.main.name}, 10,gapsin:0,gapsout:0"
"${monitors.main.name}, 100"
"${monitors.second.name}, 21,gapsin:0,gapsout:0"
"${monitors.second.name}, 21"
"${monitors.second.name}, 22"
"${monitors.second.name}, 23"
"${monitors.second.name}, 24"
"${monitors.second.name}, 25"
"${monitors.second.name}, 26"
"${monitors.second.name}, 27"
"${monitors.second.name}, 28"
"${monitors.second.name}, 29"
"${monitors.second.name}, 20"
];
workspace = [
"${monitors.main.name}, 11"
"${monitors.main.name}, 12"
"${monitors.main.name}, 13"
"${monitors.main.name}, 14"
"${monitors.main.name}, 15"
"${monitors.main.name}, 16"
"${monitors.main.name}, 17"
"${monitors.main.name}, 18"
"${monitors.main.name}, 19"
"${monitors.main.name}, 10,gapsin:0,gapsout:0"
"${monitors.main.name}, 100"
"${monitors.second.name}, 21,gapsin:0,gapsout:0"
"${monitors.second.name}, 21"
"${monitors.second.name}, 22"
"${monitors.second.name}, 23"
"${monitors.second.name}, 24"
"${monitors.second.name}, 25"
"${monitors.second.name}, 26"
"${monitors.second.name}, 27"
"${monitors.second.name}, 28"
"${monitors.second.name}, 29"
"${monitors.second.name}, 20"
];
"device:logitech-wireless-mouse-mx-master-1" = {
sensitivity = -0.2;
};
"device:logitech-wireless-mouse-mx-master-1" = {
sensitivity = -0.2;
};
# env = XCURSOR_SIZE,18
@@ -110,94 +114,96 @@ workspace = [
# env = XMODIFIERS,@im=ibus
input = {
sensitivity = 0.1;
kb_layout = "de";
follow_mouse = "2";
touchpad = {
natural_scroll = true;
scroll_factor = "0.9";
};
sensitivity = 0.1;
kb_layout = "de";
follow_mouse = "2";
touchpad = {
natural_scroll = true;
scroll_factor = "0.9";
};
};
general = {
gaps_in = builtins.div gap-size 2;
gaps_out = gap-size;
border_size = "1";
"col.active_border" = "rgba(888888ff)";
"col.inactive_border" = "rgba(000000ff)";
layout = "dwindle";
# layout = "master";
resize_on_border = false;
general = {
gaps_in = builtins.div gap-size 2;
gaps_out = gap-size;
border_size = "1";
"col.active_border" = "rgba(888888ff)";
"col.inactive_border" = "rgba(000000ff)";
layout = "dwindle";
# layout = "master";
resize_on_border = false;
};
decoration = {
rounding = "0";
rounding = "0";
drop_shadow = false;
shadow_range = "20";
shadow_offset = "0 0";
shadow_render_power = "4";
"col.shadow" = "rgba(000000ff)";
"col.shadow_inactive" = "rgba(00000000)";
drop_shadow = false;
shadow_range = "20";
shadow_offset = "0 0";
shadow_render_power = "4";
"col.shadow" = "rgba(000000ff)";
"col.shadow_inactive" = "rgba(00000000)";
active_opacity = "1.0";
inactive_opacity = "1.0";
fullscreen_opacity = "1.0";
active_opacity = "1.0";
inactive_opacity = "1.0";
fullscreen_opacity = "1.0";
dim_inactive = false;
dim_strength = "0.3";
dim_inactive = false;
dim_strength = "0.3";
blur = {
enabled = true;
size = "3";
passes = "2";
xray = false;
ignore_opacity = true;
};
blur = {
enabled = true;
size = "3";
passes = "2";
xray = false;
ignore_opacity = true;
};
};
animations = {
enabled = true;
bezier = "myBezier, 0.01, 0.9, 0.1, 1.0";
animation = [
"windows, 1, ${animation-speed}, myBezier, slide"
"border, 1, ${animation-speed}, myBezier"
"fade, 1, ${animation-speed}, myBezier"
"workspaces, 1, ${animation-speed}, myBezier, slide"
];
enabled = true;
# bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o
# bezier = "myBezier, 0.83, 0, 0.17, 1"; # io
bezier = "myBezier, 0.33, 1, 0.68, 1";
animation = [
"windows, 1, ${animation-speed}, myBezier, slide"
"border, 1, ${animation-speed}, myBezier"
"fade, 1, ${animation-speed}, myBezier"
"workspaces, 1, ${animation-speed}, myBezier, slide"
];
};
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = "4";
workspace_swipe_distance = "300";
workspace_swipe_invert = true;
workspace_swipe_min_speed_to_force = "30";
workspace_swipe_cancel_ratio = "0.5";
workspace_swipe_create_new = false;
workspace_swipe_direction_lock = false;
workspace_swipe_direction_lock_threshold = "10";
workspace_swipe_forever = true;
workspace_swipe_numbered = false;
workspace_swipe_use_r = false;
workspace_swipe = true;
workspace_swipe_fingers = "4";
workspace_swipe_distance = "300";
workspace_swipe_invert = true;
workspace_swipe_min_speed_to_force = "30";
workspace_swipe_cancel_ratio = "0.5";
workspace_swipe_create_new = false;
workspace_swipe_direction_lock = false;
workspace_swipe_direction_lock_threshold = "10";
workspace_swipe_forever = true;
workspace_swipe_numbered = false;
workspace_swipe_use_r = false;
};
dwindle = {
preserve_split = true; # you probably want this
no_gaps_when_only = true;
preserve_split = true; # you probably want this
no_gaps_when_only = true;
};
master = {
new_is_master = true;
new_is_master = true;
};
misc = {
disable_hyprland_logo = true;
animate_mouse_windowdragging = false;
enable_swallow = true;
disable_hyprland_logo = true;
animate_mouse_windowdragging = false;
enable_swallow = true;
};
exec-once = [
@@ -216,29 +222,31 @@ workspace = [
];
windowrulev2 = [
"opacity $trans,class:^(com.chatterino.chatterino)$"
"opacity $trans,class:^(chatterino)$"
"opacity ${transparency},class:^(com.chatterino.chatterino)$"
"opacity ${transparency},class:^(chatterino)$"
"bordercolor rgba(ff00ffff) rgba(ff00ff66), pinned:1"
];
windowrule = [
"opacity $trans, code-oss"
"opacity $trans, VSCodium"
"opacity $trans, Code"
"opacity $trans, neovide"
"opacity $trans, obsidian"
"opacity $trans, zathura"
"opacity ${transparency}, firefox"
"opacity ${transparency}, code-oss"
"opacity ${transparency}, VSCodium"
"opacity ${transparency}, Code"
"opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian"
"opacity ${transparency}, zathura"
"bordercolor rgba(ffffffff) rgba(000000b2), Alacritty"
"bordercolor rgba(ffffffff) rgba(000000b2), Kitty"
"opacity $trans, discord"
"opacity $trans, vesktop"
"opacity $trans, Element"
"opacity $trans, thunderbird"
"opacity $trans, lutris"
"opacity $trans, element"
"opacity $trans, ^([sS]potify)$"
"opacity $trans, virt-manager"
"opacity $trans, thunar"
"opacity ${transparency}, discord"
"opacity ${transparency}, vesktop"
"opacity ${transparency}, Element"
"opacity ${transparency}, thunderbird"
"opacity ${transparency}, lutris"
"opacity ${transparency}, element"
"opacity ${transparency}, ^([sS]potify)$"
"opacity ${transparency}, virt-manager"
"opacity ${transparency}, thunar"
"opacity ${transparency}, title:^(wlogout)$"
"opaque, title:^(GNU Image Manipulation Program)$"
"dimaround, Rofi"
"float, title:^(Picture-in-Picture)$"
@@ -433,16 +441,16 @@ workspace = [
bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"
];
];
};
# .d8888. db db d8888b. 88b d88 d8b d88888b. .d8888.
# 88' YP 88 88 88 '8D 88YbdP88 dP'Yb 88' '8b 88' YP
# '8bo. 88 88 88oooY' 88 YP 88 d8. .8b 88. .8P '8bo.
# 'Y8b. 88 88 88''Yb. 88 88 8888888 888888P' 'Y8b.
# db 8D 88. .88 88 8D 88 88 88' '88 88 db 8D
# '8888Y' 'Y8888P' Y8888P' YP YP 88 YP YP '8888Y'
# .d8888. db db d8888b. 88b d88 d8b d88888b. .d8888.
# 88' YP 88 88 88 '8D 88YbdP88 dP'Yb 88' '8b 88' YP
# '8bo. 88 88 88oooY' 88 YP 88 d8. .8b 88. .8P '8bo.
# 'Y8b. 88 88 88''Yb. 88 88 8888888 888888P' 'Y8b.
# db 8D 88. .88 88 8D 88 88 88' '88 88 db 8D
# '8888Y' 'Y8888P' Y8888P' YP YP 88 YP YP '8888Y'
extraConfig = ''
submap = browserSM
bind = , W, exec, waybar_mode unset
@@ -727,30 +735,104 @@ workspace = [
submap = reset
'';
};
home.file = {
".config/hypr/hyprlock.conf".text = ''
background {
monitor = ${monitors.main.name}
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
path = /home/nx2/Pictures/nix-wall.png
blur_size = 4
blur_passes = 3 # 0 disables blurring
noise = 0.0117
contrast = 1.3000 # Vibrant!!!
brightness = 0.8000
vibrancy = 0.2100
vibrancy_darkness = 0.0
}
input-field {
monitor =
size = 250, 50
outline_thickness = 1
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = rgba(aaaaaaff)
inner_color = rgba(000000ff)
font_color = rgba(ffffffff)
fade_on_empty = true
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
hide_input = false
position = 0, 50
halign = center
valign = bottom
}
# Current time
label {
monitor =
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"
color = $color0
font_size = 64
font_family = ${font.code} 10
position = 0, 16
halign = center
valign = center
}
# User label
label {
monitor =
text = Hey <span text_transform="capitalize" size="larger">$USER</span>
color = $color0
font_size = 20
font_family = ${font.code} 10
position = 0, 0
halign = center
valign = center
}
# Type to unlock
label {
monitor =
text = Type to unlock!
color = $color0
font_size = 16
font_family = ${font.code} 10
position = 0, 30
halign = center
valign = bottom
}
'';
};
}
# plugin {
# hycov {
# overview_gappo = 60 # gaps width from screen edge
# overview_gappi = 24 # gaps width from clients
# enable_hotarea = 0 # enable mouse cursor hotarea
# # hotarea_monitor = all # monitor name which hotarea is in, default is all
# # hotarea_pos = 1 # position of hotarea (1: bottom left, 2: bottom right, 3: top left, 4: top right)
# # hotarea_size = 10 # hotarea size, 10x10
# # swipe_fingers = 4 # finger number of gesture,move any directory
# move_focus_distance = 100 # distance for movefocus,only can use 3 finger to move
# enable_gesture = 0 # enable gesture
# disable_workspace_change = 0 # disable workspace change when in overview mode
# disable_spawn = 0 # disable bind exec when in overview mode
# auto_exit = 1 # enable auto exit when no client in overview
# auto_fullscreen = 0 # auto make active window maximize after exit overview
# only_active_workspace = 0 # only overview the active workspace
# only_active_monitor = 1 # only overview the active monitor
# enable_alt_release_exit = 0 # alt swith mode arg,see readme for detail
# alt_replace_key = Alt_L # alt swith mode arg,see readme for detail
# alt_toggle_auto_next = 0 # auto focus next window when toggle overview in alt swith mode
# click_in_cursor = 0 # when click to jump,the target windwo is find by cursor, not the current foucus window.
# hight_of_titlebar = 0 # height deviation of title bar hight
# }
# }
# plugin {
# hycov {
# overview_gappo = 60 # gaps width from screen edge
# overview_gappi = 24 # gaps width from clients
# enable_hotarea = 0 # enable mouse cursor hotarea
# # hotarea_monitor = all # monitor name which hotarea is in, default is all
# # hotarea_pos = 1 # position of hotarea (1: bottom left, 2: bottom right, 3: top left, 4: top right)
# # hotarea_size = 10 # hotarea size, 10x10
# # swipe_fingers = 4 # finger number of gesture,move any directory
# move_focus_distance = 100 # distance for movefocus,only can use 3 finger to move
# enable_gesture = 0 # enable gesture
# disable_workspace_change = 0 # disable workspace change when in overview mode
# disable_spawn = 0 # disable bind exec when in overview mode
# auto_exit = 1 # enable auto exit when no client in overview
# auto_fullscreen = 0 # auto make active window maximize after exit overview
# only_active_workspace = 0 # only overview the active workspace
# only_active_monitor = 1 # only overview the active monitor
# enable_alt_release_exit = 0 # alt swith mode arg,see readme for detail
# alt_replace_key = Alt_L # alt swith mode arg,see readme for detail
# alt_toggle_auto_next = 0 # auto focus next window when toggle overview in alt swith mode
# click_in_cursor = 0 # when click to jump,the target windwo is find by cursor, not the current foucus window.
# hight_of_titlebar = 0 # height deviation of title bar hight
# }
# }