From faef4a4255906fd49738d958a224f91356ce75fe Mon Sep 17 00:00:00 2001 From: jeschli Date: Mon, 9 Sep 2019 12:39:06 +0000 Subject: j emacs: add which-key; sort melpaPackages --- jeschli/2configs/emacs.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 4f5b690f..958f2d5c 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -96,10 +96,11 @@ let epkgs.melpaStablePackages.magit epkgs.melpaPackages.nix-mode epkgs.melpaPackages.go-mode - epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.google-this + epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.monokai-alt-theme epkgs.melpaPackages.rust-mode + epkgs.elpaPackages.which-key ]); myEmacs = pkgs.writeDashBin "my-emacs" '' -- cgit v1.2.3 From 888dc73fe1564c7e34d45561172a4367a2d884ae Mon Sep 17 00:00:00 2001 From: jeschli Date: Mon, 9 Sep 2019 12:39:39 +0000 Subject: j bolide: reactivate emacs.nix --- jeschli/1systems/bolide/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeschli/1systems/bolide/config.nix b/jeschli/1systems/bolide/config.nix index 5cb6ef56..c8f2e822 100644 --- a/jeschli/1systems/bolide/config.nix +++ b/jeschli/1systems/bolide/config.nix @@ -12,7 +12,7 @@ in ./hardware-configuration.nix - # + ]; krebs.build.host = config.krebs.hosts.bolide; -- cgit v1.2.3 From ca7d5c33536614079826424924598f7f1288c729 Mon Sep 17 00:00:00 2001 From: jeschli Date: Mon, 9 Sep 2019 12:40:23 +0000 Subject: j bolide: add rofi --- jeschli/1systems/bolide/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/bolide/config.nix b/jeschli/1systems/bolide/config.nix index c8f2e822..90acfc74 100644 --- a/jeschli/1systems/bolide/config.nix +++ b/jeschli/1systems/bolide/config.nix @@ -56,6 +56,7 @@ in }; nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ + rofi wget vim # system helper ag -- cgit v1.2.3 From c734bb4db0dab03c88d411aad33723cd6e755d29 Mon Sep 17 00:00:00 2001 From: jeschli Date: Mon, 9 Sep 2019 12:40:44 +0000 Subject: j bolide: add vscode --- jeschli/1systems/bolide/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/bolide/config.nix b/jeschli/1systems/bolide/config.nix index 90acfc74..ea0f0eb8 100644 --- a/jeschli/1systems/bolide/config.nix +++ b/jeschli/1systems/bolide/config.nix @@ -79,6 +79,7 @@ in chromium google-chrome # programming languages + vscode go gcc9 ccls -- cgit v1.2.3 From f6670ed74f309ed5508bf560bb82947ab09b0689 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 11 Sep 2019 20:57:18 +0000 Subject: j emacs: configure magit --- jeschli/2configs/emacs.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 958f2d5c..fc786c6e 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -42,6 +42,10 @@ let (ido-mode t) ''; + magit = '' + (global-set-key (kbd "C-x g") 'magit-status) ; "Most Magit commands are commonly invoked from the status buffer" + ''; + windowCosmetics = '' (menu-bar-mode -1) (tool-bar-mode -1) ; Disable the button bar atop screen @@ -83,6 +87,7 @@ let ${evilMode} ${goMode} ${ido} + ${magit} ${packageRepos} ${orgMode} ${recentFiles} -- cgit v1.2.3 From 263d604b96165d06a2766b10fad535a290e8b431 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 11 Sep 2019 20:58:58 +0000 Subject: j emacs: add company plugin for completion --- jeschli/2configs/emacs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index fc786c6e..28bbe796 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -97,6 +97,7 @@ let emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ epkgs.melpaPackages.ag + epkgs.melpaPackages.company epkgs.melpaPackages.evil epkgs.melpaStablePackages.magit epkgs.melpaPackages.nix-mode -- cgit v1.2.3 From 1315611c5a40f325e7fe65533095b648a68ff06c Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 11 Sep 2019 21:00:00 +0000 Subject: j emacs: add elpy emacs python ide --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 28bbe796..c0edfcc6 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -106,6 +106,8 @@ let epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.monokai-alt-theme epkgs.melpaPackages.rust-mode + epkgs.melpaPackages.elpy + epkgs.elpaPackages.which-key ]); -- cgit v1.2.3 From f6d2562043ce83497791eca8c521bba056244c37 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 11 Sep 2019 23:32:45 +0000 Subject: j IM: add bolide to irc --- jeschli/2configs/IM.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/2configs/IM.nix b/jeschli/2configs/IM.nix index 288134fa..2366726f 100644 --- a/jeschli/2configs/IM.nix +++ b/jeschli/2configs/IM.nix @@ -29,6 +29,7 @@ in { jeschli.pubkey jeschli-bln.pubkey jeschli-brauerei.pubkey + jeschli-bolide.pubkey ]; packages = [ tmux ]; }; -- cgit v1.2.3 From fcb3a3985f1512913f8182a33c73311227f57cb8 Mon Sep 17 00:00:00 2001 From: jeschli Date: Thu, 12 Sep 2019 03:22:20 +0000 Subject: j emacs: add keybindings to switch dark and light customized themes --- jeschli/2configs/emacs.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index c0edfcc6..8bc78d18 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -75,6 +75,26 @@ let theme = '' (load-theme 'monokai-alt t) + (load-theme 'whiteboard t) + + (defun mh/load-whiteboard-theme () + "load whiteboard theme" + (interactive) + (message "whiteboard loaded") + (disable-theme 'monokai-alt) + (enable-theme 'whiteboard) + ) + + (defun mh/load-monokai-theme () + "load monokai theme" + (interactive) + (message "monokai loaded") + (disable-theme 'whiteboard) + (enable-theme 'monokai-alt) + ) + + (global-set-key "\C-ctw" 'mh/load-whiteboard-theme) + (global-set-key "\C-ctm" 'mh/load-monokai-theme) ''; recentFiles = '' -- cgit v1.2.3 From 1096c419b696eb1d5c5ee2a017f777f58a590250 Mon Sep 17 00:00:00 2001 From: jeschli Date: Thu, 12 Sep 2019 14:47:51 +0000 Subject: j i3: add i3 config file based on Luis' window-manager.nix --- jeschli/2configs/i3.nix | 918 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 918 insertions(+) create mode 100644 jeschli/2configs/i3.nix diff --git a/jeschli/2configs/i3.nix b/jeschli/2configs/i3.nix new file mode 100644 index 00000000..58d480dd --- /dev/null +++ b/jeschli/2configs/i3.nix @@ -0,0 +1,918 @@ +{pkgs, environment, config, lib, ... }: + +with pkgs; + +let + + bar_update_interval = "1"; # In seconds + terminal_pkg = "${pkgs.gnome3.gnome-terminal}/bin/gnome-terminal"; + terminal_class = "Gnome\\\\-terminal"; + terminal_instance = "gnome\\\\-terminal\\\\-server"; + + reload_layout = pkgs.writeScript "reload_layout.sh" '' + #!/bin/sh + pkill $(basename "${terminal_pkg}") + + i3-msg append_layout ${shell_layout} + + for i in {1..16} + do + ${terminal_pkg} & + done + ''; + + single_shell_spawn = pkgs.writeScript "single_shell_spawn.sh" '' + #!/bin/sh + + i3-msg focus parent + i3-msg append_layout ${single_shell} + for i in {1..2} + do + ${terminal_pkg} + done + sleep 0.3 + i3-msg focus parent + ''; + + single_shell = pkgs.writeText "single-shell.json" '' +{ + "border": "pixel", + "floating": "auto_off", + "layout": "tabbed", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + } + ] + } + ] +} + ''; + + shell_layout = pkgs.writeText "shell-layout.json" '' + { + "border": "pixel", + "floating": "auto_off", + "layout": "tabbed", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + } + ] + } + ] + }, + + { + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + } + ] + } + ] + }, + + { + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + } + ] + } + ] + }, + + + { + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + }, + { + "border": "pixel", + + "floating": "auto_off", + "geometry": { + "height": 434, + "width": 722, + "x": 0, + "y": 0 + }, + "percent": 0.5, + "swallows": [ + { + "class": "^${terminal_class}$", + "instance": "^${terminal_instance}$" + } + ], + "type": "con" + } + ] + } + ] + } + ] + } + ] + } + ''; + + + i3_conf_file = pkgs.writeText "config" '' + # This file has been auto-generated by i3-config-wizard(1). + # It will not be overwritten, so edit it as you like. + # + # Should you change your keyboard layout some time, delete + # this file and re-run i3-config-wizard(1). + # + + # i3 config file (v4) + # + # Please see https://i3wm.org/docs/userguide.html for a complete reference! + + set $mod Mod4 + + ####################### + # # + # LOOKS # + # # + ####################### + # Font for window titles. Will also be used by the bar unless a different font + # is used in the bar {} block below. + font pango:Bitstream Vera Sans Mono 14 + font pango:Monospace 14, Icons 10 + hide_edge_borders smart + new_window pixel 1 + new_float normal + + # Lockscreen shortcut + bindsym $mod+l exec xscreensaver-command -l + + # start a terminal + bindsym $mod+Return exec ${terminal_pkg} + + + # class border backgr. text indicator child_border + client.focused #4fceea #285577 #ffffff #2e9ef4 #285577 + client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a + client.unfocused #333333 #222222 #888888 #292d2e #222222 + + # Size of border + default_border pixel 3 + + ####################### + # # + # DEFAULT CONFIG # + # # + ####################### + floating_modifier $mod + workspace_layout stacked + default_orientation vertical + + # Kill focused window + bindsym $mod+Shift+q kill + + # start dmenu (a program launcher) + bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -modi drun#run -combi-modi drun#run -show combi -show-icons -display-combi run + # Switch windows + bindsym $mod+x exec ${pkgs.rofi}/bin/rofi -modi window -show window -auto-select + + # Arrow keys for focus navigation + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # Move focused window + bindsym $mod+Shift+j move left + bindsym $mod+Shift+k move down + bindsym $mod+Shift+l move up + bindsym $mod+Shift+odiaeresis move right + + # Arrow keys for focused window movement + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right + + # Split in horizontal orientation + bindsym $mod+h split h + + # Split in vertical orientation + bindsym $mod+v split v + + # Enter fullscreen mode for the focused container + bindsym $mod+f fullscreen toggle + + # Change container layout (stacked, tabbed, toggle split) + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # Toggle tiling / floating + bindsym $mod+Shift+space floating toggle + + # Change focus between tiling / floating windows + bindsym $mod+space focus mode_toggle + + # Focus the parent container + bindsym $mod+a focus parent + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Restart i3 inplace (preserves your layout/session, can be used to upgrade i3) + bindsym $mod+Shift+r restart + + # Exit i3 (logs you out of your X session) + bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + + # Resize window. You can also use the mouse for that + mode "resize" { + # 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 a resize shrink width 10 px or 10 ppt + bindsym s resize grow height 10 px or 10 ppt + bindsym w resize shrink height 10 px or 10 ppt + bindsym d 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" + } + + # Enable floating + for_window [class="usbguard-applet-qt"] floating enable + for_window [class="Nm-connection-editor"] floating enable + for_window [class="Gnome-disks"] floating enable + for_window [class="QtPass" title="QtPass"] move scratchpad + + # Make the currently focused window a scratchpad + bindsym $mod+Shift+minus move scratchpad + + # Show the first scratchpad window + bindsym $mod+minus scratchpad show + + # Show the sup-mail scratchpad window, if any. + bindsym $mod+Shift+s [class="QtPass" title="QtPass"] scratchpad show + + ####################### + # # + # WORKSPACES # + # # + ####################### + # Variables + set $workspace1 "1: Terminals" + set $workspace2 "2: Firefox" + set $workspace3 "3: Emacs" + set $workspace4 "4" + set $workspace5 "5" + set $workspace6 "6" + set $workspace7 "7" + set $workspace8 "8" + set $workspace9 "9" + set $workspace10 "10" + + assign [class="emacs"] $workspace3 + assign [class="Firefox"] $workspace2 + assign [class="Daily"] $workspace5 + + assign [class="VirtualBox Manager"] $workspace4 + assign [class="Virt-manager" title="Virtual Machine Manager"] $workspace4 + + assign [class="libreoffice"] $workspace6 + assign [class="Eclipse"] $workspace6 + + # Workspace lateral movement + bindsym $mod+Next workspace next + bindsym $mod+Prior workspace prev + + # Switch to workspace + bindsym $mod+1 workspace $workspace1 + bindsym $mod+2 workspace $workspace2 + bindsym $mod+3 workspace $workspace3 + bindsym $mod+4 workspace $workspace4 + bindsym $mod+5 workspace $workspace5 + bindsym $mod+6 workspace $workspace6 + bindsym $mod+7 workspace $workspace7 + bindsym $mod+8 workspace $workspace8 + bindsym $mod+9 workspace $workspace9 + bindsym $mod+0 workspace $workspace10 + + # Move workspace to other monitor + bindsym $mod+Shift+Next move workspace to output right + bindsym $mod+Shift+Prior move workspace to output left + + # move focused container to workspace + bindsym $mod+Shift+1 move container to workspace $workspace1 + bindsym $mod+Shift+2 move container to workspace $workspace2 + bindsym $mod+Shift+3 move container to workspace $workspace3 + bindsym $mod+Shift+4 move container to workspace $workspace4 + bindsym $mod+Shift+5 move container to workspace $workspace5 + bindsym $mod+Shift+6 move container to workspace $workspace6 + bindsym $mod+Shift+7 move container to workspace $workspace7 + bindsym $mod+Shift+8 move container to workspace $workspace8 + bindsym $mod+Shift+9 move container to workspace $workspace9 + bindsym $mod+Shift+0 move container to workspace $workspace10 + + + ####################### + # # + # FUNCTION KEYS # + # # + ####################### + # Backlight controls + bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight +10 + bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -10 + + # Pulse Audio controls + bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume + bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume + bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound + bindsym XF86AudioMicMute exec --no-startup-id amixer set Capture toggle + + ####################### + # # + # TTY KEYS # + # # + ####################### + + bindsym Mod1+F1 exec --no-startup-id chvt 0 + bindsym Mod1+F2 exec --no-startup-id chvt 1 + bindsym Mod1+F3 exec --no-startup-id chvt 2 + bindsym Mod1+F4 exec --no-startup-id chvt 3 + bindsym Mod1+F5 exec --no-startup-id chvt 4 + bindsym Mod1+F6 exec --no-startup-id chvt 5 + bindsym Mod1+F7 exec --no-startup-id chvt 6 + bindsym Mod1+F8 exec --no-startup-id chvt 7 + bindsym Mod1+F9 exec --no-startup-id chvt 8 + bindsym Mod1+F10 exec --no-startup-id chvt 9 + + + ####################### + # # + # CONVENIENCE KEYS # + # # + ####################### + bindsym Mod1+Shift+3 exec screenshot + + ####################### + # # + # WINDOW LAYOUT # + # # + ####################### + bindsym Shift+F11 exec --no-startup-id ${reload_layout} + bindsym Shift+F12 exec --no-startup-id ${single_shell_spawn} + + + bar { + status_command i3status + position top + } + + ####################### + # # + # AUTORUNS # + # # + ####################### + ## Start 16 gnome shells + exec i3-msg 'workspace $workspace1;' && ${reload_layout} + + # Start firefox + exec --no-startup-id ${pkgs.firefox}/bin/firefox --ProfileManager --new-instance --setDefaultBrowser + + # Start firefox + exec --no-startup-id my-emacs-daemon + ''; + +in { + + ####################### + # # + # AUTORANDR # + # # + ####################### + + # Start autorandr on display change + services.autorandr = { + enable = true; + defaultTarget = "mobile"; + }; + + # What to execute after resolution has been changed + environment.etc."xdg/autorandr/postswitch" = { + text = '' sleep 4 && i3-msg "restart" ''; + + }; + + # Start autorandr once on startup + systemd.user.services.boot-autorandr = { + description = "Autorandr service"; + partOf = [ "graphical-session.target" ]; + wantedBy = [ "graphical-session.target" ]; + serviceConfig = { + ExecStart = "${pkgs.autorandr}/bin/autorandr -c"; + Type = "oneshot"; + }; + }; + + + + ####################### + # # + # XSERVER # + # # + ####################### + services.xserver.enable = true; + + # Enable i3 Window Manager + services.xserver.windowManager.i3 = { + enable = true; + package = pkgs.i3; + configFile = i3_conf_file; + }; + + + # ${pkgs.xorg.xhost}/bin/xhost +SI:localuser:${cfg.user.name} + # ${pkgs.xorg.xhost}/bin/xhost -LOCAL: + services.xserver.windowManager.default = "i3"; + services.xserver.desktopManager.xterm.enable = false; + + + # Enable the X11 windowing system. + services.xserver.displayManager.slim = { + enable = true; + }; + + # Allow users in video group to change brightness + hardware.brightnessctl.enable = true; + + environment.systemPackages = with pkgs; [ + rofi # Dmenu replacement + acpilight # Replacement for xbacklight + arandr # Xrandr gui + feh + wirelesstools # To get wireless statistics + acpi + xorg.xhost + xorg.xauth + gnome3.gnome_terminal + ]; + +} -- cgit v1.2.3 From 50d1f50f1fbf0e9b50bc627aefd4dc286f0964fe Mon Sep 17 00:00:00 2001 From: jeschli Date: Thu, 12 Sep 2019 15:35:43 +0000 Subject: j emacs: emacs package repo stuff needs to be first --- jeschli/2configs/emacs.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 8bc78d18..18c47ca8 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -104,11 +104,12 @@ let ''; dotEmacs = pkgs.writeText "dot-emacs" '' + ${packageRepos} + ${evilMode} ${goMode} ${ido} ${magit} - ${packageRepos} ${orgMode} ${recentFiles} ${theme} -- cgit v1.2.3 From 235708c8e101490b66d7d9f0d9a1ee372cf4ec07 Mon Sep 17 00:00:00 2001 From: jeschli Date: Thu, 12 Sep 2019 16:05:01 +0000 Subject: j i3: minimize luis' config to fit my needs --- jeschli/2configs/i3.nix | 975 ++++++++---------------------------------------- 1 file changed, 154 insertions(+), 821 deletions(-) diff --git a/jeschli/2configs/i3.nix b/jeschli/2configs/i3.nix index 58d480dd..6901c38d 100644 --- a/jeschli/2configs/i3.nix +++ b/jeschli/2configs/i3.nix @@ -4,822 +4,158 @@ with pkgs; let - bar_update_interval = "1"; # In seconds - terminal_pkg = "${pkgs.gnome3.gnome-terminal}/bin/gnome-terminal"; - terminal_class = "Gnome\\\\-terminal"; - terminal_instance = "gnome\\\\-terminal\\\\-server"; - - reload_layout = pkgs.writeScript "reload_layout.sh" '' - #!/bin/sh - pkill $(basename "${terminal_pkg}") - - i3-msg append_layout ${shell_layout} - - for i in {1..16} - do - ${terminal_pkg} & - done - ''; - - single_shell_spawn = pkgs.writeScript "single_shell_spawn.sh" '' - #!/bin/sh - - i3-msg focus parent - i3-msg append_layout ${single_shell} - for i in {1..2} - do - ${terminal_pkg} - done - sleep 0.3 - i3-msg focus parent - ''; - - single_shell = pkgs.writeText "single-shell.json" '' -{ - "border": "pixel", - "floating": "auto_off", - "layout": "tabbed", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - } - ] - } - ] -} - ''; - - shell_layout = pkgs.writeText "shell-layout.json" '' - { - "border": "pixel", - "floating": "auto_off", - "layout": "tabbed", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - }, - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - } - ] - } - ] - }, - - { - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - }, - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - } - ] - } - ] - }, - - { - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - }, - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - } - ] - } - ] - }, - - - { - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - }, - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.5, - "type": "con", - "nodes": [ - { - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 1, - "type": "con", - "nodes": [ - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - }, - { - "border": "pixel", - - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 722, - "x": 0, - "y": 0 - }, - "percent": 0.5, - "swallows": [ - { - "class": "^${terminal_class}$", - "instance": "^${terminal_instance}$" - } - ], - "type": "con" - } - ] - } - ] - } - ] - } - ] - } - ''; - - i3_conf_file = pkgs.writeText "config" '' - # This file has been auto-generated by i3-config-wizard(1). - # It will not be overwritten, so edit it as you like. - # - # Should you change your keyboard layout some time, delete - # this file and re-run i3-config-wizard(1). - # - - # i3 config file (v4) - # - # Please see https://i3wm.org/docs/userguide.html for a complete reference! - - set $mod Mod4 - - ####################### - # # - # LOOKS # - # # - ####################### - # Font for window titles. Will also be used by the bar unless a different font - # is used in the bar {} block below. - font pango:Bitstream Vera Sans Mono 14 - font pango:Monospace 14, Icons 10 - hide_edge_borders smart - new_window pixel 1 - new_float normal - - # Lockscreen shortcut - bindsym $mod+l exec xscreensaver-command -l - - # start a terminal - bindsym $mod+Return exec ${terminal_pkg} - - - # class border backgr. text indicator child_border - client.focused #4fceea #285577 #ffffff #2e9ef4 #285577 - client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a - client.unfocused #333333 #222222 #888888 #292d2e #222222 - - # Size of border - default_border pixel 3 - - ####################### - # # - # DEFAULT CONFIG # - # # - ####################### - floating_modifier $mod - workspace_layout stacked - default_orientation vertical - - # Kill focused window - bindsym $mod+Shift+q kill - - # start dmenu (a program launcher) - bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -modi drun#run -combi-modi drun#run -show combi -show-icons -display-combi run - # Switch windows - bindsym $mod+x