mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Migrate services from wrappers to systemd services
This commit is contained in:
parent
e1ba06a5fb
commit
aceeeef689
13 changed files with 291 additions and 247 deletions
33
modules/home/de/hyprland/default.nix
Normal file
33
modules/home/de/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}@moduleArgs:
|
||||
{
|
||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "" // {
|
||||
default = moduleArgs.osConfig.myConfig.de.hyprland.enable or false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
|
||||
home.packages = [
|
||||
(wrappers.rofi { inherit (config.myConfig) theme; })
|
||||
pkgs.wl-clipboard
|
||||
pkgs.playerctl
|
||||
pkgs.brightnessctl
|
||||
pkgs.grimblast
|
||||
];
|
||||
|
||||
myConfig.de = {
|
||||
hyprpaper.enable = true;
|
||||
hypridle.enable = true;
|
||||
waybar.enable = true;
|
||||
cliphist.enable = true;
|
||||
};
|
||||
|
||||
services.dunst.enable = true;
|
||||
};
|
||||
}
|
||||
126
modules/home/de/hyprland/keybinds.nix
Normal file
126
modules/home/de/hyprland/keybinds.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
# Bindflags:
|
||||
# r = release
|
||||
# e = repeat
|
||||
# l = locked
|
||||
|
||||
# Variables
|
||||
$play-pause = playerctl --ignore-player=firefox play-pause
|
||||
$play-next = playerctl --ignore-player=firefox next
|
||||
$play-previous = playerctl --ignore-player=firefox previous
|
||||
$mute = wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
$volume-up = wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
$volume-down = wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
$mute-mic = wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
|
||||
# Essentials
|
||||
bind = SUPER SHIFT, C, killactive,
|
||||
bind = SUPER SHIFT, V, togglefloating,
|
||||
bind = SUPER SHIFT, F, fullscreen, 0
|
||||
|
||||
# Launch programs
|
||||
bind = SUPER, R, exec, rofi -show drun
|
||||
bind = SUPER, RETURN, exec, kitty
|
||||
bind = SUPER, V, exec, rofi-clipboard
|
||||
bind = SUPER, B, exec, firefox
|
||||
bind = SUPER, F, exec, nemo
|
||||
bind = SUPER, C, exec, codium
|
||||
|
||||
# Move focus
|
||||
bind = SUPER, left, movefocus, l
|
||||
bind = SUPER, right, movefocus, r
|
||||
bind = SUPER, up, movefocus, u
|
||||
bind = SUPER, down, movefocus, d
|
||||
bind = SUPER, TAB, cyclenext,
|
||||
|
||||
# Move window
|
||||
bind = SUPER SHIFT, left, movewindow, l
|
||||
bind = SUPER SHIFT, right, movewindow, r
|
||||
bind = SUPER SHIFT, up, movewindow, u
|
||||
bind = SUPER SHIFT, down, movewindow, d
|
||||
bindm = SUPER, mouse:272, movewindow
|
||||
|
||||
# Resize window
|
||||
binde = SUPER CONTROL, left, resizeactive, -100 0
|
||||
binde = SUPER CONTROL, right, resizeactive, 100 0
|
||||
binde = SUPER CONTROL, up, resizeactive, 0 -100
|
||||
binde = SUPER CONTROL, down, resizeactive, 0 100
|
||||
bindm = SUPER, mouse:273, resizewindow
|
||||
|
||||
# Minimize window
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
bind = SUPER SHIFT, M, movetoworkspace, +0
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
bind = SUPER SHIFT, M, movetoworkspace, special:minimize
|
||||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
|
||||
# Switch workspace
|
||||
${lib.concatMapStringsSep "\n" (n: ''
|
||||
bind = SUPER, ${toString n}, focusworkspaceoncurrentmonitor, ${toString n}
|
||||
bind = SUPER, ${toString n}, togglespecialworkspace, blank
|
||||
bind = SUPER, ${toString n}, togglespecialworkspace, blank
|
||||
bind = SUPER SHIFT, ${toString n}, movetoworkspacesilent, ${toString n}
|
||||
'') (lib.range 1 9)}
|
||||
bind = SUPER, mouse_down, workspace, e-1
|
||||
bind = SUPER, mouse_up, workspace, e+1
|
||||
|
||||
# Manage session
|
||||
bindrl = SUPER CONTROL, Q, exit,
|
||||
bindrl = SUPER CONTROL, P, exec, poweroff
|
||||
bindrl = SUPER CONTROL, R, exec, reboot
|
||||
bindrl = SUPER CONTROL, S, exec, lock-suspend
|
||||
bindl = , switch:on:Lid Switch, exec, lock-suspend
|
||||
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
|
||||
bindrl = SUPER CONTROL, B, exec, sleep 1 && hyprctl dispatch dpms off
|
||||
bind = SUPER CONTROL, W, exec, pkill waybar && hyprctl dispatch exec waybar
|
||||
|
||||
# Control media
|
||||
bindl = , XF86AudioPlay, exec, $play-pause
|
||||
bindel = SHIFT, XF86AudioRaiseVolume, exec, $play-next
|
||||
bindel = SHIFT, XF86AudioLowerVolume, exec, $play-previous
|
||||
bindl = , XF86AudioMute, exec, $mute
|
||||
bindel = , XF86AudioRaiseVolume, exec, $volume-up
|
||||
bindel = , XF86AudioLowerVolume, exec, $volume-down
|
||||
bindl = SHIFT, XF86AudioMute, exec, $mute-mic
|
||||
|
||||
bindl = SUPER ALT, RETURN, exec, $play-pause
|
||||
bindel = SUPER ALT, right, exec, $play-next
|
||||
bindel = SUPER ALT, left, exec, $play-previous
|
||||
bindl = SUPER ALT, BACKSPACE, exec, $mute
|
||||
bindel = SUPER ALT, up, exec, $volume-up
|
||||
bindel = SUPER ALT, down, exec, $volume-down
|
||||
bindl = SUPER ALT, M, exec, $mute-mic
|
||||
|
||||
# Adjust brightness
|
||||
bindel = , XF86MonBrightnessUp, exec, brightnessctl -e set +2%
|
||||
bindel = , XF86MonBrightnessDown, exec, brightnessctl -e set 2%-
|
||||
|
||||
# Screenshot
|
||||
bind = , Print, exec, grimblast --notify --freeze copysave output
|
||||
bind = SHIFT, Print, exec, grimblast --notify --freeze copysave area
|
||||
|
||||
# Music workspace
|
||||
workspace = special:music, border:false, gapsout:30, on-created-empty:spotify
|
||||
exec-once = [workspace special:music silent] spotify
|
||||
bind = SUPER, S, togglespecialworkspace, music
|
||||
|
||||
# Chat workspace
|
||||
workspace = special:chat, border:false, gapsout:30, on-created-empty:webcord
|
||||
exec-once = [workspace special:chat silent] webcord
|
||||
bind = SUPER, D, togglespecialworkspace, chat
|
||||
|
||||
# Flake workspace
|
||||
workspace = special:flake, border:false, gapsout:30, on-created-empty:kitty --override background_opacity=0.7 --directory ${config.home.sessionVariables.FLAKE}
|
||||
windowrulev2 = noblur, class:(kitty), onworkspace:special:flake
|
||||
bind = SUPER, Q, togglespecialworkspace, flake
|
||||
|
||||
# System monitor workspace
|
||||
workspace = special:monitor, border:false, gapsout:30, on-created-empty:kitty btm
|
||||
exec-once = [workspace special:monitor silent] kitty btm
|
||||
bind = SUPER, M, togglespecialworkspace, monitor
|
||||
'';
|
||||
};
|
||||
}
|
||||
54
modules/home/de/hyprland/settings.nix
Normal file
54
modules/home/de/hyprland/settings.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "nodeadkeys";
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "logitech-usb-receiver-mouse";
|
||||
sensitivity = "0.2";
|
||||
}
|
||||
{
|
||||
name = "dell0b9f:00-27c6:0d43-touchpad";
|
||||
accel_profile = "adaptive";
|
||||
disable_while_typing = true;
|
||||
natural_scroll = true;
|
||||
middle_button_emulation = true;
|
||||
}
|
||||
];
|
||||
|
||||
gestures.workspace_swipe = true;
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 1;
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
master = {
|
||||
no_gaps_when_only = 1;
|
||||
mfact = "0.5";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 6;
|
||||
drop_shadow = false;
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
key_press_enables_dpms = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue