From cf4159a6da75200d9e3971cc3253a62cb517ed72 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 31 Mar 2020 17:09:22 -0400 Subject: Some extra i3 shortcuts, plus dunst config --- home/modules/i3.nix | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'home/modules/i3.nix') diff --git a/home/modules/i3.nix b/home/modules/i3.nix index ebe87e8bac..c564ed8221 100644 --- a/home/modules/i3.nix +++ b/home/modules/i3.nix @@ -7,6 +7,14 @@ let msg=$(emacsclient --eval '${eval}' 2>&1) echo "''${msg:1:-1}" ''; + screenlayout = { + home = pkgs.writeShellScript "screenlayout_home.sh" '' + xrandr \ + --output eDP1 --mode 3840x2160 --pos 0x0 --rotate normal \ + --output DP1 --primary --mode 3840x2160 --pos 0x2160 --rotate normal \ + --output DP2 --off --output DP3 --off --output VIRTUAL1 --off + ''; + }; in { options = with lib; { system.machine.wirelessInterface = mkOption { @@ -71,7 +79,7 @@ in { "${mod}+m" = ''exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Go to: ' ''; # Screenshots - "${mod}+q" = "exec maim"; + "${mod}+q" = "exec \"maim | xclip -selection clipboard -t image/png\""; "${mod}+Shift+q" = "exec \"maim -s | xclip -selection clipboard -t image/png\""; # Launching applications @@ -99,9 +107,10 @@ in { # Screen Layout "${mod}+Shift+t" = "exec xrandr --auto"; - # TODO - # $mod+t exec /home/griffin/.screenlayout/work.sh - # $mod+Ctrl+t exec /home/griffin/bin/fix_screen.sh + "${mod}+t" = "exec ${screenlayout.home}"; + "${mod}+Ctrl+t" = "exec ${pkgs.writeShellScript "fix_term.sh" '' + xrandr --output eDP-1 --off && ${screenlayout.home} + ''}"; }; fonts = [ decorationFont ]; @@ -243,14 +252,18 @@ in { enable = true; settings = with solarized; { global = { - font = "Meslo 10"; + font = "MesloLGSDZ ${toString (config.system.machine.i3FontSize * 1.5)}"; allow_markup = true; format = "%s\n%b"; sort = true; alignment = "left"; - geometry = "600x15-30+20"; + geometry = "600x15-40+40"; idle_threshold = 120; separator_color = "frame"; + separator_height = 1; + word_wrap = true; + padding = 8; + horizontal_padding = 8; }; frame = { -- cgit 1.4.1