move more stuff to modules

This commit is contained in:
Tristan 2023-07-20 13:48:49 +01:00
parent a2e0d1cfd5
commit 6283c36e66
6 changed files with 385 additions and 475 deletions

View file

@ -68,200 +68,6 @@ in
enable = true; enable = true;
}; };
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
clock = true;
screenshots = true;
effect-scale = 0.5;
effect-blur = "10x10";
grace = 5;
};
};
services.swayidle.enable = true;
services.swayidle.systemdTarget = "graphical-session.target";
services.swayidle.events = [
{ event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
{ event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
];
services.swayidle.timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
}
];
wayland.windowManager.hyprland = {
enable = true;
systemdIntegration = true;
# https://wiki.hyprland.org/Configuring/Variables/
extraConfig = ''
## global hyprland configuration
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = NIXOS_OZONE_WL,1
input {
kb_layout = gb
kb_options = caps:escape
numlock_by_default = true
touchpad {
natural_scroll = yes
scroll_factor = 0.5
}
}
bind = SUPER_SHIFT, X, killactive,
bind = SUPER_SHIFT, E, exit,
bind = SUPER, SLASH, focuswindow, brave-browser
bind = SUPER, n, focuswindow, Logseq
windowrule = float, title:wlogout
bind = SUPER, h, movefocus,l
bind = SUPER, l, movefocus,r
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
bind = SUPER, j, layoutmsg,cyclenext
bind = SUPER, k, layoutmsg,cycleprev
bind = SUPER, space, layoutmsg,swapwithmaster master
bind = SUPER_SHIFT, k, layoutmsg, orientationtop
bind = SUPER_SHIFT, h, layoutmsg, orientationleft
bind = SUPER, F, fullscreen,
bind = SUPER, V, togglefloating,
bind = SUPER_SHIFT, V, togglegroup,
bind = SUPER_SHIFT, space, changegroupactive,n
bind = SUPER, Y, togglespecialworkspace
bind = SUPER_SHIFT, Y, movetoworkspace, special
bind = SUPER,1,workspace,1
bind = SUPER,2,workspace,2
bind = SUPER,3,workspace,3
bind = SUPER,4,workspace,4
bind = SUPER,5,workspace,5
bind = SUPER,6,workspace,6
bind = SUPER,7,workspace,7
bind = SUPER,8,workspace,8
bind = SUPER,9,workspace,9
bind = SUPER,0,workspace,10
bind = SUPER_SHIFT,1,movetoworkspace,1
bind = SUPER_SHIFT,2,movetoworkspace,2
bind = SUPER_SHIFT,3,movetoworkspace,3
bind = SUPER_SHIFT,4,movetoworkspace,4
bind = SUPER_SHIFT,5,movetoworkspace,5
bind = SUPER_SHIFT,6,movetoworkspace,6
bind = SUPER_SHIFT,7,movetoworkspace,7
bind = SUPER_SHIFT,8,movetoworkspace,8
bind = SUPER_SHIFT,9,movetoworkspace,9
bind = SUPER_SHIFT,0,movetoworkspace,10
gestures {
workspace_swipe = yes
}
decoration {
rounding = 5
drop_shadow = no
}
bezier = overshot, 0.05, 0.9, 0.1, 1.1
bezier = linear, 0.0, 0.0, 1.0, 1.0
animations {
enabled = 1
animation = windows, 1, 1, default, popin
animation = border, 1, 1, default
animation = fade, 1, 1, default
animation = workspaces, 1, 3, overshot
animation = borderangle,1, 50, linear, loop
}
general {
resize_on_border = yes
layout = master
col.active_border = rgb(FFFF00) rgb(00FFFF) rgb(FF00FF)
border_size = 5
}
master {
mfact = 0.7
new_on_top = yes
}
misc {
vrr = 2
}
'';
};
programs.wlogout = {
enable = true;
style = ''
window {
background-color: rgba(12, 12, 12, 0.2);
}
'';
};
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 36;
modules-left = [ "hyprland/window" ];
modules-right = [ "mpris" "pulseaudio" "clock" "tray" "battery" ];
clock = {
format = "📅 {:%a %b-%d %I:%M %p}";
};
pulseaudio = {
format-muted = "🔇 {volume}";
format = "{icon} {volume}";
format-icons.default = [ "🔈" "🔉" "🔊" ];
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
mpris = {
format = "{player_icon} {artist} - {title}";
format-paused = "{status_icon} {artist} - {title}";
player-icons = {
default = "";
mpd = "🎵";
};
status-icons = {
paused = "";
};
};
battery = {
format = "{icon} {capacity}%";
format-icons = [ "🤏" "🪫" "🔋" "🔋" ];
states = {
warning = 30;
critical = 15;
};
};
};
};
systemd = {
enable = true;
target = "graphical-session.target";
};
};
services.udiskie = { services.udiskie = {
enable = true; enable = true;
notify = true; notify = true;
@ -289,10 +95,6 @@ in
]; ];
}; };
services.mako = {
enable = true;
};
programs.ncmpcpp = { programs.ncmpcpp = {
enable = true; enable = true;
settings.mpd_host = "music.local"; settings.mpd_host = "music.local";
@ -359,20 +161,6 @@ in
}; };
}; };
programs.vscode = {
extensions = with pkgs; [
vscode-extensions.asvetliakov.vscode-neovim
];
userSettings = {
"vscode-neovim.neovimExecutablePaths.linux" = "/run/current-system/sw/bin/nvim";
"keyboard.dispatch" = "keyCode";
"terminal.integrated.sendKeybindingsToShell" = true;
"aws.telemetry" = false;
"gitlens.telemetry.enabled" = false;
"redhat.telemetry.enabled" = false;
};
};
programs.rbw = { programs.rbw = {
enable = true; enable = true;
settings = { settings = {
@ -393,8 +181,6 @@ in
}; };
}; };
programs.neovim.defaultEditor = true;
programs.lf.enable = true; programs.lf.enable = true;
programs.lf.package = lf-sixel; programs.lf.package = lf-sixel;
programs.lf.keybindings = { programs.lf.keybindings = {
@ -510,7 +296,6 @@ in
programs.librewolf.enable = true; programs.librewolf.enable = true;
programs.helix = { programs.helix = {
enable = true; enable = true;
languages = { languages = {
@ -535,232 +320,6 @@ in
}; };
}; };
programs.neomutt.extraConfig = ''
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# New mail is boldened:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
# Tagged mail is highlighted:
color index brightyellow blue "~T"
color index_author brightred blue "~T"
color index_subject brightcyan blue "~T"
# Other colors and aesthetic settings:
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color sidebar_highlight red default
color sidebar_divider brightblack black
color sidebar_flagged red black
color sidebar_new green black
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
# Regex highlighting:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
'';
programs.aerc.extraBinds = ''
# Binds are of the form <key sequence> = <command to run>
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-t> = :term<Enter>
[messages]
Q = :quit<Enter>
T = :toggle-threads<Enter>
j = :next<Enter>
<Down> = :next<Enter>
<C-d> = :next 50%<Enter>
<C-f> = :next 100%<Enter>
<PgDn> = :next -s 100%<Enter>
k = :prev<Enter>
<Up> = :prev<Enter>
<C-u> = :prev 50%<Enter>
<C-b> = :prev<Enter>
<PgUp> = :prev -s 100%<Enter>
gg = :select 0<Enter>
G = :select -1<Enter>
J = :next-folder<Enter>
K = :prev-folder<Enter>
v = :mark -t<Enter>
V = :mark -v<Enter>
f = :flag<Enter>
F = :unflag<Enter>
t = :toggle-threads<Enter>
<Enter> = :view<Enter>
D = :delete<Enter>
C = :compose<enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
rt = :unflag<Enter>:reply -a -Tthanks<Enter>
Rt = :unflag<Enter>:reply -qa -Tquoted_thanks<Enter>
a = :mv Archive<Enter>
c = :cf<space>
$ = :term<space>
! = :term<space>
| = :pipe<space>
ga = :flag<Enter>:pipe -mb git am -3<Enter>
gp = :term git push<Enter>
gl = :term git log<Enter>
/ = :search<space>
\ = :filter<space>
n = :next-result<Enter>
N = :prev-result<Enter>
o = :term mbsync -a<Enter>
q = :quit<Enter>
[view]
/ = :toggle-key-passthrough<Enter>/
q = :close<Enter>
| = :pipe -m<space>
S = :save<space>
H = :toggle-headers<Enter>
D = :delete<Enter>
<C-k> = :prev-part<Enter>
<C-j> = :next-part<Enter>
J = :next<Enter>
K = :prev<Enter>
f = :forward<Enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
rt = :reply -Tthanks<Enter>
ga = :pipe -b git am -3<Enter>
gp = :term git push<Enter>
gl = :term git log<Enter>
[view::passthrough]
$noinherit = true
$ex = <C-x>
<Esc> = :toggle-key-passthrough<Enter>
[compose]
$ex = <C-x>
<C-k> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<tab> = :next-field<Enter>
[compose::editor]
# Keybindings used when the embedded terminal is selected in the compose view
$noinherit = true
$ex = <C-x>
<C-t> = :term<Enter>
<C-k> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
[compose::review]
# Keybindings used when reviewing a message to be sent
y = :send<Enter>
n = :abort<Enter>
e = :edit<Enter>
a = :attach<space>
c = :encrypt<Enter>
s = :sign<Enter>
V = :header -f X-Sourcehut-Patchset-Update NEEDS_REVISION<Enter>
A = :header -f X-Sourcehut-Patchset-Update APPLIED<Enter>
R = :header -f X-Sourcehut-Patchset-Update REJECTED<Enter>
[terminal]
$noinherit = true
$ex = <C-x>
<C-t> = :term<Enter>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
'';
programs.aerc.extraConfig = {
general = {
pgp-provider = "gpg";
unsafe-accounts-conf = true;
};
ui = { };
viewer = { };
filters = {
"text/plain" = "colorize";
"text/calendar" = "calendar";
"message/delivery-status" = "colorize";
"message/rfc822" = "colorize";
"image/*" = "img2sixel";
"text/html" = "html | colorize";
};
};
home.file.".config/pipewire/pipewire.conf.d/raop-discover.conf".text = '' home.file.".config/pipewire/pipewire.conf.d/raop-discover.conf".text = ''
context.modules = [ context.modules = [
{ {
@ -861,36 +420,6 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-
''; '';
}; };
programs.neovim = {
enable = true;
coc = {
enable = true;
settings = {
languageserver = {
go = {
command = "${pkgs.gopls}/bin/gopls";
filetypes = [ "go" ];
};
nix = {
command = "${pkgs.rnix-lsp}/bin/rnix-lsp";
filetypes = [ "nix" ];
};
typescript = {
command = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server";
filetypes = [ "ts" "tsx" ];
};
};
};
};
};
programs.wofi = {
enable = true;
settings = {
insensitive = true;
};
};
programs.pandoc = { programs.pandoc = {
enable = true; enable = true;
defaults = { defaults = {

View file

@ -30,6 +30,7 @@
windowManager.hyprland = true; windowManager.hyprland = true;
programs.menu.enable = true;
roles.work.enable = work; roles.work.enable = work;
roles.personal.enable = !work; roles.personal.enable = !work;

View file

@ -23,7 +23,43 @@ in
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = editor.package; package = editor.package;
extensions = with pkgs; [
vscode-extensions.asvetliakov.vscode-neovim
];
userSettings = {
"vscode-neovim.neovimExecutablePaths.linux" = "/run/current-system/sw/bin/nvim";
"keyboard.dispatch" = "keyCode";
"terminal.integrated.sendKeybindingsToShell" = true;
"aws.telemetry" = false;
"gitlens.telemetry.enabled" = false;
"redhat.telemetry.enabled" = false;
};
}; };
programs.neovim = {
enable = true;
defaultEditor = true;
coc = {
enable = true;
settings = {
languageserver = {
go = {
command = "${pkgs.gopls}/bin/gopls";
filetypes = [ "go" ];
};
nix = {
command = "${pkgs.rnix-lsp}/bin/rnix-lsp";
filetypes = [ "nix" ];
};
typescript = {
command = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server";
filetypes = [ "ts" "tsx" ];
};
};
};
};
};
}]; }];
programs.scripts = [{ programs.scripts = [{

View file

@ -70,7 +70,160 @@ in
}; };
programs.mbsync.enable = cfg.terminal; programs.mbsync.enable = cfg.terminal;
services.mbsync.enable = cfg.terminal; services.mbsync.enable = cfg.terminal;
programs.aerc.enable = cfg.terminal;
programs.aerc = {
enable = cfg.terminal;
extraBinds = ''
# Binds are of the form <key sequence> = <command to run>
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-t> = :term<Enter>
[messages]
Q = :quit<Enter>
T = :toggle-threads<Enter>
j = :next<Enter>
<Down> = :next<Enter>
<C-d> = :next 50%<Enter>
<C-f> = :next 100%<Enter>
<PgDn> = :next -s 100%<Enter>
k = :prev<Enter>
<Up> = :prev<Enter>
<C-u> = :prev 50%<Enter>
<C-b> = :prev<Enter>
<PgUp> = :prev -s 100%<Enter>
gg = :select 0<Enter>
G = :select -1<Enter>
J = :next-folder<Enter>
K = :prev-folder<Enter>
v = :mark -t<Enter>
V = :mark -v<Enter>
f = :flag<Enter>
F = :unflag<Enter>
t = :toggle-threads<Enter>
<Enter> = :view<Enter>
D = :delete<Enter>
C = :compose<enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
rt = :unflag<Enter>:reply -a -Tthanks<Enter>
Rt = :unflag<Enter>:reply -qa -Tquoted_thanks<Enter>
a = :mv Archive<Enter>
c = :cf<space>
$ = :term<space>
! = :term<space>
| = :pipe<space>
ga = :flag<Enter>:pipe -mb git am -3<Enter>
gp = :term git push<Enter>
gl = :term git log<Enter>
/ = :search<space>
\ = :filter<space>
n = :next-result<Enter>
N = :prev-result<Enter>
o = :term mbsync -a<Enter>
q = :quit<Enter>
[view]
/ = :toggle-key-passthrough<Enter>/
q = :close<Enter>
| = :pipe -m<space>
S = :save<space>
H = :toggle-headers<Enter>
D = :delete<Enter>
<C-k> = :prev-part<Enter>
<C-j> = :next-part<Enter>
J = :next<Enter>
K = :prev<Enter>
f = :forward<Enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
rt = :reply -Tthanks<Enter>
ga = :pipe -b git am -3<Enter>
gp = :term git push<Enter>
gl = :term git log<Enter>
[view::passthrough]
$noinherit = true
$ex = <C-x>
<Esc> = :toggle-key-passthrough<Enter>
[compose]
$ex = <C-x>
<C-k> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<tab> = :next-field<Enter>
[compose::editor]
# Keybindings used when the embedded terminal is selected in the compose view
$noinherit = true
$ex = <C-x>
<C-t> = :term<Enter>
<C-k> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
[compose::review]
# Keybindings used when reviewing a message to be sent
y = :send<Enter>
n = :abort<Enter>
e = :edit<Enter>
a = :attach<space>
c = :encrypt<Enter>
s = :sign<Enter>
V = :header -f X-Sourcehut-Patchset-Update NEEDS_REVISION<Enter>
A = :header -f X-Sourcehut-Patchset-Update APPLIED<Enter>
R = :header -f X-Sourcehut-Patchset-Update REJECTED<Enter>
[terminal]
$noinherit = true
$ex = <C-x>
<C-t> = :term<Enter>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
'';
extraConfig = {
general = {
pgp-provider = "gpg";
unsafe-accounts-conf = true;
};
ui = { };
viewer = { };
filters = {
"text/plain" = "colorize";
"text/calendar" = "calendar";
"message/delivery-status" = "colorize";
"message/rfc822" = "colorize";
"image/*" = "img2sixel";
"text/html" = "html | colorize";
};
};
};
}]; }];
}; };

View file

@ -21,14 +21,13 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${user}.imports = [{ home-manager.users.${user}.imports = [{
programs.wofi = mkIf cfg.package == pkgs.wofi { programs.wofi = mkIf (cfg.package == pkgs.wofi) {
enable = true; enable = true;
settings = { settings = {
term = termcmd; term = termcmd;
insensitive = true;
}; };
}; };
home.packages = [ cfg.package ];
}]; }];
}; };
} }

View file

@ -24,5 +24,197 @@ in
default_session = if cfg.sway then sway_session else hypr_session; default_session = if cfg.sway then sway_session else hypr_session;
}; };
}; };
home-manager.users.${user}.imports = [{
wayland.windowManager.hyprland = mkIf cfg.hyprland {
enable = true;
systemdIntegration = true;
# https://wiki.hyprland.org/Configuring/Variables/
extraConfig = ''
## global hyprland configuration
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = NIXOS_OZONE_WL,1
input {
kb_layout = gb
kb_options = caps:escape
numlock_by_default = true
touchpad {
natural_scroll = yes
scroll_factor = 0.5
}
}
bind = SUPER_SHIFT, X, killactive,
bind = SUPER_SHIFT, E, exit,
bind = SUPER, SLASH, focuswindow, brave-browser
bind = SUPER, n, focuswindow, Logseq
windowrule = float, title:wlogout
bind = SUPER, h, movefocus,l
bind = SUPER, l, movefocus,r
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
bind = SUPER, j, layoutmsg,cyclenext
bind = SUPER, k, layoutmsg,cycleprev
bind = SUPER, space, layoutmsg,swapwithmaster master
bind = SUPER_SHIFT, k, layoutmsg, orientationtop
bind = SUPER_SHIFT, h, layoutmsg, orientationleft
bind = SUPER, F, fullscreen,
bind = SUPER, V, togglefloating,
bind = SUPER_SHIFT, V, togglegroup,
bind = SUPER_SHIFT, space, changegroupactive,n
bind = SUPER, Y, togglespecialworkspace
bind = SUPER_SHIFT, Y, movetoworkspace, special
bind = SUPER,1,workspace,1
bind = SUPER,2,workspace,2
bind = SUPER,3,workspace,3
bind = SUPER,4,workspace,4
bind = SUPER,5,workspace,5
bind = SUPER,6,workspace,6
bind = SUPER,7,workspace,7
bind = SUPER,8,workspace,8
bind = SUPER,9,workspace,9
bind = SUPER,0,workspace,10
bind = SUPER_SHIFT,1,movetoworkspace,1
bind = SUPER_SHIFT,2,movetoworkspace,2
bind = SUPER_SHIFT,3,movetoworkspace,3
bind = SUPER_SHIFT,4,movetoworkspace,4
bind = SUPER_SHIFT,5,movetoworkspace,5
bind = SUPER_SHIFT,6,movetoworkspace,6
bind = SUPER_SHIFT,7,movetoworkspace,7
bind = SUPER_SHIFT,8,movetoworkspace,8
bind = SUPER_SHIFT,9,movetoworkspace,9
bind = SUPER_SHIFT,0,movetoworkspace,10
gestures {
workspace_swipe = yes
}
decoration {
rounding = 5
drop_shadow = no
}
bezier = overshot, 0.05, 0.9, 0.1, 1.1
bezier = linear, 0.0, 0.0, 1.0, 1.0
animations {
enabled = 1
animation = windows, 1, 1, default, popin
animation = border, 1, 1, default
animation = fade, 1, 1, default
animation = workspaces, 1, 3, overshot
animation = borderangle,1, 50, linear, loop
}
general {
resize_on_border = yes
layout = master
col.active_border = rgb(FFFF00) rgb(00FFFF) rgb(FF00FF)
border_size = 5
}
master {
mfact = 0.7
new_on_top = yes
}
misc {
vrr = 2
}
'';
};
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
clock = true;
screenshots = true;
effect-scale = 0.5;
effect-blur = "10x10";
grace = 5;
};
};
services.swayidle.enable = true;
services.swayidle.systemdTarget = "graphical-session.target";
services.swayidle.events = [
{ event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
{ event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
];
services.swayidle.timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
}
];
services.mako = {
enable = true;
};
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 36;
modules-left = [ "hyprland/window" ];
modules-right = [ "mpris" "pulseaudio" "clock" "tray" "battery" ];
clock = {
format = "📅 {:%a %b-%d %I:%M %p}";
};
pulseaudio = {
format-muted = "🔇 {volume}";
format = "{icon} {volume}";
format-icons.default = [ "🔈" "🔉" "🔊" ];
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
mpris = {
format = "{player_icon} {artist} - {title}";
format-paused = "{status_icon} {artist} - {title}";
player-icons = {
default = "";
mpd = "🎵";
};
status-icons = {
paused = "";
};
};
battery = {
format = "{icon} {capacity}%";
format-icons = [ "🤏" "🪫" "🔋" "🔋" ];
states = {
warning = 30;
critical = 15;
};
};
};
};
systemd = {
enable = true;
target = "graphical-session.target";
};
};
}];
}; };
} }