commit 5ca886785b312e38672a7b51d5f333929320a660
parent 49e58266b401fe3b1e466ce40ca2640b1149b404
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 1 Nov 2018 13:13:42 +0100
profiles: add a desktop profile and update i3 profile
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
14 files changed, 309 insertions(+), 277 deletions(-)
diff --git a/desktop.nix b/desktop.nix
@@ -2,39 +2,6 @@
{
imports = [ ./fish.nix ./ssh.nix ./base.nix ];
- profiles.i3.enable = true;
- home.keyboard = {
- layout = "fr(bepo),fr";
- variant = "oss";
- options = ["grp:menu_toggle" "grp_led:caps" "compose:caps"];
- };
- xsession = {
- enable = true;
- initExtra = ''
- ${pkgs.xlibs.xmodmap}/bin/xmodmap ~/.Xmodmap &
- '';
- pointerCursor = {
- package = pkgs.vanilla-dmz;
- name = "Vanilla-DMZ";
- };
- };
- gtk = {
- enable = true;
- iconTheme = {
- name = "Arc";
- package = pkgs.arc-icon-theme;
- };
- theme = {
- name = "Arc-Dark";
- package = pkgs.arc-theme;
- };
- };
- home.file.".XCompose".source = ./xorg/XCompose;
- home.file.".Xmodmap".source = ./xorg/Xmodmap;
- xdg.configFile."xorg/emoji.compose".source = ./xorg/emoji.compose;
- xdg.configFile."xorg/parens.compose".source = ./xorg/parens.compose;
- xdg.configFile."xorg/modletters.compose".source = ./xorg/modletters.compose;
- xdg.configFile."user-dirs.dirs".source = ./xorg/user-dirs.dirs;
services = {
gpg-agent = {
enable = true;
@@ -44,50 +11,18 @@
allow-emacs-pinentry
'';
};
- dunst.enable = true;
- udiskie.enable = true;
- network-manager-applet.enable = true;
- screen-locker = {
- enable = true;
- lockCmd = "i3lock-color --clock --color=606060";
- inactiveInterval = 15;
- };
- random-background = {
- enable = true;
- imageDirectory = "/home/vincent/desktop/pictures/wallpapers/Unsplashed";
- };
};
programs = {
firefox.enable = true;
- termite = {
- enable = true;
- font = "Ubuntu Mono 16";
- sizeHints = true;
- };
- rofi = {
- enable = true;
- };
};
- xdg.configFile."alacritty/alacritty.yml".source = ./xorg/alacritty.yml;
home.packages = with pkgs; [
- alacritty # create a `programs.alacritty`
aspell
aspellDicts.en
aspellDicts.fr
#etBook
- gnome3.defaultIconTheme
- gnome3.gnome_themes_standard
- i3lock-color
keybase
- libnotify
- maim
- # pass
peco
- # scrot
spotify
- slop
- xdg-user-dirs
- xdg_utils
youtube-dl
];
}
diff --git a/emacs.nix b/emacs.nix
@@ -1,7 +1,8 @@
{ pkgs, config, lib, ... }:
{
- home.file.".local/share/applications/org-protocol.desktop".source = ./xorg/org-protocol.desktop;
+ # FIXME update this
+ home.file.".local/share/applications/org-protocol.desktop".source = ./modules/profiles/assets/xorg/org-protocol.desktop;
systemd.user.services.emacs = {
Unit = {
Description = "Emacs: the extensible, self-documenting text editor";
diff --git a/hokkaido.nix b/hokkaido.nix
@@ -12,6 +12,7 @@
./containers.nix
./kubernetes.nix
];
+ profiles.desktop.enable = true;
home.packages = with pkgs; [
google-chrome
];
diff --git a/modules/module-list.nix b/modules/module-list.nix
@@ -3,6 +3,7 @@
{
imports = [
./profiles/i3.nix
+ ./profiles/desktop.nix
./services/shairport-sync.nix
];
}
diff --git a/xorg/XCompose b/modules/profiles/assets/xorg/XCompose
diff --git a/xorg/Xmodmap b/modules/profiles/assets/xorg/Xmodmap
diff --git a/xorg/alacritty.yml b/modules/profiles/assets/xorg/alacritty.yml
diff --git a/xorg/emoji.compose b/modules/profiles/assets/xorg/emoji.compose
diff --git a/xorg/modletters.compose b/modules/profiles/assets/xorg/modletters.compose
diff --git a/xorg/org-protocol.desktop b/modules/profiles/assets/xorg/org-protocol.desktop
diff --git a/xorg/parens.compose b/modules/profiles/assets/xorg/parens.compose
diff --git a/xorg/user-dirs.dirs b/modules/profiles/assets/xorg/user-dirs.dirs
diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix
@@ -0,0 +1,71 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.profiles.desktop;
+in
+{
+ options = {
+ profiles.desktop = {
+ enable = mkOption {
+ default = false;
+ description = "Enable desktop profile";
+ type = types.bool;
+ };
+ xsession = {
+ enable = mkOption {
+ default = true;
+ description = "Enable xsession managed";
+ type = types.bool;
+ };
+ i3 = mkOption {
+ default = true;
+ description = "Enable i3 managed window manager";
+ type = types.bool;
+ };
+ };
+
+ };
+ };
+ config = mkIf cfg.enable {
+ xsession = mkIf cfg.xsession.enable {
+ enable = true;
+ initExtra = ''
+ ${pkgs.xlibs.xmodmap}/bin/xmodmap ~/.Xmodmap &
+ '';
+ pointerCursor = {
+ package = pkgs.vanilla-dmz;
+ name = "Vanilla-DMZ";
+ };
+ };
+ home.keyboard = mkIf cfg.xsession.enable {
+ layout = "fr(bepo),fr";
+ variant = "oss";
+ options = ["grp:menu_toggle" "grp_led:caps" "compose:caps"];
+ };
+ gtk = {
+ enable = true;
+ iconTheme = {
+ name = "Arc";
+ package = pkgs.arc-icon-theme;
+ };
+ theme = {
+ name = "Arc-Dark";
+ package = pkgs.arc-theme;
+ };
+ };
+ home.file.".XCompose".source = ./assets/xorg/XCompose;
+ home.file.".Xmodmap".source = ./assets/xorg/Xmodmap;
+ xdg.configFile."xorg/emoji.compose".source = ./assets/xorg/emoji.compose;
+ xdg.configFile."xorg/parens.compose".source = ./assets/xorg/parens.compose;
+ xdg.configFile."xorg/modletters.compose".source = ./assets/xorg/modletters.compose;
+ xdg.configFile."user-dirs.dirs".source = ./assets/xorg/user-dirs.dirs;
+ profiles.i3.enable = cfg.xsession.i3;
+ home.packages = with pkgs; [
+ gnome3.defaultIconTheme
+ gnome3.gnome_themes_standard
+ xdg-user-dirs
+ xdg_utils
+ ];
+ };
+}
diff --git a/modules/profiles/i3.nix b/modules/profiles/i3.nix
@@ -16,241 +16,264 @@ in
};
};
config = mkIf cfg.enable {
- xsession.windowManager.i3 = {
- enable = true;
- config = {
- fonts = ["Fira Code 10"];
- focus = {
- followMouse = false;
+ home.packages = with pkgs; [
+ alacritty
+ i3lock-color
+ libnotify
+ maim
+ slop
+ ];
+ programs.rofi.enable = true;
+ services = {
+ dunst.enable = true;
+ udiskie.enable = true;
+ network-manager-applet.enable = true;
+ screen-locker = {
+ enable = true;
+ lockCmd = "i3lock-color --clock --color=606060";
+ inactiveInterval = 15;
};
- window = {
- titlebar = false;
- border = 1;
- hideEdgeBorders = "both";
+ random-background = {
+ enable = true;
+ imageDirectory = "/home/vincent/desktop/pictures/wallpapers/Unsplashed";
};
- keybindings = {
- "Mod4+Return" = "exec alacritty";
- "Mod4+Shift+F11" = "exec 'autorandr -c'";
- };
- keycodebindings = {
- "Mod4+Shift+24" = "kill";
- "Mod4+33" = "exec \"${pkgs.rofi}/bin/rofi -show run -modi 'run,window' -kb-row-select 'Tab' -kb-row-tab '' -location 2 -hide-scrollbar -separator-style solid -font 'Ubuntu Mono 14'";
- # focus window
- "Mod4+44" = "focus left";
- "Mod4+45" = "focus down";
- "Mod4+46" = "focus up";
- "Mod4+47" = "focus right";
- "Mod4+38" = "focus parent";
- # move focused window
- "Mod4+Shift+44" = "move left";
- "Mod4+Shift+45" = "move down";
- "Mod4+Shift+46" = "move up";
- "Mod4+Shift+47" = "move right";
- # Split
- "Mod4+43" = "split h";
- "Mod4+55" = "split v";
- # Fullscreen
- "Mod4+41" = "fullscreen toggle";
- # Change container layout
- "Mod4+39" = "layout stacking";
- "Mod4+25" = "layout tabbed";
- "Mod4+26" = "layout toggle split";
- # Manage floating
- "Mod4+Shift+61" = "floating toggle";
- "Mod4+61" = "focus mode_toggle";
- # manage workspace
- "Mod4+113" = "workspace prev_on_output";
- "Mod4+114" = "workspace next_on_output";
- # manage output
- "Mod4+Shift+113" = "focus output left";
- "Mod4+Shift+116" = "focus output down";
- "Mod4+Shift+111" = "focus output up";
- "Mod4+Shift+114" = "focus output right";
- # Custom keybinding
- "Mod4+Shift+32" = "exec loginctl lock-session";
- "Mod4+Shift+39" = "exec sleep 1 && xset dpms force standby";
- "Mod4+24" = "border toggle";
- };
- modes = {};
- bars = [{
- mode = "hide";
- position = "bottom";
- statusCommand = "${pkgs.i3status}/bin/i3status";
- # fonts = ["Fira Code 10"];
- colors = {
- background = "#073642";
- statusline = "#eee8d5";
- focusedWorkspace = {
- border = "#cb4b16";
- background = "#cb4b16";
- text = "#eee8d5";
- };
- activeWorkspace = {
- border = "#cb4b16";
- background = "#cb4b16";
- text = "#eee8d5";
- };
- inactiveWorkspace = {
- border = "#b58900";
- background = "#b58900";
- text = "#eee8d5";
- };
- };
- }];
};
- extraConfig = ''
- set $mod Mod4
+ xdg.configFile."alacritty/alacritty.yml".source = ./assets/xorg/alacritty.yml;
+ xsession.windowManager.i3 = {
+ enable = true;
+ config = {
+ fonts = ["Fira Code 10"];
+ focus = {
+ followMouse = false;
+ };
+ window = {
+ titlebar = false;
+ border = 1;
+ hideEdgeBorders = "both";
+ };
+ keybindings = {
+ "Mod4+Return" = "exec alacritty";
+ "Mod4+Shift+F11" = "exec 'autorandr -c'";
+ };
+ keycodebindings = {
+ "Mod4+Shift+24" = "kill";
+ "Mod4+33" = "exec \"${pkgs.rofi}/bin/rofi -show run -modi 'run,window' -kb-row-select 'Tab' -kb-row-tab '' -location 2 -hide-scrollbar -separator-style solid -font 'Ubuntu Mono 14'";
+ # focus window
+ "Mod4+44" = "focus left";
+ "Mod4+45" = "focus down";
+ "Mod4+46" = "focus up";
+ "Mod4+47" = "focus right";
+ "Mod4+38" = "focus parent";
+ # move focused window
+ "Mod4+Shift+44" = "move left";
+ "Mod4+Shift+45" = "move down";
+ "Mod4+Shift+46" = "move up";
+ "Mod4+Shift+47" = "move right";
+ # Split
+ "Mod4+43" = "split h";
+ "Mod4+55" = "split v";
+ # Fullscreen
+ "Mod4+41" = "fullscreen toggle";
+ # Change container layout
+ "Mod4+39" = "layout stacking";
+ "Mod4+25" = "layout tabbed";
+ "Mod4+26" = "layout toggle split";
+ # Manage floating
+ "Mod4+Shift+61" = "floating toggle";
+ "Mod4+61" = "focus mode_toggle";
+ # manage workspace
+ "Mod4+113" = "workspace prev_on_output";
+ "Mod4+114" = "workspace next_on_output";
+ # manage output
+ "Mod4+Shift+113" = "focus output left";
+ "Mod4+Shift+116" = "focus output down";
+ "Mod4+Shift+111" = "focus output up";
+ "Mod4+Shift+114" = "focus output right";
+ # Custom keybinding
+ "Mod4+Shift+32" = "exec loginctl lock-session";
+ "Mod4+Shift+39" = "exec sleep 1 && xset dpms force standby";
+ "Mod4+24" = "border toggle";
+ };
+ modes = {};
+ bars = [{
+ mode = "hide";
+ position = "bottom";
+ statusCommand = "${pkgs.i3status}/bin/i3status";
+ # fonts = ["Fira Code 10"];
+ colors = {
+ background = "#073642";
+ statusline = "#eee8d5";
+ focusedWorkspace = {
+ border = "#cb4b16";
+ background = "#cb4b16";
+ text = "#eee8d5";
+ };
+ activeWorkspace = {
+ border = "#cb4b16";
+ background = "#cb4b16";
+ text = "#eee8d5";
+ };
+ inactiveWorkspace = {
+ border = "#b58900";
+ background = "#b58900";
+ text = "#eee8d5";
+ };
+ };
+ }];
+ };
+ extraConfig = ''
+ set $mod Mod4
- # Use Mouse+$mod to drag floating windows to their wanted position
- floating_modifier $mod
+ # Use Mouse+$mod to drag floating windows to their wanted position
+ floating_modifier $mod
- set $WS0 0 ๐ฝ
- set $WS1 1 ๐
- set $WS2 2 ๐ง
- set $WS3 3 ๐น
- set $WS4 4 ๐ธ
- set $WS5 5 ๐ท
- set $WS6 6 ๐ฐ
- set $WS7 7 ๊ฎ
- set $WS8 8 ๐ง
- set $WS9 9 ๐
- # ๐ ๐ณ ๐ง ๐ ๐ฐ ๐ฎ ๐ฐ ๐ ๐ ๐ ๐ป ๐ก ๐ข ๐ท ๐
- # ๐ณ ๐ธ ๐น ๐บ ๐ฝ ๐ฎ ๐พ ๐ฟ ๐ง ๐ฅ ๐ฃ ๐ ๐ ๐ ๐ ๐ญ
- # ๐ ๐ง ๐ฐ ๐ช ๐ ๐ต ๐ โบ โ โบ
+ set $WS0 0 ๐ฝ
+ set $WS1 1 ๐
+ set $WS2 2 ๐ง
+ set $WS3 3 ๐น
+ set $WS4 4 ๐ธ
+ set $WS5 5 ๐ท
+ set $WS6 6 ๐ฐ
+ set $WS7 7 ๊ฎ
+ set $WS8 8 ๐ง
+ set $WS9 9 ๐
+ # ๐ ๐ณ ๐ง ๐ ๐ฐ ๐ฎ ๐ฐ ๐ ๐ ๐ ๐ป ๐ก ๐ข ๐ท ๐
+ # ๐ณ ๐ธ ๐น ๐บ ๐ฝ ๐ฎ ๐พ ๐ฟ ๐ง ๐ฅ ๐ฃ ๐ ๐ ๐ ๐ ๐ญ
+ # ๐ ๐ง ๐ฐ ๐ช ๐ ๐ต ๐ โบ โ โบ
- # switch to workspace
- bindcode $mod+10 workspace $WS1
- bindcode $mod+11 workspace $WS2
- bindcode $mod+12 workspace $WS3
- bindcode $mod+13 workspace $WS4
- bindcode $mod+14 workspace $WS5
- bindcode $mod+15 workspace $WS6
- bindcode $mod+16 workspace $WS7
- bindcode $mod+17 workspace $WS8
- bindcode $mod+18 workspace $WS9
- bindcode $mod+19 workspace $WS0
+ # switch to workspace
+ bindcode $mod+10 workspace $WS1
+ bindcode $mod+11 workspace $WS2
+ bindcode $mod+12 workspace $WS3
+ bindcode $mod+13 workspace $WS4
+ bindcode $mod+14 workspace $WS5
+ bindcode $mod+15 workspace $WS6
+ bindcode $mod+16 workspace $WS7
+ bindcode $mod+17 workspace $WS8
+ bindcode $mod+18 workspace $WS9
+ bindcode $mod+19 workspace $WS0
- # move focused container to workspace
- bindcode $mod+Shift+10 move container to workspace $WS1
- bindcode $mod+Shift+11 move container to workspace $WS2
- bindcode $mod+Shift+12 move container to workspace $WS3
- bindcode $mod+Shift+13 move container to workspace $WS4
- bindcode $mod+Shift+14 move container to workspace $WS5
- bindcode $mod+Shift+15 move container to workspace $WS6
- bindcode $mod+Shift+16 move container to workspace $WS7
- bindcode $mod+Shift+17 move container to workspace $WS8
- bindcode $mod+Shift+18 move container to workspace $WS9
- bindcode $mod+Shift+19 move container to workspace $WS0
+ # move focused container to workspace
+ bindcode $mod+Shift+10 move container to workspace $WS1
+ bindcode $mod+Shift+11 move container to workspace $WS2
+ bindcode $mod+Shift+12 move container to workspace $WS3
+ bindcode $mod+Shift+13 move container to workspace $WS4
+ bindcode $mod+Shift+14 move container to workspace $WS5
+ bindcode $mod+Shift+15 move container to workspace $WS6
+ bindcode $mod+Shift+16 move container to workspace $WS7
+ bindcode $mod+Shift+17 move container to workspace $WS8
+ bindcode $mod+Shift+18 move container to workspace $WS9
+ bindcode $mod+Shift+19 move container to workspace $WS0
- assign [class="Firefox" window_role="browser"] โ $WS1
- assign [class="Google-chrome" window_role="browser"] โ $WS1
+ assign [class="Firefox" window_role="browser"] โ $WS1
+ assign [class="Google-chrome" window_role="browser"] โ $WS1
- ## quick terminal (tmux)
- exec --no-startup-id alacritty --title metask --class metask --command tmux
- for_window [instance="metask"] floating enable;
- for_window [instance="metask"] move scratchpad; [instance="metask"] scratchpad show; move position center; move scratchpad
- bindcode $mod+49 [instance="metask"] scratchpad show
+ ## quick terminal (tmux)
+ exec --no-startup-id alacritty --title metask --class metask --command tmux
+ for_window [instance="metask"] floating enable;
+ for_window [instance="metask"] move scratchpad; [instance="metask"] scratchpad show; move position center; move scratchpad
+ bindcode $mod+49 [instance="metask"] scratchpad show
- ## hide those chats !
- for_window [class="Slack"] move scratchpad; [class="Slack"] scratchpad show
- bindcode $mod+Shift+49 [class="Slack"] scratchpad show
- for_window [class="Mattermost"] move scratchpad; [class="Mattermost"] scratchpad show
- bindcode $mod+Control+49 [class="Mattermost"] scratchpad show
+ ## hide those chats !
+ for_window [class="Slack"] move scratchpad; [class="Slack"] scratchpad show
+ bindcode $mod+Shift+49 [class="Slack"] scratchpad show
+ for_window [class="Mattermost"] move scratchpad; [class="Mattermost"] scratchpad show
+ bindcode $mod+Control+49 [class="Mattermost"] scratchpad show
- bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
- bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
- bindsym shift+XF86MonBrightnessUp exec "xbacklight -inc 1"
- bindsym shift+XF86MonBrightnessDown exec "xbacklight -dec 1"
- bindsym XF86AudioLowerVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false ; pactl set-sink-volume @DEFAULT_SINK@ -5%"
- bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false ; pactl set-sink-volume @DEFAULT_SINK@ +5%"
- bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
- bindsym XF86AudioMicMute exec "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
- bindsym XF86AudioPlay exec "playerctl play-pause"
- bindsym XF86AudioNext exec "playerctl next"
- bindsym XF86AudioPrev exec "playerctl previous"
+ bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
+ bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
+ bindsym shift+XF86MonBrightnessUp exec "xbacklight -inc 1"
+ bindsym shift+XF86MonBrightnessDown exec "xbacklight -dec 1"
+ bindsym XF86AudioLowerVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false ; pactl set-sink-volume @DEFAULT_SINK@ -5%"
+ bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false ; pactl set-sink-volume @DEFAULT_SINK@ +5%"
+ bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
+ bindsym XF86AudioMicMute exec "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
+ bindsym XF86AudioPlay exec "playerctl play-pause"
+ bindsym XF86AudioNext exec "playerctl next"
+ bindsym XF86AudioPrev exec "playerctl previous"
- # reload the configuration file
- bindsym $mod+Shift+x reload
- # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
- bindsym $mod+Shift+o restart
- # exit i3 (logs you out of your X session)
- bindsym $mod+Shift+p exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"
- # poweroff
- bindsym $mod+Shift+F12 exec "i3-nagbar -t warning -m 'You pressed the poweroff shortcut. Do you really want to poweroff?' -b 'Yes, poweroff' 'systemctl poweroff'"
- # reboot
- bindsym $mod+Control+F12 exec "i3-nagbar -t warning -m 'You pressed the reboot shortcut. Do you really want to reboot?' -b 'Yes, reboot' 'systemctl reboot'"
- # move workspace to output
- set $workspace_move Move workspace to output : [l]eft [r]ight [d]own [u]p
+ # reload the configuration file
+ bindsym $mod+Shift+x reload
+ # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
+ bindsym $mod+Shift+o restart
+ # exit i3 (logs you out of your X session)
+ bindsym $mod+Shift+p exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"
+ # poweroff
+ bindsym $mod+Shift+F12 exec "i3-nagbar -t warning -m 'You pressed the poweroff shortcut. Do you really want to poweroff?' -b 'Yes, poweroff' 'systemctl poweroff'"
+ # reboot
+ bindsym $mod+Control+F12 exec "i3-nagbar -t warning -m 'You pressed the reboot shortcut. Do you really want to reboot?' -b 'Yes, reboot' 'systemctl reboot'"
+ # move workspace to output
+ set $workspace_move Move workspace to output : [l]eft [r]ight [d]own [u]p
- mode "$workspace_move" {
- bindsym left move workspace to output left
- bindsym l move workspace to output left
+ mode "$workspace_move" {
+ bindsym left move workspace to output left
+ bindsym l move workspace to output left
- bindsym right move workspace to output right
- bindsym r move workspace to output right
+ bindsym right move workspace to output right
+ bindsym r move workspace to output right
- bindsym down move workspace to output down
- bindsym d move workspace to output down
+ bindsym down move workspace to output down
+ bindsym d move workspace to output down
- bindsym up move workspace to output up
- bindsym u move workspace to output up
+ bindsym up move workspace to output up
+ bindsym u move workspace to output up
- bindsym Escape mode "default"
- bindsym Return mode "default"
- }
+ bindsym Escape mode "default"
+ bindsym Return mode "default"
+ }
- bindsym $mod+m mode "$workspace_move"
+ bindsym $mod+m mode "$workspace_move"
- # resize window (you can also use the mouse for that)
- mode "resize" {
- # These bindings trigger as soon as you enter the resize mode
+ # resize window (you can also use the mouse for that)
+ mode "resize" {
+ # These bindings trigger as soon as you enter the resize mode
- # Pressing left will shrink the windowโs width.
- # Pressing right will grow the windowโs width.
- # Pressing up will shrink the windowโs height.
- # Pressing down will grow the windowโs height.
- bindsym t resize shrink width 10 px or 10 ppt
- bindsym s resize grow height 10 px or 10 ppt
- bindsym r resize shrink height 10 px or 10 ppt
- bindsym n resize grow width 10 px or 10 ppt
+ # Pressing left will shrink the windowโs width.
+ # Pressing right will grow the windowโs width.
+ # Pressing up will shrink the windowโs height.
+ # Pressing down will grow the windowโs height.
+ bindsym t resize shrink width 10 px or 10 ppt
+ bindsym s resize grow height 10 px or 10 ppt
+ bindsym r resize shrink height 10 px or 10 ppt
+ bindsym n resize grow width 10 px or 10 ppt
- # same bindings, but for the arrow keys
- bindsym Left resize shrink width 10 px or 10 ppt
- bindsym Down resize grow height 10 px or 10 ppt
- bindsym Up resize shrink height 10 px or 10 ppt
- bindsym Right resize grow width 10 px or 10 ppt
+ # same bindings, but for the arrow keys
+ bindsym Left resize shrink width 10 px or 10 ppt
+ bindsym Down resize grow height 10 px or 10 ppt
+ bindsym Up resize shrink height 10 px or 10 ppt
+ bindsym Right resize grow width 10 px or 10 ppt
- # back to normal: Enter or Escape
- bindsym Return mode "default"
- bindsym Escape mode "default"
- }
+ # back to normal: Enter or Escape
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+ }
- bindsym $mod+o mode "resize"
- '';
- };
- xdg.configFile."i3/i3status.conf".text = ''
- general {
- colors = true
- color_bad = "#dc322f"
- color_degraded = "#cb4b16"
- color_separator = "#000000"
- output_format = "i3bar"
- interval = 5
- }
+ bindsym $mod+o mode "resize"
+ '';
+ };
+ xdg.configFile."i3/i3status.conf".text = ''
+ general {
+ colors = true
+ color_bad = "#dc322f"
+ color_degraded = "#cb4b16"
+ color_separator = "#000000"
+ output_format = "i3bar"
+ interval = 5
+ }
- order = ""
- order = "wireless wlp3s0"
- order += "disk /"
- order += "time"
+ order = ""
+ order = "wireless wlp3s0"
+ order += "disk /"
+ order += "time"
- wireless wlp3s0 {
- format_up = "W: (%quality at %essid) %ip"
- format_down = "W: down"
- }
+ wireless wlp3s0 {
+ format_up = "W: (%quality at %essid) %ip"
+ format_down = "W: down"
+ }
- disk "/" {
- format = "/ %free"
- }
- '';
- };
+ disk "/" {
+ format = "/ %free"
+ }
+ '';
+ };
}