Merge branch 'master' of github.com:IvanMalison/dotfiles

This commit is contained in:
Ivan Malison 2018-06-03 14:36:49 -07:00
commit b515f3cc2b
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
8 changed files with 73 additions and 77 deletions

View File

@ -14,6 +14,6 @@ pos 0x0
rate 60.00
output DVI-D-0
mode 2560x1440
pos 3840x0
pos 0x2160
primary
rate 59.95

View File

@ -1,35 +1,3 @@
/*
* GTK - The GIMP Toolkit
* Copyright (C) 2002 Owen Taylor
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/*
* A keybinding set implementing Emacs-like keybindings
*/
/*
* Bindings for GtkTextView and GtkEntry
*/
@binding-set gtk-emacs-text-entry
{
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) };
@ -53,6 +21,7 @@
bind "<ctrl>d" { "delete-from-cursor" (chars, 1) };
bind "<alt>d" { "delete-from-cursor" (word-ends, 1) };
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) };
bind "<alt>backspace" { "delete-from-cursor" (word-ends, -1) };
bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) };
bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) };

View File

@ -1,11 +1,11 @@
[Settings]
gtk-key-theme-name=MyEmacs
gtk-key-theme-name=Emacs
gtk-application-prefer-dark-theme=false
gtk-theme-name=Adwaita-dark
gtk-theme-name=Arc
gtk-fallback-icon-theme=gnome
gtk-icon-theme-name=Paper
gtk-icon-theme-name=Numix-Circle
gtk-font-name=Roboto 11
gtk-cursor-theme-name=Paper
gtk-cursor-theme-name=Breeze_Snow
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
@ -15,5 +15,5 @@ gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb

View File

@ -10,8 +10,8 @@ image/png=okularApplication_kimgio.desktop;
video/mp4=vlc.desktop;org.gnome.Totem.desktop;
[Default Applications]
text/html=google-chrome-unstable.desktop
x-scheme-handler/http=google-chrome-unstable.desktop
x-scheme-handler/https=google-chrome-unstable.desktop
x-scheme-handler/about=google-chrome-unstable.desktop
x-scheme-handler/unknown=google-chrome-unstable.desktop
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop

View File

@ -436,7 +436,8 @@ chromeTabAction doSplit action selected =
-- done with the existing window bringer interface
myWindowAct c@WindowBringerConfig {menuCommand = cmd, menuArgs = args} action = do
visible <- visibleWindows
ws <- windowMap' c {windowFilter = not . flip elem visible}
-- Uncomment filter to remove windows that are visible
ws <- windowMap' c -- {windowFilter = not . flip elem visible}
-- chromeTabs <- liftIO getChromeTabInfo
let options = M.union (M.map Left ws) (M.map Right M.empty)
selection <- DM.menuMapArgs cmd args options
@ -704,7 +705,7 @@ getWindowWS a = withWindowSet $ \ws -> return $ listToMaybe
replaceWindow original replacement =
W.delete original . swapWindows original replacement
myKill =
chromeReplaceKill =
withFocused $ \w -> do
vClass <- getClass w
if vClass == "Chrome" then
@ -906,7 +907,7 @@ addKeys conf@XConfig { modMask = modm } =
, ((modalt, xK_Return), deactivateFullAnd restoreAllMinimized)
, ((modm .|. controlMask, xK_t),
setReplaceTarget >> spawn "chromix-too open chrome://newtab")
, ((modm .|. shiftMask, xK_c), myKill)
, ((mod .|. controlMask, xK_c), chromeReplaceKill)
, ((hyper, xK_g), gatherThisClass)
-- Directional navigation

View File

@ -1043,6 +1043,20 @@ I keep it around just in case I need it.
(fset 'extract-and-name-use-package-block
[?\C-a return ?\C-p ?# ?+ ?E ?N ?D ?_ ?S ?R ?C return ?# ?+ ?B ?E ?G ?I ?N ?_ ?S ?R ?C ? ?e ?m ?a ?c ?s ?- ?l ?i ?s ?p ?\C-a ?\C-p ?\C- ?\C-n ?\C-e ?\M-w ?\C-n ?\C-a ?\C-\M-f return ?\C-y ?\C-p ?\C-p ?\C-c ?\' ?\M-< ?\C-s ?u ?s ?e ?- ?p ?a ?c ?k return ?\C-\M-f ?\C-f ?\C- ?\C-\M-f ?\M-w ?\C-c ?\' ?\C-r ?B ?E ?G ?I ?N return ?\C-a ?\C-p ?\C-e return ?* ? ?\C-y])
#+END_SRC
* Man-mode
Man page escape sequences aren't properly handled by emacs pager. This function
fixes that, but for now, it needs to be run manually, since I haven't figured
out how to detect that a buffer is a man mode buffer.
#+BEGIN_SRC emacs-lisp
(use-package man
:config
(progn
(defun imalison:fontify-man-page-buffer ()
(interactive)
(read-only-mode -1)
(Man-fontify-manpage)
(read-only-mode +1))))
#+END_SRC
* General
** User Info
#+BEGIN_SRC emacs-lisp
@ -1154,7 +1168,7 @@ Disabling line numbers because they are slow as fuck.
#+END_SRC
*** frame-mode
#+BEGIN_SRC emacs-lisp
(defvar imalison:use-frame-mode t)
(defvar imalison:use-frame-mode nil)
(use-package frame-mode
:if imalison:use-frame-mode
:demand t
@ -2758,7 +2772,6 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
**** haskell-ide-engine
#+BEGIN_SRC emacs-lisp
(use-package lsp-haskell
:disabled t
:config
(add-hook 'haskell-mode-hook 'lsp-haskell-enable))
#+END_SRC
@ -3057,14 +3070,19 @@ Intero seems to be causing hangs, so it has been disabled
(add-hook 'org-mode-hook 'imalison:load-babel-languages)
(defun imalison:load-babel-languages ()
(let* ((loaded-ob (or (require 'ob-sh nil t) (require 'ob-shell nil t)))
(ob-shell-name
(when loaded-ob
(intern (substring-no-properties (imalison:maybe-symbol-name loaded-ob) 3))))
(added-modes (when ob-shell-name `((,ob-shell-name . t)))))
(org-babel-do-load-languages
'org-babel-load-languages
'((sh . t)
(python . t)
`((python . t)
(ruby . t)
(octave . t)
(sqlite . t)
(plantuml . t))))
(plantuml . t)
,@added-modes))))
(setq org-log-into-drawer t
org-log-reschedule t
@ -3201,6 +3219,7 @@ Intero seems to be causing hangs, so it has been disabled
(add-to-list 'org-capture-templates
`("c" "Calendar entry" entry
(file ,imalison:org-calendar-file)
,(format "%s\n%s\n%s" "* %?" imalison:created-property-string "%^T")))
(add-to-list 'org-capture-templates
@ -3484,6 +3503,11 @@ alphanumeric characters only."
:after org-projectile
:bind (("C-c n p" . org-projectile-helm-template-or-project)))
#+END_SRC
**** org-pomodoro
#+BEGIN_SRC emacs-lisp
(use-package org-pomodoro
:after org)
#+END_SRC
**** org-super-agenda
#+BEGIN_SRC emacs-lisp
(use-package org-super-agenda
@ -4506,23 +4530,7 @@ This is useful with server mode when editing gmail messages. I think that it is
:defer t
:config
(progn
(defun alert-notifier-notify (info)
(if alert-notifier-command
(let ((args
(list "-title" (alert-encode-string (plist-get info :title))
"-activate" "org.gnu.Emacs"
"-message" (alert-encode-string (plist-get info :message))
"-execute" (format "\"%s\"" (switch-to-buffer-command (plist-get info :buffer))))))
(apply #'call-process alert-notifier-command nil nil nil args))
(alert-message-notify info)))
(defun switch-to-buffer-command (buffer-name)
(emacsclient-command (format "(switch-to-buffer \\\"%s\\\")" buffer-name)))
(defun emacsclient-command (command)
(format "emacsclient --server-file='%s' -e '%s'" server-name command))
(setq alert-default-style 'notifier)))
(setq alert-default-style 'libnotify)))
#+END_SRC
** sauron
#+BEGIN_SRC emacs-lisp
@ -4859,7 +4867,8 @@ Ensure all themes that I use are installed:
(spaceline-helm-mode)
;; 'spaceline-gh-notifier and 'imalison:muni disabled for now
(spaceline-spacemacs-theme)))
(spaceline-spacemacs-theme)
(spaceline-toggle-org-pomodoro-on)))
#+END_SRC
** page-break-lines
#+BEGIN_SRC emacs-lisp

View File

@ -2,4 +2,12 @@
# -*- mode:sh
cd "$HOME/.config/taffybar"
stack run
stack install
if command_exists "imalison-taffybar"; then
imalison-taffybar "$@"
else
# Move .lib/bin to the end of PATH so that this script is not called again
add_to_path "$HOME/.lib/bin" --after
taffybar "$@"
fi

View File

@ -42,6 +42,15 @@ def build_board(size=4):
]
def board_string(board_to_draw):
border_line = "+{0}+".format((len(board_to_draw[0]) * 2 - 1) * "-")
return "{border_line}\n{contents}\n{border_line}".format(
contents="\n".join("|{0}|".format(" ".join(letter_line))
for letter_line in board_to_draw),
border_line=border_line,
)
def build_trie():
node = TrieNode()
with open('/usr/share/dict/words') as the_file:
@ -57,7 +66,7 @@ class Boggle(object):
@classmethod
def new_random(cls, trie):
return cls(build_board(), trie)
return cls(build_Board(), trie)
def __init__(self, board, trie):
self.height = len(board)
@ -154,5 +163,5 @@ def build_board_from_dice_roll(dice=None, row_size=4):
if __name__ == '__main__':
dict_trie = build_trie()
board = build_board_from_dice_roll()
print(board)
print(board_string(board))
print(list(Boggle(board, dict_trie).run()))