Several changes for clemacs, added auto-complete, dunno how hooking rainbowmode to conf mode works
parent
6b96a115a4
commit
7165004c23
12
README.md
12
README.md
|
@ -8,10 +8,11 @@ I'm using:
|
|||
* [Oh My Zsh](http://ohmyz.sh)
|
||||
* [GNU stow](https://www.gnu.org/software/stow)
|
||||
* [Materia Theme](https://github.com/nana-4/materia-theme)
|
||||
|
||||
## TODOS: ##
|
||||
1. Update this README for the migration to GNU stow and clemacs
|
||||
2. Making an own conky, conky_maia-like
|
||||
..* [conky](https://github.com/brndnmtthws/conky/wiki/Configuraion-Settings)
|
||||
* [conky](https://github.com/brndnmtthws/conky/wiki/Configuraion-Settings)
|
||||
3. Sorting the "Prerequisites" by importance
|
||||
4. Improve the README.md or maybe make a wiki.
|
||||
5. Getting away from Manjaro i3 (?)
|
||||
|
@ -55,6 +56,7 @@ Yaourt Install
|
|||
* [i3lock-color](https://github.com/PandorasFox/i3lock-color) - Needed for ~/.scripts/i3lock.py
|
||||
* [cava](https://github.com/karlstav/cava) - **C**onsole-based **A**udio **V**isualizer for **A**LSA (MPD and Pulseaudio)
|
||||
* [materia-theme](https://github.com/nana-4/materia-theme)
|
||||
|
||||
``` shell
|
||||
sudo pacman -Syu
|
||||
sudo pacman -S emacs git termite python-pip zsh-theme-powerlevel9k powerline-fonts awesome-terminal-fonts texlive-most firefox thunderbird evince veracrypt keepassx2 xorg-xbacklight pulseaudio-alsa pulseaudio-bluetooth nyancat cmus lxappearance
|
||||
|
@ -73,10 +75,6 @@ rm -rf ~/.*bash* # remove bash-stuff from your home directory.. don't do it if y
|
|||
### Setting up Emacs ###
|
||||
I tried to make this as easy as possible. All packages should be installed automatically. I'm not sure whether it works or not
|
||||
|
||||
``` shell
|
||||
curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
|
||||
```
|
||||
|
||||
### Setups ###
|
||||
Setting up some programs.
|
||||
#### Installing Nextcloud-Client (optional) ####
|
||||
|
@ -89,7 +87,9 @@ sudo ln -s ~/Downloads/Nextcloud-2.3.3-x86_64.AppImage /usr/bin/nextcloud
|
|||
#### Finally *"installing"* the dotfiles. ####
|
||||
``` shell
|
||||
git clone https://github.com/TuDatTr/dotfiles .dotfiles
|
||||
stow
|
||||
stow emacs
|
||||
stow i3
|
||||
stow zsh
|
||||
rm -rf ~/.i3/
|
||||
sudo ln -s ~/.scripts/pipes.sh /usr/local/bin/pipes
|
||||
```
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
((("defun" .
|
||||
[0 0 0 1 0])
|
||||
("wird" .
|
||||
[2 0 0 0])))
|
|
@ -33,6 +33,10 @@
|
|||
'(lambda ()
|
||||
(set-face-background 'default "unspecified-bg")))
|
||||
|
||||
(f-mkdir "~/.emacs-saves")
|
||||
(setq auto-save-file-name-transforms
|
||||
'((".*" "~/.emacs-saves/" t)))
|
||||
|
||||
(defun copy-to-xclipboard(arg)
|
||||
(interactive "P")
|
||||
(cond
|
||||
|
@ -91,10 +95,13 @@
|
|||
|
||||
(menu-bar-mode -1)
|
||||
|
||||
(ac-config-default)
|
||||
|
||||
(add-hook 'python-mode-hook 'anaconda-mode)
|
||||
(add-hook 'python-mode-hook 'anaconda-eldoc-mode)
|
||||
|
||||
(require 'tex)
|
||||
(require 'auto-complete-auctex)
|
||||
(setq TeX-auto-save t)
|
||||
(setq TeX-parse-self t)
|
||||
(setq-default TeX-master nil)
|
||||
|
@ -113,10 +120,11 @@
|
|||
(add-hook 'org-mode-hook 'rainbow-delimiters-mode)
|
||||
|
||||
(counsel-mode 1)
|
||||
(global-set-key "\C-s" 'swiper)
|
||||
|
||||
(require 'paren)
|
||||
(setq show-paren-style 'parenthesis)
|
||||
(show-paren-mode +1)
|
||||
(show-paren-mode 1)
|
||||
|
||||
(global-hl-line-mode 1)
|
||||
(set-face-background 'hl-line "#141b1e")
|
||||
|
@ -142,3 +150,5 @@
|
|||
:lighter " my-keys")
|
||||
|
||||
(my-keys-minor-mode 1)
|
||||
|
||||
(add-hook 'conf-mode 'rainbow-mode)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#+SELECT_TAGS: export
|
||||
|
||||
* Packages
|
||||
A list of installed packages and details about them.
|
||||
** Package Archives
|
||||
Adding the melpa package repository to Emacs.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -73,8 +74,18 @@ Changes the Emacs background to the terminals defaults. (Generally)
|
|||
'(lambda ()
|
||||
(set-face-background 'default "unspecified-bg")))
|
||||
#+END_SRC
|
||||
* Emacs behavior
|
||||
Save auto-save files in ~/.emacs-save
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(f-mkdir "~/.emacs-saves")
|
||||
(setq auto-save-file-name-transforms
|
||||
'((".*" "~/.emacs-saves/" t)))
|
||||
#+END_SRC
|
||||
|
||||
* Functions
|
||||
All the functions I use.
|
||||
** Cut/Copy and Paste by Boruch Baum
|
||||
A nice way to copy and paste contents comfortably inside and out of emacs.
|
||||
*** Copy
|
||||
Copy the marked area to the clipboard.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -144,7 +155,8 @@ Go back to indentation, if you are at the indentation, go to beginning of the li
|
|||
#+END_SRC
|
||||
|
||||
Sets the background of Emacs in terminal-mode to the terminals. Doesn't change it in window
|
||||
mode tho.
|
||||
mode though.
|
||||
Function is not currently used since I still have to figure out how to make it work with emacs in daemon mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun transparent-terminal ()
|
||||
(unless (display-graphic-p (selected-frame))
|
||||
|
@ -155,7 +167,11 @@ mode tho.
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(menu-bar-mode -1)
|
||||
#+END_SRC
|
||||
** Autocomplete
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(ac-config-default)
|
||||
|
||||
#+END_SRC
|
||||
** Python
|
||||
Using Anaconda-mode as default python development mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -167,6 +183,7 @@ Some default settings for LaTeX-Mode.
|
|||
AucTeX is needed.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'tex)
|
||||
(require 'auto-complete-auctex)
|
||||
(setq TeX-auto-save t)
|
||||
(setq TeX-parse-self t)
|
||||
(setq-default TeX-master nil)
|
||||
|
@ -199,12 +216,13 @@ Add rainbow-delimiters in org-mode
|
|||
** Ivy/Counsel/Swiper
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(counsel-mode 1)
|
||||
(global-set-key "\C-s" 'swiper)
|
||||
#+END_SRC
|
||||
** Parenthesis
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'paren)
|
||||
(setq show-paren-style 'parenthesis)
|
||||
(show-paren-mode +1)
|
||||
(show-paren-mode 1)
|
||||
#+END_SRC
|
||||
** Highlight line
|
||||
Globaly highlight the current line in a slightly darker shade of grey.
|
||||
|
@ -221,7 +239,7 @@ Globaly highlight the current line in a slightly darker shade of grey.
|
|||
(yas-global-mode 1)
|
||||
#+END_SRC
|
||||
|
||||
** Personal mode
|
||||
** Personal
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar my-keys-minor-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
|
@ -239,3 +257,9 @@ Globaly highlight the current line in a slightly darker shade of grey.
|
|||
|
||||
(my-keys-minor-mode 1)
|
||||
#+END_SRC
|
||||
|
||||
** Conf
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'conf-mode 'rainbow-mode)
|
||||
#+END_SRC
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(counsel swiper material-theme anaconda-mode rainbow-mode ox-twbs google-this auctex smartparens eclim flycheck rainbow-delimiters forest-blue-theme))))
|
||||
(auto-complete-auctex auto-complete counsel swiper material-theme anaconda-mode rainbow-mode ox-twbs google-this auctex smartparens eclim flycheck rainbow-delimiters forest-blue-theme))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
;; -*- emacs-lisp -*- <18/01/15 17:18:27 /home/tuan/.emacs.d/tramp>
|
||||
;; Tramp connection history. Don't change this file.
|
||||
;; You can delete it, forcing Tramp to reapply the checks.
|
||||
|
||||
((["ssh" "infra" "mx" nil nil]
|
||||
("uname" "Linux 4.4.0-109-generic")
|
||||
("locale" "LC_ALL=en_US.utf8")
|
||||
("test" "test")
|
||||
("remote-path"
|
||||
("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin"))
|
||||
("remote-shell" "/bin/sh")
|
||||
("readlink" "\\readlink")
|
||||
("stat" nil)
|
||||
("perl-file-spec" t)
|
||||
("perl-cwd-realpath" t)
|
||||
("perl" "\\perl")
|
||||
("id" "/usr/bin/id")
|
||||
("gid-integer" 1000)
|
||||
("gid-string" "infra")
|
||||
("file-exists" "test -e")))
|
|
@ -1,4 +1,4 @@
|
|||
import datetime
|
||||
import time
|
||||
import os
|
||||
|
||||
from PIL import Image
|
||||
|
@ -106,7 +106,14 @@ def lock_config():
|
|||
lock_pic)
|
||||
|
||||
|
||||
def log_command(command):
|
||||
def lock():
|
||||
'Locks the System'
|
||||
command = lock_config()
|
||||
|
||||
os.system(command)
|
||||
|
||||
|
||||
def log(start_time):
|
||||
write_mode = ''
|
||||
home = os.path.expanduser('~')
|
||||
log_file_path = "{}/{}".format(home, ".scripts/lock.log")
|
||||
|
@ -116,23 +123,18 @@ def log_command(command):
|
|||
else:
|
||||
write_mode = 'w'
|
||||
|
||||
program_duration = time.time() - start_time
|
||||
with open(log_file_path, write_mode) as f:
|
||||
f.write("[{}] {}\n".format(str(datetime.datetime.now()), command))
|
||||
f.write("[{}] {} seconds runtime.\n".format(time.asctime(), program_duration))
|
||||
f.close()
|
||||
|
||||
|
||||
def lock():
|
||||
'Locks the System'
|
||||
command = lock_config()
|
||||
|
||||
log_command(command)
|
||||
|
||||
os.system(command)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
start_time = time.time()
|
||||
screenshot()
|
||||
|
||||
pixelate()
|
||||
|
||||
lock()
|
||||
|
||||
log(start_time)
|
||||
|
|
|
@ -65,5 +65,6 @@ alias dir="du -h -d 1"
|
|||
alias -s tex=emacs
|
||||
alias -s cpp=emacs
|
||||
alias org="e ~/Nextcloud/orgs/man.org"
|
||||
alias neofetch="neofetch --block_range 0 16"
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
export GPG_TTY=$(tty)
|
||||
|
|
Loading…
Reference in New Issue