dotfiles/nixos/user-xsession.nix

107 lines
3.3 KiB
Nix
Raw Normal View History

2019-07-14 09:35:06 +01:00
{ config, pkgs, ... }:
let
mod = "Mod4";
in
{
2019-07-14 12:22:18 +01:00
services = {
2019-07-27 09:03:29 +01:00
compton = {
enable = true;
vSync = "opengl-oml";
};
2019-07-27 08:46:43 +01:00
kdeconnect = {
enable = true;
indicator = true;
};
2019-07-27 09:37:18 +01:00
network-manager-applet.enable = true;
pasystray.enable = true;
2019-07-14 12:42:23 +01:00
};
2019-07-14 12:22:18 +01:00
2019-07-14 12:42:23 +01:00
xsession = {
enable = true;
windowManager.i3 = {
2019-07-14 12:22:18 +01:00
enable = true;
2019-07-14 12:42:23 +01:00
package = pkgs.i3-gaps;
config = {
startup = [
2019-07-31 19:49:48 +01:00
{ command = "exec setxkbmap -layout pl"; always = true; notification = false; }
2019-07-15 21:31:39 +01:00
{ command = "exec autorandr -c"; always = true; notification = false; }
2019-07-15 20:52:19 +01:00
{ command = "exec i3-sensible-terminal"; always = false; notification = false; }
{ command = "exec $HOME/dev/dotfiles/lock.sh"; always = false; notification = false; }
2019-07-14 12:42:23 +01:00
];
2019-07-14 19:24:40 +01:00
window = {
hideEdgeBorders = "horizontal";
titlebar = false;
border = 0;
};
workspaceLayout = "tabbed";
2019-07-14 12:42:23 +01:00
bars = [];
gaps = {
2019-07-14 15:16:49 +01:00
inner = 8;
2019-07-14 12:42:23 +01:00
outer = 0;
smartGaps = true;
smartBorders = "on";
};
2019-07-14 12:22:18 +01:00
2019-07-14 12:42:23 +01:00
modifier = mod;
keybindings = {
"${mod}+Shift+e" = "exec i3-msg exit";
2019-07-14 16:09:41 +01:00
"${mod}+Shift+c" = "reload";
2019-07-14 14:45:41 +01:00
"${mod}+Shift+r" = "restart";
2019-07-14 21:27:01 +01:00
"${mod}+Shift+l" = "exec physlock -d";
2019-08-24 09:50:42 +01:00
"${mod}+Return" = "exec i3-sensible-terminal";
2019-07-14 16:09:41 +01:00
2019-07-27 10:40:37 +01:00
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
2019-07-14 19:24:40 +01:00
"XF86MonBrightnessUp" = "exec light -s sysfs/backlight/intel_backlight -A 5";
"XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5";
2019-07-14 16:09:41 +01:00
"${mod}+r" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
2019-07-21 10:13:49 +01:00
"${mod}+c" = "exec ${pkgs.clipmenu}/bin/clipmenu";
2019-07-14 16:09:41 +01:00
"${mod}+q" = "kill";
"${mod}+f" = "fullscreen toggle";
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
2019-07-14 09:35:06 +01:00
};
};
};
2019-07-14 12:42:23 +01:00
};
2019-07-14 14:45:41 +01:00
2019-07-14 15:16:49 +01:00
programs.autorandr = {
enable = true;
2019-07-15 21:31:39 +01:00
hooks = {
postswitch = {
"restart-polybar" = "systemctl --user restart polybar";
"restart-kde-connect-indicator" = "systemctl --user restart kdeconnect-indicator";
};
};
2019-07-14 15:16:49 +01:00
profiles = {
"foureighty-alone" = {
fingerprint = {
eDP1 = "00ffffffffffff0006af362300000000001b0104a51f117802f4f5a4544d9c270f505400000001010101010101010101010101010101e65f00a0a0a040503020350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343051414e30322e33200a00b2";
};
config = {
eDP1 = {
enable = true;
primary = true;
mode = "2560x1440";
2019-07-15 22:01:34 +01:00
dpi = 144;
2019-07-14 15:16:49 +01:00
};
};
};
};
};
2019-07-14 14:45:41 +01:00
imports = [
./polybar.nix
];
2019-07-14 12:42:23 +01:00
}