From 0228eddc9ab21119790eca85cb781bbb7456936b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 17 Mar 2017 14:00:45 -0700 Subject: [PATCH 1/5] [Linux] Add home_tv autorandr config --- dotfiles/config/autorandr/home_tv/config | 19 +++++++++++++++++++ dotfiles/config/autorandr/home_tv/setup | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 dotfiles/config/autorandr/home_tv/config create mode 100644 dotfiles/config/autorandr/home_tv/setup diff --git a/dotfiles/config/autorandr/home_tv/config b/dotfiles/config/autorandr/home_tv/config new file mode 100644 index 00000000..e32fd517 --- /dev/null +++ b/dotfiles/config/autorandr/home_tv/config @@ -0,0 +1,19 @@ +output HDMI-1 +off +output DP-0 +off +output DP-1 +off +output DP-2 +off +output DP-3 +off +output HDMI-0 +mode 3840x2160 +pos 0x0 +rate 60.00 +output DVI-D-0 +mode 2560x1440 +pos 0x2160 +primary +rate 59.95 diff --git a/dotfiles/config/autorandr/home_tv/setup b/dotfiles/config/autorandr/home_tv/setup new file mode 100644 index 00000000..a58a49cf --- /dev/null +++ b/dotfiles/config/autorandr/home_tv/setup @@ -0,0 +1,2 @@ +DVI-D-0 00ffffffffffff0010ac7e404c33353220180103803c2278ea4bb5a7564ba3250a5054a54b008100b300d100714fa9408180d1c00101565e00a0a0a029503020350055502100001a000000ff00374a4e59353438363235334c0a000000fc0044454c4c205532373133484d0a000000fd0031561d711c000a20202020202000e4 +HDMI-0 00ffffffffffff001e6d010001010101011a010380a05a780aee91a3544c99260f5054a108003140454061407140818001010101010108e80030f2705a80b0588a0040846300001e023a801871382d40582c450040846300001e000000fd003a3e1e883c000a202020202020000000fc004c47205456205256550a2020200102020354f1506110222005040302015d5e5f66626364293d06c01507500957076e030c003000b83c2000800102030467d85dc401788003e200cfee0146d00024180900ad5244a9230ce305c000e3060501e30f0110011d8018711c1620582c250040846300009e662150b051001b304070360040846300001e0000000000000070 From d8020c49e6c700da1043b7df28a4c61c558306f2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 17 Mar 2017 14:01:46 -0700 Subject: [PATCH 2/5] [XMonad] Ignore prompt history --- dotfiles/xmonad/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/xmonad/.gitignore b/dotfiles/xmonad/.gitignore index 34f763ef..ac62bcfa 100644 --- a/dotfiles/xmonad/.gitignore +++ b/dotfiles/xmonad/.gitignore @@ -8,3 +8,4 @@ /xmonad.hi /xmonad.o /xmonad.state +/prompt-history From de6fb432e13d6811c82c3bdddda75c6e79a1e56a Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 18 Mar 2017 10:46:15 -0700 Subject: [PATCH 3/5] [Linux] Ignore mono stuff --- dotfiles/config/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/config/.gitignore b/dotfiles/config/.gitignore index afb8624b..5c32ae1d 100644 --- a/dotfiles/config/.gitignore +++ b/dotfiles/config/.gitignore @@ -42,3 +42,4 @@ /user-dirs.locale /vlc/ /xfce4/ +/.mono/keypairs/ From 9496c2c10308ce934bc1cba9bf7887f5f55a5e5b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 18 Mar 2017 10:46:45 -0700 Subject: [PATCH 4/5] [Linux] Extend rofi_command to include aliases and functions --- dotfiles/lib/bin/rofi_command.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/dotfiles/lib/bin/rofi_command.sh b/dotfiles/lib/bin/rofi_command.sh index b5dc5a1a..240e401e 100755 --- a/dotfiles/lib/bin/rofi_command.sh +++ b/dotfiles/lib/bin/rofi_command.sh @@ -1,11 +1,29 @@ -#!/usr/bin/env bash -function get_all_commands { - IFS=: - for exec_path in $PATH; do +#!/usr/bin/env zsh + +get_all_executables () { + for exec_path in $path; do test -r "$exec_path" && \ find "$exec_path" -maxdepth 1 -executable ! -type d -printf "%f\n" done } -selected=$(get_all_commands | rofi -dmenu -i) -"$selected" +get_all_functions () { + print -l ${(ok)functions} +} + +get_all_aliases () { + alias | cut -d = -f 1 +} + + +selected=$({ get_all_executables; get_all_aliases; get_all_functions; } | rofi -dmenu -i -kb-custom-1 "Alt+c") +rofi_exit="$?" +args="" +case "$rofi_exit" in + 1) + exit + ;; + 10) + args=$(echo "" | rofi -dmenu) +esac +eval "$selected $args" From 0cde170eaca10734fce9cb8495b72d4387ae487e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 18 Mar 2017 11:44:04 -0700 Subject: [PATCH 5/5] [Emacs] Use nlinum-mode --- dotfiles/emacs.d/README.org | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 1a807e49..19242bb5 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -998,6 +998,7 @@ This was stolen from https://github.com/jwiegley/dot-emacs (,mode-name ,disable-value))) (imalison:disable-mode-hook linum-mode) +(imalison:disable-mode-hook nlinum-mode) (imalison:disable-mode-hook yas-minor-mode) #+END_SRC ** Other @@ -1141,12 +1142,27 @@ I keep it around just in case I need it. (line-number-mode t) (column-number-mode t) #+END_SRC -Linum can be really slow on large files so it does not make sense to -have it on by default. Its probably safe to turn it on when in a -programming mode. +*** nlinum +Linum/NLinum can be really slow on large files so it does not make sense to have +it on by default. Its probably safe to turn it on when in a programming mode. #+BEGIN_SRC emacs-lisp (global-linum-mode -1) -(add-hook 'prog-mode-hook (lambda () (linum-mode t))) +#+END_SRC +#+BEGIN_SRC emacs-lisp +(use-package nlinum + :demand t + :config + (progn + (add-hook 'prog-mode-hook (lambda () (nlinum-mode t))) + (defun imalison-nlinum-mode-hook () + (when nlinum-mode + (setq-local nlinum-format + (concat "%" (number-to-string + ;; Guesstimate number of buffer lines. + (ceiling (log (max 1 (/ (buffer-size) 80)) 10))) + "d")))) + + (add-hook 'nlinum-mode-hook #'imalison-nlinum-mode-hook))) #+END_SRC ** Backups *** Put them all in one directory