format all code with alejandra
This commit is contained in:
parent
fa0cda2673
commit
4f0d45e4d5
89 changed files with 1605 additions and 1298 deletions
101
home/x/i3.nix
101
home/x/i3.nix
|
|
@ -1,9 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkIf
|
||||
mkOptionDefault
|
||||
;
|
||||
;
|
||||
|
||||
isEnabled = config.my.home.x.enable;
|
||||
|
||||
|
|
@ -20,14 +25,13 @@ let
|
|||
logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot";
|
||||
|
||||
i3Theme = config.my.theme.i3Theme;
|
||||
in
|
||||
{
|
||||
in {
|
||||
config = mkIf isEnabled {
|
||||
my.home = {
|
||||
flameshot.enable = true;
|
||||
};
|
||||
|
||||
home.packages = [ pkgs.betterlockscreen ];
|
||||
home.packages = [pkgs.betterlockscreen];
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
|
|
@ -35,39 +39,38 @@ in
|
|||
config = {
|
||||
inherit modifier;
|
||||
|
||||
bars =
|
||||
let
|
||||
barConfigPath =
|
||||
config.xdg.configFile."i3status-rust/config-top.toml".target;
|
||||
in
|
||||
[
|
||||
{
|
||||
statusCommand = "i3status-rs ${barConfigPath}";
|
||||
position = "top";
|
||||
fonts = {
|
||||
names = [ "DejaVuSansMono" "FontAwesome5Free" ];
|
||||
size = 9.0;
|
||||
};
|
||||
bars = let
|
||||
barConfigPath =
|
||||
config.xdg.configFile."i3status-rust/config-top.toml".target;
|
||||
in [
|
||||
{
|
||||
statusCommand = "i3status-rs ${barConfigPath}";
|
||||
position = "top";
|
||||
fonts = {
|
||||
names = ["DejaVuSansMono" "FontAwesome5Free"];
|
||||
size = 9.0;
|
||||
};
|
||||
|
||||
colors = i3Theme.bar;
|
||||
colors = i3Theme.bar;
|
||||
|
||||
trayOutput = "primary";
|
||||
trayOutput = "primary";
|
||||
|
||||
# disable mouse scroll wheel in bar
|
||||
extraConfig = ''
|
||||
bindsym button4 nop
|
||||
bindsym button5 nop
|
||||
'';
|
||||
}
|
||||
];
|
||||
# disable mouse scroll wheel in bar
|
||||
extraConfig = ''
|
||||
bindsym button4 nop
|
||||
bindsym button5 nop
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
colors = {
|
||||
inherit (i3Theme)
|
||||
inherit
|
||||
(i3Theme)
|
||||
focused
|
||||
focusedInactive
|
||||
unfocused
|
||||
urgent
|
||||
;
|
||||
;
|
||||
};
|
||||
|
||||
focus = {
|
||||
|
|
@ -78,7 +81,7 @@ in
|
|||
workspaceAutoBackAndForth = true;
|
||||
|
||||
fonts = {
|
||||
names = [ "DejaVu Sans Mono" ];
|
||||
names = ["DejaVu Sans Mono"];
|
||||
size = 8.0;
|
||||
};
|
||||
|
||||
|
|
@ -104,40 +107,44 @@ in
|
|||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show run";
|
||||
};
|
||||
|
||||
modes =
|
||||
let
|
||||
makeModeBindings = attrs: attrs // {
|
||||
modes = let
|
||||
makeModeBindings = attrs:
|
||||
attrs
|
||||
// {
|
||||
"Escape" = "mode default";
|
||||
"Return" = "mode default";
|
||||
};
|
||||
in
|
||||
mkOptionDefault {
|
||||
"${logoutMode}" = makeModeBindings {
|
||||
"l" = "exec --no-startup-id i3-msg exit, mode default";
|
||||
"s" = "exec --no-startup-id betterlockscreen --suspend, mode default";
|
||||
"p" = "exec --no-startup-id systemctl poweroff, mode default";
|
||||
"r" = "exec --no-startup-id systemctl reboot, mode default";
|
||||
};
|
||||
in
|
||||
mkOptionDefault {
|
||||
"${logoutMode}" = makeModeBindings {
|
||||
"l" = "exec --no-startup-id i3-msg exit, mode default";
|
||||
"s" = "exec --no-startup-id betterlockscreen --suspend, mode default";
|
||||
"p" = "exec --no-startup-id systemctl poweroff, mode default";
|
||||
"r" = "exec --no-startup-id systemctl reboot, mode default";
|
||||
};
|
||||
};
|
||||
|
||||
terminal = myTerminal;
|
||||
|
||||
assigns = {
|
||||
"10" = [
|
||||
{ class = "Slack"; }
|
||||
{ class = "discord"; }
|
||||
{class = "Slack";}
|
||||
{class = "discord";}
|
||||
];
|
||||
};
|
||||
|
||||
window.commands = [
|
||||
{ command = "border pixel 2"; criteria = { class = "Alacritty"; }; }
|
||||
{
|
||||
command = "border pixel 2";
|
||||
criteria = {class = "Alacritty";};
|
||||
}
|
||||
|
||||
# NOTE: should be done with an assign command, but Spotify doesn't set
|
||||
# its class until after initialization, so has to be done this way.
|
||||
#
|
||||
# See https://i3wm.org/docs/userguide.html#assign_workspace
|
||||
{
|
||||
criteria = { class = "Spotify"; };
|
||||
criteria = {class = "Spotify";};
|
||||
command = "move --no-auto-back-and-forth to workspace 8";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue