move desktops to their own folder

This commit is contained in:
tristan 2024-02-09 22:29:27 +00:00
parent 1444fd91c8
commit 06e889c274
7 changed files with 10 additions and 11 deletions

View file

@ -1,25 +0,0 @@
{pkgs, ...}: {
wayland.windowManager.hyprland = {
plugins = with pkgs; [
hycov
];
settings.plugin.hycov = {
overview_gappo = 20;
};
settings.bind = [
# bind key to toggle overview(normal mode)
"ALT,tab,hycov:toggleoverview"
# bind key to toggle overview(force mode,no affected by `only_active_workspace` and `only_active_monitor`)
"ALT,grave,hycov:toggleoverview,forceall" #grave key is the '~' key
# The direction switch shortcut key binding.
# calculate the window closest to the direction to switch focus.
# This keybind is applicable not only to the overview but also to the general layout
"ALT,h,hycov:movefocus,l"
"ALT,l,hycov:movefocus,r"
"ALT,k,hycov:movefocus,u"
"ALT,j,hycov:movefocus,d"
];
};
}

View file

@ -1,194 +0,0 @@
{
lib,
pkgs,
config,
...
}: let
modifier = config.windowManager.modifierKey;
in {
imports = [
(import ./swaylock.nix)
(import ./swayidle.nix)
(import ./waybar.nix)
];
xdg.portal = {
enable = true;
configPackages = [pkgs.hyprland];
extraPortals = [pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk];
};
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
settings = {
input = {
touchpad = {
natural_scroll = true;
scroll_factor = 0.5;
};
kb_options = lib.mkDefault "caps:escape";
kb_layout = lib.mkDefault "gb";
numlock_by_default = true;
};
"device:zsa-technology-labs-moonlander-mark-i" = {
kb_variant = "";
kb_options = "esperanto:qwerty,lv3:ralt_switch";
};
gestures = {
workspace_swipe = true;
workspace_swipe_numbered = true;
};
decoration = {
rounding = 0;
drop_shadow = false;
};
bezier = [
"overshot, 0.05, 0.9, 0.1, 1.1"
"linear, 0.0, 0.0, 1.0, 1.0"
];
animations = {
enabled = true;
animation = [
"windows, 1, 1, default, popin"
"border, 1, 1, default"
"fade, 1, 1, default"
"workspaces, 1, 1, default"
"borderangle,1, 50, linear, loop"
];
};
bind = [
# movement
"${modifier}, h, movefocus, l"
"${modifier}, l, movefocus, r"
"${modifier}_SHIFT, space, cyclenext, floating"
# window management
"${modifier}, F, fullscreen,"
"${modifier}, V, togglefloating,"
"${modifier}_SHIFT, X, killactive"
# master layout
"${modifier}, j, layoutmsg, cyclenext"
"${modifier}, k, layoutmsg, cycleprev"
"${modifier}, space, layoutmsg, swapwithmaster master"
"${modifier}, W, layoutmsg, orientationtop"
"${modifier}_SHIFT, W, layoutmsg, orientationleft"
# window grouping
"${modifier}_SHIFT, V, togglegroup,"
"${modifier}_SHIFT, j, changegroupactive,b"
"${modifier}_SHIFT, k, changegroupactive,f"
"${modifier}_SHIFT, h, moveintogroup,l"
"${modifier}_SHIFT, l, moveintogroup,r"
# scratch buffer
"${modifier}, Y, togglespecialworkspace"
"${modifier}_SHIFT, Y, movetoworkspace, special"
# applications
"${modifier}, slash, focuswindow, brave-browser"
"${modifier}, n, focuswindow, Logseq"
# workspaces
"${modifier}, 1, workspace,1"
"${modifier}, 2, workspace,2"
"${modifier}, 3, workspace,3"
"${modifier}, 4, workspace,4"
"${modifier}, 5, workspace,5"
"${modifier}, 6, workspace,6"
"${modifier}, 7, workspace,7"
"${modifier}, 8, workspace,8"
"${modifier}, 9, workspace,9"
"${modifier}, 0, workspace,10"
"${modifier}, left, workspace,r-1"
"${modifier}, right, workspace,r+1"
"${modifier}_SHIFT, 1, movetoworkspace,1"
"${modifier}_SHIFT, 2, movetoworkspace,2"
"${modifier}_SHIFT, 3, movetoworkspace,3"
"${modifier}_SHIFT, 4, movetoworkspace,4"
"${modifier}_SHIFT, 5, movetoworkspace,5"
"${modifier}_SHIFT, 6, movetoworkspace,6"
"${modifier}_SHIFT, 7, movetoworkspace,7"
"${modifier}_SHIFT, 8, movetoworkspace,8"
"${modifier}_SHIFT, 9, movetoworkspace,9"
"${modifier}_SHIFT, 0, movetoworkspace,10"
];
bindm = [
"${modifier}, mouse:272, movewindow"
"${modifier}, mouse:273, resizewindow"
];
env = [
"GDK_BACKEND,wayland,x11"
"QT_QPA_PLATFORM,wayland;xcb"
"SDL_VIDEODRIVER,wayland"
"CLUTTER_BACKEND,wayland"
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
];
windowrule = [
"float, title:wlogout"
"idleinhibit always, vrmonitor"
"idleinhibit focus, steam_app"
];
workspace = [
"11, default:true"
];
general = {
gaps_out = 2;
gaps_in = 2;
resize_on_border = true;
layout = "master";
"col.active_border" = lib.mkForce "rgb(FFFF00) rgb(00FFFF) rgb(FF00FF)";
border_size = lib.mkDefault 2;
};
master = {
mfact = 0.7;
new_on_top = true;
};
misc = {
vrr = 2;
focus_on_activate = true;
};
};
# https://wiki.hyprland.org/Configuring/Variables/
extraConfig = ''
bind = ${modifier}, R, submap, resize
submap = resize
binde = ,right,resizeactive,10 0
binde = ,left,resizeactive,-10 0
binde = ,up,resizeactive,0 -10
binde = ,down,resizeactive,0 10
binde = ,k,resizeactive,0 -10
binde = ,j,resizeactive,0 10
binde = ,l,splitratio,0.05
binde = ,h,splitratio,-0.05
binde = SHIFT,l,splitratio,0.3
binde = SHIFT,h,splitratio,-0.3
bind = , escape, submap,reset
bind = , enter, submap,reset
bind = ${modifier}, R, submap,reset
bind = CONTROL, C, submap,reset
submap = reset
bind = ${modifier}_CONTROL, V, submap, passthrough
submap = passthrough
bind = ${modifier}_CONTROL, V, submap, reset
bind = SUPER, escape, submap, reset
submap = reset
'';
};
services.mako = {
enable = true;
};
programs.waybar.settings.mainBar.modules-left = ["hyprland/workspaces" "hyprland/window"];
}

View file

@ -1,51 +0,0 @@
{
pkgs,
config,
...
}: let
term = "${config.programs.terminal}/bin/${config.programs.terminal.pname}";
modKeyName = config.windowManager.modifierKey;
modifier =
if modKeyName == "SUPER"
then "Mod4"
else if modKeyName == "ALT"
then "Mod1"
else null;
in {
imports = [
(import ./swaylock.nix)
(import ./swayidle.nix)
(import ./waybar.nix)
];
xdg.portal = {
enable = true;
configPackages = [pkgs.sway];
extraPortals = [pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk];
};
wayland.windowManager.sway = {
enable = true;
config = {
inherit modifier;
bars = [];
input = {
"*" = {
xkb_layout = "gb";
xkb_options = "esperanto:qwerty,lv3:ralt_switch";
};
"type:touchpad".natural_scroll = "enabled";
};
};
};
services.mako.enable = true;
programs.waybar = {
enable = true;
settings = {
mainBar = {
modules-left = ["sway/workspaces" "sway/window"];
};
};
};
}

View file

@ -1,26 +0,0 @@
{pkgs, ...}: {
services.swayidle = {
enable = true;
systemdTarget = "graphical-session.target";
events = [
{
event = "before-sleep";
command = "${pkgs.swaylock-effects}/bin/swaylock";
}
{
event = "lock";
command = "${pkgs.swaylock-effects}/bin/swaylock";
}
];
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
}
{
timeout = 600;
command = "systemctl suspend";
}
];
};
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
clock = true;
screenshots = true;
effect-scale = 0.5;
effect-blur = "10x10";
grace = 5;
};
};
}

View file

@ -1,50 +0,0 @@
{pkgs, ...}: {
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 36;
modules-right = ["mpris" "idle_inhibitor" "pulseaudio" "clock" "tray" "battery"];
clock = {
format = "📅 {:%a %b-%d %I:%M %p}";
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "👀";
deactivated = "😴";
};
tooltip-format-activated = "system sleep inhibited";
tooltip-format-deactivated = "system will sleep when idle";
};
pulseaudio = {
format-muted = "🔇 {volume}";
format = "{icon} {volume}";
format-icons.default = ["🔈" "🔉" "🔊"];
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
mpris = {
format = "{player_icon} {dynamic}";
format-paused = " {player_icon} {dynamic}";
player-icons = {
default = "";
mpd = "🎵";
kdeconnect = "";
};
};
battery = {
format = "{icon} {capacity}%";
format-icons = ["🤏" "🪫" "🔋" "🔋"];
format-charging = "🔌 {capacity}%";
states = {
warning = 30;
critical = 15;
};
};
};
};
};
}