From d856cc00dd4ca77a32fd8c23bdb432d132c9a362 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Fri, 12 Apr 2019 13:06:03 -0400 Subject: [PATCH] dotfile changes --- home.nix | 76 +++++++++++++++++++++++++++++++++++++-- i3 | 58 ++---------------------------- polybar | 14 ++++---- spacemacs | 98 +++++++++++++++++++++++++++++++++++---------------- tmux.conf | 12 +++---- urlview.linux | 2 +- xprofile | 2 +- 7 files changed, 157 insertions(+), 105 deletions(-) diff --git a/home.nix b/home.nix index b710039..182fd45 100644 --- a/home.nix +++ b/home.nix @@ -1,10 +1,14 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { - home.packages = with pkgs; [ bat beets wget clipit keychain ncmpcpp pandoc silver-searcher tmux tree unzip wirelesstools xcape xclip anki pavucontrol ranger blueman gifsicle networkmanager paprefs steam mpv nnn nodejs pinentry vlc gnupg nitrogen alacritty wine tldr yarn spotify signal-desktop mu mosh ispell google-chrome emacs-all-the-icons-fonts gnupg python3 veracrypt bashmount exfat exfat-utils neofetch toot rtv newsboat neomutt i3lock-pixeled nmap p4v killall calc cargo cava diceware magic-wormhole msmtp xorg.xmodmap zip youtube-dl cacert dropbox-cli keepassx2 w3m wireshark-qt khard khal vdirsyncer slack riot-web retroarch ipfs gimp blender + home.packages = with pkgs; [ bat wget clipit ncmpcpp pandoc silver-searcher tmux tree unzip wirelesstools xcape xsel anki pavucontrol ranger blueman gifsicle networkmanager paprefs steam mpv nnn nodejs pinentry vlc gnupg nitrogen alacritty wine tldr yarn spotify signal-desktop mu mosh ispell google-chrome emacs-all-the-icons-fonts gnupg python3 python37Packages.pip veracrypt bashmount exfat exfat-utils neofetch toot rtv newsboat neomutt i3lock-pixeled nmap p4v killall calc cargo cava diceware magic-wormhole msmtp xorg.xmodmap zip youtube-dl cacert dropbox-cli keepassx2 w3m wireshark-qt khard khal vdirsyncer slack riot-web retroarch ipfs gimp blender urlview ]; home.sessionVariables = { + EDITOR = "vim"; + BROWSER = "firefox"; + LEDGER_FILE = ~/Sync/Ledger/ledger.ledger; + P4USER = "dswan"; P4PORT = "humu.iocom.com:1666"; P4CONFIG = "p4.cfg"; @@ -35,6 +39,9 @@ maxCacheTtl = 86400; defaultCacheTtlSsh = 86400; maxCacheTtlSsh = 86400; + extraConfig = '' + pinentry-program /home/dustinswan/.nix-profile/bin/pinentry + ''; }; services.polybar = { @@ -50,6 +57,7 @@ services.screen-locker = { enable = true; + inactiveInterval = 30; lockCmd = "${pkgs.i3lock-pixeled}/bin/i3lock-pixeled"; }; @@ -117,6 +125,7 @@ ta = "tmux attach -d"; e = "emacsclient -a \"\" -t -nw"; weather = "curl http://wttr.in"; + er = "rm -rf logs; unzip -o"; }; }; programs.firefox.enable = true; @@ -147,6 +156,24 @@ programs.rofi = { enable = true; }; + programs.beets = { + enable = true; + settings = { + directory = "~/Music"; + library = "~/Music/musiclibrary.db"; + import = { + copy = true; + }; + plugins = [ "lastgenre" "fetchart" "embedart" "lyrics" "scrub" "mpdupdate" ]; # TODO bandcamp + lastfm = { + user = "dustinswan"; + }; + bandcamp = { + lyrics = true; + art = true; + }; + }; + }; xsession = { enable = true; @@ -155,14 +182,57 @@ enable = true; package = pkgs.i3-gaps; config = { + modifier = "Mod4"; + gaps = { + inner = 10; + outer = 0; + smartBorders = "on"; + }; + window = { + border = 0; + commands = [ + { criteria = { class = "mpv"; }; command = "floating enable, move absolute position center"; } + { criteria = { class = "feh"; }; command = "floating enable, move absolute position center"; } + ]; + }; bars = []; startup = [{ command = "systemctl --user restart polybar"; always = true; notification = false; }]; + keybindings = let mod = "Mod4"; in lib.mkOptionDefault { + "${mod}+space" = "exec \"rofi -show combi\""; + "${mod}+Return" = "exec alacritty"; + "${mod}+Ctrl+Mod1+t" = "exec alacritty"; + "${mod}+Ctrl+Mod1+e" = "exec \"emacsclient -c\""; + "${mod}+Ctrl+Mod1+b" = "exec firefox"; + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; + + "${mod}+s" = "layout stacking"; + "${mod}+comma" = "layout tabbed"; + "${mod}+period" = "layout toggle split"; + + "${mod}+apostrophe" = "split h"; + "${mod}+minus" = "split v"; + + "${mod}+Shift+space" = "floating toggle"; + "${mod}+Ctrl+space" = "focus mode_toggle"; + + "${mod}+p" = "focus parent"; + "${mod}+c" = "focus child"; + "${mod}+r" = "mode resize"; + }; }; - extraConfig = builtins.readFile ~/dotfiles/i3; + # extraConfig = builtins.readFile ~/dotfiles/i3; }; }; } diff --git a/i3 b/i3 index 40d77bf..d6f62aa 100644 --- a/i3 +++ b/i3 @@ -1,7 +1,6 @@ set $mod Mod4 gaps inner 10 gaps outer 0 -# smart_gaps on smart_borders on for_window [class="^.*"] border pixel 0 @@ -82,7 +81,7 @@ bindsym $mod+Shift+space floating toggle bindsym $mod+Ctrl+space focus mode_toggle # focus the parent container -bindsym $mod+a focus parent +bindsym $mod+p focus parent # focus the child container bindsym $mod+c focus child @@ -131,69 +130,16 @@ bindsym $mod+Shift+c restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+period 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" { - # 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 h resize shrink width 2 px or 2 ppt bindsym k resize grow height 2 px or 2 ppt bindsym j resize shrink height 2 px or 2 ppt bindsym l resize grow width 2 px or 2 ppt - # same bindings, but for the arrow keys - bindsym Left resize shrink width 2 px or 2 ppt - bindsym Down resize grow height 2 px or 2 ppt - bindsym Up resize shrink height 2 px or 2 ppt - bindsym Right resize grow width 2 px or 2 ppt - # back to normal: Enter or Escape or $mod+r bindsym Return mode "default" bindsym Escape mode "default" bindsym $mod+p mode "default" } -bindsym $mod+p mode "resize" - -# gaps shortcuts -set $mode_gaps Gaps: (o) outer, (i) inner -set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) -bindsym $mod+Shift+g mode "$mode_gaps" - -mode "$mode_gaps" { - bindsym o mode "$mode_gaps_outer" - bindsym i mode "$mode_gaps_inner" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -mode "$mode_gaps_inner" { - bindsym plus gaps inner current plus 5 - bindsym minus gaps inner current minus 5 - bindsym 0 gaps inner current set 0 - - bindsym Shift+plus gaps inner all plus 5 - bindsym Shift+minus gaps inner all minus 5 - bindsym Shift+0 gaps inner all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} -mode "$mode_gaps_outer" { - bindsym plus gaps outer current plus 5 - bindsym minus gaps outer current minus 5 - bindsym 0 gaps outer current set 0 - - bindsym Shift+plus gaps outer all plus 5 - bindsym Shift+minus gaps outer all minus 5 - bindsym Shift+0 gaps outer all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# exec --no-startup-id xautolock -time 10 -locker 'i3lock-pixeled' +bindsym $mod+r mode "resize" diff --git a/polybar b/polybar index 0803fe0..c2d0347 100644 --- a/polybar +++ b/polybar @@ -138,7 +138,7 @@ ramp-coreload-7-foreground = #ff5555 [module/date] type = internal/date -date =  %%{F#99}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-} +date =  %%{F#99}%m-%d%%{F-} %%{F#fff}%H:%M%%{F-} date-alt =  %%{F#fff}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-} [module/memory] @@ -146,7 +146,7 @@ type = internal/memory format =