Use modules folder
This commit is contained in:
parent
e42f845f09
commit
2903676336
46 changed files with 21 additions and 21 deletions
114
modules/i3/default.nix
Normal file
114
modules/i3/default.nix
Normal file
|
@ -0,0 +1,114 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
theme = import ../theme;
|
||||
mod = "Mod4";
|
||||
in with theme.colors; {
|
||||
# Dependencies
|
||||
home.packages = with pkgs; [
|
||||
playerctl # pactl comes with PulseAudio
|
||||
xclip # Copying screenshots to clipboard
|
||||
];
|
||||
|
||||
# Screenshots
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = true;
|
||||
showStartupLaunchMessage = false;
|
||||
showHelp = false;
|
||||
showSidePanelButton = false;
|
||||
uiColor = "${bg1}";
|
||||
contrastUiColor = "${bg0}";
|
||||
drawColor = "#ffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
defaultWorkspace = "workspace number 1"; # defaults to 10 for some reason
|
||||
modifier = mod;
|
||||
gaps = {
|
||||
inner = 12;
|
||||
smartGaps = true;
|
||||
};
|
||||
colors = {
|
||||
focused = {
|
||||
border = "${bg1}";
|
||||
background = "${bg1}";
|
||||
text = "${fg0}";
|
||||
indicator = "${undefined}";
|
||||
childBorder = "${undefined}";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = "${bg1}";
|
||||
background = "${bg1}";
|
||||
text = "${fg0}";
|
||||
indicator = "${undefined}";
|
||||
childBorder = "${undefined}";
|
||||
};
|
||||
unfocused = {
|
||||
border = "${bg0}";
|
||||
background = "${bg0}";
|
||||
text = "${fg0}";
|
||||
indicator = "${undefined}";
|
||||
childBorder = "${undefined}";
|
||||
};
|
||||
};
|
||||
startup = [
|
||||
{
|
||||
command = "(systemctl --user restart polybar &) && (nm-applet &) && (nextcloud &)";
|
||||
always = true;
|
||||
notification = false;
|
||||
}
|
||||
];
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${mod}+Return" = "exec kitty";
|
||||
"${mod}+Shift+e" = "exec i3-msg exit"; # bypass default session exit confirmation menu
|
||||
"${mod}+space" = "exec i3-msg open"; # Open blank space
|
||||
"Mod1+Q" = "exec /etc/profiles/per-user/elnu/bin/rofi-power";
|
||||
|
||||
# Audio controls
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%";
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%";
|
||||
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
|
||||
# Media player controls
|
||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
|
||||
# Window resizing
|
||||
"${mod}+Ctrl+Left" = "resize shrink width 16px or 1ppt";
|
||||
"${mod}+Ctrl+Right" = "resize grow width 16px or 1ppt";
|
||||
"${mod}+Ctrl+Up" = "resize grow height 16px or 1ppt";
|
||||
"${mod}+Ctrl+Down" = "resize shrink height 16px or 1ppt";
|
||||
|
||||
# Screenshots
|
||||
"Print" = "exec flameshot gui";
|
||||
};
|
||||
keycodebindings = {
|
||||
"133" = "--release exec rofi -show run -theme";
|
||||
};
|
||||
window.commands = [
|
||||
{
|
||||
command = "border pixel 0";
|
||||
criteria = { class = "^.*"; };
|
||||
}
|
||||
{
|
||||
command = "floating enable";
|
||||
criteria = { class = "Nextcloud"; };
|
||||
}
|
||||
{
|
||||
command = "floating enable";
|
||||
criteria = { class = "PureRef"; };
|
||||
}
|
||||
];
|
||||
bars = [];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue