From 23b21c19942b5aea829c1d3e1e6b1cd2ef38c92e Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Wed, 10 Jan 2018 22:48:00 +0100 Subject: [PATCH] Update and fix. --- emacs/emacs.org | 123 +++++++++++------- i3/i3.nix | 4 + i3/polybar | 1 + nix/.config/nixpkgs/config.nix | 3 + nix/.config/nixpkgs/overlays/01-backports.nix | 18 ++- .../nixpkgs/overlays/03-customizations.nix | 6 + nix/.config/nixpkgs/overlays/04-combine.nix | 7 +- nix/.config/nixpkgs/overlays/05-envs.nix | 12 +- nix/.config/nixpkgs/pkgs/lejos.nix | 6 +- nix/.config/nixpkgs/pkgs/peageprint.nix | 4 +- 10 files changed, 124 insertions(+), 60 deletions(-) diff --git a/emacs/emacs.org b/emacs/emacs.org index 29a8a52..f890925 100644 --- a/emacs/emacs.org +++ b/emacs/emacs.org @@ -14,66 +14,78 @@ #+END_SRC ** keybindings #+BEGIN_SRC emacs-lisp -(bind-keys :map global-map - ("C-c l" . org-store-link) - ("C-c a" . org-agenda) - ("C-c c" . org-capture)) + (bind-keys :map global-map + ("C-c l" . org-store-link) + ("C-c a" . org-agenda) + ("C-c b" . org-iswitchb) + ("C-c c" . org-capture)) #+END_SRC ** config #+BEGIN_SRC emacs-lisp - (setq org-pretty-entities t) - (setq org-startup-indented t) - (setq org-src-fontify-natively t) - (setq org-src-tab-acts-natively t) - (setq org-ellipsis "⬎") - (setq org-log-done t) - (setq org-todo-keywords - '((sequence "TODO(t)" "WAIT" "|" "DONE(d)" "CANCEL"))) -(setq org-agenda-files (list "~/org/life.org" - "~/org/ru.org" - "~/org/symfo.org" - "~/org/fiction.org")) -(setq org-use-fast-todo-selection t) -(setq org-directory "~/org") + (setq org-pretty-entities t) + (setq org-startup-indented t) + (setq org-src-fontify-natively t) + (setq org-completion-use-ido t) + (setq org-src-tab-acts-natively t) + (setq org-ellipsis "⬎") + (setq org-log-done t) + (setq org-todo-keywords + '((sequence "TODO(t)" "WAIT" "|" "DONE(d)" "CANCEL"))) + (setq org-agenda-files (list "~/org/life.org" + "~/org/ru.org" + "~/org/symfo.org" + "~/org/fiction.org")) + (setq org-use-fast-todo-selection t) + (setq org-directory "~/org") -(defun org-file-path (filename) -"Return the absolute address of an org file, given its relative name." -(concat (file-name-as-directory org-directory) filename)) + (defun org-file-path (filename) + "Return the absolute address of an org file, given its relative name." + (concat (file-name-as-directory org-directory) filename)) -; (setq org-inbox-file "~/org/inbox.org") -(setq org-index-file (org-file-path "life.org")) -(setq org-archive-location - (concat (org-file-path "archive.org") "::* From %s")) + ; (setq org-inbox-file "~/org/inbox.org") + (setq org-index-file (org-file-path "life.org")) + (setq org-archive-location + (concat (org-file-path "archive.org") "::* From %s")) -(setq org-default-notes-file "~/org/refile.org") + (setq org-default-notes-file "~/org/refile.org") + (setq org-agenda-todo-ignore-scheduled t) - -(setq org-capture-templates - '(("l" "Today I learned" - entry - (file+datetree (org-file-path "til.org")) - "* %?\n") - ("u" "link" - entry - (file+headline org-index-file "check links") - "* %^L\n") - ("w" "Week review" - entry - (file+datetree (org-file-path "weeklog.org")) - "* %?\n") - ("t" "todo item" - entry - (file+headline org-index-file "todo") - "* TODO %?\n"))) - + (setq org-capture-templates + '(("l" "Today I learned" + entry + (file+datetree (org-file-path "til.org")) + "* %?\n") + ("u" "link" + entry + (file+headline org-index-file "check links") + "* %^L\n") + ("w" "Week review" + entry + (file+datetree (org-file-path "weeklog.org")) + "* %?\n") + ("t" "todo item" + entry + (file+headline org-index-file "todo") + "* TODO %?\n"))) + #+END_SRC -** add template for elisp +** add templates #+BEGIN_SRC emacs-lisp - (add-to-list 'org-structure-template-alist - '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC")) + (add-to-list 'org-structure-template-alist + '("py" "#+BEGIN_SRC python\n?\n#+END_SRC")) + (org-babel-do-load-languages + 'org-babel-load-languages + '((python . t) + (sh . t) + )) #+END_SRC + +#+RESULTS: + ** org-bullets #+BEGIN_SRC emacs-lisp (use-package org-bullets @@ -184,6 +196,21 @@ ;; (global-set-key (kbd "C-x l") 'counsel-locate) ;; (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) ;; (define-key read-expression-map (kbd "C-r") 'counsel-expression-history) +** projectile +#+BEGIN_SRC emacs-lisp + (use-package projectile + :config + (projectile-global-mode t) + (use-package counsel-projectile)) +#+END_SRC +** ggtags +#+BEGIN_SRC emacs-lisp +(use-package ggtags +:demand +:bind ("M-." . ggtags-find-tag-dwim)) +#+END_SRC + + ** TODO i3-emacs * editing ** line numbers diff --git a/i3/i3.nix b/i3/i3.nix index 3203d75..d9a5dce 100644 --- a/i3/i3.nix +++ b/i3/i3.nix @@ -178,10 +178,14 @@ ${kill-and-restart haskellPackages.arbtt "arbtt-capture"} bindsym XF86MonBrightnessUp exec ${light}/bin/light -A 5 bindsym XF86MonBrightnessDown exec ${light}/bin/light -U 5 +bindsym ctrl+XF86MonBrightnessUp exec ${light}/bin/light -A 1 +bindsym ctrl+XF86MonBrightnessDown exec ${light}/bin/light -U 1 bindsym XF86AudioLowerVolume exec ${alsaUtils}/bin/amixer set Master 1%- bindsym XF86AudioRaiseVolume exec ${alsaUtils}/bin/amixer set Master 1%+ bindsym XF86AudioMute exec ${alsaUtils}/bin/amixer set Master toggle bindsym $mod+Shift+s exec --no-startup-id ${screenshot_public}/bin/screenshot_public +bindsym Print exec --no-startup-id ${screenshot_public}/bin/screenshot_public +bindsym $mod+p exec --no-startup-id passmenu workspace_auto_back_and_forth yes hide_edge_borders smart diff --git a/i3/polybar b/i3/polybar index 1cc643d..ab4082c 100644 --- a/i3/polybar +++ b/i3/polybar @@ -309,6 +309,7 @@ format-charging-underline = #ffb52a time-format = %H:%M label-charging = %percentage%% - %time% label-discharging = %percentage%% - %time% +label-full = %percentage%% format-discharging = format-discharging-underline = ${self.format-charging-underline} diff --git a/nix/.config/nixpkgs/config.nix b/nix/.config/nixpkgs/config.nix index 2723624..71eeac8 100644 --- a/nix/.config/nixpkgs/config.nix +++ b/nix/.config/nixpkgs/config.nix @@ -1,7 +1,10 @@ { allowUnfree = true; + chromium = { + vaapiSupport = true; + }; # chromium = { # enablePepperFlash = true; # enablePepperPDF = true; diff --git a/nix/.config/nixpkgs/overlays/01-backports.nix b/nix/.config/nixpkgs/overlays/01-backports.nix index 91787ae..726071f 100644 --- a/nix/.config/nixpkgs/overlays/01-backports.nix +++ b/nix/.config/nixpkgs/overlays/01-backports.nix @@ -1,12 +1,23 @@ self: super: let +pkgold = super; overrideOlder = original: override: let - lib = super.lib; + lib = super.lib; newpkgver = lib.getVersion (override original); oldpkgver = lib.getVersion original; in if (lib.versionOlder oldpkgver newpkgver) then original.overrideDerivation override else original; in { + i3lock-color = overrideOlder super.i3lock-color (attrs: rec { + version = "2.9.1-2017-09-10"; + name = "i3lock-color-${version}"; + src = super.fetchFromGitHub { + owner = "chrjguill"; + repo = "i3lock-color"; + rev = "d03fbe70c92505627af61a1464f2eaafe9fcbfd5"; + sha256 = "12vw90n6pmz1fxqv55nlwpbfzj9wap6b7rcrxjgfl0snqx3nijlg"; + }; + }); # spotify = overrideOlder pkgs.spotify (attrs: rec { # version = "1.0.48.103.g15edf1ec-94"; # name = "spotify-${version}"; @@ -16,4 +27,9 @@ in # }; #}); + haskellPackages = with super.haskell.lib; super.haskellPackages.extend (self: super:{ + X11 = overrideCabal super.X11 (drv: { + librarySystemDepends = drv.librarySystemDepends ++ [ pkgold.xorg.libXScrnSaver ]; + }); + }); } diff --git a/nix/.config/nixpkgs/overlays/03-customizations.nix b/nix/.config/nixpkgs/overlays/03-customizations.nix index 126a947..3790a83 100644 --- a/nix/.config/nixpkgs/overlays/03-customizations.nix +++ b/nix/.config/nixpkgs/overlays/03-customizations.nix @@ -17,6 +17,12 @@ self: super: { ''; }); }); + i3-gaps = super.i3-gaps.overrideDerivation (attrs: { + patches = [(super.fetchpatch { + url = "https://github.com/Lucus16/i3/commit/65a5afda81ddd1618b4a62b7188173c82ee5f985.patch"; + sha256 = "1s943069afamizrz5pmll6cmrzgnlv3v93bmnykifhr0mnavbhph"; + })]; + }); # wine = pkgs.wine.override { wineRelease = "staging"; wineBuild = "wineWow"; }; } diff --git a/nix/.config/nixpkgs/overlays/04-combine.nix b/nix/.config/nixpkgs/overlays/04-combine.nix index 7f0e561..b2e13c5 100644 --- a/nix/.config/nixpkgs/overlays/04-combine.nix +++ b/nix/.config/nixpkgs/overlays/04-combine.nix @@ -6,8 +6,11 @@ self: super: { counsel flycheck ivy + ivy-hydra magit projectile + epkgs.melpaPackages.counsel-projectile + ggtags use-package org-bullets solarized-theme @@ -17,13 +20,15 @@ self: super: { evil-tutor evil-surround epkgs.evil-goggles + epkgs.ox-mediawiki + epkgs.hledger-mode # evil-commentary password-store pass linum-relative (epkgs.trivialBuild { pname = "emacs-nix-mode"; - src = pkgs.fetchFromGitHub { + src = super.fetchFromGitHub { owner = "matthewbauer"; repo = "nix-mode"; rev = "v1.2.1"; diff --git a/nix/.config/nixpkgs/overlays/05-envs.nix b/nix/.config/nixpkgs/overlays/05-envs.nix index 6e0d7e1..a900ed2 100644 --- a/nix/.config/nixpkgs/overlays/05-envs.nix +++ b/nix/.config/nixpkgs/overlays/05-envs.nix @@ -16,6 +16,7 @@ in { xorg.xrandr pavucontrol light nitrogen + dropbox # really? # wpa_supplicant_gui xclip siji fira-mono playerctl font-awesome-ttf ]; @@ -40,12 +41,13 @@ in { spotify quasselClient leafpad - # calibre + calibre + wpa_supplicant_gui #py2.plover wireshark meld discord fanficfare - wpa_supplicant_gui + hledger hledger-web ]; media = mkEnv "y-media" [ @@ -87,8 +89,8 @@ in { java = openjdk; games = mkEnv "y-games" [ - # steam openttd wine winetricks minecraft - # steam nottetris2 # ftb + # steam openttd wine winetricks minecraft nottetris2 + steam ]; js = mkEnv "y-jsdev" [ @@ -108,7 +110,7 @@ in { # so check with nix-env -q first hosts = with self; with self.envs; { ascanius = [apps code de games envs.js pdf nix media gcc misc scripts coins]; - jarvis = [apps code de games envs.js pdf nix media gcc misc scripts]; + jarvis = [apps code de games envs.js pdf nix media gcc misc scripts myEmacs]; woodhouse = [de media misc kodi chromium spotify]; pennyworth = []; frumar = [bup gitAndTools.git-annex rtorrent pyroscope]; diff --git a/nix/.config/nixpkgs/pkgs/lejos.nix b/nix/.config/nixpkgs/pkgs/lejos.nix index 5925f7d..019cc66 100644 --- a/nix/.config/nixpkgs/pkgs/lejos.nix +++ b/nix/.config/nixpkgs/pkgs/lejos.nix @@ -1,8 +1,8 @@ -{ jdk, ant, libusb, makeWrapper, stdenv, lib, fetchurl }: +{ jdk7, ant, libusb, makeWrapper, stdenv, lib, fetchurl }: let lejospkg = type: attrs: stdenv.mkDerivation ({ name = "lejos-${type}-${attrs.version}"; - JDK_PATH = jdk; + JDK_PATH = jdk7; buildPhase = '' pushd build ant @@ -18,7 +18,7 @@ let lejospkg = type: attrs: done runHook postInstall ''; - buildInputs = [ jdk ant libusb makeWrapper ]; + buildInputs = [ jdk7 ant libusb makeWrapper ]; } // attrs); in { diff --git a/nix/.config/nixpkgs/pkgs/peageprint.nix b/nix/.config/nixpkgs/pkgs/peageprint.nix index 6826752..5548e2a 100644 --- a/nix/.config/nixpkgs/pkgs/peageprint.nix +++ b/nix/.config/nixpkgs/pkgs/peageprint.nix @@ -1,7 +1,7 @@ { pkgs ? import {} , stdenv ? pkgs.stdenv , fetchgit ? pkgs.fetchgit -, samba3_light ? pkgs.samba3_light +, samba4 ? pkgs.samba4 , lib ? pkgs.lib }: stdenv.mkDerivation { @@ -18,6 +18,6 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin install ./peage-print $out/bin - wrapProgram $out/bin/peage-print --suffix PATH : ${samba3_light}/bin + wrapProgram $out/bin/peage-print --suffix PATH : ${samba4}/bin ''; }