Browse Source

Merge branch 'master' of https://github.com/WolfeCub/dotfiles

pull/2/head
Josh Wolfe 5 years ago
parent
commit
25882cc63b
  1. 37
      emacs/.emacs.d/README.org
  2. 1
      i3/.config/i3/config
  3. 39
      i3/.config/i3/fibonacci.py

37
emacs/.emacs.d/README.org

@ -249,6 +249,7 @@ Vim-like relative line numbering @@ -249,6 +249,7 @@ Vim-like relative line numbering
#+END_SRC
* Variables
#+BEGIN_SRC emacs-lisp :tangle yes
(defvar wolfe/literate-config-name "README.org"
"The name of my literate config")
@ -259,25 +260,41 @@ Vim-like relative line numbering @@ -259,25 +260,41 @@ Vim-like relative line numbering
"The path to my literate config file")
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(defvar wolfe/linux? (eq system-type 'gnu/linux)
"Are we on linux")
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(defvar wolfe/windows? (eq system-type 'windows-nt)
"Are we on windows")
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(defvar wolfe/org-ellipsis
(if (display-graphic-p)
"⤵"
"...")
"Fancy arrow when not in terminal")
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(defvar wolfe/project-path
(cond
((eq system-type 'gnu/linux)
"~/Projects/")
((eq system-type 'windows-nt)
"C:/dev/")
(else nil))
(wolfe/linux? "~/Projects/")
(wolfe/windows? "C:/dev/")
(:else nil))
"Path to my projects directory")
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(defvar wolfe/org-dropbox-path
(cond
((eq system-type 'gnu/linux)
(wolfe/linux?
"~/Dropbox/org/")
((eq system-type 'windows-nt)
(wolfe/windows?
"C:\\Users\\Josh\\Dropbox\\org\\")
(else nil))
(:else nil))
"Path to my org files inside dropbox")
#+END_SRC
@ -535,7 +552,7 @@ Setup some basic quality of life org settings. @@ -535,7 +552,7 @@ Setup some basic quality of life org settings.
org-agenda-use-time-grid nil
org-agenda-skip-deadline-if-done t
org-agenda-skip-scheduled-if-done t
org-ellipsis "⤵")
org-ellipsis wolfe/org-ellipsis)
(global-set-key "\C-cl" 'org-store-link)
@ -1238,7 +1255,7 @@ Stores all backups and temp files in =~/.bak.emacs/= @@ -1238,7 +1255,7 @@ Stores all backups and temp files in =~/.bak.emacs/=
** Org Project
#+BEGIN_SRC emacs-lisp :tangle yes
(load-file "c:/dev/SideProjects/org-project/org-project.el")
(load-file "~/Projects/org-project/org-project.el")
(setq org-project-use-ag t)
#+END_SRC

1
i3/.config/i3/config

@ -8,6 +8,7 @@ exec --no-startup-id ~/bin/battery_notify @@ -8,6 +8,7 @@ exec --no-startup-id ~/bin/battery_notify
exec --no-startup-id powertop --auto-tune
exec --no-startup-id tlp start
exec --no-startup-id xset r rate 225 30
exec --no-startup-id ~/.config/i3/fibonacci.py
# Disable window borders
for_window [class="^.*"] border pixel 2

39
i3/.config/i3/fibonacci.py

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
#!/usr/bin/env python3
import i3ipc
counts = {}
i3 = i3ipc.Connection()
def fibonacci(con, num):
print(num)
if num % 2 == 0:
i3.command('split h')
else:
i3.command('split v')
def on_window_open(i3, e):
con = i3.get_tree().find_focused()
ws = con.workspace().name
if ws in counts.keys():
counts[ws] += 1
else:
counts[ws] = 0
fibonacci(con, counts[ws])
def on_window_close(i3, e):
con = i3.get_tree().find_focused()
ws = con.workspace().name
counts[ws] -= 1
def on_window_move(i3, e):
print('halo?')
i3.on('window::new', on_window_open)
i3.on('window::move', on_window_move)
i3.on('window::close', on_window_close)
i3.main()
Loading…
Cancel
Save