2024-07-06 17:17:54 +02:00
|
|
|
{ pkgs, lib, vars, ... }:
|
2023-06-17 02:01:27 +02:00
|
|
|
|
2023-06-26 18:02:44 +02:00
|
|
|
let
|
2024-04-07 16:41:16 +02:00
|
|
|
inherit (pkgs) polkit_gnome callPackage;
|
2024-07-05 20:09:52 +02:00
|
|
|
inherit (lib) mkForce;
|
2024-04-06 17:35:34 +02:00
|
|
|
|
2024-04-02 23:17:01 +02:00
|
|
|
opacity = "0.95";
|
2024-04-02 21:46:56 +02:00
|
|
|
super = "SUPER";
|
2024-04-06 04:51:24 +02:00
|
|
|
|
2024-04-07 17:53:47 +02:00
|
|
|
osu-backgrounds = callPackage ../packages/osu-backgrounds.nix { };
|
2024-04-07 16:41:16 +02:00
|
|
|
|
2024-04-06 04:51:24 +02:00
|
|
|
raiseVolumeScript = "hypr/raise-volume.fish";
|
|
|
|
lowerVolumeScript = "hypr/lower-volume.fish";
|
2024-07-05 21:41:49 +02:00
|
|
|
muteScript = "hypr/mute.fish";
|
2024-04-06 04:51:24 +02:00
|
|
|
gapsScript = "hypr/gaps.sh";
|
|
|
|
randomBackgroundScript = "hypr/random-bg.fish";
|
|
|
|
swapBackgroundScript = "hypr/swap-bg.fish";
|
2024-04-07 16:41:16 +02:00
|
|
|
setBackgroundScript = "hypr/set-bg.fish";
|
2023-06-26 18:02:44 +02:00
|
|
|
in
|
2023-06-22 16:42:23 +02:00
|
|
|
{
|
2024-04-06 16:19:02 +02:00
|
|
|
home.packages = with pkgs; [
|
2024-04-05 02:02:51 +02:00
|
|
|
hyprdim
|
2024-03-08 04:14:48 +01:00
|
|
|
hyprnome
|
2024-04-13 15:04:04 +02:00
|
|
|
hyprshade
|
2024-04-05 02:02:51 +02:00
|
|
|
swww
|
|
|
|
grimblast
|
2024-04-06 16:19:02 +02:00
|
|
|
brightnessctl
|
|
|
|
playerctl
|
|
|
|
mpvpaper
|
|
|
|
lnch
|
|
|
|
wev
|
|
|
|
tessen
|
|
|
|
wtype
|
|
|
|
dmenu-wayland
|
|
|
|
thud
|
|
|
|
python311Packages.icoextract
|
|
|
|
wallust
|
|
|
|
activate-linux
|
|
|
|
wl-clipboard-rs
|
|
|
|
wf-recorder
|
2024-04-06 17:35:34 +02:00
|
|
|
lutgen
|
2024-03-08 04:14:48 +01:00
|
|
|
];
|
2023-08-30 22:13:44 +02:00
|
|
|
|
2024-03-29 19:46:11 +01:00
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-07-07 14:48:05 +02:00
|
|
|
plugins = [
|
|
|
|
(callPackage ../packages/hyprspace.nix { })
|
|
|
|
];
|
|
|
|
|
2024-04-02 21:59:57 +02:00
|
|
|
settings = {
|
2024-04-02 21:46:56 +02:00
|
|
|
env = [
|
|
|
|
"BROWSER,librewolf"
|
|
|
|
"QT_IM_MODULE,fcitx"
|
|
|
|
"XMODIFIERS,@im=fcitx"
|
|
|
|
"SDL_IM_MODULE,fcitx"
|
|
|
|
"GLFW_IM_MODULE,ibus"
|
|
|
|
"SWWW_TRANSITION,grow"
|
|
|
|
"SWWW_TRANSITION_STEP,200"
|
|
|
|
"SWWW_TRANSITION_DURATION,1.5"
|
|
|
|
"SWWW_TRANSITION_FPS,240"
|
|
|
|
"SWWW_TRANSITION_WAVE,80,40"
|
|
|
|
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
|
|
|
"QT_QPA_PLATFORM,wayland;xcb"
|
|
|
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
|
|
|
"QT_QPA_PLATFORMTHEME,qt5ct"
|
|
|
|
"QT_STYLE_OVERRIDE,kvantum"
|
|
|
|
];
|
|
|
|
|
|
|
|
monitor = ",preferred,auto,1";
|
|
|
|
|
|
|
|
exec-once = [
|
2024-04-29 19:12:17 +02:00
|
|
|
"sleep 0.1; swww-daemon"
|
2024-04-02 21:46:56 +02:00
|
|
|
"wpctl set-volume @DEFAULT_AUDIO_SINK@ 20%"
|
|
|
|
"ironbar"
|
|
|
|
"fcitx5"
|
|
|
|
"hyprctl dispatch workspace 5000000"
|
2024-04-06 04:51:24 +02:00
|
|
|
"${polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
2024-04-02 21:46:56 +02:00
|
|
|
"hyprdim --no-dim-when-only --persist --ignore-leaving-special --dialog-dim"
|
|
|
|
"sleep 1 && eww open desktop-icons"
|
2024-04-06 04:51:24 +02:00
|
|
|
"~/.config/${randomBackgroundScript}"
|
2024-04-02 21:46:56 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
input = {
|
|
|
|
kb_layout = "us";
|
|
|
|
repeat_rate = 50;
|
|
|
|
repeat_delay = 300;
|
|
|
|
|
|
|
|
accel_profile = "flat";
|
|
|
|
follow_mouse = 1;
|
|
|
|
sensitivity = 0;
|
|
|
|
mouse_refocus = false;
|
|
|
|
|
|
|
|
touchpad = {
|
|
|
|
natural_scroll = true;
|
|
|
|
disable_while_typing = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
general = {
|
2024-04-08 15:08:03 +02:00
|
|
|
gaps_in = 0;
|
|
|
|
gaps_out = 0;
|
|
|
|
border_size = 0;
|
2024-04-02 21:46:56 +02:00
|
|
|
layout = "master";
|
|
|
|
};
|
|
|
|
|
|
|
|
decoration = {
|
2024-04-08 15:08:03 +02:00
|
|
|
rounding = 0;
|
2024-04-02 21:46:56 +02:00
|
|
|
drop_shadow = true;
|
2024-04-17 19:44:22 +02:00
|
|
|
shadow_range = 30;
|
2024-04-02 21:46:56 +02:00
|
|
|
shadow_render_power = 3;
|
|
|
|
|
|
|
|
blur = {
|
|
|
|
enabled = true;
|
|
|
|
size = 4;
|
|
|
|
passes = 2;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
animations = {
|
|
|
|
enabled = true;
|
|
|
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
|
|
|
animation = [
|
|
|
|
"windows, 1, 7, myBezier"
|
|
|
|
"windowsOut, 1, 7, default, popin 80%"
|
|
|
|
"border, 1, 10, default"
|
|
|
|
"borderangle, 1, 8, default"
|
|
|
|
"fade, 1, 7, default"
|
|
|
|
"workspaces, 1, 6, default, slidevert"
|
|
|
|
"specialWorkspace, 1, 6, default, fade"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
dwindle = {
|
|
|
|
preserve_split = true;
|
|
|
|
special_scale_factor = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
master = {
|
|
|
|
new_on_top = false;
|
|
|
|
mfact = 0.65;
|
|
|
|
special_scale_factor = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
gestures = {
|
|
|
|
workspace_swipe = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
device = [
|
|
|
|
{
|
|
|
|
name = "synps/2-synaptics-touchpad";
|
|
|
|
sensitivity = 0.75;
|
|
|
|
accel_profile = "flat";
|
|
|
|
natural_scroll = true;
|
|
|
|
disable_while_typing = false;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "tpps/2-elan-trackpoint";
|
|
|
|
sensitivity = 0.5;
|
|
|
|
accel_profile = "flat";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
binds = {
|
|
|
|
allow_workspace_cycles = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
layerrule = [
|
|
|
|
"blur,ironbar"
|
|
|
|
"blur,rofi"
|
|
|
|
"blur,notifications"
|
|
|
|
];
|
|
|
|
|
2024-07-07 14:48:05 +02:00
|
|
|
plugin = {
|
|
|
|
overview = {
|
|
|
|
affectStrut = false;
|
|
|
|
showEmptyWorkspace = false;
|
|
|
|
exitOnSwitch = true;
|
|
|
|
exitOnClick = true;
|
|
|
|
drawActiveWorkspace = true;
|
|
|
|
hideRealLayers = false;
|
|
|
|
hideOverlayLayers = false;
|
|
|
|
hideTopLayers = false;
|
|
|
|
hideBackgroundLayers = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-02 21:46:56 +02:00
|
|
|
windowrulev2 = [
|
|
|
|
"nomaxsize,class:^(winecfg\.exe)$"
|
|
|
|
"nomaxsize,class:^(osu\.exe)$"
|
|
|
|
"opaque,class:^(kitty)$"
|
|
|
|
"noblur,class:^(kitty)$"
|
|
|
|
"nodim,title:^(Picture-in-Picture)$"
|
|
|
|
"nodim,title:^(ピクチャーインピクチャー)$"
|
|
|
|
"nodim,class:^(mpv)$"
|
|
|
|
"tile,class:^(.qemu-system-x86_64-wrapped)$"
|
|
|
|
"opacity ${opacity} ${opacity},class:^(thunar)$"
|
|
|
|
"float,class:^(librewolf)$"
|
|
|
|
"center 1,class:^(librewolf)$"
|
|
|
|
];
|
|
|
|
|
|
|
|
misc = {
|
|
|
|
disable_hyprland_logo = true;
|
|
|
|
animate_manual_resizes = true;
|
2024-07-04 15:35:14 +02:00
|
|
|
animate_mouse_windowdragging = true;
|
2024-04-02 21:46:56 +02:00
|
|
|
disable_autoreload = true;
|
|
|
|
new_window_takes_over_fullscreen = 1;
|
2024-06-13 11:42:08 +02:00
|
|
|
initial_workspace_tracking = 0;
|
2024-04-02 21:46:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
bind = [
|
|
|
|
"${super}_SHIFT, Return, exec, kitty"
|
|
|
|
"${super}_SHIFT, Q, killactive"
|
2024-04-06 04:51:24 +02:00
|
|
|
"${super}, W, exec, ~/.config/${randomBackgroundScript}"
|
|
|
|
"${super}_SHIFT, W, exec, ~/.config/${swapBackgroundScript}"
|
2024-04-02 21:46:56 +02:00
|
|
|
"${super}, P, exec, dunstify --icon=$(grimblast save screen) Screenshot Captured."
|
|
|
|
", Print, exec, grimblast --freeze copy area"
|
|
|
|
"${super}_ALT, delete, exit"
|
|
|
|
"${super}, T, exec, tessen"
|
|
|
|
"${super}, V, togglefloating"
|
|
|
|
"${super}, B, centerwindow"
|
2024-04-06 04:51:24 +02:00
|
|
|
"${super}, U, exec, ~/.config/${gapsScript}"
|
2024-04-02 21:46:56 +02:00
|
|
|
"${super}, X, pin"
|
|
|
|
"${super}, F, fullscreen"
|
2024-07-07 14:48:05 +02:00
|
|
|
"${super}, Tab, overview:toggle, all"
|
2024-04-02 21:46:56 +02:00
|
|
|
"${super}, S, swapactiveworkspaces, 0 1"
|
|
|
|
"${super}_SHIFT, S, movetoworkspace, special"
|
|
|
|
"${super}_SHIFT, A, exec, killall activate-linux || activate-linux -s 1.15 -x 412 -y 120 -c 1-1-1-0.05"
|
2024-04-08 14:25:58 +02:00
|
|
|
"${super}, O, exec, killall .ironbar-wrapper inotifywait pactl || ironbar"
|
2024-04-02 21:46:56 +02:00
|
|
|
"${super}_SHIFT, O, exec, eww close overlay || eww open overlay"
|
|
|
|
"${super}, F1, exec, killall rofi || rofi -show drun"
|
|
|
|
"${super}, F2, togglespecialworkspace"
|
2024-07-06 17:17:54 +02:00
|
|
|
"${super}, comma, exec, playerctl -p mpv position \"5-\" && ${vars.notifySend} \"Minus 5 seconds\" \"$(playerctl -p mpv position)\""
|
|
|
|
"${super}, period, exec, playerctl -p mpv position \"5+\" && ${vars.notifySend} \"Plus 5 seconds\" \"$(playerctl -p mpv position)\""
|
|
|
|
"${super}_SHIFT, comma, exec, playerctl -p mpv previous && ${vars.notifySend} \"Previous track\" \"$(playerctl -p mpv metadata xesam:title)\""
|
|
|
|
"${super}_SHIFT, period, exec, playerctl -p mpv next && ${vars.notifySend} \"Next track\" \"$(playerctl -p mpv metadata xesam:title)\""
|
|
|
|
"${super}, slash, exec, playerctl -p mpv play-pause && ${vars.notifySend} \"mpv\" \"$(playerctl -p mpv status)\""
|
2024-04-02 21:46:56 +02:00
|
|
|
"${super}, M, focusmonitor, +1"
|
|
|
|
"${super}_SHIFT, M, focusmonitor, -1"
|
|
|
|
|
|
|
|
"${super}, Return, layoutmsg, swapwithmaster master"
|
|
|
|
"${super}, J, layoutmsg, cyclenext"
|
|
|
|
"${super}, K, layoutmsg, cycleprev"
|
|
|
|
"${super}_SHIFT, J, layoutmsg, swapnext"
|
|
|
|
"${super}_SHIFT, K, layoutmsg, swapprev"
|
|
|
|
"${super}, C, splitratio, exact 0.80"
|
|
|
|
"${super}, C, layoutmsg, orientationtop"
|
|
|
|
"${super}_SHIFT, C, splitratio, exact 0.65"
|
|
|
|
"${super}_SHIFT, C, layoutmsg, orientationleft"
|
|
|
|
"${super}, H, layoutmsg, addmaster"
|
|
|
|
"${super}, L, layoutmsg, removemaster"
|
|
|
|
"${super}_SHIFT, H, splitratio, -0.05"
|
|
|
|
"${super}_SHIFT, L, splitratio, +0.05"
|
|
|
|
"${super}_ALT, L, exec, hyprlock"
|
|
|
|
|
|
|
|
"${super}, 1, exec, hyprnome --previous"
|
|
|
|
"${super}, 2, exec, hyprnome"
|
|
|
|
"${super}, F11, exec, hyprnome --previous"
|
|
|
|
"${super}, F12, exec, hyprnome"
|
|
|
|
"${super}_SHIFT, 1, exec, hyprnome --previous --move"
|
|
|
|
"${super}_SHIFT, 2, exec, hyprnome --move"
|
|
|
|
|
|
|
|
"${super}, mouse_down, workspace, e+1"
|
|
|
|
"${super}, mouse_up, workspace, e-1"
|
|
|
|
];
|
|
|
|
|
|
|
|
bindm = [
|
|
|
|
"${super}, mouse:272, movewindow"
|
|
|
|
"${super}, mouse:273, resizewindow"
|
|
|
|
];
|
|
|
|
|
|
|
|
bindl = [
|
2024-07-05 21:41:49 +02:00
|
|
|
", XF86AudioMute, exec, ~/.config/${muteScript} Volume @DEFAULT_AUDIO_SINK@"
|
2024-04-06 04:51:24 +02:00
|
|
|
", XF86AudioRaiseVolume, exec, ~/.config/${raiseVolumeScript}"
|
|
|
|
", XF86AudioLowerVolume, exec, ~/.config/${lowerVolumeScript}"
|
2024-07-05 21:41:49 +02:00
|
|
|
", XF86AudioMicMute, exec, ~/.config/${muteScript} Microphone @DEFAULT_AUDIO_SOURCE@"
|
2024-07-06 17:17:54 +02:00
|
|
|
", XF86MonBrightnessDown, exec, brightnessctl set 5%- && ${vars.notifySend} \"Decreased brightness to\" \"$(brightnessctl get)\""
|
|
|
|
", XF86MonBrightnessUp, exec, brightnessctl set +5% && ${vars.notifySend} \"Increased brightness to\" \"$(brightnessctl get)\""
|
2024-07-07 16:45:33 +02:00
|
|
|
", XF86WLAN, exec, sleep 0.2 && ${vars.notifySend} \"WiFi\" \"$(nmcli radio wifi)\""
|
2024-04-02 21:46:56 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = /* bash */ ''
|
|
|
|
bind = CTRL, Alt_L, submap, passthrough
|
|
|
|
submap = passthrough
|
|
|
|
bind = CTRL, Alt_L, submap, reset
|
|
|
|
submap = reset
|
|
|
|
'';
|
2024-03-29 19:46:11 +01:00
|
|
|
};
|
|
|
|
|
2024-04-06 04:51:24 +02:00
|
|
|
xdg.configFile.${gapsScript} = {
|
2023-07-01 20:21:12 +02:00
|
|
|
executable = true;
|
|
|
|
text = /* bash */ ''
|
2023-12-30 12:17:36 +01:00
|
|
|
#!/usr/bin/env bash
|
2024-03-09 03:46:06 +01:00
|
|
|
hyprctl keyword general:gaps_out $((10 - $(hyprctl getoption general:gaps_out -j | jq -r ".custom" | choose 1)))
|
|
|
|
hyprctl keyword general:gaps_in $((5 - $(hyprctl getoption general:gaps_in -j | jq -r ".custom" | choose 1)))
|
2024-04-08 15:08:03 +02:00
|
|
|
hyprctl keyword general:border_size $((2 - $(hyprctl getoption general:border_size -j | jq -r ".int")))
|
2023-07-03 20:52:59 +02:00
|
|
|
hyprctl keyword decoration:rounding $((8 - $(hyprctl getoption decoration:rounding -j | jq -r ".int")))
|
2023-07-01 20:21:12 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-06 04:51:24 +02:00
|
|
|
xdg.configFile.${raiseVolumeScript} = {
|
2024-01-28 16:30:06 +01:00
|
|
|
executable = true;
|
|
|
|
text = /* fish */ ''
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2024-01-29 23:17:56 +01:00
|
|
|
wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
|
|
|
|
2024-01-28 16:30:06 +01:00
|
|
|
set VOL $(math "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100")
|
|
|
|
|
2024-07-06 17:17:54 +02:00
|
|
|
${vars.notifySend} "Raised volume to" "$VOL%"
|
2024-01-28 16:30:06 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-06 04:51:24 +02:00
|
|
|
xdg.configFile.${lowerVolumeScript} = {
|
2024-01-28 16:30:06 +01:00
|
|
|
executable = true;
|
|
|
|
text = /* fish */ ''
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2024-01-29 23:17:56 +01:00
|
|
|
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
|
|
|
|
2024-01-28 16:30:06 +01:00
|
|
|
set VOL $(math "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100")
|
|
|
|
|
2024-07-06 17:17:54 +02:00
|
|
|
${vars.notifySend} "Lowered volume to" "$VOL%"
|
2024-01-28 16:30:06 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-07-05 21:41:49 +02:00
|
|
|
xdg.configFile.${muteScript} = {
|
|
|
|
executable = true;
|
|
|
|
text = /* fish */ ''
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
|
|
|
wpctl set-mute "$argv[2]" toggle
|
|
|
|
|
|
|
|
set SINK $(wpctl get-volume "$argv[2]")
|
|
|
|
|
|
|
|
if test -n "$(echo $SINK | choose 2)"
|
2024-07-06 17:17:54 +02:00
|
|
|
${vars.notifySend} "$argv[1]" "Muted"
|
2024-07-05 21:41:49 +02:00
|
|
|
else
|
2024-07-06 17:17:54 +02:00
|
|
|
${vars.notifySend} "$argv[1]" "$(math "$(echo $SINK | choose 1) * 100")%"
|
2024-07-05 21:41:49 +02:00
|
|
|
end
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-07 16:41:16 +02:00
|
|
|
xdg.configFile.${setBackgroundScript} = {
|
2023-08-01 18:01:18 +02:00
|
|
|
executable = true;
|
|
|
|
text = /* fish */ ''
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
|
|
|
if [ (hyprctl getoption animations:enabled -j | jq -r ".int") = "1" ]
|
|
|
|
swww img \
|
|
|
|
--transition-type $(random choice grow wave outer) \
|
|
|
|
--transition-wave 80,40 \
|
|
|
|
--transition-angle $(random choice 45 90 135 225 270 315) \
|
|
|
|
--transition-pos $(random choice center top left right bottom top-left top-right bottom-left bottom-right) \
|
|
|
|
--transition-step 200 \
|
|
|
|
--transition-duration 1.5 \
|
|
|
|
--transition-fps 240 \
|
2023-11-19 12:37:21 +01:00
|
|
|
--outputs "$argv[1]" \
|
|
|
|
"$argv[2]"
|
2023-08-01 18:01:18 +02:00
|
|
|
else
|
|
|
|
swww img \
|
|
|
|
--transition-type simple \
|
|
|
|
--transition-step 255 \
|
2023-11-19 12:37:21 +01:00
|
|
|
--outputs "$argv[1]" \
|
|
|
|
"$argv[2]"
|
2023-08-01 18:01:18 +02:00
|
|
|
end
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-06 04:51:24 +02:00
|
|
|
xdg.configFile.${randomBackgroundScript} = {
|
2023-08-01 18:01:57 +02:00
|
|
|
executable = true;
|
|
|
|
text = /* fish */ ''
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2023-11-19 12:37:21 +01:00
|
|
|
for monitor in (hyprctl monitors -j | jq -r '.[].name')
|
2024-04-07 17:53:47 +02:00
|
|
|
~/.config/${setBackgroundScript} "$monitor" "$(random choice $(fd . ${osu-backgrounds}/2024-03-30-Spring-2024-Fanart-Contest-All-Entries --follow -e jpg -e png))"
|
2023-11-19 12:37:21 +01:00
|
|
|
end
|
2023-08-01 18:01:57 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-06 04:51:24 +02:00
|
|
|
xdg.configFile.${swapBackgroundScript} = {
|
2024-03-08 06:04:48 +01:00
|
|
|
executable = true;
|
|
|
|
text = /* fish */ ''
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2024-04-20 21:33:36 +02:00
|
|
|
set M "$(swww query | cut -d ':' -f 5)"
|
|
|
|
set M1 "$(echo "$M" | head -n 1 | awk '{$1=$1};1')"
|
|
|
|
set M2 "$(echo "$M" | tail -n 1 | awk '{$1=$1};1')"
|
2024-03-08 06:04:48 +01:00
|
|
|
|
2024-04-20 21:33:36 +02:00
|
|
|
~/.config/${setBackgroundScript} "$(swww query | choose 0 | choose -c 0..-1 | tail -n 1)" "$M1"
|
|
|
|
~/.config/${setBackgroundScript} "$(swww query | choose 0 | choose -c 0..-1 | head -n 1)" "$M2"
|
2024-03-08 06:04:48 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-05-28 19:19:15 +02:00
|
|
|
programs.hyprlock = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
general = {
|
|
|
|
hide_cursor = true;
|
|
|
|
grace = 2;
|
|
|
|
};
|
|
|
|
|
|
|
|
background = {
|
|
|
|
color = "rgba(25, 20, 20, 1.0)";
|
|
|
|
path = "screenshot";
|
|
|
|
blur_passes = 2;
|
|
|
|
brightness = 0.5;
|
|
|
|
};
|
|
|
|
|
|
|
|
label = {
|
|
|
|
text = "パスワードをご入力ください";
|
|
|
|
color = "rgba(222, 222, 222, 1.0)";
|
|
|
|
font_size = 50;
|
|
|
|
font_family = "Noto Sans CJK JP";
|
|
|
|
position = "0, 70";
|
|
|
|
halign = "center";
|
|
|
|
valign = "center";
|
|
|
|
};
|
|
|
|
|
|
|
|
input-field = {
|
|
|
|
size = "50, 50";
|
|
|
|
dots_size = 0.33;
|
|
|
|
dots_spacing = 0.15;
|
|
|
|
outer_color = "rgba(25, 20, 20, 0)";
|
|
|
|
inner_color = "rgba(25, 20, 20, 0)";
|
|
|
|
font_color = "rgba(222, 222, 222, 1.0)";
|
|
|
|
placeholder_text = "パスワード";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-03-08 11:34:22 +01:00
|
|
|
|
2024-05-28 19:01:29 +02:00
|
|
|
services.hypridle = {
|
|
|
|
enable = true;
|
2024-03-08 11:34:22 +01:00
|
|
|
|
2024-05-28 19:01:29 +02:00
|
|
|
settings = {
|
|
|
|
general = {
|
|
|
|
lock_cmd = "pidof hyprlock || hyprlock";
|
|
|
|
before_sleep_cmd = "loginctl lock-session";
|
|
|
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
|
|
};
|
2024-03-08 11:34:22 +01:00
|
|
|
|
2024-05-28 19:01:29 +02:00
|
|
|
listener = [
|
|
|
|
{
|
|
|
|
timeout = 150;
|
2024-07-07 17:00:57 +02:00
|
|
|
on-timeout = "brightnessctl -s set 10 && brightnessctl --device=tpacpi::kbd_backlight set 0 --save";
|
|
|
|
on-resume = "brightnessctl -r && brightnessctl --device=tpacpi::kbd_backlight --restore";
|
2024-05-28 19:01:29 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
timeout = 300;
|
|
|
|
on-timeout = "loginctl lock-session";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
timeout = 380;
|
|
|
|
on-timeout = "hyprctl dispatch dpms off";
|
|
|
|
on-resume = "hyprctl dispatch dpms on";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
timeout = 1800;
|
|
|
|
on-timeout = "systemctl suspend";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-07-05 20:09:52 +02:00
|
|
|
|
|
|
|
services.hyprpaper.enable = mkForce false;
|
2023-06-17 02:01:27 +02:00
|
|
|
}
|