83 Commits
tmux ... master

Author SHA1 Message Date
J. Fernando Sánchez
94fcdb812c Update home packages 2025-08-31 20:09:39 +02:00
J. Fernando Sánchez
84f9bf297f Create flake.nix 2025-08-31 19:17:09 +02:00
J. Fernando Sánchez
fa7041ff8b added home-manager 2024-01-23 16:25:59 +01:00
J. Fernando Sánchez
f68b89be0f add ansible and sshpass 2023-11-13 10:28:59 +01:00
J. Fernando Sánchez
1c449f436a add home-manager 2023-11-10 16:16:24 +01:00
J. Fernando Sánchez
b0933f7e42 add firefox no tab instructions 2023-06-30 12:02:06 +02:00
J. Fernando Sánchez
bc1b20a0aa script to remove old snap packages 2022-09-06 12:59:56 +02:00
J. Fernando Sánchez
7ec07febf3 setting up xiao 2021-09-15 15:49:01 +02:00
J. Fernando Sánchez
f395ed8f03 Add rofi themes and bluetooth menu
+ Fixed dunst
2020-12-28 16:21:25 +01:00
J. Fernando Sánchez
d1067cbb00 Fix polybar.sh
After the last update, I started getting duplicated bars when using cloned
monitors.

This commit changes the polybar.sh script to use replace xrandr with a call to
`polybar --list-monitors`, which ignores cloned monitors by default.
2020-12-28 14:58:16 +01:00
J. Fernando Sánchez
e813bc26e6 multiple changes 2020-12-28 12:54:24 +01:00
J. Fernando Sánchez
1f613497fb update compton -> picom 2020-12-28 12:53:26 +01:00
J. Fernando Sánchez
d77bd51746 update zprezto 2020-12-05 20:36:29 +01:00
J. Fernando Sánchez
651fc3426e add default completion zsh zfz 2020-05-06 18:05:38 +02:00
J. Fernando Sánchez
bef862a0b1 Add fzf-tab
Auto-completion in zsh using fzf.

https://github.com/Aloxaf/fzf-tab
2020-05-06 16:55:25 +02:00
J. Fernando Sánchez
3eb127c65c alacritty terminal as default 2020-05-06 16:35:18 +02:00
J. Fernando Sánchez
468fa01fa2 Add fzf, nvim and alacritty 2020-05-06 16:33:03 +02:00
J. Fernando Sánchez
c3064a3d76 Minor changes 2020-04-15 17:27:00 +02:00
J. Fernando Sánchez
10dc194dc6 Merge branch 'master' of github.com:balkian/dotfiles 2020-04-15 17:24:42 +02:00
J. Fernando Sánchez
2574a62403 Batch of changes 2020-04-15 17:19:21 +02:00
J. Fernando Sánchez
97566eccc6 Add npm binaries to zsh 2020-04-13 15:35:39 +02:00
J. Fernando Sánchez
d63f2adf19 Update emacs use-package for newer versions 2020-04-13 15:35:15 +02:00
J. Fernando Sánchez
fd2ca33e0d Add keep 2019-06-21 11:55:36 +02:00
J. Fernando Sánchez
f35f478a03 Add typescript to emacs 2018-12-07 18:50:20 +01:00
J. Fernando Sánchez
9d25e4c13b Vscode update + gitback 2018-12-08 02:48:04 +01:00
J. Fernando Sánchez
f2ef049f7f Default to tabbed in i3 2018-12-08 02:48:04 +01:00
J. Fernando Sánchez
e4d3e84525 Improve nodistractions script 2018-10-09 16:30:18 +02:00
J. Fernando Sánchez
ea78b16bd9 Multiple changes 2018-09-12 19:04:59 +02:00
J. Fernando Sánchez
6f97821cae Add polybar 2018-09-12 19:01:24 +02:00
J. Fernando Sánchez
f0202964ec Several changes
* Compton improvements
* Add a wide screen layout
* Set termite as the default terminal
* Update spacemacs
* Add script to copy bibtex entries from zotero
2018-04-20 11:42:22 +02:00
J. Fernando Sánchez
6f07d96ea0 Several changes
* Added ranger
* Update vim airline
* Added udiskie and
* Updated i3 status
* Updated zsh paths to load even when not in a login session
2017-12-07 17:11:32 +01:00
J. Fernando Sánchez
0cd98dd54b Simplified monitor setup and locking 2017-12-05 20:27:19 +01:00
J. Fernando Sánchez
074f9bcb3c i3blocks for panther 2017-12-04 17:37:26 +01:00
J. Fernando Sánchez
6dbc5a2635 Update tmux, add pavucontrol 2017-12-03 15:42:16 +01:00
J. Fernando Sánchez
ea2954b21e Add rotation script and default shell in tmux 2017-12-03 15:34:15 +01:00
J. Fernando Sánchez
c8b5165b95 Latex in spacemacs 2017-12-02 21:30:33 +01:00
J. Fernando Sánchez
0f015849aa Updated zprezto 2017-11-16 12:19:43 +01:00
J. Fernando Sánchez
a830c391e6 syncthing -> owncloud 2017-10-19 12:30:23 +02:00
J. Fernando Sánchez
2772190259 Fixed play-pause 2017-10-02 15:52:54 +02:00
J. Fernando Sánchez
b51604d950 Replaced spotify remote with playerctl 2017-10-02 15:37:24 +02:00
J. Fernando Sánchez
a9f2b370d0 Added autosuggestions 2017-10-02 11:24:16 +02:00
J. Fernando Sánchez
e471aad8d4 Trying spacemacs 2017-09-29 16:33:21 +02:00
J. Fernando Sánchez
ae3e2e45b6 Replaced firefox with chromium 2017-09-29 16:33:21 +02:00
J. Fernando Sánchez
5240a44722 Changed kubernetes alias and function 2017-09-29 16:33:21 +02:00
J. Fernando Sánchez
ae9e8f5d7c Fix netmenu bug 2017-09-29 16:33:21 +02:00
J. Fernando Sánchez
8bf32d1b93 Fixed runmenu 2017-06-06 18:06:39 +02:00
J. Fernando Sánchez
6a2f0dec9d Fixed i3 status 2017-06-06 13:25:32 +02:00
J. Fernando Sánchez
0c3fc88325 Makefile! 2017-03-24 18:11:40 +01:00
J. Fernando Sánchez
37837558b1 Use stow in make.sh 2017-03-24 16:52:14 +01:00
J. Fernando Sánchez
fc49bdf6c4 Lots of changes
New termite theme
Changed i3 configuration
Added run script and find_blob script
2017-03-24 16:29:31 +01:00
J. Fernando Sánchez
5866cb54d0 Several changes
* Changed default terminal
* Modified rofi to launch ssh
* More shortcuts
* Gitlab in emacs
2017-02-13 16:51:53 +01:00
J. Fernando Sánchez
5cd9fdc6a9 Open new terminal in current folder from emacs 2017-01-14 00:14:05 +01:00
J. Fernando Sánchez
91a33cdeb5 Added Git LFS 2017-01-14 00:13:09 +01:00
J. Fernando Sánchez
0a59f73c8f Menu to change (dis)connect to networks
* Only for NetworkManager
2017-01-14 00:11:34 +01:00
J. Fernando Sánchez
2d20791d0d Added 256 color code for hostname PS1 2016-12-22 10:18:04 +01:00
J. Fernando Sánchez
2f78d852e6 Add filemenu to i3 2016-12-15 15:35:16 +01:00
J. Fernando Sánchez
619cd94874 Updated zprezto to the latest version 2016-11-29 12:23:03 +01:00
J. Fernando Sánchez
c9c02318d3 Updated emacs' custom file 2016-11-29 12:09:53 +01:00
J. Fernando Sánchez
b88768512a Removed hard-coded colors in my zsh theme
Now I can use the theme in light terminal themes. Before this, it always
showed a black background in the in the prompt, which looks horrible in
light themes.
2016-11-29 12:06:34 +01:00
J. Fernando Sánchez
ca7513be8b Synaptics buttons 2016-11-10 18:26:15 +01:00
J. Fernando Sánchez
6814a0f545 Fixed cursor blinking 2016-11-10 18:25:59 +01:00
J. Fernando Sánchez
9cca8b0e05 Added scala 2016-11-10 18:24:30 +01:00
J. Fernando Sánchez
1e449408bb Different prompt color per hostname 2016-10-08 00:56:35 +02:00
J. Fernando Sánchez
32509d6482 Don't use vimperator in the gsi domain 2016-10-08 00:49:09 +02:00
J. Fernando Sánchez
aa48c18165 Added note taking with emacs to i3 2016-10-08 00:48:47 +02:00
J. Fernando Sánchez
23556fddf2 Updated emacs' config 2016-10-08 00:48:25 +02:00
J. Fernando Sánchez
ea3d2edc97 tmux doesn't like mouse-utf8 anymore 2016-10-08 00:46:55 +02:00
J. Fernando Sánchez
59483a7ac8 Bump 2016-03-09 15:16:31 +01:00
J. Fernando Sánchez
e68ff6e85e Integrated rofi 2016-01-10 12:55:09 +01:00
J. Fernando Sánchez
18af6196b3 More emacs 2016-01-07 12:59:23 +01:00
J. Fernando Sánchez
90d6b9aad9 ZSH update for termite 2016-01-07 12:53:33 +01:00
J. Fernando Sánchez
f8a7c1e39d WM updates 2016-01-07 12:53:04 +01:00
J. Fernando Sánchez
1a1c055b06 Termite and URXVT terminfo 2016-01-07 12:43:21 +01:00
J. Fernando Sánchez
ee3e7b81e4 Minor updates
* Added syncthing
* JSON indentation in emacs
* Fixed bug with myemacs script
2015-12-09 17:07:44 +01:00
J. Fernando Sánchez
cfb2d498fa New version of tmux 2015-11-25 03:24:33 +01:00
J. Fernando Sánchez
ebcaeb805c Fixed zprezto submodule 2015-10-25 01:36:05 +02:00
J. Fernando Sánchez
3f5da0dfe0 Added compose-run 2015-09-22 17:24:14 +02:00
J. Fernando Sánchez
d829dd0959 Added recentf, temp files emacs 2015-09-22 16:44:32 +02:00
J. Fernando Sánchez
c29fdd9625 Updates in i3, added dunst 2015-09-19 18:32:17 +02:00
J. Fernando Sánchez
21debe133a Modified README to include the stow system 2015-09-18 02:22:56 +02:00
J. Fernando Sánchez
fc8c11d360 New config 2015-09-18 02:14:17 +02:00
J. Fernando Sánchez
8e833119db Org-mode tags and others 2015-09-04 11:58:09 +02:00
J. Fernando Sánchez
9a934dc351 pyenv and others 2015-04-13 10:47:46 +02:00
198 changed files with 10007 additions and 1764 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
*

2
.gitignore vendored
View File

@@ -1,2 +0,0 @@
.*
vim/Session.vim

18
.gitmodules vendored
View File

@@ -1,10 +1,16 @@
[submodule "vim/bundle/vundle"] [submodule "vim/.vim/bundle/vundle"]
path = vim/bundle/vundle path = vim/.vim/bundle/vundle
url = https://github.com/gmarik/vundle.git url = https://github.com/gmarik/vundle.git
ignore = dirty ignore = dirty
[submodule "oh-my-zsh"] [submodule "oh-my-zsh"]
path = oh-my-zsh path = zsh/.oh-my-zsh
url = https://github.com/balkian/oh-my-zsh.git url = https://github.com/balkian/oh-my-zsh.git
[submodule "i3-wm-scripts"] [submodule "prezto"]
path = bin/i3-wm-scripts path = zsh/.zprezto
url = https://github.com/yiuin/i3-wm-scripts.git url = https://github.com/sorin-ionescu/prezto.git
[submodule "i3/.config/i3/i3blocks-contrib"]
path = i3/.config/i3/i3blocks-contrib
url = https://github.com/vivien/i3blocks-contrib.git
[submodule "zsh/.zprezto-contrib/fzf-z"]
path = zsh/.zprezto-contrib/fzf-z
url = git@github.com:andrewferrier/fzf-z.git

View File

@@ -1,54 +0,0 @@
FROM ubuntu:14.04
RUN apt-get update -y
RUN apt-get install -y build-essential
RUN apt-get install -y cmake
RUN apt-get install -y curl
RUN apt-get install -y diffstat
RUN apt-get install -y git
RUN apt-get install -y pkg-config
RUN apt-get install -y python
RUN apt-get install -y python-dev
RUN apt-get install -y python3
RUN apt-get install -y tmux
RUN apt-get install -y vim
RUN apt-get install -y zsh
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2
RUN pip install virtualenv
RUN pip install virtualenvwrapper
# Setup home environment
RUN useradd dev
RUN mkdir /home/dev && chown -R dev: /home/dev
ENV PATH /home/dev/bin:$PATH
# Create a shared data volume
# We need to create an empty file, otherwise the volume will
# belong to root.
# This is probably a Docker bug.
RUN mkdir /var/shared/
RUN touch /var/shared/placeholder
RUN chown -R dev:dev /var/shared
RUN mkdir -p /usr/src/app/
RUN touch /usr/src/app/nocode
RUN chown -R dev:dev /usr/src/app
VOLUME /usr/src/app
WORKDIR /home/dev
ENV HOME /home/dev
RUN git clone https://github.com/balkian/dotfiles /home/dev/dotfiles
RUN sh /home/dev/dotfiles/make.sh
# Link in shared parts of the home directory
RUN ln -s /var/shared/.ssh
RUN ln -s /usr/src/app
RUN chsh dev -s /usr/bin/zsh
RUN chown -R dev: /home/dev
RUN chown -R dev: /usr/local/
WORKDIR /home/dev/app
ENTRYPOINT ["zsh"]
USER dev

57
Dockerfile Normal file
View File

@@ -0,0 +1,57 @@
FROM ubuntu:16.04
RUN apt-get update -y && \
apt-get install -y build-essential \
cmake \
curl \
diffstat \
git \
pkg-config \
python \
python-dev \
python \
python3 \
tmux \
stow \
sudo \
vim \
zsh && \
apt clean
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
RUN pip install virtualenv virtualenvwrapper
# Setup home environment
RUN useradd dev
RUN mkdir /home/dev && chown -R dev: /home/dev
ENV PATH /home/dev/bin:$PATH
# Create a shared data volume
# We need to create an empty file, otherwise the volume will
# belong to root.
# This is probably a Docker bug.
RUN mkdir /var/shared/
RUN touch /var/shared/placeholder
RUN chown -R dev:dev /var/shared
RUN mkdir -p /usr/src/app/
RUN touch /usr/src/app/nocode
RUN chown -R dev:dev /usr/src/app
VOLUME /usr/src/app
WORKDIR /home/dev
ENV HOME /home/dev
RUN mkdir /home/dev/dotfiles/
RUN ls /home/dev/dotfiles
COPY . /home/dev/dotfiles
RUN sh /home/dev/dotfiles/make.sh
# Link in shared parts of the home directory
RUN ln -s /var/shared/.ssh && ln -s /usr/src/app
RUN chsh dev -s /usr/bin/zsh
RUN echo "dev ALL = NOPASSWD: ALL" >> /etc/sudoers
USER dev
WORKDIR /home/dev/app
ENTRYPOINT ["zsh"]

15
Makefile Normal file
View File

@@ -0,0 +1,15 @@
########## Variables
# change to the dotfiles directory
stow: submodules
find . -maxdepth 0 -type d | xargs stow -v
submodules:
git submodule update --init --recursive
docker: Dockerfile
git clone . /tmp/dotfiles
docker build -t balkian/devmachine /tmp/dotfiles
.PHONY: stow submodules docker

View File

@@ -11,13 +11,22 @@ The fast way:
```bash ```bash
curl -#L https://github.com/balkian/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md} curl -#L https://github.com/balkian/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md}
``` ```
### Install ### Quick install
Just run: ```
```bash make
```
### Install
Each folder contains the configuration files for a specific program, as they would appear under "$HOME" (~).
To install them, first initialize the submodules:
```
git submodule update --init --recursive git submodule update --init --recursive
source make.sh
``` ```
## How it works Then, you can use the [GNU Stow](https://www.gnu.org/software/stow/) utility to link the files to the appropriate folder:
So far, this is the simplest way of keeping your dotfiles in a repository. The installation script will just back-up your files in a folder in your ~/ with the timestamp, so running it twice won't destroy your original files. ```bash
stow <modules that you want to install>
```
Alternatively, you may simply copy the files to your $HOME folder.

View File

@@ -1,38 +0,0 @@
URxvt*termName:screen-256color
URxvt*loginShell:true
URxvt.iconFile: /usr/share/icons/HighContrast/scalable/apps/utilities-terminal.svg
URxvt.scrollBar: false
URxvt.scrollstyle: rxvt
URxvt*scrollTtyOutput: false
URxvt*scrollWithBuffer: true
URxvt*scrollTtyKeypress: true
URxvt.depth: 32
URxvt.saveLines: 50000
URxvt.font: xft:DejaVu Sans Mono:size=10
Xft.antialias: rgba
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.rgba: rgb
Xft.dpi: 96
URxvt.letterSpace: -2
URxvt.foreground: #FFFFFF
URxvt.background: #111111
URxvt.color0: #2E3436
URxvt.color1: #CC0000
URxvt.color2: #4E9A06
URxvt.color3: #C4A000
URxvt.color4: #3465A4
URxvt.color5: #75507B
URxvt.color6: #06989A
URxvt.color7: #D3D7CF
URxvt.color8: #555753
URxvt.color9: #EF2929
URxvt.color10: #8AE234
URxvt.color11: #FCE94F
URxvt.color12: #729FCF
URxvt.color13: #AD7FA8
URxvt.color14: #34E2E2
URxvt.color15: #EEEEEC

View File

@@ -1,96 +0,0 @@
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
!-------------------------------------------------------------------------------
! URxvt settings
! Colours lifted from Solarized (http://ethanschoonover.com/solarized)
! More info at:
! http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod
!-------------------------------------------------------------------------------
URxvt.depth: 32
URxvt.geometry: 90x30
URxvt.transparent: false
URxvt.fading: 0
! URxvt.urgentOnBell: true
! URxvt.visualBell: true
URxvt.loginShell: true
URxvt.saveLines: 50
URxvt.internalBorder: 3
URxvt.lineSpace: 0
URxvt.letterSpace: -2
! Fonts
URxvt.allow_bold: true
/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */
URxvt*font: xft:DejaVu Sans Mono:pixelsize=14
URxvt*boldFont: xft:DejaVu Sans Mono:pixelsize=14
! Fix font space
URxvt*letterSpace: -1
! Scrollbar
URxvt.scrollStyle: rxvt
URxvt.scrollBar: false
! Perl extensions
URxvt.perl-ext-common: default,matcher
URxvt.matcher.button: 1
URxvt.urlLauncher: google-chrome
! Cursor
URxvt.cursorBlink: true
URxvt.cursorColor: #657b83
URxvt.cursorUnderline: false
! Pointer
URxvt.pointerBlank: true
!!Source http://github.com/altercation/solarized
*background: #002b36
*foreground: #657b83
!!*fading: 40
*fadeColor: #002b36
*cursorColor: #93a1a1
*pointerColorBackground: #586e75
*pointerColorForeground: #93a1a1
!! black dark/light
*color0: #073642
*color8: #002b36
!! red dark/light
*color1: #dc322f
*color9: #cb4b16
!! green dark/light
*color2: #859900
*color10: #586e75
!! yellow dark/light
*color3: #b58900
*color11: #657b83
!! blue dark/light
*color4: #268bd2
*color12: #839496
!! magenta dark/light
*color5: #d33682
*color13: #6c71c4
!! cyan dark/light
*color6: #2aa198
*color14: #93a1a1
!! white dark/light
*color7: #eee8d5
*color15: #fdf6e3

View File

@@ -4,14 +4,14 @@
Xft.dpi: 96 Xft.dpi: 96
Xft.antialias: true Xft.antialias: true
Xft.rgba: rgb Xft.rgba: none
Xft.hinting: true Xft.hinting: true
Xft.hintstyle: hintfull Xft.hintstyle: hintslight
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Emacs settings ! Emacs settings
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
!Emacs.font: DejaVu Sans Mono-10 Emacs.font: DejaVu Sans Mono-10
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! URxvt settings ! URxvt settings
@@ -27,18 +27,18 @@ URxvt.fading: 0
! URxvt.urgentOnBell: true ! URxvt.urgentOnBell: true
! URxvt.visualBell: true ! URxvt.visualBell: true
URxvt.loginShell: true URxvt.loginShell: true
URxvt.saveLines: 50 URxvt.saveLines: 100
URxvt.internalBorder: 3 URxvt.internalBorder: 3
URxvt.lineSpace: 0 URxvt.lineSpace: 0
! Fonts ! Fonts
URxvt.allow_bold: true URxvt.allow_bold: true
/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */ /* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */
URxvt*font: xft:DejaVu\ Sans\ Mono:pixelsize=14 URxvt*font: xft:DejaVu\ Sans\ Mono:pixelsize=13
URxvt*boldFont: xft:DejaVu\ Sans\ Mono:pixelsize=14:style=bold URxvt*boldFont: xft:DejaVu\ Sans\ Mono:pixelsize=13:style=bold
! Fix font space ! Fix font space
URxvt*letterSpace: -2 URxvt*letterSpace: -1
! Scrollbar ! Scrollbar
URxvt.scrollStyle: rxvt URxvt.scrollStyle: rxvt
@@ -295,4 +295,14 @@ URxvt.pointerBlank: true
*color13: #bb88dd *color13: #bb88dd
*color14: #4eb4fa *color14: #4eb4fa
*color15: #d0d0d0 *color15: #d0d0d0
!
! ------------------------------------------------------------------------------
! ROFI Color theme
! ------------------------------------------------------------------------------
rofi.color-enabled: true
rofi.terminal: i3-sensible-terminal
rofi.color-window: #273238, #273238, #1e2529
rofi.color-normal: #273238, #c1c1c1, #273238, #394249, #ffffff
rofi.color-active: #273238, #80cbc4, #273238, #394249, #80cbc4
rofi.color-urgent: #273238, #ff1844, #273238, #394249, #ff1844
rofi.ssh-command: {terminal} -e "{ssh-client} {host}"

View File

@@ -24,3 +24,9 @@ fi
if [ -f $HOME/.Xmodmap ]; then if [ -f $HOME/.Xmodmap ]; then
/usr/bin/xmodmap $HOME/.Xmodmap 2>/dev/null & /usr/bin/xmodmap $HOME/.Xmodmap 2>/dev/null &
fi fi
#https://superuser.com/questions/114895/improve-man-page-search/114903#114903
# saner defaults for LESS (and bat)
export LESS="-iMRj4a"
. "$HOME/.cargo/env"

9
Xsession/.xprofile Executable file
View File

@@ -0,0 +1,9 @@
# echo "pasado(xprofile)" $(date) >> /tmp/LOG
setxkbmap "us,es" "altgr-intl," -option "ctrl:nocaps,grp:shift_toggle,terminate:ctrl_alt_bksp"
#xmodmap ~/.Xmodmap
#source ~/.xinitrc
export XTERMINAL=alacritty
export TERMINAL=alacritty
export TERMCMD=alacritty
export BROWSER2=chromium
export BROWSER=firefox

View File

@@ -0,0 +1,83 @@
[window]
[window.padding]
x = 15
y = 15
[font]
[font.normal]
family = "IosevkaTerm"
style = "Regular"
[shell]
program = "tmux"
[[key_bindings]]
key = "Return"
mods = "Control|Shift"
action = "SpawnNewInstance"
[[key_bindings]]
key = "V"
mods = "Control|Shift"
action = "Paste"
[[key_bindings]]
key = "C"
mods = "Control|Shift"
action = "Copy"
[[key_bindings]]
key = "Insert"
mods = "Shift"
action = "PasteSelection"
[[key_bindings]]
key = "Key0"
mods = "Control"
action = "ResetFontSize"
[[key_bindings]]
key = "Equals"
mods = "Control"
action = "IncreaseFontSize"
[[key_bindings]]
key = "Plus"
mods = "Control"
action = "IncreaseFontSize"
[[key_bindings]]
key = "Minus"
mods = "Control"
action = "DecreaseFontSize"
[[key_bindings]]
key = "Minus"
mods = "Control"
action = "DecreaseFontSize"
[colors]
[colors.primary]
background = "0x1d1f21"
foreground = "0xc5c8c6"
[colors.cursor]
text = "0x1d1f21"
cursor = "0xc5c8c6"
[colors.normal]
black = "0x1d1f21"
red = "0xcc6666"
green = "0xb5bd68"
yellow = "0xf0c674"
blue = "0x81a2be"
magenta = "0xb294bb"
cyan = "0x8abeb7"
white = "0xc5c8c6"
[colors.bright]
black = "0x969896"
red = "0xde935f"
green = "0x282a2e"
yellow = "0x373b41"
blue = "0xb4b7b4"
magenta = "0xe0e0e0"
cyan = "0xa3685a"
white = "0xffffff"

View File

@@ -0,0 +1,635 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
#TERM: alacritty
window:
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
#dimensions:
# columns: 0
# lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 15
y: 15
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background, but no title bar buttons
#decorations: full
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
#startup_mode: Windowed
# Window title
#title: Alacritty
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# GTK theme variant (Linux/BSD only)
#
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
# Set this to `None` to use the default theme variant.
#gtk_theme_variant: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Number of lines the viewport will move for every line scrolled when
# scrollback is enabled (history > 0).
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
# family: Hack Nerd Font
# family: DejaVuSansM Nerd Font
# family: FiraCode Nerd Font
# family: IosevkaTerm Nerd Font
family: CaskaydiaCove NFM
# The `style` can be specified to pick a specific face.
style: Regular
# Bold font face
#bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold
# Italic font face
#italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Italic
# Bold italic font face
#bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold Italic
# Point size
#size: 11.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the right,
# increasing `y` moves the glyph upwards.
#glyph_offset:
# x: 0
# y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`
#
# macOS >= 10.14.x:
#
# If the font quality on non-retina display looks bad then set
# `use_thin_strokes` to `true` and enable font smoothing by running the
# following command:
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
#
# This is a global setting and will require a log out or restart to take
# effect.
#use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Tomorrow Night Bright)
#colors:
# Default colors
#primary:
# background: '#000000'
# foreground: '#eaeaea'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not present.
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
# is `false`, the normal foreground color will be used.
#dim_foreground: '#9a9a9a'
#bright_foreground: '#ffffff'
# Cursor colors
#
# Colors which should be used to draw the terminal cursor. If these are unset,
# the cursor color will be the inverse of the cell color.
#cursor:
# text: '#000000'
# cursor: '#ffffff'
# Selection colors
#
# Colors which should be used to draw the selection area. If selection
# background is unset, selection color will be the inverse of the cell colors.
# If only text is unset the cell text color will remain the same.
#selection:
# text: '#eaeaea'
# background: '#404040'
# Normal colors
#normal:
# black: '#000000'
# red: '#d54e53'
# green: '#b9ca4a'
# yellow: '#e6c547'
# blue: '#7aa6da'
# magenta: '#c397d8'
# cyan: '#70c0ba'
# white: '#eaeaea'
# Bright colors
#bright:
# black: '#666666'
# red: '#ff3334'
# green: '#9ec400'
# yellow: '#e7c547'
# blue: '#7aa6da'
# magenta: '#b77ee0'
# cyan: '#54ced6'
# white: '#ffffff'
# Dim colors
#
# If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors.
#dim:
# black: '#000000'
# red: '#8c3336'
# green: '#7a8530'
# yellow: '#97822e'
# blue: '#506d8f'
# magenta: '#80638e'
# cyan: '#497e7a'
# white: '#9a9a9a'
# Indexed Colors
#
# The indexed colors include all colors from 16 to 256.
# When these are not set, they're filled with sensible defaults.
#
# Example:
# `- { index: 16, color: '#ff00ff' }`
#
#indexed_colors: []
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#
# Specifying a `duration` of `0` will disable the visual bell.
#visual_bell:
# animation: EaseOutExpo
# duration: 0
# color: '#ffffff'
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
#background_opacity: 1.0
#selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
# Allow terminal applications to change Alacritty's window title.
#dynamic_title: true
#cursor:
# Cursor style
#
# Values for `style`:
# - ▇ Block
# - _ Underline
# - | Beam
#style: Block
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
#
# Default:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
shell:
program: tmux
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# WinPTY backend (Windows only)
#
# Alacritty defaults to using the newer ConPTY backend if it is available,
# since it resolves a lot of bugs and is quite a bit faster. If it is not
# available, the the WinPTY backend will be used instead.
#
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
# even if the ConPTY backend is available.
#winpty_backend: false
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
#url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
#
# When set to `None`, URL launching will be disabled completely.
#
# Default:
# - (macOS) open
# - (Linux/BSD) xdg-open
# - (Windows) explorer
#launcher:
# program: xdg-open
# args: []
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: None
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
# `Shift` modifier is automatically added as a requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings)
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Middle, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - Copy
# - Paste
# - PasteSelection
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Minimize
# - Quit
# - ToggleFullscreen
# - SpawnNewInstance
# - ClearLogNotice
# - ReceiveChar
# - None
#
# (macOS only):
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Alt
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# at once.
key_bindings:
# (Windows, Linux, and BSD only)
- { key: Return, mods: Control|Shift, action: SpawnNewInstance }
- { key: V, mods: Control|Shift, action: Paste }
- { key: C, mods: Control|Shift, action: Copy }
- { key: Insert, mods: Shift, action: PasteSelection }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Plus, mods: Control, action: IncreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Add, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: K, mods: Command, action: ClearHistory }
#- { key: K, mods: Command, chars: "\x0c" }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: H, mods: Command, action: Hide }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, chars: "\x0c" }
#- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
#- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
#- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt }
#- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - None
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false
# Base16-tomorrow-night
colors:
# Default colors
primary:
background: '0x1d1f21'
foreground: '0xc5c8c6'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x1d1f21'
cursor: '0xc5c8c6'
# Normal colors
normal:
black: '0x1d1f21'
red: '0xcc6666'
green: '0xb5bd68'
yellow: '0xf0c674'
blue: '0x81a2be'
magenta: '0xb294bb'
cyan: '0x8abeb7'
white: '0xc5c8c6'
# Bright colors
bright:
black: '0x969896'
red: '0xde935f'
green: '0x282a2e'
yellow: '0x373b41'
blue: '0xb4b7b4'
magenta: '0xe0e0e0'
cyan: '0xa3685a'
white: '0xffffff'
#draw_bold_text_with_bright_colors: true
## base16-Atelier-dune
#colors:
# # Default colors
# primary:
# background: '0x20201d'
# foreground: '0xa6a28c'
# # Colors the cursor will use if `custom_cursor_colors` is true
# cursor:
# text: '0x20201d'
# cursor: '0xa6a28c'
# # Normal colors
# normal:
# black: '0x20201d'
# red: '0xd73737'
# green: '0x60ac39'
# yellow: '0xae9513'
# blue: '0x6684e1'
# magenta: '0xb854d4'
# cyan: '0x1fad83'
# white: '0xa6a28c'
# # Bright colors
# bright:
# black: '0x7d7a68'
# red: '0xb65611'
# green: '0x292824'
# yellow: '0x6e6b5e'
# blue: '0x999580'
# magenta: '0xe8e4cf'
# cyan: '0xd43552'
# white: '0xfefbec'
#draw_bold_text_with_bright_colors: false

View File

@@ -4,4 +4,4 @@ fi
### Added by the Heroku Toolbelt ### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH" export PATH="/usr/local/heroku/bin:$HOME/.local/bin:$HOME/.bin$PATH"

View File

@@ -1,125 +0,0 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
xterm) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
export PROMPT_COMMAND='PS1="\\[\033[1;\`if [[ \$? = "0" ]]; then echo "32m\\]"; else echo "31m\\]"; fi\`[\!]\\[\033[0m\]\u@\h \W: "'
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alhF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
export CDPATH=~:/media/Datos:/home/balkian
if [ "$TERM" = "linux" ]; then
alias logout="clear && logout && exit"
else
alias logout="exit 0"
fi
export PYTHONSTARTUP=/home/$USER/.pythonrc
export PATH=$PATH:/var/lib/gems/1.8/bin
setWindowTitle() {
echo -ne "\e]2;$*\a"
}
updateWindowTitle() {
setWindowTitle "${HOSTNAME%%.*}:${PWD/$HOME/~}"
}
PROMPT_COMMAND=$PROMPT_COMMAND updateWindowTitle
function findHere() { ex=$1; shift; grep -R $* $ex .;}

View File

@@ -1,2 +0,0 @@
#!/bin/bash
one-window 'gnome-terminal' 'xdotool windowfocus $WID & xdotool key ctrl+shift+t'

View File

@@ -1,23 +0,0 @@
#!/bin/sh
case $1 in
"single")
#xrandr --auto --output eDP1 --primary --output DP1 --off
~/.screenlayout/gsi-single.sh
xrandr --output HDMI1 --off --output DVI-1 --off --output DP1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;;
"dual")
case $2 in
"home")
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;;
*)
#xrandr --auto --output eDP1 --primary --right-of DP1
xrandr --output VIRTUAL1 --off --output DP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 1920x0 --rotate normal --output VGA1 --off
xrandr --output "DVI-1-0" --off
;;
esac
;;
esac
if [ `command -v nitrogen` ]; then
nitrogen --restore
fi

View File

@@ -1,2 +0,0 @@
#!/bin/bash
one-window "terminator" "xdotool windowfocus \$WID & xdotool key ctrl+shift+t;" "/usr/bin/terminator $*"

View File

@@ -1,2 +0,0 @@
#!/bin/sh
~/Programs/Zotero_linux-x86_64/run-zotero.sh

20
bspwm/.config/bspwm/bspwmrc Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
sxhkd &
compton --config ~/.compton.conf &
bspc config border_width 2
bspc config window_gap 12
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_by_distance true
bspc config focus_follows_pointer true
bspc monitor -d I II III IV V VI VII VIII IX X
bspc rule -a Gimp desktop=^8 state=floating follow=on
bspc rule -a Firefox desktop=^2
bspc rule -a mplayer2 state=floating
bspc rule -a Screenkey manage=off

120
dunst/.config/dunst/dunstrc Normal file
View File

@@ -0,0 +1,120 @@
[global]
font = "DejaVu Sans 10"
allow_markup = yes
format = "<b>%s %p</b>\n%b"
sort = yes
indicate_hidden = true
idle_threshold = 0
geometry = "300x40-20+20"
alignment = center
show_age_threshold = 60
sticky_history = yes
follow = mouse
icon_position = left
word_wrap = yes
separator_height = 2
padding = 15
horizontal_padding = 10
separator_color = frame
startup_notification = true
dmenu = "/usr/bin/dmenu -p dunst: -nb #FFFFFF -nf #000000 -sb #94DBFF -sf #000000"
browser = firefox
[frame]
width = 0
color = "#565656"
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
#history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#232323"
foreground = "#FEFEFE"
timeout = 30
[urgency_normal]
background = "#94DBFF"
foreground = "#000000"
timeout = 45
[urgency_critical]
background = "#ff9999"
foreground = "#000000"
timeout = 0
[libpurple_signed]
appname = libpurple
summary = *igned*
urgency = low
timeout = 3
background = "#ccff33"
[libpurple_came_back]
appname = libpurple
summary = "*came*"
format = ""
[libpurple_went_away]
appname = libpurple
summary = "*went*"
format = ""
[libpurple_says]
appname = libpurple
summary = *ays*
urgency = critical
background = "#ccff33"
[libpurple]
appname = libpurple
urgency = critical
background = "#ccff33"
[twitter]
appname = Pidgin
summary = *twitter.com*
urgency = low
[turpial]
appname = Turpial
urgency = low
[ttytter]
summary = "TTYtter*"
urgency = low
[dunst-sum]
appname = gmailnotify.py
summary = "*[dD]unst*"
urgency = critical
[dunst-body]
appname = gmailnotify.py
body = "*[dD]unst*"
urgency = critical
[mcabber]
appname = notify-send
summary = "*jabber*"
urgency = critical
[irc]
appname = weechat
timeout = 0
background = "#99FF33"
foreground = "#000000"
[XChat]
appname = XChat
timeout = 0
background = "#99FF33"
foreground = "#000000"
[test]
summary = "*test*"
background="#22dd22"

4
emacs.d/.gitignore vendored
View File

@@ -1,4 +0,0 @@
*
!init.el
!config/
!config/config-*.el

View File

@@ -1,25 +0,0 @@
(defun ergoemacs-open-in-external-app ()
"Open the current file or dired marked files in external app."
(interactive)
(let ( doIt
(myFileList
(cond
((string-equal major-mode "dired-mode") (dired-get-marked-files))
(t (list (buffer-file-name))) ) ) )
(setq doIt (if (<= (length myFileList) 5)
t
(y-or-n-p "Open more than 5 files?") ) )
(when doIt
(cond
((string-equal system-type "windows-nt")
(mapc (lambda (fPath) (w32-shell-execute "open" (replace-regexp-in-string "/" "\\" fPath t t)) ) myFileList)
)
((string-equal system-type "darwin")
(mapc (lambda (fPath) (shell-command (format "open \"%s\"" fPath)) ) myFileList) )
((string-equal system-type "gnu/linux")
(mapc (lambda (fPath) (let ((process-connection-type nil)) (start-process "" nil "xdg-open" fPath)) ) myFileList) ) ) ) ) )
(define-key dired-mode-map (kbd "e") 'ergoemacs-open-in-external-app)
(provide 'config-dired)

View File

@@ -1,55 +0,0 @@
(evil-define-key 'normal ein:notebooklist-mode-map
"r" 'ein:notebooklist-reload
"q" 'bury-buffer)
(evil-define-key 'normal ein:notebook-mode-map
",w" 'ein:notebook-save-notebook-command
",cc" 'ein:worksheet-execute-cell
",e" 'ein:worksheet-clear-output
",v" 'ein:worksheet-set-output-visibility-all
",l" 'ein:worksheet-clear-output
",L" 'ein:worksheet-clear-all-output
",d" 'ein:worksheet-kill-cell
",y" 'ein:worksheet-copy-cell
",p" 'ein:worksheet-yank-cell
",O" 'ein:worksheet-insert-cell-above
",o" 'ein:worksheet-insert-cell-below
"]e" 'ein:notebook-worksheet-move-next
"[e" 'ein:notebook-worksheet-move-rev
",t" 'ein:worksheet-toggle-cell-type
",u" 'ein:worksheet-change-cell-type
",s" 'ein:worksheet-split-cell-at-point
",m" 'ein:worksheet-merge-cell
"\C-n" 'ein:worksheet-goto-next-input
"\C-p" 'ein:worksheet-goto-prev-input
(kbd "<C-return>") 'ein:worksheet-execute-cell)
(evil-define-key 'insert ein:notebook-mode-map
(kbd "<C-return>") 'ein:worksheet-execute-cell)
(defun ipybackground ()
(interactive)
;(setq prevfg (face-attribute 'default :foreground))
(face-remap-add-relative 'ein:cell-input-area :background (face-attribute 'default :background))
;(face-remap-add-relative 'default :background "#ffffff")
(setq buffer-face-mode-face '(:background "#343434"))
(buffer-face-mode))
(add-hook
'ein:notebook-mode-hook 'ipybackground)
;; (add-hook
;; 'ein:notebook-mode-hook '(linum-mode 0))
(setq ein:notebook-modes '(ein:notebook-mumamo-mode ein:notebook-plain-mode))
(setq mumamo-background-colors nil)
(when (and (>= emacs-major-version 24)
(>= emacs-minor-version 2))
(eval-after-load "mumamo"
'(setq mumamo-per-buffer-local-vars
(delq 'buffer-file-name mumamo-per-buffer-local-vars))))
(provide 'config-ein)

View File

@@ -1,67 +0,0 @@
;;; config-evil.el --- Configuration for evil and its keybindings
;;; Commentary:
;;; Code:
(evil-mode)
(require 'evil-leader)
(require 'evil-matchit)
(require 'evil-nerd-commenter)
(require 'evil-surround)
;; Evil global modes config
(evilnc-default-hotkeys)
(setq evil-default-cursor t)
;; Evil global modes
(global-evil-matchit-mode 1)
(global-evil-surround-mode 1)
(global-evil-jumper-mode)
(global-evil-leader-mode)
;; exclude modes from evil mode
(add-to-list 'evil-emacs-state-modes 'git-rebase-mode)
(add-to-list 'evil-emacs-state-modes 'undo-tree-visualizer-mode)
(add-to-list 'evil-emacs-state-modes 'dired-mode)
(defun next-code-buffer ()
;;; Avoid special buffers when cycling through windows
;;; http://stackoverflow.com/questions/14323516/make-emacs-next-buffer-skip-messages-buffer
(interactive)
(let (( bread-crumb (buffer-name) ))
(next-buffer)
(while
(and
(string-match-p "^\*" (buffer-name))
(not ( equal bread-crumb (buffer-name) )) )
(next-buffer))))
(defun previous-code-buffer ()
(interactive)
(let (( bread-crumb (buffer-name) ))
(previous-buffer)
(while
(and
(string-match-p "^\*" (buffer-name))
(not ( equal bread-crumb (buffer-name) )) )
(previous-buffer))))
;;
;; Evil keys
(evil-leader/set-leader "<SPC>")
(define-key evil-normal-state-map (kbd "[b") 'previous-code-buffer)
(define-key evil-normal-state-map (kbd "]b") 'next-code-buffer)
(define-key evil-normal-state-map (kbd "s") 'evil-ace-jump-char-mode)
(define-key evil-normal-state-map (kbd ",d") 'neotree-toggle)
(define-key evil-normal-state-map (kbd ",u") 'undo-tree-visualize)
(define-key evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)
(define-key evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)
(add-hook 'neotree-mode-hook
(lambda ()
(define-key evil-normal-state-local-map (kbd "TAB") 'neotree-enter)
(define-key evil-normal-state-local-map (kbd "SPC") 'neotree-enter)
(define-key evil-normal-state-local-map (kbd "q") 'neotree-hide)
(define-key evil-normal-state-local-map (kbd "RET") 'neotree-enter)))
(provide 'config-evil)
;;; config-evil.el ends here

View File

@@ -1,80 +0,0 @@
;;; config-file -- Helm configuration
;;; Commentary:
;;; The slowest part is actually loading helm-projectile
;;; Code:
(require 'helm)
(require 'helm-config)
(require 'helm-grep)
(require 'helm-locate)
(require 'helm-misc)
(require 'projectile)
(require 'helm-projectile)
(setq helm-quick-update t)
(setq helm-bookmark-show-location t)
(setq helm-buffers-fuzzy-matching t)
;;; Save current position to mark ring
(add-hook 'helm-goto-line-before-hook 'helm-save-current-pos-to-mark-ring)
;; Better helm fonts
(set-face-attribute 'helm-selection nil :background "gold" :foreground "black")
;;; Keyboard mappings
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z
(define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward)
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
(global-set-key (kbd "C-x b") 'helm-mini)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(global-set-key (kbd "C-h SPC") 'helm-all-mark-rings)
(global-set-key (kbd "C-c h o") 'helm-occur)
(define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward)
;;; Evil helm
(define-key evil-normal-state-map (kbd "C-p") 'helm-mini)
(evil-leader/set-key "<SPC>" 'helm-M-x)
(define-key evil-normal-state-map (kbd ",f") 'helm-swoop)
(define-key evil-normal-state-map (kbd ",a") 'helm-ag)
(define-key evil-normal-state-map (kbd ",y") 'helm-show-kill-ring)
;;; Keyboard
(global-set-key (kbd "M-x") 'helm-M-x)
(define-key helm-map (kbd "C-w") 'backward-kill-word)
;; use helm to list eshell history
(add-hook 'eshell-mode-hook
#'(lambda ()
(define-key eshell-mode-map (kbd "M-l") 'helm-eshell-history)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGE: helm-swoop ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Locate the helm-swoop folder to your path
(require 'helm-swoop)
;; Change the keybinds to whatever you like :)
(global-set-key (kbd "C-c h o") 'helm-swoop)
(global-set-key (kbd "C-c s") 'helm-multi-swoop-all)
;; When doing isearch, hand the word over to helm-swoop
(define-key isearch-mode-map (kbd "M-i") 'helm-swoop-from-isearch)
;; From helm-swoop to helm-multi-swoop-all
(define-key helm-swoop-map (kbd "M-i") 'helm-multi-swoop-all-from-helm-swoop)
;; Save buffer when helm-multi-swoop-edit complete
(setq helm-multi-swoop-edit-save t)
;; If this value is t, split window inside the current window
(setq helm-swoop-split-with-multiple-windows t)
;; Split direcion. 'split-window-vertically or 'split-window-horizontally
(setq helm-swoop-split-direction 'split-window-vertically)
;; If nil, you can slightly boost invoke speed in exchange for text color
(setq helm-swoop-speed-or-color t)
(helm-mode 1)
(provide 'config-helm)
;;; config-helm.el ends here

View File

@@ -1,38 +0,0 @@
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(setq TeX-view-program-list '(
;; ("Evince" "evince --page-index=%(outpage) %o"),
("Okular" "okular --noraise --unique %o#src:%n%a")
))
;; (setq TeX-view-program-selection '((output-pdf "Evince")))
(setq TeX-view-program-selection '((output-pdf "Okular")))
(setq LaTeX-command "latex -synctex=1")
(setq TeX-source-correlate-method 'synctex)
;(setq TeX-one-master "<none>") ;; If you don't want emacs to write the variables to the file
(setq-default TeX-master nil) ;
;; Avoid questions :)
(defun build-view ()
(interactive)
(let ((TeX-save-query nil))
(TeX-save-document (TeX-master-file)))
(setq build-proc (TeX-command "LaTeX" 'TeX-master-file -1))
(set-process-sentinel build-proc 'build-sentinel)
)
(defun build-sentinel (process event)
(if (string= event "finished\n")
(TeX-view)
(message "Errors! Check with C-`")))
(add-hook 'LaTeX-mode-hook '(lambda () (local-set-key (kbd "\C-c\C-c") 'build-view)))
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
(add-hook 'LaTeX-mode-hook 'reftex-mode)
(provide 'config-latex)

View File

@@ -1,20 +0,0 @@
(require 'org)
(require 'evil-org)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(evil-leader/set-key "a" 'org-agenda)
(setq org-log-done t)
(setq org-directory "~/Dropbox/org")
(setq org-mobile-inbox-for-pull "~/Dropbox/org/inbox.org")
(setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
(setq org-mobile-files '("~/Dropbox/org"))
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq org-agenda-files (list org-directory))
(define-key global-map "\C-cc" 'org-capture)
(setq org-clock-persist 'history)
(provide 'config-org)

View File

@@ -1,24 +0,0 @@
(require 'python)
(setq
python-shell-interpreter "ipython"
python-shell-interpreter-args "--pylab"
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion"
python-shell-completion-module-string-code
"';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
(add-hook 'python-mode-hook 'auto-complete-mode)
(add-hook 'python-mode-hook '(lambda () (require 'nose)))
(add-hook 'python-mode-hook 'jedi:setup)
(eval-after-load "python"
'(progn
(define-key python-mode-map (kbd "C-c C-d") 'helm-pydoc)))
(setq jedi:complete-on-dot t)
(provide 'config-python)

View File

@@ -1,331 +0,0 @@
;;; BalkEmacs --- My emacs configuration
;;; Commentary:
;;; Config that needs to be loaded before require
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes (quote ("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "31a01668c84d03862a970c471edbd377b2430868eccf5e8a9aec6831f1a0908d" "1297a022df4228b81bc0436230f211bad168a117282c20ddcba2db8c6a200743" "c3c0a3702e1d6c0373a0f6a557788dfd49ec9e66e753fb24493579859c8e95ab" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(setq evil-want-C-u-scroll t)
;;; Code:
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(setq package-enable-at-startup nil)
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(goto-char (point-max))
(eval-print-last-sexp)))
(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")
(setq el-get-sources
'((:name molokai-theme
:type github
:pkgname "hbin/molokai-theme"
:load "molokai-theme.el")))
(setq
my:el-get-packages
'(el-get ; el-get is self-hosting
ace-jump-mode
auctex
auctex-latexmk
auto-complete ; complete as you type with overlays
ein
emmet-mode
; escreen ; screen for emacs, C-\ C-h
evil
evil-jumper
evil-leader
evil-matchit
evil-nerd-commenter
evil-numbers
evil-org-mode
evil-surround
exec-path-from-shell
fill-column-indicator
flycheck
gist
git-gutter-fringe
guide-key
helm
helm-ag
helm-projectile
helm-pydoc
helm-swoop
jedi
magit
markdown-mode
neotree
nxhtml
nose
pivotal-tracker
popwin
pretty-mode
projectile
;; smex
smart-mode-line
switch-window ; takes over C-x o
undo-tree
vimrc-mode
volatile-highlights
yaml-mode
yasnippet
zygospore
; zencoding-mode ; http://www.emacswiki.org/emacs/ZenCoding
;; color-theme-solarized
;; color-theme-tango)) ; check out color-theme-olarized
;; install new packages and init already installed packages
))
(setq my:el-get-packages
(append my:el-get-packages
(mapcar #'el-get-source-name el-get-sources)))
(require 'el-get-elpa)
(unless (file-directory-p el-get-recipe-path-elpa)
(el-get-elpa-build-local-recipes))
(el-get 'sync my:el-get-packages)
;;(color-theme-solarized-dark)
;(load-theme 'soothe t)
;;(require 'monokai-theme)
(load-theme 'molokai t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
;;(setq completion-cycle-threshold t)
;;; Neotree
(require 'neotree)
(setq projectile-switch-project-action 'neotree-projectile-action)
(when neo-persist-show
(add-hook 'popwin:before-popup-hook
(lambda () (setq neo-persist-show nil)))
(add-hook 'popwin:after-popup-hook
(lambda () (setq neo-persist-show t))))
;;; Popwin
(require 'popwin)
(popwin-mode)
;;; Linum
(require 'linum)
(add-hook 'prog-mode-hook 'linum-mode)
(setq linum-format 'dynamic)
(set-face-attribute 'linum nil :height 90)
(setq highlight-color "#232323")
;;; Show column number
(column-number-mode)
;;; Highlight line
(global-hl-line-mode)
(set-face-background 'hl-line highlight-color)
;;; Flycheck
(add-hook 'after-init-hook #'global-flycheck-mode)
(setq flycheck-temp-prefix ".flycheck")
;; (global-linum-mode 1)
;; (setq linum-mode-inhibit-modes-list '(eshell-mode
;; helm-buffer
;; shell-mode
;; ein:notebook-bg-mode
;; ein:bg/ein:notebook
;; ein:bg
;; ein:notebook
;; ))
;; (defadvice linum-on (around linum-on-inhibit-for-modes)
;; "Stop the load of linum-mode for some major modes."
;; (unless (member major-mode linum-mode-inhibit-modes-list)
;; ad-do-it))
;; (ad-activate 'linum-on)
(add-hook 'prog-mode-hook 'fci-mode)
;; (require 'powerline)
;; (powerline-center-evil-theme)
(sml/setup)
(sml/apply-theme 'dark)
(display-time-mode t)
;;; Global emacs settings
;; disable splash screen
(setq inhibit-splash-screen t)
(setq truncate-partial-width-windows nil)
(set-default 'truncate-lines nil)
;; No tabs, only 4 spaces, as default
(setq-default indent-tabs-mode nil)
(setq tab-width 4)
(setq default-tab-width 4);
;; Show info about available commands
(setq guide-key/guide-key-sequence '("SPC" ","))
;; Separate Configs
(add-to-list 'load-path (concat user-emacs-directory "config"))
(require 'config-latex)
(require 'config-python)
(eval-after-load 'ein-notebooklist
'(require 'config-ein))
(require 'config-helm)
(require 'config-evil)
(require 'config-org)
(require 'config-secret)
(require 'config-dired)
;;; Global modes
(tool-bar-mode 0)
(savehist-mode 1)
(show-paren-mode t)
(yas-global-mode 1)
(guide-key-mode 1)
;;; Specific modes
;; (autoload 'markdown-mode "markdown-mode"
;; "Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
;;
;; Global Keybindings
;;
(global-set-key "\C-w" 'backward-kill-word)
(global-set-key "\C-x\C-k" 'kill-region)
(global-set-key [escape] 'keyboard-escape-quit)
(define-key helm-map (kbd "C-w") 'backward-kill-word)
(global-set-key (kbd "C-x 1") 'zygospore-toggle-delete-other-windows)
;; Don't clover my folders
(setq
backup-by-copying t ; don't clobber symlinks
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" , temporary-file-directory t)))
;; Preven #file#.txt files
(setq create-lockfiles nil)
(setq inhibit-startup-message t)
(toggle-indicate-empty-lines)
;;; Columns
(require 'fill-column-indicator)
(setq fci-rule-column 79)
(setq fci-rule-color highlight-color)
(setq fci-rule-width 3)
(fringe-mode '(5 . 5))
(eval-after-load 'magit
'(progn
(set-face-foreground 'magit-diff-add "green3")
(set-face-foreground 'magit-diff-del "red3")
(set-face-background 'magit-item-highlight "black")))
;; Fix Scrolling in tmux
;; Set the default font too
(defun client-config (&optional frame)
"Establish settings for the current terminal."
(if (not frame) ;; The initial call.
(xterm-mouse-mode 1)
;; Otherwise called via after-make-frame-functions.
(if xterm-mouse-mode
;; Re-initialise the mode in case of a new terminal.
(xterm-mouse-mode 1))))
;; Evaluate both now (for non-daemon emacs) and upon frame creation
;; (for new terminals via emacsclient).
(client-config)
(add-hook 'after-make-frame-functions 'client-config)
(defun toggle-current-window-dedication ()
(interactive)
(let* ((window (selected-window))
(dedicated (window-dedicated-p window)))
(set-window-dedicated-p window (not dedicated))
(message "Window %sdedicated to %s"
(if dedicated "no longer " "")
(buffer-name))))
(global-set-key [insert] 'toggle-current-window-dedication)
;; Disable copying to the clipboard
;; (setq x-select-enable-clipboard nil)
;; (setq x-select-enable-primary t)
;;; Show human sizes in dired
(setq-default dired-listing-switches "-alhv")
(defalias 'yes-or-no-p 'y-or-n-p)
;;; Winner
;;; History of visited windows
;;; C-<left>, C-<right>
(when (fboundp 'winner-mode)
(winner-mode 1))
(exec-path-from-shell-initialize)
(require 'git-gutter-fringe)
(setq git-gutter-fr:side 'right-fringe)
;; set a default font
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10"))
;; emacs doesn't actually save undo history with revert-buffer
;; see http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-04/msg00151.html
;; fix that.
(defun revert-buffer-keep-history (&optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)
(interactive)
(setq tmp (point))
;; tell Emacs the modtime is fine, so we can edit the buffer
(clear-visited-file-modtime)
;; insert the current contents of the file on disk
(widen)
(delete-region (point-min) (point-max))
(insert-file-contents (buffer-file-name))
;; mark the buffer as not modified
(not-modified)
(set-visited-file-modtime)
(goto-char tmp)
)
(setq revert-buffer-function 'revert-buffer-keep-history)
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-saved-items 300)
(setq recentf-max-menu-items 20)
(provide '.emacs)

3
emacs/.emacs.d/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*
!init.el
!custom.el

23
emacs/.emacs.d/custom.el Normal file
View File

@@ -0,0 +1,23 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-names-vector
["#101010" "#7c7c7c" "#8e8e8e" "#a0a0a0" "#686868" "#747474" "#686868" "#b9b9b9"])
'(ansi-term-color-vector
[unspecified "#101010" "#7c7c7c" "#8e8e8e" "#a0a0a0" "#686868" "#747474" "#686868" "#b9b9b9"])
'(custom-safe-themes
(quote
("aea30125ef2e48831f46695418677b9d676c3babf43959c8e978c0ad672a7329" "cea3ec09c821b7eaf235882e6555c3ffa2fd23de92459751e18f26ad035d2142" "3380a2766cf0590d50d6366c5a91e976bdc3c413df963a0ab9952314b4577299" "100eeb65d336e3d8f419c0f09170f9fd30f688849c5e60a801a1e6addd8216cb" "3f67aee8f8d8eedad7f547a346803be4cc47c420602e19d88bdcccc66dba033b" "c968804189e0fc963c641f5c9ad64bca431d41af2fb7e1d01a2a6666376f819c" "50d07ab55e2b5322b2a8b13bc15ddf76d7f5985268833762c500a90e2a09e7aa" "4feee83c4fbbe8b827650d0f9af4ba7da903a5d117d849a3ccee88262805f40d" "fee4e306d9070a55dce4d8e9d92d28bd9efe92625d2ba9d4d654fc9cd8113b7f" "6daa09c8c2c68de3ff1b83694115231faa7e650fdbb668bc76275f0f2ce2a437" "1263771faf6967879c3ab8b577c6c31020222ac6d3bac31f331a74275385a452" "ec13410d459f1b67158c500d13d290560fc4dad2edaaa22e33a4d1df08e8f887" "34ed3e2fa4a1cb2ce7400c7f1a6c8f12931d8021435bad841fdc1192bd1cc7da" "8cf1002c7f805360115700144c0031b9cfa4d03edc6a0f38718cef7b7cabe382" "12670281275ea7c1b42d0a548a584e23b9c4e1d2dabb747fd5e2d692bcd0d39b" "21e380db38e92e8c0e56e0a2446f7ac8f6851061b57ffbcadb284ffe4c102478" "91fba9a99f7b64390e1f56319c3dbbaed22de1b9676b3c73d935bf62277b799c" "b1bcb837df0455af8e91114b7a3bddfa084cde32ceb16b1b468d5e5e8605a835" "e24679edfdea016519c0e2d4a5e57157a11f928b7ef4361d00c23a7fe54b8e01" "9f6750057fefba39c184783c7b80ddd9c63bc6e8064846b423b4362c9e930404" "d43120398682953ef18fd7e11e69c94e44d39bb2ab450c4e64815311542acbff" "b4ec581daad15aa7020b722523dc6bcea850bfbdbe31bfeb11c45ea51899bd75" "3a3917dbcc6571ef3942c2bf4c4240f70b5c4bc0b28192be6d3f9acd83607a24" "b6db49cec08652adf1ff2341ce32c7303be313b0de38c621676122f255ee46db" "b6d649c9f972b491686e7fa634535653e6222c1faca1ab71b3117854470a79ae" "0ae52e74c576120c6863403922ee00340a3bf3051615674c4b937f9c99b24535" "b2028956188cf668e27a130c027e7f240c24c705c1517108b98a9645644711d9" "03e3e79fb2b344e41a7df897818b7969ca51a15a67dc0c30ebbdeb9ea2cd4492" "232f715279fc131ed4facf6a517b84d23dca145fcc0e09c5e0f90eb534e1680f" "aed73c6d0afcf2232bb25ed2d872c7a1c4f1bda6759f84afc24de6a1aec93da8" "0b6645497e51d80eda1d337d6cabe31814d6c381e69491931a688836c16137ed" "cdfb22711f64d0e665f40b2607879fcf2607764b2b70d672ddaa26d2da13049f" "196cc00960232cfc7e74f4e95a94a5977cb16fd28ba7282195338f68c84058ec" default)))
'(global-hl-line-mode t)
'(package-selected-packages
(quote
(package-build yafolding origami-mode highlight-indent-guides indent-guide go-dlv quelpa avy avy-mode github-theme base16-theme hlinum glab neotree evil-magit docker password-store gitlab flycheck-cask ensime scala-mode yasnippet yaml-mode slime quelpa-use-package ob-ipython nose n3-mode monokai-theme markdown-mode magit jedi helm-swoop helm-projectile helm-descbinds helm-ag guide-key go-mode go-autocomplete gist flymake-go flycheck exec-path-from-shell evil-surround evil-smartparens evil-paredit evil-org evil-nerd-commenter evil-mu4e evil-matchit evil-leader evil-jumper ein clojure-mode auctex ace-jump-mode)))
'(safe-local-variable-values (quote ((TeX-command-extra-options . "-shell-escape")))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

854
emacs/.emacs.d/init.el Normal file
View File

@@ -0,0 +1,854 @@
;;; BalkEmacs --- My emacs configuration
;;; Commentary:
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file 'noerror)
(package-initialize)
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
(setq quelpa-checkout-melpa-p nil)
(unless (package-installed-p 'quelpa)
(with-temp-buffer
(url-insert-file-contents "https://github.com/quelpa/quelpa/raw/master/quelpa.el")
(eval-buffer)
(quelpa-self-upgrade)))
(require 'quelpa nil t)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
;;(quelpa 'use-package)
;; ;'(use-package
;; ;:fetcher github
;; ;:repo "quelpa/quelpa-use-package"))
(require 'use-package)
(quelpa
'(quelpa-use-package
:fetcher github
:repo "quelpa/quelpa-use-package"))
(require 'quelpa-use-package)
(eval-when-compile (require 'cl))
(use-package evil
:ensure
:init (progn
(setq evil-want-C-u-scroll t)
)
:config (progn
(evil-mode)
(use-package evil-leader :ensure)
(use-package evil-matchit :ensure)
(use-package neotree :ensure)
(use-package evil-nerd-commenter
:ensure
:config (progn
(evilnc-default-hotkeys)
)
)
(use-package evil-surround :ensure)
(use-package avy :ensure)
;; Evil global modes config
(evilnc-default-hotkeys)
(setq evil-default-cursor t)
;; Evil global modes
(global-evil-jumper-mode 1)
(global-evil-surround-mode 1)
(global-evil-leader-mode)
(global-evil-matchit-mode 1)
;; exclude modes from evil mode
(add-to-list 'evil-emacs-state-modes 'git-rebase-mode)
(add-to-list 'evil-emacs-state-modes 'undo-tree-visualizer-mode)
(add-to-list 'evil-emacs-state-modes 'dired-mode)
;; Neo
(defun neotree-project-dir-toggle ()
"Open NeoTree using the project root, using find-file-in-project,
or the current buffer directory."
(interactive)
(let ((project-dir
(ignore-errors
(projectile-project-root)
))
(file-name (buffer-file-name))
(neo-smart-open t))
(if (and (fboundp 'neo-global--window-exists-p)
(neo-global--window-exists-p))
(neotree-hide)
(progn
(neotree-show)
(if project-dir
(neotree-dir project-dir))
(if file-name
(neotree-find file-name))))))
(defun next-code-buffer ()
;;; Avoid special buffers when cycling through windows
;;; http://stackoverflow.com/questions/14323516/make-emacs-next-buffer-skip-messages-buffer
(interactive)
(let (( bread-crumb (buffer-name) ))
(next-buffer)
(while
(and
(string-match-p "^\*" (buffer-name))
(not ( equal bread-crumb (buffer-name) )) )
(next-buffer))))
(defun previous-code-buffer ()
(interactive)
(let (( bread-crumb (buffer-name) ))
(previous-buffer)
(while
(and
(string-match-p "^\*" (buffer-name))
(not ( equal bread-crumb (buffer-name) )) )
(previous-buffer))))
;; change mode-line color by evil state
(lexical-let ((default-color (cons (face-background 'mode-line)
(face-foreground 'mode-line))))
(add-hook 'post-command-hook
(lambda ()
(let ((color (cond ((minibufferp) default-color)
((evil-insert-state-p) (cons (cdr default-color) (car default-color)))
((buffer-modified-p) '("#ff0000" . "#ffffff"))
(t default-color))))
(set-face-background 'mode-line (car color))
(set-face-foreground 'mode-line (cdr color))))))
;; Evil keys
(evil-leader/set-leader "<SPC>")
(define-key evil-normal-state-map (kbd "[q") 'previous-error)
(define-key evil-normal-state-map (kbd "]q") 'next-error)
(define-key evil-normal-state-map (kbd "[b") 'previous-code-buffer)
(define-key evil-normal-state-map (kbd "]b") 'next-code-buffer)
(define-key evil-normal-state-map (kbd "s") 'avy-goto-char-timer)
(define-key evil-normal-state-map (kbd "S") 'avy-goto-word-0)
(define-key evil-normal-state-map (kbd ",d") 'neotree-project-dir-toggle)
(define-key evil-normal-state-map (kbd ",u") 'undo-tree-visualize)
(define-key evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)
(define-key evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)
(add-hook 'neotree-mode-hook
(lambda ()
(define-key evil-normal-state-local-map (kbd "TAB") 'neotree-enter)
(define-key evil-normal-state-local-map (kbd "SPC") 'neotree-enter)
(define-key evil-normal-state-local-map (kbd "q") 'neotree-hide)
(define-key evil-normal-state-local-map (kbd "RET") 'neotree-enter)))
)
)
(use-package guide-key
:ensure
:config (progn
(setq guide-key/guide-key-sequence t)
(guide-key-mode 1)
))
(use-package projectile
:ensure
:config (progn
(projectile-global-mode)
(setq projectile-switch-project-action 'projectile-dired)
))
(use-package helm
:ensure t
:config (progn
(use-package helm-config)
(use-package helm-grep)
(use-package helm-locate)
(use-package helm-misc)
(use-package helm-descbinds
:config (progn
(helm-descbinds-mode)
)
)
(use-package helm-projectile :ensure
:config (progn
(setq projectile-completion-system 'helm)
(helm-projectile-on)
))
(use-package helm-ag :ensure)
(setq helm-quick-update t)
(setq helm-bookmark-show-location t)
(setq helm-buffers-fuzzy-matching t)
(defun smart-for-files ()
"Call `helm-projectile' if `projectile-project-p', otherwise fallback to `helm-for-files'."
(interactive)
(if (projectile-project-p)
(helm-projectile)
(helm-for-files)))
(defun smart-for-buffers ()
"Call `helm-projectile' if `projectile-project-p', otherwise fallback to `helm-for-files'."
(interactive)
(if (projectile-project-p)
(helm-projectile-switch-to-buffer)
(switch-to-buffer)))
;;; Save current position to mark ring
(add-hook 'helm-goto-line-before-hook 'helm-save-current-pos-to-mark-ring)
;; Better helm fonts
(set-face-attribute 'helm-selection nil :background "gold" :foreground "black")
;;; Keyboard mappings
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
(global-set-key (kbd "C-x b") 'helm-mini)
(global-set-key (kbd "C-x p") 'smart-for-files)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(global-set-key (kbd "C-h SPC") 'helm-all-mark-rings)
(global-set-key (kbd "C-c h o") 'helm-occur)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z
(define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward)
(define-key evil-normal-state-map "\C-e" 'evil-end-of-line)
(define-key evil-insert-state-map "\C-e" 'end-of-line)
(define-key evil-visual-state-map "\C-e" 'evil-end-of-line)
(define-key evil-motion-state-map "\C-e" 'evil-end-of-line)
(define-key evil-normal-state-map "\C-n" 'evil-next-line)
(define-key evil-insert-state-map "\C-n" 'evil-next-line)
(define-key evil-visual-state-map "\C-n" 'evil-next-line)
(define-key evil-normal-state-map "\C-p" 'evil-previous-line)
(define-key evil-insert-state-map "\C-p" 'evil-previous-line)
(define-key evil-visual-state-map "\C-p" 'evil-previous-line)
(define-key evil-normal-state-map "\C-k" 'kill-line)
(define-key evil-insert-state-map "\C-k" 'kill-line)
(define-key evil-visual-state-map "\C-k" 'kill-line)
(define-key evil-normal-state-map "Q" 'call-last-kbd-macro)
(define-key evil-visual-state-map "Q" 'call-last-kbd-macro)
;;; Evil helm
;; (define-key evil-normal-state-map (kbd "C-p") 'helm-mini)
(evil-leader/set-key "p" 'smart-for-files)
(evil-leader/set-key "b" 'smart-for-buffers)
(evil-leader/set-key "<SPC>" 'helm-M-x)
(define-key evil-normal-state-map (kbd ",s") 'helm-swoop)
(define-key evil-normal-state-map (kbd ",a") 'helm-ag)
(define-key evil-normal-state-map (kbd ",y") 'helm-show-kill-ring)
;;; Keyboard
(global-set-key (kbd "M-x") 'helm-M-x)
(define-key helm-map (kbd "C-w") 'backward-kill-word)
;; use helm to list eshell history
(add-hook 'eshell-mode-hook
#'(lambda ()
(define-key eshell-mode-map (kbd "M-l") 'helm-eshell-history)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGE: helm-swoop ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Locate the helm-swoop folder to your path
(use-package helm-swoop
:ensure
:config (progn
;; Change the keybinds to whatever you like :)
(global-set-key (kbd "C-c h o") 'helm-swoop)
(global-set-key (kbd "C-c s") 'helm-multi-swoop-all)
;; When doing isearch, hand the word over to helm-swoop
(define-key isearch-mode-map (kbd "M-i") 'helm-swoop-from-isearch)
;; From helm-swoop to helm-multi-swoop-all
(define-key helm-swoop-map (kbd "M-i") 'helm-multi-swoop-all-from-helm-swoop)
;; Save buffer when helm-multi-swoop-edit complete
(setq helm-multi-swoop-edit-save t)
;; If this value is t, split window inside the current window
(setq helm-swoop-split-with-multiple-windows t)
;; Split direcion. 'split-window-vertically or 'split-window-horizontally
(setq helm-swoop-split-direction 'split-window-vertically)
;; If nil, you can slightly boost invoke speed in exchange for text color
(setq helm-swoop-speed-or-color t)
))
(helm-mode 1)
)
)
(use-package auto-complete
:ensure t
:config (progn
(ac-config-default)
)
)
(use-package flycheck
:ensure t
:config (progn
(add-hook 'after-init-hook #'global-flycheck-mode)
)
)
(use-package popwin
:ensure
:config (progn
(popwin-mode)
))
(use-package hlinum
:ensure
:config (progn
(hlinum-activate)
(add-hook 'prog-mode-hook 'linum-mode)
)
)
(use-package base16-theme
:ensure
:config (progn
(load-theme 'base16-tomorrow-night)
)
)
(use-package slime
:config (progn
(setq inferior-lisp "/usr/bin/sbcl")
(setq inferior-lisp-program (executable-find "sbcl"))
(setq slime-contribs '(slime-fancy))
)
)
(use-package python
:config (progn
(use-package ob-ipython
:config (progn
)
)
(setq
;; python-shell-interpreter "compose-run"
;; python-shell-interpreter-args "python ")
python-shell-interpreter "ipython"
python-shell-interpreter-args "--pylab"
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion"
python-shell-completion-module-string-code "';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
(add-hook 'python-mode-hook 'auto-complete-mode)
(add-hook 'python-mode-hook '(lambda () (require 'nose)))
(eval-after-load "python"
'(progn
(define-key python-mode-map (kbd "C-c C-d") 'helm-pydoc)))
(use-package jedi
:config (progn
(setq jedi:complete-on-dot t)
(setq jedi:get-in-function-call-delay 500)
(add-hook 'python-mode-hook 'jedi:setup)
)
)
)
)
(use-package go-mode
:init (progn
(use-package go-autocomplete :ensure
:config (progn
(use-package auto-complete-config)
(ac-config-default)
)
)
(use-package go-dlv :ensure
)
(defun my-go-mode-hook ()
; Use goimports instead of go-fmt
;; You need to do: go get golang.org/x/tools/cmd/goimports
(setq gofmt-command "goimports")
; Call Gofmt before saving
(add-hook 'before-save-hook 'gofmt-before-save)
; Customize compile command to run go build
(if (not (string-match "go" compile-command))
(set (make-local-variable 'compile-command)
"go build -v && go test -v && go vet"))
; Godef jump key binding
(local-set-key (kbd "M-.") 'godef-jump)
(auto-complete-for-go)
)
(defun auto-complete-for-go ()
(auto-complete-mode 1))
(add-hook 'go-mode-hook 'my-go-mode-hook)
)
)
(use-package flymake-go
:ensure
:init (progn
)
)
(use-package scala-mode
:interpreter
("scala" . scala-mode))
(use-package ensime
:config (progn
(setq ensime-startup-snapshot-notification nil)
(use-package flycheck-cask
:ensure t
:commands flycheck-cask-setup
:config (add-hook 'emacs-lisp-mode-hook (flycheck-cask-setup)))
))
(use-package org
:ensure t
:config (progn
(use-package evil-org :ensure t)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(evil-leader/set-key "a" 'org-agenda)
(evil-org-mode)
(add-hook 'org-capture-mode-hook 'evil-insert-state)
(setq org-log-done t)
(setq org-directory "~/Dropbox/org")
(setq org-mobile-inbox-for-pull "~/Dropbox/org/inbox.org")
(setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
(setq org-mobile-files '("~/Dropbox/org"))
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq org-agenda-files (list org-directory))
(define-key global-map "\C-cc" 'org-capture)
(setq org-clock-persist 'history)
;; Set syntax highlight in org-mode babel
(setq org-src-fontify-natively t)
;;;don't prompt me to confirm everytime I want to evaluate a block
(setq org-confirm-babel-evaluate nil)
;;; display/update images in the buffer after I evaluate
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
;;
(setq org-tag-alist '(
(:startgroup . nil)
("@phd" . ?p) ("@home" . ?h)
(:endgroup . nil)
(:startgroup . nil)
("reading" . ?r) ("coding" . ?c) ("writing" . "w")
(:endgroup . nil)
)
)
(org-babel-do-load-languages
'org-babel-load-languages
'(
(sh . t)
(python . t)
))
(defun org-archive-done-tasks ()
(interactive)
(org-map-entries
(lambda ()
(org-archive-subtree)
(setq org-map-continue-from (outline-previous-heading)))
"/DONE" 'file))
(define-key org-mode-map "\C-cd" 'org-archive-done-tasks)
(setq org-capture-templates
(quote
(("i" "Ideas" entry
(file "ideas.org")
"* %?" nil nil)
("t" "Tasks" entry
(file "tasks.org")
"* TODO %?\n\t%i"))))
(defadvice org-capture-finalize
(after delete-capture-frame activate)
"Advise capture-finalize to close the frame"
(if (equal "capture" (frame-parameter nil 'name))
(delete-frame)))
(defadvice org-capture-destroy
(after delete-capture-frame activate)
"Advise capture-destroy to close the frame"
(if (equal "capture" (frame-parameter nil 'name))
(delete-frame)))
;; make the frame contain a single window. by default org-capture
;; splits the window.
(add-hook 'org-capture-mode-hook
'delete-other-windows)
(defun make-capture-frame ()
"Create a new frame and run org-capture."
(interactive)
(make-frame '((name . "capture")
(width . 120)
(height . 15)))
(select-frame-by-name "capture")
(setq word-wrap 1)
(setq truncate-lines nil)
(org-capture)
(delete-other-windows)
)
)
)
(use-package magit
:ensure
:config (progn
(add-hook 'after-save-hook 'magit-after-save-refresh-status)
(define-key evil-normal-state-map (kbd ",g") 'magit-status)
(define-key evil-normal-state-map (kbd "C-c g") 'magit-status)
)
)
(use-package yaml-mode
:config (progn
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode))
)
)
(use-package gist
:config (progn
)
)
(use-package n3-mode
:mode ("\\.ttl" "\\.n3")
)
(use-package yasnippet
:diminish yas-minor-mode
:config (progn
(yas-global-mode 1)
)
)
(use-package smartparens
:diminish smartparens-mode
:init
:config (progn
(use-package evil-paredit
:ensure
:config (progn
(use-package evil-smartparens :ensure)
(add-hook 'clojure-mode-hook 'smartparens-mode)
(add-hook 'cider-repl-mode-hook 'evil-smartparens-mode)
(add-hook 'lisp-mode-hook 'evil-smartparens-mode)
(add-hook 'emacs-lisp-mode-hook 'evil-smartparens-mode)
(add-hook 'lisp-interaction-mode-hook 'evil-smartparens-mode)
(add-hook 'ielm-mode-hook 'evil-smartparens-mode)
)
)
)
)
(use-package markdown-mode
:init
:config (progn
(setq markdown-command "pandoc -f markdown -t html -s")
)
)
(use-package go-mode
:init
:config (progn
)
)
(use-package mu4e
:init
:config (progn
(use-package smtpmail
:ensure)
(setq mu4e-contexts
`( ,(make-mu4e-context
:name "Private"
:enter-func (lambda () (mu4e-message "Switch to the GMAIL context"))
;; leave-func not defined
:match-func (lambda (msg)
(when msg
(mu4e-message-contact-field-matches msg
:to "jfsanchezrada@gmail.com")))
:vars '(
(smtpmail-starttls-credentials '("smtp.gmail.com" 587 nil nil))
(smtpmail-auth-credentials '(("smtp.gmail.com" 587 "jfsanchezrada@gmail.com" nil)))
(smtpmail-default-smtp-server "smtp.gmail.com")
(smtpmail-smtp-server "smtp.gmail.com")
(smtpmail-smtp-service 587)
(smtpmail-debug-info t)
( user-mail-address . "jfsanchezrada@gmail.com" )
( user-full-name . "J. Fernando Sánchez Rada" )
( mu4e-compose-signature . "J. Fernando Sánchez\n")))
,(make-mu4e-context
:name "Sinpapel"
:enter-func (lambda () (mu4e-message "Switch to the Personal context"))
;; leave-fun not defined
:match-func (lambda (msg)
(when msg
(mu4e-message-contact-field-matches msg
:to "j@sinpapel.es")))
:vars '(
(smtpmail-starttls-credentials '(("smtp.sinpapel.es" 587 nil nil)))
(smtpmail-auth-credentials '(("smtp.sinpapel.es" 587 "j@sinpapel.es" nil)))
(smtpmail-default-smtp-server "smtp.sinpapel.es")
(smtpmail-smtp-server "smtp.sinpapel.es")
(smtpmail-smtp-service 587)
(smtpmail-debug-info t)
( user-mail-address . "j@sinpapel.es" )
( user-full-name . "J. Fernando Sánchez Rada" )
( mu4e-compose-signature .
"J. Fernando Sánchez\n"))))
)
(setq mu4e-compose-context-policy nil)
(setq message-send-mail-function 'smtpmail-send-it
starttls-use-gnutls t
smtpmail-debug-info t)
(setq mu4e-maildir (expand-file-name "~/.mail/"))
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-sent-folder "/Sent Items")
(setq mu4e-trash-folder "/Trash")
(setq message-signature-file "~/.emacs.d/.signature") ; put your signature in this file
(setq mu4e-get-mail-command "mbsync gmail-inbox balkian"
mu4e-html2text-command "w3m -T text/html"
mu4e-update-interval 300
mu4e-headers-auto-update t
mu4e-compose-signature-auto-include nil)
(add-to-list 'mu4e-view-actions
'("ViewInBrowser" . mu4e-action-view-in-browser) t)
(setq mu4e-maildir-shortcuts
'( ("/gmail/INBOX" . ?i)
("/Sent Items" . ?s)
("/Trash" . ?t)
("/Drafts" . ?d)))
;; use imagemagick if available
(when (fboundp 'imagemagick-register-types)
(imagemagick-register-types))
;; general emacs mail settings; used when composing e-mail
;; the non-mu4e-* stuff is inherited from emacs/message-mode
(setq mu4e-reply-to-address "jfsanchezrada@gmail.com"
user-mail-address "jfsanchezrada@gmail.com"
user-full-name "J. Fernando Sánchez")
;; show images
(setq mu4e-show-images t
mu4e-show-addresses t)
;; By default, mu4e only shows contact names
(setq mu4e-view-show-addresses t)
;; don't save message to Sent Messages, IMAP takes care of this
(setq mu4e-sent-messages-behavior 'delete)
(add-hook 'mu4e-compose-mode-hook
(defun my-do-compose-stuff ()
"My settings for message composition."
(set-fill-column 72)
(flyspell-mode)))
)
)
;;; Global emacs settings
;; disable splash screen
(setq inhibit-splash-screen t)
(setq initial-scratch-message "\
;; SCRATCHPAD
")
(setq truncate-partial-width-windows nil)
(set-default 'truncate-lines nil)
;;; Highlight line
(global-hl-line-mode)
(require 'color)
(defun set-hl-line-color-based-on-theme ()
"Set the hl-line face to have no foregorund and a background that is 10% darker than the default face's background."
(let ((background-color (color-lighten-name (face-background 'default) 10)))
(set-face-attribute 'hl-line nil
:foreground nil
:background background-color)
(set-face-attribute 'linum-highlight-face nil
:background (face-foreground 'default)
:foreground (face-background 'default))))
(add-hook 'global-hl-line-mode-hook 'set-hl-line-color-based-on-theme)
;; (set-face-background 'hl-line 'highlight-color)
(setq-default indent-tabs-mode nil)
(setq tab-width 4)
(setq default-tab-width 4);
(setq js-indent-level 2)
(toggle-indicate-empty-lines)
;;; Global modes
(scroll-bar-mode 0)
(tool-bar-mode 0)
(savehist-mode 1)
(show-paren-mode t)
(column-number-mode)
(when (fboundp 'winner-mode)
(winner-mode 1))
;;; Other key bindings
(define-key global-map "\C-ch" 'winner-undo)
(define-key global-map "\C-cl" 'winner-redo)
;; set a default font
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
;; emacs doesn't actually save undo history with revert-buffer
;; see http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-04/msg00151.html
;; fix that.
(defun revert-buffer-keep-history (&optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)
(interactive)
(setq tmp (point))
;; tell Emacs the modtime is fine, so we can edit the buffer
(clear-visited-file-modtime)
;; insert the current contents of the file on disk
(widen)
(delete-region (point-min) (point-max))
(insert-file-contents (buffer-file-name))
;; mark the buffer as not modified
(not-modified)
(set-visited-file-modtime)
(goto-char tmp)
)
(setq revert-buffer-function 'revert-buffer-keep-history)
(use-package recentf
:config (progn
(recentf-mode 1)
(setq recentf-max-saved-items 300)
(setq recentf-max-menu-items 20)
)
)
(use-package exec-path-from-shell
:ensure
:config (progn
(exec-path-from-shell-initialize)
)
)
(use-package password-store
:config (progn
)
)
(use-package docker
:ensure
:config (progn
(use-package docker-tramp
:ensure
:config (progn
)
)
)
)
(use-package glab
:config (progn
(defconst glab--domain ".lab.cluster.gsi.dit.upm.es")
(defconst glab--root-endpoint "https://lab.cluster.gsi.dit.upm.es/api/v3")
)
)
(use-package highlight-indent-guides
:ensure
:config (progn
(setq highlight-indent-guides-method 'character)
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
)
)
(add-hook 'prog-mode-hook 'hs-minor-mode)
;;
;; LATEX
;;
(add-hook 'LaTeX-mode-hook (lambda ()
(push
'("latexmk" "latexmk -pdf %s" TeX-run-TeX nil t
:help "Run latexmk on file")
TeX-command-list)))
(add-hook 'TeX-mode-hook '(lambda () (setq TeX-command-default "latexmk")))
;; ENDLATEX
(setq PREVSHELL (getenv "SHELL")) ;; Workaround for tramp
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
(setq tramp-default-method "ssh")
;; Don't clover my folders
(setq
backup-by-copying t ; don't clobber symlinks
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" , temporary-file-directory t)))
;; Prevent #file#.txt files
(setq create-lockfiles nil)
;; Path
(setenv "PATH" (concat (getenv "PATH") ":" (getenv "HOME") "/.bin" ":" (getenv "HOME") "/.local/bin"))
(setq exec-path (append exec-path (list (concat (getenv "HOME") "/.bin") (concat (getenv "HOME") ".local/bin") "/usr/bin")))
;; Launch terminal
(defun open-terminal ()
"Open a terminal in the current working directory."
(interactive)
(call-process (or (getenv "XTERMINAL") "xterm") nil 0 nil "-e" PREVSHELL))
;; This does not work: (concat "echo -c 'cd " default-directory "'"))
(global-set-key (kbd "C-c t") 'open-terminal)
(provide '.init)
;;; init.el ends here

View File

@@ -0,0 +1,144 @@
[Desktop Entry]
Version=1.0
#NoDisplay=true
Name=Firefox Web Browser (nixGL)
GenericName=Web Browser
GenericName[ar]=متصفح ويب
GenericName[ast]=Restolador Web
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlížeč
GenericName[da]=Webbrowser
GenericName[el]=Περιηγητής διαδικτύου
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[fa]=مرورگر اینترنتی
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[gl]=Navegador Web
GenericName[he]=דפדפן אינטרנט
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[it]=Browser web
GenericName[ja]=ウェブ・ブラウザ
GenericName[ko]=웹 브라우저
GenericName[ku]=Geroka torê
GenericName[lt]=Interneto naršyklė
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=Internetový prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sv]=Webbläsare
GenericName[tr]=Web Tarayıcı
GenericName[ug]=توركۆرگۈ
GenericName[uk]=Веб-браузер
GenericName[vi]=Trình duyệt Web
GenericName[zh_CN]=网络浏览器
GenericName[zh_TW]=網路瀏覽器
Keywords=Internet;WWW;Browser;Web;Explorer
Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب
Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador
Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer
Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer
Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet
Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;Ιντερνετ
Keywords[es]=Explorador;Internet;WWW
Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa
Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה;
Keywords[hr]=Internet;WWW;preglednik;Web
Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer
Keywords[it]=Internet;WWW;Browser;Web;Navigatore
Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk
Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ
Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside
Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online
Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador
Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador
Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис
Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer
Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet
Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara
Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд
Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web
Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站;
Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;video/webm;application/x-xpinstall;
StartupNotify=true
StartupWMClass=firefox
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=Open a New Window
Name[ar]=افتح نافذة جديدة
Name[ast]=Abrir una ventana nueva
Name[bn]=Abrir una ventana nueva
Name[ca]=Obre una finestra nova
Name[cs]=Otevřít nové okno
Name[da]=Åbn et nyt vindue
Name[de]=Ein neues Fenster öffnen
Name[el]=Νέο παράθυρο
Name[es]=Abrir una ventana nueva
Name[fi]=Avaa uusi ikkuna
Name[fr]=Ouvrir une nouvelle fenêtre
Name[gl]=Abrir unha nova xanela
Name[he]=פתיחת חלון חדש
Name[hr]=Otvori novi prozor
Name[hu]=Új ablak nyitása
Name[it]=Apri una nuova finestra
Name[ja]=新しいウィンドウを開く
Name[ko]=새 창 열기
Name[ku]=Paceyeke nû veke
Name[lt]=Atverti naują langą
Name[nb]=Åpne et nytt vindu
Name[nl]=Nieuw venster openen
Name[pt]=Abrir nova janela
Name[pt_BR]=Abrir nova janela
Name[ro]=Deschide o fereastră nouă
Name[ru]=Новое окно
Name[sk]=Otvoriť nové okno
Name[sl]=Odpri novo okno
Name[sv]=Öppna ett nytt fönster
Name[tr]=Yeni pencere aç
Name[ug]=يېڭى كۆزنەك ئېچىش
Name[uk]=Відкрити нове вікно
Name[vi]=Mở cửa sổ mới
Name[zh_CN]=新建窗口
Name[zh_TW]=開啟新視窗
Exec=firefox -new-window
[Desktop Action new-private-window]
Name=Open a New Private Window
Name[ar]=افتح نافذة جديدة للتصفح الخاص
Name[ca]=Obre una finestra nova en mode d'incògnit
Name[cs]=Otevřít nové anonymní okno
Name[de]=Ein neues privates Fenster öffnen
Name[el]=Νέο ιδιωτικό παράθυρο
Name[es]=Abrir una ventana privada nueva
Name[fi]=Avaa uusi yksityinen ikkuna
Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée
Name[he]=פתיחת חלון גלישה פרטית חדש
Name[hu]=Új privát ablak nyitása
Name[it]=Apri una nuova finestra anonima
Name[nb]=Åpne et nytt privat vindu
Name[ru]=Новое приватное окно
Name[sl]=Odpri novo okno zasebnega brskanja
Name[sv]=Öppna ett nytt privat fönster
Name[tr]=Yeni gizli pencere aç
Name[uk]=Відкрити нове вікно у потайливому режимі
Name[zh_TW]=開啟新隱私瀏覽視窗
Exec=nixGL firefox -private-window

3
firefox/README.md Normal file
View File

@@ -0,0 +1,3 @@
toolkit.legacyUserProfileCustomizations.stylesheets to true
cp <profile>/chrome/userChrome.css

10
firefox/userChrome.css Normal file
View File

@@ -0,0 +1,10 @@
/* hides the native tabs */
#TabsToolbar {
visibility: collapse;
}
#titlebar {
visibility: collapse;
}
#sidebar-header {
visibility: collapse !important;
}

View File

@@ -0,0 +1,3 @@
set -U fish_greeting
set -g -x NIX_PATH "/home/j/.nix-defexpr/channels/:/nix/var/nix/profiles/per-user/root/channels"
starship init fish | source

48
flake.lock generated Normal file
View File

@@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1756579987,
"narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1756542300,
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d7600c775f877cd87b4f5a831c28aa94137377aa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

46
flake.nix Normal file
View File

@@ -0,0 +1,46 @@
{
description = "Home Manager configuration of j";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
# TCS config
homeConfigurations."j@lenny" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home-manager/common.nix
./home-manager/lenny.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
# Home
homeConfigurations."j" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home-manager/common.nix
];
};
};
}

View File

@@ -16,7 +16,11 @@ lg1 = log --graph --all --format=format:'%C(yellow)%h%C(reset) - %C(green)(%ad)%
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit
lg = !"git lg1" lg = !"git lg1"
[core] [core]
excludesfile = /home/jfernando/.gitignore_global excludesfile = ~/.gitignore_global
[filter "lfs"]
[include] clean = git-lfs clean -- %f
path = ~/.gitconfig_secret smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[pull]
rebase = false

162
home-manager/common.nix Normal file
View File

@@ -0,0 +1,162 @@
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "j";
home.homeDirectory = "/home/j";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "25.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# Desktop
pavucontrol
wofi
waybar
mako # Notification daemon
hyprlock # Lock
hypridle # Run lock on idle
pkgs.nerd-fonts.fira-code
pkgs.nerd-fonts.monoid
wezterm
# Editors
emacs
neovim
helix
# Utils
jq
bat # Replacement for less
eza # Better ld
zoxide # better cd
yazi # File manager
ripgrep # Better search
fzf # Fuzzy file finder
zenith # System monitor
# Shells
fish
grc # Colorizer
fishPlugins.grc
starship
# Dev tools
git
lazygit
# Python
uv
#uutils-coreutils
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/j/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
# EDITOR = "emacs";
EDITOR = "nvim";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.eza = {
enableFishIntegration = true;
icons = "auto";
git = true;
extraOptions = [
"--color=always"
"--tree"
"--level=1"
"--group-directories=first"
"--dereference"
];
};
programs.fish = {
enable = true;
interactiveShellInit = ''set fish_greeting '';
plugins = [
{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
];
};
programs.starship = {
enable = true;
settings = {
add_newline = false;
};
};
programs.zoxide.enable = true;
programs.bash = {
enable = true;
initExtra = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
''; # Launch fish on startup
};
fonts.fontconfig.enable = true;
}

15
home-manager/lenny.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
jujutsu
];
programs.git = {
enable = true;
userName = "Fernando Sánchez";
userEmail = "f.sanchez@thechannelstore.tv";
extraConfig = {
init.defaultBranch = "main";
};
};
}

81
home-manager/old.nix Normal file
View File

@@ -0,0 +1,81 @@
{ config, pkgs, nixgl, ... }:
let nixgl = import <nixgl> {};
in
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "j";
home.homeDirectory = "/home/j";
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.packages = [
pkgs.htop
pkgs.zoom-us
pkgs.fortune
pkgs.tmux
pkgs.git
pkgs.git-lfs
pkgs.hugo
pkgs.fish
pkgs.fd
pkgs.helix
pkgs.starship
pkgs.ripgrep
pkgs.eza
pkgs.ansible
pkgs.ranger
pkgs.sshpass
pkgs.jq
pkgs.bat
pkgs.davfs2
pkgs.pandoc
pkgs.rustup
#pkgs.texlive
# pkgs.texlive.combine {
# inherit (texlive) xcolor
# }
pkgs.wl-clipboard
nixgl.auto.nixGLDefault
#(pkgs.python311.withPackages (p: with p; [
#jupyterlab
#matplotlib
#pandas
#openpyxl
#]))
pkgs.alacritty
pkgs.wezterm
pkgs.kitty
pkgs.zellij
(pkgs.nerdfonts.override { fonts = [ "Iosevka" "IosevkaTerm" "Hack" "CascadiaCode" "FiraCode" "DejaVuSansMono" ]; })
];
fonts.fontconfig.enable = true;
programs.neovim = {
enable = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
auto-pairs
fzf-vim
lightline-vim
];
};
services.owncloud-client.enable = true;
}

13
home-manager/personal.nix Normal file
View File

@@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ ];
programs.git = {
enable = true;
userName = "J. Fernando Sánchez";
userEmail = "balkian@gmail.com";
extraConfig = {
init.defaultBranch = "main";
};
};
}

339
i3/.config/i3/config Normal file
View File

@@ -0,0 +1,339 @@
# This file has been auto-generated by i3-config-wizard(1).
#
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# font for window titles. ISO 10646 = Unicode
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font xft:Deja Vu Sans 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
#/exec
# start a terminal
#bindsym $mod+Return exec --no-startup-id i3-one-tmux
bindsym $mod+Return [title="^scratch"] scratchpad show
bindsym Control+Mod1+t exec --no-startup-id i3-sensible-terminal
bindsym Control+Mod1+Shift+t exec --no-startup-id i3-sensible-terminal --title=scratch -e 'tmux new-session -A -s scratch'
# File manager
bindsym Control+Mod1+f exec --no-startup-id i3-sensible-terminal --title=filemanager -e 'zsh -c ranger'
# start lock
bindsym Control+Mod1+l exec --no-startup-id i3-exit.sh lock
bindsym Control+Mod1+Shift+w exec --no-startup-id $BROWSER2
bindsym Control+Mod1+w exec --no-startup-id $BROWSER
bindsym Control+Mod1+v exec --no-startup-id pavucontrol
bindsym Control+Mod1+g exec --no-startup-id gvim
bindsym Control+Mod1+e exec --no-startup-id myemacs -c
bindsym $mod+Tab exec --no-startup-id winmenu.sh
bindsym Mod1+Tab exec --no-startup-id winmenu.sh
bindsym $mod+p [title="filemanager"] scratchpad show; [class="Nemo|Thunar"] scratchpad show
bindsym $mod+period [instance="emacs" title="^(?!myagenda$)"] scratchpad show
bindsym $mod+shift+comma exec --no-startup-id myemacs -nc --eval '(progn (find-file "~/Dropbox/Todo/org/rules.org") (org-agenda-list) (set-frame-name "myagenda"))'
bindsym $mod+c exec myemacs -n -e '(make-capture-frame)'
bindsym $mod+comma [title="^myagenda"] scratchpad show
bindsym $mod+Control+s exec --no-startup-id flameshot gui
# Spotify
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
# Volume
bindsym XF86AudioRaiseVolume exec --no-startup-id volume-up.sh
bindsym XF86AudioLowerVolume exec --no-startup-id volume-down.sh
bindsym XF86AudioMute exec --no-startup-id volume-toggle-mute.sh
# Brightness
#bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight +5
#bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -5
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
#bindsym $mod+Space exec --no-startup-id dmenu_run
bindsym $mod+space exec --no-startup-id runmenu
bindsym $mod+o exec --no-startup-id filemenu $HOME
bindsym $mod+b exec btmenu
#
# Arandr magic
bindsym Mod1+F5 exec --no-startup-id monitors single
bindsym Mod1+F6 exec --no-startup-id monitors single-hdmi
bindsym Mod1+F7 exec --no-startup-id monitors dual-mirror
bindsym Mod1+F8 exec --no-startup-id monitors dual-home
bindsym Mod1+F9 exec --no-startup-id monitors dual
bindsym Mod1+F10 exec --no-startup-id xrandr --auto
bindsym Mod1+F11 exec --no-startup-id monitors # auto
# Move to displays
bindsym $mod+Mod1+j move workspace to output down
bindsym $mod+Mod1+k move workspace to output up
bindsym $mod+Mod1+l move workspace to output right
bindsym $mod+Mod1+h move workspace to output left
# Move windows in tiled mode
bindsym $mod+Shift+H move left 100px
bindsym $mod+Shift+J move down 100px
bindsym $mod+Shift+K move up 100px
bindsym $mod+Shift+L move right 100px
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+m mode "move"
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+g split h
# split in vertical orientation
bindsym $mod+Shift+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout default
bindsym $mod+g layout splith
bindsym $mod+v layout splitv
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+i focus mode_toggle
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus [instance="*"] scratchpad show
# focus the parent container
bindsym $mod+u focus parent
# focus the child container
bindsym $mod+d focus child
# switch to workspace
bindsym $mod+grave workspace 0: Personal
bindsym $mod+1 workspace 1: Term
bindsym $mod+2 workspace 2: Web
bindsym $mod+3 workspace 3: Edit
bindsym $mod+4 workspace 4: Viewer
bindsym $mod+5 workspace 5: Files
bindsym $mod+6 workspace 6: Music
bindsym $mod+7 workspace 7: Chat
bindsym $mod+8 workspace 8: Misc Big
bindsym $mod+9 workspace 9: Misc Small
bindsym $mod+0 workspace number 10
bindsym $mod+Control+h workspace prev
bindsym $mod+Control+l workspace next
# move focused container to workspace
bindsym $mod+Shift+grave move container to workspace 0: Personal
bindsym $mod+Shift+exclam move container to workspace 1: Term
bindsym $mod+Shift+at move container to workspace 2: Web
bindsym $mod+Shift+numbersign move container to workspace 3: Edit
bindsym $mod+Shift+dollar move container to workspace 4: Viewer
bindsym $mod+Shift+percent move container to workspace 5: Files
bindsym $mod+Shift+asciicircum move container to workspace 6: Music
bindsym $mod+Shift+ampersand move container to workspace 7: Chat
bindsym $mod+Shift+asterisk move container to workspace 8: Misc Big
bindsym $mod+Shift+parenleft move container to workspace 9: Misc Small
bindsym $mod+Shift+parenright move container to workspace number 10
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exec --no-startup-id i3-exit.sh logout
bindsym $mod+Mod1+s exec --no-startup-id i3-exit.sh suspend
bindsym $mod+Shift+p exec passmenu
bindsym $mod+Shift+n exec netmenu
# move with finer grain
mode "move" {
bindsym H move left 100px
bindsym J move down 100px
bindsym K move up 100px
bindsym L move right 100px
bindsym Shift+H move left 10 px
bindsym Shift+J move down 10px
bindsym Shift+K move up 10 px
bindsym Shift+L move right 10 px
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym H resize shrink width 100 px or 100 ppt
bindsym J resize grow height 100 px or 100 ppt
bindsym K resize shrink height 100 px or 100 ppt
bindsym L resize grow width 100 px or 100 ppt
bindsym Shift+H resize shrink width 10 px or 10 ppt
bindsym Shift+J resize grow height 10 px or 10 ppt
bindsym Shift+K resize shrink height 10 px or 10 ppt
bindsym Shift+L resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
bindsym $mod+n exec i3-input -F 'rename workspace to %s' -P 'New name: '
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#status_command i3status
#}
# bar {
# mode dock
# position top
# font pango:DejaVu Sans 10
# workspace_buttons yes
# # status_command ~/.config/i3/status.sh
# status_command i3status -c ~/.config/i3status/conf
# colors {
# background #101010
# statusline #ffffff
# focused_workspace #101010 #586e75 #fdf6e3
# active_workspace #101010 #101010 #cb4b16
# inactive_workspace #101010 #101010 #93a1a1
# urgent_workspace #fdf6e3 #dc322f
# }
# }
# class border backgr. text indicator
client.focused #4c7899 #4c7899 #fefef #93a1a1 #2e9ef4
client.focused_inactive #4c7899 #101010 #93a1a1 #484e50
client.unfocused #ffffff #101010 #93a1a1 #292d2e
client.urgent #2f343a #101010 #93a1a1 #900000
default_border pixel 3
# smart_borders on
workspace_layout tabbed
for_window [title="^floatingwin"] floating enable;
for_window [title="^capture"] floating enable;
for_window [title="^myagenda"] move to scratchpad
for_window [class="^Google-chrome$"] border none
for_window [class="^Chromium"] border none
for_window [class="^Pavucontrol"] floating enable
assign [class="Google-chrome" window_role="browser"] 2: Web
assign [class="Chromium" window_role="browser"] 2: Web
for_window [class="^Firefox$"] border none
for_window [class="^Polybar"] border none
assign [class="Firefox" window_role="browser"] 2: Web
for_window [class="^Xfce4-notifyd$"] floating enable; border none; focus mode_toggle
for_window [class="^termite"] border 1px
for_window [class="^lxterminal"] border 1px
for_window [class="^xfce4-terminal"] border 1px
for_window [title="^scratch"] move to scratchpad
assign [class="^Nemo|Thunar|Ranger"] 5: Files
for_window [title="^filemanager$"] move to scratchpad;
#KDE
for_window [class="Plasma-desktop"] border none
for_window [class="krunner"] border none
for_window [class="Kmix"] floating enable;
for_window [class="Plasmoidviewer"] floating enable;
for_window [class="Klipper"] floating enable; border none
for_window [class="Spotify"] move to workspace 6: Music
#assign [class="^Gvim$"] 3: Edit
#assign [class="^Evince$"] 4: Viewer
assign [class="^Audacious$"] 6: Music
assign [class="^Xchat$"] 7: Chat
#for_window [class="Pcmanfm"] floating enable
workspace "0: Personal" output DP-2
workspace "1: Term" output DP-1
workspace "2: Web" output DP-1
workspace "3: Edit" output DP-1
workspace "4: Viewer" output eDP-1
workspace "5: Files" output eDP-1
workspace "6: Music" output eDP-1
workspace "7: Chat" output eDP-1
workspace "8: Misc Big" output DP-1
workspace "9: Misc Small" output eDP-1
gaps inner 8
gaps outer 5
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3-exit.sh lock, mode "default"
bindsym e exec --no-startup-id i3-exit.sh logout #, mode "default"
bindsym s exec --no-startup-id i3-exit.sh suspend #, mode "default"
bindsym h exec --no-startup-id i3-exit.sh hibernate, mode "default"
bindsym r exec --no-startup-id i3-exit.sh reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3-exit.sh shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Delete mode "$mode_system"
bindsym $mod+Escape exec xfce4-session-logout
#exec --no-startup-id xautolock -corners '----' -time 10 -locker 'dm-tool lock' # lightdm
#exec xautolock -time 10 -corners "----" -locker 'i3lock -t -c 000000 -i ~/Pictures/Wallpapers/Game\ Over\ Hacker.png' &
exec --no-startup-id picom -b --config ~/.picom.conf
exec --no-startup-id dropbox start
exec --no-startup-id i3-sensible-terminal --title=filemanager -e 'ranger'
exec --no-startup-id nitrogen --restore
exec --no-startup-id nm-applet
exec --no-startup-id pasystray
exec --no-startup-id syndaemon -i 0.5 -d
exec --no-startup-id i3-sensible-terminal --title=scratch -e 'tmux new-session -A -s scratch'
exec --no-startup-id i3-exit.sh autolock
exec --no-startup-id xfce4-power-manager
#exec --no-startup-id xfsettingsd --sm-client-disable &
exec --no-startup-id clipit -n
exec --no-startup-id owncloud
exec --no-startup-id udiskie --no-notify --tray --use-udisks2
exec --no-startup-id polybar.sh

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
echo "{\"version\":1}" echo "{\"version\":1}"
echo "[[] ," echo "[[] ,"
conky -c ~/.i3/conkyrc conky -c ~/.config/i3/conkyrc

View File

@@ -1,18 +1,20 @@
out_to_x no conky.config = {
own_window no out_to_x=no,
out_to_console yes own_window=no,
background no out_to_console=yes,
max_text_width 0 background=no,
# Update interval in seconds max_text_width=0,
update_interval 2.0 --Update interval in seconds
total_run_times 0 update_interval=2.0,
override_utf8_locale yes total_run_times=0,
override_utf8_locale=yes
}
TEXT conky.text = [[
{ "full_text" : "Phys" , "color" : "\#b58900" } ,
# [{ "full_text" : "MPD" , "color" : "\#b58900" } , { "full_text" : "${execi 10 sensors | grep 'Phys' | cut -d" " -f 5}", "color" :"\#93a1a1" } ,
# { "full_text" : "${if_mpd_playing}${mpd_smart 50} ${mpd_elapsed}/${mpd_length}${else}${mpd_status}${endif}" , "color" :"\#93a1a1" } , { "full_text" : "ACPI" , "color" : "\#b58900" } ,
[ { "full_text" : "${execi 10 sensors | grep 'temp1' | cut -d" " -f 9}", "color" :"\#93a1a1" } ,
{ "full_text" : "HD" , "color" : "\#b58900" } , { "full_text" : "HD" , "color" : "\#b58900" } ,
{ "full_text" : "home: ${fs_free /home}/${fs_size /home} root: ${fs_free /}/${fs_size /}" , "color" :"\#93a1a1" } , { "full_text" : "home: ${fs_free /home}/${fs_size /home} root: ${fs_free /}/${fs_size /}" , "color" :"\#93a1a1" } ,
{ "full_text" : "Ram" , "color" : "\#b58900" } , { "full_text" : "Ram" , "color" : "\#b58900" } ,
@@ -23,4 +25,5 @@ TEXT
{ "full_text" : "${battery BAT0}" , "color" : { "full_text" : "${battery BAT0}" , "color" :
${if_match ${battery_percent BAT0}<20}"\#b95670"${else}"\#5f5f5f"${endif} } , ${if_match ${battery_percent BAT0}<20}"\#b95670"${else}"\#5f5f5f"${endif} } ,
{ "full_text" : "Date" , "color" : "\#b58900" } , { "full_text" : "Date" , "color" : "\#b58900" } ,
{ "full_text" : "${time %b %d %Y %I:%M%P}", "color" :"\#93a1a1" }] , { "full_text" : "${time %b %d %Y %I:%M%P}", "color" :"\#93a1a1" }
]]

160
i3/.config/i3/i3blocks.conf Normal file
View File

@@ -0,0 +1,160 @@
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent
# Global properties
#
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
command=$SCRIPT_DIR/$BLOCK_NAME
separator_block_width=15
markup=pango
color=#FFFFFF
# Volume indicator
#
# The first parameter sets the step (and units to display)
# The second parameter overrides the mixer selection
# See the script for details.
#[volume 1 pulse]
##label=VOL
#label=♪
#instance=Main
##instance=PCM
#interval=once
#signal=10
# Temperature
#
# Support multiple chips, though lm-sensors.
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
[temperature temp1]
label=TEMP
interval=10
# Memory usage
#
# The type defaults to "mem" if the instance is not specified.
[memory]
label=MemFree
separator=true
interval=30
instance=MemFree:
#[memory]
#label=SWAP
#instance=swap
#separator=false
#interval=30
# Disk usage
#
# The directory defaults to $HOME if the instance is not specified.
# The script may be called with a optional argument to set the alert
# (defaults to 10 for 10%).
[disk 1]
label=/home
#instance=/mnt/data
interval=30
separator=false
[disk]
label=/
instance=/
interval=30
# Network interface monitoring
#
# If the instance is not specified, use the interface used for default route.
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
[iface]
instance=wlp1s0
interval=10
separator=false
[wifi]
instance=wlp2s0
interval=10
separator=false
[bandwidth]
#instance=eth0
interval=5
# CPU usage
#
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
[cpu_usage]
label=CPU
interval=10
min_width=CPU: 100.00%
#separator=false
#[load_average]
#interval=10
# Battery indicator
#
# The battery instance defaults to 0.
[battery]
#label=BAT
label=⚡
instance=1
interval=30
# Date Time
#
[time]
command=date '+%Y-%m-%d %H:%M:%S'
interval=5
# Generic media player support
#
# This displays "ARTIST - SONG" if a music is playing.
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
#[mediaplayer]
#instance=spotify
#interval=5
#signal=10
# OpenVPN support
#
# Support multiple VPN, with colors.
# [openvpn]
# interval=20
# Key indicators
#
# Add the following bindings to i3 config file:
#
# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks
#[keyindicator]
#instance=CAPS
#interval=once
#signal=11
#[keyindicator]
#instance=NUM
#interval=once
#signal=11

77
i3/.config/i3/status.conf Normal file
View File

@@ -0,0 +1,77 @@
general {
output_format = "dzen2"
colors = true
interval = 5
}
order += "ipv6"
order += "disk /"
order += "run_watch DHCP"
order += "run_watch VPNC"
order += "path_exists VPN"
order += "wireless wlan0"
order += "ethernet eth0"
order += "battery 0"
# order += "cpu_temperature 0"
order += "load"
order += "tztime local"
order += "tztime berlin"
wireless wlan0 {
format_up = "W: (%quality at %essid, %bitrate) %ip"
format_down = "W: down"
}
ethernet eth0 {
# if you use %speed, i3status requires the cap_net_admin capability
format_up = "E: %ip (%speed) "
format_down = "E: down"
}
battery 0 {
format = "%status %percentage %remaining %emptytime"
format_down = "No battery"
status_chr = "⚡ CHR"
status_bat = "🔋 BAT"
status_unk = "? UNK"
status_full = "☻ FULL"
path = "/sys/class/power_supply/BAT0/uevent"
low_threshold = 10
}
run_watch DHCP {
pidfile = "/var/run/dhclient*.pid"
}
run_watch VPNC {
# file containing the PID of a vpnc process
pidfile = "/var/run/vpnc/pid"
}
path_exists VPN {
# path exists when a VPN tunnel launched by nmcli/nm-applet is active
path = "/proc/sys/net/ipv4/conf/tun0"
}
tztime local {
format = "%Y-%m-%d %H:%M:%S"
}
tztime berlin {
format = "%Y-%m-%d %H:%M:%S %Z"
timezone = "Europe/Berlin"
}
load {
format = "%5min"
}
# cpu_temperature 0 {
# format = "T: %degrees °C"
# path = "/sys/devices/platform/coretemp.0/temp1_input"
# }
disk "/" {
format = "%free"
}

6
i3/.config/i3/status.sh Executable file
View File

@@ -0,0 +1,6 @@
#1/bin/sh
SCRIPT_DIR=/usr/lib/i3blocks
if [ ! -d "$SCRIPT_DIR" ]; then
SCRIPT_DIR=/usr/share/i3blocks
fi
CONTRIB_PATH=$HOME/.config/i3/i3blocks-contrib SCRIPT_DIR=$SCRIPT_DIR i3blocks -c $HOME/.config/i3/i3blocks.conf

62
i3/.config/i3status/conf Normal file
View File

@@ -0,0 +1,62 @@
general {
colors = true
interval = 5
}
order += "disk /"
order += "disk /home"
order += "path_exists VPN"
order += "wireless wlp2s0"
order += "ethernet eth0"
order += "battery 0"
order += "cpu_temperature 0"
order += "load"
order += "tztime local"
wireless wlp2s0 {
format_up = "%essid %ip %quality %bitrate"
format_down = "Wireless down"
}
ethernet eth0 {
# if you use %speed, i3status requires the cap_net_admin capability
format_up = "E: %ip (%speed) "
format_down = "E: down"
}
battery 0 {
format = "%status %percentage %remaining %emptytime"
format_down = "No battery"
status_chr = "⚡ CHR"
status_bat = "🔋 BAT"
status_unk = "? UNK"
status_chr = "⚡ FULL"
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
}
path_exists VPN {
# path exists when a VPN tunnel launched by nmcli/nm-applet is active
path = "/proc/sys/net/ipv4/conf/ppp0"
}
tztime local {
format = "%H:%M %d/%m/%Y"
}
load {
format = "%5min"
}
# cpu_temperature 0 {
# format = "T: %degrees °C"
# path = "/sys/devices/platform/coretemp.0/temp1_input"
# }
disk "/" {
format = "%free / "
}
disk "/home" {
format = "%free /home "
}

3
i3/.dmenurc Normal file
View File

@@ -0,0 +1,3 @@
DMENU_FONT='-*-*-medium-r-*-*-18-*-*-*-*-*-*-*'
DMENU="dmenu -i -fn $DMENU_FONT -nb #1E2320 -nf #DBDBDB -sb #3f3f3f -sf #ffffff"

275
i3/config
View File

@@ -1,275 +0,0 @@
# This file has been auto-generated by i3-config-wizard(1).
#
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# font for window titles. ISO 10646 = Unicode
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font xft:Deja Vu Sans 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
#/exec
# start a terminal
#bindsym $mod+Return exec i3-one-tmux
bindsym $mod+Return [instance="tmux"] scratchpad show
bindsym Control+Mod1+t exec urxvt
# start lock
bindsym Control+Mod1+l exec i3-exit.sh lock
bindsym Control+Mod1+w exec i3-one-instance firefox
bindsym Control+Mod1+g exec i3-one-instance gvim
bindsym Control+Mod1+e exec myemacs
bindsym $mod+o exec i3-winmenu.py
bindsym Control+Mod1+f exec pcmanfm
# Spotify
bindsym XF86AudioPlay exec spotify-remote.py -a playPause
bindsym XF86AudioNext exec spotify-remote.py -a next
bindsym XF86AudioPrev exec spotify-remote.py -a previous
# Volume
bindsym XF86AudioRaiseVolume exec volume-up.sh
bindsym XF86AudioLowerVolume exec volume-down.sh
bindsym XF86AudioMute exec volume-toggle-mute.sh
# Brightness
#bindsym XF86MonBrightnessUp exec xbacklight +5
#bindsym XF86MonBrightnessDown exec xbacklight -5
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
#bindsym Mod1+F2 exec dmenu_run
bindsym Mod1+F2 exec dmenu_run -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191919" -sf "#b72f62" -b
# Arandr magic
bindsym Mod1+F5 exec monitors single
bindsym Mod1+F6 exec monitors dual
bindsym Mod1+F7 exec monitors dual home
bindsym Mod1+F8 exec i3-secondary-to-primary
# Move to displays
bindsym $mod+Mod1+j move workspace to output down
bindsym $mod+Mod1+k move workspace to output up
bindsym $mod+Mod1+l move workspace to output right
bindsym $mod+Mod1+h move workspace to output left
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+H move left
bindsym $mod+Shift+J move down
bindsym $mod+Shift+K move up
bindsym $mod+Shift+L move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+g split h
# split in vertical orientation
bindsym $mod+Shift+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout default
bindsym $mod+g layout splith
bindsym $mod+v layout splitv
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus scratchpad show
# focus the parent container
bindsym $mod+u focus parent
# focus the child container
bindsym $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace 1: Term
bindsym $mod+2 workspace 2: Web
bindsym $mod+3 workspace 3: Edit
bindsym $mod+4 workspace 4: Viewer
bindsym $mod+5 workspace 5: Files
bindsym $mod+6 workspace 6: Music
bindsym $mod+7 workspace 7: Chat
bindsym $mod+8 workspace 8: Misc Big
bindsym $mod+9 workspace 9: Misc Small
bindsym $mod+0 workspace number 10
bindsym $mod+Control+h workspace prev
bindsym $mod+Control+l workspace next
# move focused container to workspace
bindsym $mod+Shift+exclam move container to workspace 1: Term
bindsym $mod+Shift+at move container to workspace 2: Web
bindsym $mod+Shift+numbersign move container to workspace 3: Edit
bindsym $mod+Shift+dollar move container to workspace 4: Viewer
bindsym $mod+Shift+percent move container to workspace 5: Files
bindsym $mod+Shift+asciicircum move container to workspace 6: Music
bindsym $mod+Shift+ampersand move container to workspace 7: Chat
bindsym $mod+Shift+asterisk move container to workspace 8: Misc Big
bindsym $mod+Shift+parenleft move container to workspace 9: Misc Small
bindsym $mod+Shift+parenright move container to workspace number 10
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exec i3-exit.sh logout
bindsym $mod+Mod1+s exec i3-exit.sh suspend
bindsym $mod+Shift+p exec passmenu
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym 113 resize shrink width 10 px or 10 ppt
bindsym 116 resize grow height 10 px or 10 ppt
bindsym 111 resize shrink height 10 px or 10 ppt
bindsym 114 resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
bindsym $mod+n exec i3-input -F 'rename workspace to %s' -P 'New name: '
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#status_command i3status
#}
bar {
mode dock
position top
workspace_buttons yes
status_command ~/.i3/conky.sh
colors {
background #101010
statusline #101010
focused_workspace #101010 #586e75 #fdf6e3
active_workspace #101010 #101010 #cb4b16
inactive_workspace #101010 #101010 #93a1a1
urgent_workspace #fdf6e3 #dc322f
}
}
# class border backgr. text indicator
client.focused #4c7899 #101010 #93a1a1 #2e9ef4
client.focused_inactive #4c7899 #101010 #93a1a1 #484e50
client.unfocused #333333 #101010 #93a1a1 #292d2e
client.urgent #2f343a #101010 #93a1a1 #900000
for_window [class="^Google-chrome$"] border none
assign [class="Google-chrome" window_role="browser"] 2: Web
for_window [class="^Firefox$"] border none
assign [class="Firefox" window_role="browser"] 2: Web
for_window [class="Xfce4-notifyd"] floating enable; border none; focus mode_toggle
for_window [class="^URxvt$"] border 1px
for_window [title="^tmux$"] move to scratchpad;
#KDE
for_window [class="Plasma-desktop"] border none
for_window [class="krunner"] border none
for_window [class="Kmix"] floating enable;
for_window [class="Plasmoidviewer"] floating enable;
for_window [class="Klipper"] floating enable; border none
#assign [class="^Gvim$"] 3: Edit
#assign [class="^Evince$"] 4: Viewer
assign [class="^Spotify$"] 6: Music
assign [class="^Audacious$"] 6: Music
assign [class="^Xchat$"] 7: Chat
#for_window [class="Pcmanfm"] floating enable
workspace "1: Term" output DP1
workspace "2: Web" output DP1
workspace "3: Edit" output DP1
workspace "4: Viewer" output eDP1
workspace "5: Files" output eDP1
workspace "6: Music" output eDP1
workspace "7: Chat" output eDP1
workspace "8: Misc Big" output DP1
workspace "9: Misc Small" output eDP1
exec --no-startup-id nm-applet
exec --no-startup-id dropbox start
exec --no-startup-id volti
exec --no-startup-id clipit
exec --no-startup-id syndaemon -i 0.5 -d
exec --no-startup-id synapse -s
exec xautolock -time 10 -corners "----" -locker 'i3lock -t -c 000000 -i ~/Pictures/Wallpapers/Game\ Over\ Hacker.png' &
#exec --no-startup-id xautolock -corners '----' -time 10 -locker 'dm-tool lock' # lightdm
exec urxvt -name tmux -e tmux attach
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3-exit.sh lock, mode "default"
bindsym e exec --no-startup-id i3-exit.sh logout #, mode "default"
bindsym s exec --no-startup-id i3-exit.sh suspend #, mode "default"
bindsym h exec --no-startup-id i3-exit.sh hibernate, mode "default"
bindsym r exec --no-startup-id i3-exit.sh reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3-exit.sh shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Delete mode "$mode_system"
exec --no-startup-id nitrogen --restore &
exec --no-startup-id xfce4-power-manager
#exec --no-startup-id compton -b --config ~/.compton.conf
#

1
keep/.keep/commands.json Normal file
View File

@@ -0,0 +1 @@
{"pandoc --filter pandoc-include-code -i index.md --metadata pagetitle=yourtitle -s --highlight-style=pygments -o index.docx": {"desc": "generate docx (Word, Office) from a markdown file with code highlighting", "alias": "md2doc"}}

View File

@@ -0,0 +1 @@
06/21/2019

View File

@@ -0,0 +1,8 @@
protocol file
mime image/*
action launch --type=overlay kitten icat --hold ${FILE_PATH}
protocol file
ext log
action launch --title ${FILE} --type=os-window tail -f ${FILE_PATH}
action change_font_size current -2

View File

@@ -0,0 +1,62 @@
# LightDM GTK+ Configuration
# Available configuration options listed below.
#
# Appearance:
# theme-name = GTK+ theme to use
# icon-theme-name = Icon theme to use
# background = Background file to use, either an image path or a color (e.g. #772953)
# user-background = false|true ("true" by default) Display user background (if available)
# transition-duration = Length of time (in milliseconds) to transition between background images ("500" by default)
# transition-type = ease-in-out|linear|none ("ease-in-out" by default)
#
# Fonts:
# font-name = Font to use
# xft-antialias = false|true Whether to antialias Xft fonts
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = none|slight|medium|hintfull What degree of hinting to use
# xft-rgba = none|rgb|bgr|vrgb|vbgr Type of subpixel antialiasing
#
# Login window:
# active-monitor = Monitor to display greeter window (name or number). Use #cursor value to display greeter at monitor with cursor. Can be a semicolon separated list
# position = x y ("50% 50%" by default) Login window position
# default-user-image = Image used as default user icon, path or #icon-name
# hide-user-image = false|true ("false" by default)
#
# Panel:
# panel-position = top|bottom ("top" by default)
# clock-format = strftime-format string, e.g. %H:%M
# indicators = semi-colon ";" separated list of allowed indicator modules. Built-in indicators include "~a11y", "~language", "~session", "~power", "~clock", "~host", "~spacer". Unity indicators can be represented by short name (e.g. "sound", "power"), service file name, or absolute path
#
# Accessibility:
# a11y-states = states of accessibility features: "name" - save state on exit, "-name" - disabled at start (default value for unlisted), "+name" - enabled at start. Allowed names: contrast, font, keyboard, reader.
# keyboard = command to launch on-screen keyboard (e.g. "onboard")
# keyboard-position = x y[;width height] ("50%,center -0;50% 25%" by default) Works only for "onboard"
# reader = command to launch screen reader (e.g. "orca")
#
# Security:
# allow-debugging = false|true ("false" by default)
# screensaver-timeout = Timeout (in seconds) until the screen blanks when the greeter is called as lockscreen
#
# Template for per-monitor configuration:
# [monitor: name]
# background = overrides default value
# user-background = overrides default value
# laptop = false|true ("false" by default) Marks monitor as laptop display
# transition-duration = overrides default value
#
[greeter]
background=/etc/lightdm/wallpaper.jpg
#user-background=
#theme-name=
#icon-theme-name=
#font-name=
#xft-antialias=
#xft-dpi=
#xft-hintstyle=
#xft-rgba=
#indicators=
#clock-format=
#keyboard=
#reader=
#position=
#screensaver-timeout=

33
make.sh
View File

@@ -1,33 +0,0 @@
#!/bin/bash
############################
# .make.sh
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
############################
########## Variables
# change to the dotfiles directory
cd `dirname $0`
########## Don't forget the submodules
git submodule init
git submodule update --recursive
olddir=~/dotfiles$(date +%Y-%m-%d_%H:%M:%S) # old dotfiles backup directory
files=$(ls --ignore="not_dots" --ignore="README.md" --ignore="make.sh" --ignore="Docker" $PWD) # list of files/folders to symlink in homedir
##########
# create dotfiles_old in homedir
echo "** Creating $olddir for backup: of any existing dotfiles in ~"
mkdir -p $olddir
echo "...done"
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
echo "** Creating symlinks. Any existing dotfiles will be moved to: $olddir"
for file in $files; do
mv ~/.$file $olddir && echo "Backed up: ~/.$file"
ln -s $PWD/$file ~/.$file
done
rmdir $olddir 2>/dev/null && echo "Backup dir empty. Removed"

3
noserc
View File

@@ -1,3 +0,0 @@
[nosetests]
verbosity=3
detailed-errors=1

View File

@@ -0,0 +1,11 @@
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
EndSection

25
not_dots/50-udiskie.rules Normal file
View File

@@ -0,0 +1,25 @@
polkit.addRule(function(action, subject) {
var YES = polkit.Result.YES;
// NOTE: there must be a comma at the end of each line except for the last:
var permission = {
// required for udisks1:
"org.freedesktop.udisks.filesystem-mount": YES,
"org.freedesktop.udisks.luks-unlock": YES,
"org.freedesktop.udisks.drive-eject": YES,
"org.freedesktop.udisks.drive-detach": YES,
// required for udisks2:
"org.freedesktop.udisks2.filesystem-mount": YES,
"org.freedesktop.udisks2.encrypted-unlock": YES,
"org.freedesktop.udisks2.eject-media": YES,
"org.freedesktop.udisks2.power-off-drive": YES,
// required for udisks2 if using udiskie from another seat (e.g. systemd):
"org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
"org.freedesktop.udisks2.filesystem-unmount-others": YES,
"org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
"org.freedesktop.udisks2.eject-media-other-seat": YES,
"org.freedesktop.udisks2.power-off-drive-other-seat": YES
};
if (subject.isInGroup("storage")) {
return permission[action.id];
}
});

15
not_dots/52-tablet.conf Normal file
View File

@@ -0,0 +1,15 @@
# Config for the HUION tablet
#
## Install:
# yay linux-headers
# yay digimend
## To also control the buttons, install wacom and use xsetwacom
# yay wacom
Section "InputClass"
Identifier "Huion on wacom"
# MatchIsTablet "on"
MatchProduct "HUION"
MatchDevicePath "/dev/input/event*"
Driver "wacom"
EndSection

View File

@@ -1,73 +0,0 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob nomatch notify share_history
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/balkian/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
autoload -U colors
colors
setopt prompt_subst
local smiley="%B%(?,%{$fg[green]%}☠%{$reset_color%},%{$fg[red]%}☠%{$reset_color%})%b"
PS0='${debian_chroot:+($debian_chroot)}%n@%M'
parse_git_branch()
{
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#'
}
if ( dircolors --help && ls --color ) &> /dev/null; then
# For some reason, the unixs machines need me to use $HOME instead of ~
# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit.
function precmd {
PROMPT="$PS0:%~ %{$fg[green]%}%B$(parse_git_branch)%b%{$reset_color%}
${smiley} ";
RPROMPT="%T";
}
for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do
[[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break
done
alias ls="ls --color=auto"
alias ll="ls --color=auto -l"
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
else
# No color, so put a slash at the end of directory names, etc. to differentiate.
alias ll="ls -lF"
fi
## Completions
#autoload -U compinit
#compinit -C
#
### case-insensitive (all),partial-word and then substring completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \
'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
bindkey -M vicmd 'r' history-incremental-search-backward
export PATH=$PATH:"/home/balkian/code/personal-scripts/"
#export CDPATH=$CDPATH:"/media/Data/"
# TMUX
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
# if no session is started, start a new session
if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then
stty -ixon
test -z ${TMUX} && tmux attach
# when quitting tmux, try to attach
if [[ -z ${TMUX} ]]; then
exit;
fi
fi

View File

@@ -1,73 +0,0 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob nomatch notify share_history
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/balkian/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
autoload -U colors
colors
setopt prompt_subst
local smiley="%B%(?,%{$fg[green]%}☠%{$reset_color%},%{$fg[red]%}☠%{$reset_color%})%b"
PS0='${debian_chroot:+($debian_chroot)}%n@%M'
parse_git_branch()
{
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#'
}
if ( dircolors --help && ls --color ) &> /dev/null; then
# For some reason, the unixs machines need me to use $HOME instead of ~
# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit.
function precmd {
PROMPT="$PS0:%~ %{$fg[green]%}%B$(parse_git_branch)%b%{$reset_color%}
${smiley} ";
RPROMPT="%T";
}
for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do
[[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break
done
alias ls="ls --color=auto"
alias ll="ls --color=auto -l"
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
else
# No color, so put a slash at the end of directory names, etc. to differentiate.
alias ll="ls -lF"
fi
## Completions
#autoload -U compinit
#compinit -C
#
### case-insensitive (all),partial-word and then substring completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \
'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
bindkey -M vicmd 'r' history-incremental-search-backward
export PATH=$PATH:"/home/balkian/code/personal-scripts/"
#export CDPATH=$CDPATH:"/media/Data/"
# TMUX
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
# if no session is started, start a new session
if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then
stty -ixon
test -z ${TMUX} && tmux attach
# when quitting tmux, try to attach
if [[ -z ${TMUX} ]]; then
exit;
fi
fi

332
nvim/.config/nvim/init.vim Normal file
View File

@@ -0,0 +1,332 @@
"Balkian
" Auto-install plug-vim
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
!curl -fLo $HOME/.local/share/nvim/site/autoload/plug.vim --create-dirs "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
"set nocompatible " be iMproved
"filetype off " required!
call plug#begin(stdpath('data') . '/plugged')
echo stdpath('data')
Plug 'gmarik/vundle'
Plug 'LaTeX-Box-Team/LaTeX-Box'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-abolish'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/syntastic'
Plug 'ervandew/supertab'
Plug 'majutsushi/tagbar'
Plug 'MarcWeber/vim-addon-mw-utils'
" for vim-snippets
Plug 'tomtom/tlib_vim'
Plug 'honza/vim-snippets'
Plug 'garbas/vim-snipmate'
Plug 'mattn/webapi-vim'
Plug 'mattn/gist-vim'
Plug 'klen/python-mode'
Plug 'ivanov/vim-ipython'
Plug 'jamessan/vim-gnupg'
Plug 'Lokaltog/vim-easymotion'
Plug 'vim-scripts/YankRing.vim'
Plug 'kien/ctrlp.vim'
Plug 'sgur/ctrlp-extensions.vim'
Plug 'sjl/gundo.vim'
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-notes'
Plug 'beloglazov/vim-online-thesaurus'
Plug 'vim-scripts/ShowMarks'
Plug 'atweiden/vim-dragvisuals'
"Plug 'tomasr/molokai'
Plug 'chriskempson/base16-vim'
Plug 'elzr/vim-json'
Plug 'Rykka/riv.vim'
Plug 'niklasl/vim-rdf'
Plug 'lepture/vim-jinja'
call plug#end()
filetype plugin indent on " required!
set hidden " To start working with buffers instead of tabs
"highlight SpecialKey ctermfg=DarkGray
set listchars=tab:>-,trail:~
set list
set tabstop=4
set softtabstop=4
set shiftwidth=4
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
au FileType py set textwidth=79
au FileType html set tabstop=2 shiftwidth=2
autocmd Filetype javascript set ts=4 sts=4 sw=4 expandtab smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
set expandtab
set smarttab
set autoindent
set smartindent
syntax on
set ignorecase
set smartcase
set number
"set paste
set mouse=a
set autochdir
set showmatch
set incsearch
set hlsearch
set ruler
set wildmenu
set autoread
" faster commands
noremap <space> :
" Better Map Leader
let mapleader=","
noremap \ ,
" Commenting blocks of code. I don't need it with NerdCommenter
" autocmd FileType c,cpp,java,scala,javascript let b:comment_leader = '// '
" autocmd FileType sh,ruby,python let b:comment_leader = '# '
" autocmd FileType conf,fstab let b:comment_leader = '# '
" autocmd FileType tex let b:comment_leader = '% '
" autocmd FileType mail let b:comment_leader = '> '
" autocmd FileType vim let b:comment_leader = '" '
" noremap <silent> ,cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
" noremap <silent> ,cu :<C-B>silent <C-E>s/^\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR>
"
map <leader>p "+gp
map <leader>P "+gP
noremap <C-S> :w<CR>
imap <C-S> <C-O>:w<CR>
"Custom maps
noremap <Leader>n :NERDTreeToggle<CR>
noremap <Leader>t :TagbarOpen fj<CR>
noremap <Leader>f :CtrlPMixed<CR>
noremap <Leader>b :CtrlPBookmarkDir<CR>
noremap <Leader>l :CtrlPLine<CR>
"Omni
set completeopt=longest,menuone
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <C-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
\ '<C-x><C-o><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
set spell spelllang=en_gb
" tab navigation like firefox
nnoremap <C-S-tab> :tabprevious<CR>
nnoremap <C-tab> :tabnext<CR>
nnoremap <C-t> :tabnew<CR>
inoremap <C-S-tab> <Esc>:tabprevious<CR>i
inoremap <C-tab> <Esc>:tabnext<CR>i
"inoremap <C-t> <Esc>:tabnew<CR>
nnoremap <Leader>dd :bd<CR>
" Save sessions
function! RestoreSession()
if argc() == 0 "vim called without arguments
execute 'source ~/.vim/Session.vim'
end
endfunction
nmap Sq <ESC>:mksession! ~/.vim/Session.vim<CR>:qa!<CR>
nmap SQ <ESC>:mksession! ~/.vim/Session.vim<CR>:wqa<CR>
nmap SO :so ~/.vim/Session.vim<CR>
set sessionoptions+=resize,winpos
"autocmd VimEnter * call RestoreSession()
"Make tabs and buffers work better
":se switchbuf=usetab,newtab
" Color and shit
"set t_Co=256
"set background=dark
"colo solarized
colo base16-tomorrow-night
"hi SpellBad ctermfg=Red
"Statusline
set statusline=%t%h%m%r%y%{fugitive#statusline()}\%=[%{strlen(&fenc)?&fenc:'none'},%{&ff}]\ \ %c,%l/%L\ %P
set laststatus=2
" Now that I use Airline, there is no need for this :)
"function! InsertStatuslineColor(mode)
"if a:mode == 'i'
"hi statusline guibg=Red ctermbg=Red guifg=White ctermfg=White
"elseif a:mode == 'r'
"hi statusline guibg=Blue ctermfg=White guifg=White ctermbg=Blue
"else
"hi statusline ctermbg=Yellow guibg=Yellow ctermfg=Black guifg=Black
"endif
"endfunction
"call InsertStatuslineColor('')
"au InsertEnter * call InsertStatuslineColor(v:insertmode)
"au InsertLeave * call InsertStatuslineColor('')
au BufRead,BufNewFile *.md set filetype=markdown
"Diff the buffer and the original
command DiffOrig let g:diffline = line('.') | vert new | set bt=nofile | r # | 0d_ | diffthis | :exe "norm! ".g:diffline."G" | wincmd p | diffthis | wincmd p
nnoremap <Leader>do :DiffOrig<cr>
nnoremap <leader>dc :q<cr>:diffoff<cr>:exe "norm! ".g:diffline."G"<cr>
set guifont=DejaVu\ Sans\ Mono
set foldmethod=syntax
set foldclose=all
set foldopen+=insert,jump
set nofoldenable
" Matching for html
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
runtime! macros/matchit.vim
endif
""""""""""""""""""""
" GnuPG Extensions "
""""""""""""""""""""
" Tell the GnuPG plugin to armor new files.
let g:GPGPreferArmor=1
" Tell the GnuPG plugin to sign new files.
let g:GPGPreferSign=1
augroup GnuPGExtra
" Set extra file options.
autocmd BufReadCmd,FileReadCmd *.\(gpg\|asc\|pgp\) call SetGPGOptions()
" Automatically close unmodified files after inactivity.
autocmd CursorHold *.\(gpg\|asc\|pgp\) quit
augroup END
function SetGPGOptions()
" Set updatetime to 1 minute.
set updatetime=60000
" Fold at markers.
"set foldmethod=marker
setlocal foldmethod=expr
setlocal foldexpr=(getline(v:lnum)=~'^$')?-1:((indent(v:lnum)<indent(v:lnum+1))?('>'.indent(v:lnum+1)):indent(v:lnum))
set foldtext=getline(v:foldstart)
" Automatically close all folds.
set foldclose=all
" Only open folds with insert commands.
set foldopen=insert
endfunction
" CtrlP
" Do not clear the file cache on exit
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_extensions = [ 'mixed' ]
let g:ctrlp_regexp = 0
let g:ctrlp_cmd = 'CtrlPMixed'
" Git things
nmap <leader>gs :Gstatus<cr>
nmap <leader>gd :Gdiff<cr>
nmap <leader>gl :Glog<cr>
" Gundo magic
nnoremap <leader>u :GundoToggle<CR>
" YankRing+Ctrl-P
map <leader>y :YRShow<CR>
let g:yankring_replace_n_pkey = '<c-j>'
let g:yankring_replace_n_nkey = '<c-k>'
let g:airline_left_sep=''
let g:airline_right_sep='|'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline_theme='base16'
" Notes
:let g:notes_directories = ['~/Dropbox/Notes']
" Block move
vmap <expr> <LEFT> DVB_Drag('left')
vmap <expr> <RIGHT> DVB_Drag('right')
vmap <expr> <DOWN> DVB_Drag('down')
vmap <expr> <UP> DVB_Drag('up')
vmap <expr> D DVB_Duplicate()
function! s:get_visual_selection()
" Why is this not a built-in Vim script function?!
let [lnum1, col1] = getpos("'<")[1:2]
let [lnum2, col2] = getpos("'>")[1:2]
let lines = getline(lnum1, lnum2)
let lines[-1] = lines[-1][: col2 - (&selection == 'inclusive' ? 1 : 2)]
let lines[0] = lines[0][col1 - 1:]
return join(lines, "\n")
endfunction
" Thesaurus
let g:online_thesaurus_map_keys = 0
nnoremap <leader>k :OnlineThesaurusCurrentWord<CR>
vnoremap <leader>k <Esc>:Thesaurus <C-R><C-R>=<SID>get_visual_selection()<CR><CR>
" Resizing
nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>> :exe "vertical resize " . (winwidth(0) * 3/2)<CR>
nnoremap <silent> <Leader>< :exe "vertical resize " . (winwidth(0) * 2/3)<CR>
" Clipboard magic
if has('unnamedplus')
set clipboard=unnamed,unnamedplus
endif
set cursorline
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
let g:pymode_rope_project_root = "~/.ropeprojects"
" backup to ~/.tmp
set backup
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set backupskip=/tmp/*,/private/tmp/*
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set writebackup
" Easymotion
let g:EasyMotion_do_mapping = 0 " Disable default mappings
" Bi-directional find motion
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
" `s{char}{label}`
nmap s <Plug>(easymotion-s)
nmap <Leader>w <Plug>(easymotion-bd-w)
" or
" `s{char}{char}{label}`
" Need one more keystroke, but on average, it may be more comfortable.
nmap s <Plug>(easymotion-s2)
" Turn on case sensitive feature
let g:EasyMotion_smartcase = 1

Submodule oh-my-zsh deleted from 5663d3a1fe

109
picom/.picom.conf Normal file
View File

@@ -0,0 +1,109 @@
# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
# shadow-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# Opacity
#mark-override-focused = true;
#menu-opacity = 0.9;
# inactive-opacity = 0.95;
# active-opacity = 0.8;
# frame-opacity = 0.7;
inactive-opacity-override = false;
#alpha-step = 0.06;
inactive-dim = 0.4;
#inactive-dim-fixed = false;
# blur-background = true;
# blur-background-frame = true;
blur-kern = "3x3box"
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
# blur-background-fixed = true;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = [
"99:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'",
"99:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'",
"99:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'",
"99:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'",
"99:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'",
];
# Fading
fading = false;
# fade-delta = 30;
fade-in-step = 0.05;
fade-out-step = 0.05;
# no-fading-openclose = true;
# no-fading-destroyed-argb = true;
fade-exclude = [ ];
# Other
backend = "xrender"
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
#paint-on-overlay = true;
# sw-opti = true;
unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ "class_g = 'Cairo-clock'",
"class_g = 'Popcorn Time'",
# "class_g = 'firefox'",
# prevents dimming fullscreen windows
"_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'",
"_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'",
"_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'",
"_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'",
"_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'",
];
detect-transient = true;
detect-client-leader = false;
invert-color-include = [ ];
# resize-damage = 1;
# GLX backend
# glx-no-stencil = true;
glx-copy-from-front = false;
# glx-use-copysubbuffermesa = true;
# glx-no-rebind-pixmap = true;
glx-swap-method = "undefined";
# glx-use-gpushader4 = true;
# xrender-sync = true;
# xrender-sync-fence = true;
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.95; focus = true; };
};

View File

@@ -1,137 +0,0 @@
"""
This file is executed when the Python interactive shell is started if
$PYTHONSTARTUP is in your environment and points to this file. It's just
regular Python commands, so do what you will. Your ~/.inputrc file can greatly
complement this file.
"""
import os
try:
import readline
import rlcompleter
import atexit
except ImportError:
print("You need readline, rlcompleter, and atexit")
readline.parse_and_bind("tab: complete")
#readline.parse_and_bind ("bind ^I rl_complete")
class Completer(object):
def __init__(self):
# Enable a History
self.HISTFILE=os.path.expanduser("%s/.pyhistory" % os.environ["HOME"])
# Read the existing history if there is one
if os.path.exists(self.HISTFILE):
readline.read_history_file(self.HISTFILE)
# Set maximum number of items that will be written to the history file
readline.set_history_length(300)
atexit.register(self.savehist)
def savehist(self):
import readline
readline.write_history_file(self.HISTFILE)
c = Completer()
WELCOME=''
# Color Support
class TermColors(dict):
"""Gives easy access to ANSI color codes. Attempts to fall back to no color
for certain TERM values. (Mostly stolen from IPython.)"""
COLOR_TEMPLATES = (
("Black" , "0;30"),
("Red" , "0;31"),
("Green" , "0;32"),
("Brown" , "0;33"),
("Blue" , "0;34"),
("Purple" , "0;35"),
("Cyan" , "0;36"),
("LightGray" , "0;37"),
("DarkGray" , "1;30"), ("LightRed" , "1;31"),
("LightGreen" , "1;32"),
("Yellow" , "1;33"),
("LightBlue" , "1;34"),
("LightPurple" , "1;35"),
("LightCyan" , "1;36"),
("White" , "1;37"),
("Normal" , "0"),
)
NoColor = ''
_base = '\001\033[%sm\002'
def __init__(self):
if os.environ.get('TERM') in ('xterm-color', 'xterm-256color', 'linux',
'screen', 'screen-256color', 'screen-bce'):
self.update(dict([(k, self._base % v) for k,v in self.COLOR_TEMPLATES]))
else:
self.update(dict([(k, self.NoColor) for k,v in self.COLOR_TEMPLATES]))
_c = TermColors()
import sys
# Enable Color Prompts
sys.ps1 = '%s>>> %s' % (_c['Green'], _c['Normal'])
sys.ps2 = '%s... %s' % (_c['Red'], _c['Normal'])
# Enable Pretty Printing for stdout
def my_displayhook(value):
if value is not None:
try:
import __builtin__
__builtin__._ = value
except ImportError:
__builtins__._ = value
import pprint
pprint.pprint(value)
del pprint
sys.displayhook = my_displayhook
EDITOR = os.environ.get('EDITOR', 'vim')
EDIT_CMD = '\e'
from tempfile import mkstemp
from code import InteractiveConsole
class EditableBufferInteractiveConsole(InteractiveConsole):
def __init__(self, *args, **kwargs):
self.last_buffer = [] # This holds the last executed statement
InteractiveConsole.__init__(self, *args, **kwargs)
def runsource(self, source, *args):
self.last_buffer = [ source.encode('latin-1') ]
return InteractiveConsole.runsource(self, source, *args)
def raw_input(self, *args):
line = InteractiveConsole.raw_input(self, *args)
if line == EDIT_CMD:
fd, tmpfl = mkstemp('.py')
os.write(fd, b'\n'.join(self.last_buffer))
os.close(fd)
os.system('%s %s' % (EDITOR, tmpfl))
line = open(tmpfl).read()
os.unlink(tmpfl)
tmpfl = ''
lines = line.split( '\n' )
for i in range(len(lines) - 1): self.push( lines[i] )
line = lines[-1]
return line
# clean up namespace
del sys
if __name__ == "__main__":
c = EditableBufferInteractiveConsole(locals=locals())
c.interact(banner=WELCOME)
# Exit the Python shell on exiting the InteractiveConsole
import sys
sys.exit()

2
ranger/.config/ranger/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
history
tagged

View File

@@ -0,0 +1,11 @@
F:/home/j
f:/home/j
m:/home/j/Downloads
p:/home/j/Doctorado/Papers
s:/home/j/Doctorado/Papers/SocialContext
d:/home/j/Downloads
D:/home/j/Doctorado
o:/home/j/Downloads
g:/home/j/git/balkian
G:/home/j/GSI
j:/home/j/Downloads

View File

@@ -0,0 +1,11 @@
F:/home/j
f:/home/j
m:/home/j/Downloads
p:/home/j/Doctorado/Papers
s:/home/j/Doctorado/Papers/SocialContext
d:/home/j/Downloads
D:/home/j/Doctorado
o:/home/j/Downloads
g:/home/j/git/balkian
G:/home/j/GSI
j:/home/j/Downloads

View File

@@ -0,0 +1,61 @@
# This is a sample commands.py. You can add your own commands here.
#
# Please refer to commands_full.py for all the default commands and a complete
# documentation. Do NOT add them all here, or you may end up with defunct
# commands when upgrading ranger.
# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import *
# A simple command for demonstration purposes follows.
# -----------------------------------------------------------------------------
# You can import any python module as needed.
import os
# Any class that is a subclass of "Command" will be integrated into ranger as a
# command. Try typing ":my_edit<ENTER>" in ranger!
class my_edit(Command):
# The so-called doc-string of the class will be visible in the built-in
# help that is accessible by typing "?c" inside ranger.
""":my_edit <filename>
A sample command for demonstration purposes that opens a file in an editor.
"""
# The execute method is called when you run this command in ranger.
def execute(self):
# self.arg(1) is the first (space-separated) argument to the function.
# This way you can write ":my_edit somefilename<ENTER>".
if self.arg(1):
# self.rest(1) contains self.arg(1) and everything that follows
target_filename = self.rest(1)
else:
# self.fm is a ranger.core.filemanager.FileManager object and gives
# you access to internals of ranger.
# self.fm.thisfile is a ranger.container.file.File object and is a
# reference to the currently selected file.
target_filename = self.fm.thisfile.path
# This is a generic function to print text in ranger.
self.fm.notify("Let's edit the file " + target_filename + "!")
# Using bad=True in fm.notify allows you to print error messages:
if not os.path.exists(target_filename):
self.fm.notify("The given file does not exist!", bad=True)
return
# This executes a function from ranger.core.acitons, a module with a
# variety of subroutines that can help you construct commands.
# Check out the source, or run "pydoc ranger.core.actions" for a list.
self.fm.edit_file(target_filename)
# The tab method is called when you press tab, and should return a list of
# suggestions that the user will tab through.
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
def tab(self, tabnum):
# This is a generic tab-completion function that iterates through the
# content of the current directory.
return self._tab_directory_content()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,627 @@
# ===================================================================
# This file contains the default startup commands for ranger.
# To change them, it is recommended to create the file
# ~/.config/ranger/rc.conf and add your custom commands there.
#
# If you copy this whole file there, you may want to set the environment
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
#
# The purpose of this file is mainly to define keybindings and settings.
# For running more complex python code, please create a plugin in "plugins/" or
# a command in "commands.py".
#
# Each line is a command that will be run before the user interface
# is initialized. As a result, you can not use commands which rely
# on the UI such as :delete or :mark.
# ===================================================================
# ===================================================================
# == Options
# ===================================================================
# Which viewmode should be used? Possible values are:
# miller: Use miller columns which show multiple levels of the hierarchy
# multipane: Midnight-commander like multipane view showing all tabs next
# to each other
set viewmode miller
#set viewmode multipane
# How many columns are there, and what are their relative widths?
set column_ratios 1,3,4
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
# Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete multiple
# Which script is used to generate file previews?
# ranger ships with scope.sh, a script that calls external programs (see
# README.md for dependencies) to preview images, archives, etc.
set preview_script ~/.config/ranger/scope.sh
# Use the external preview script or display simple plain text or image previews?
set use_preview_script true
# Automatically count files in the directory, even before entering them?
set automatically_count_files true
# Open all images in this directory when running certain image viewers
# like feh or sxiv? You can still open selected files by marking them.
set open_all_images true
# Be aware of version control systems and display information.
set vcs_aware true
# State of the three backends git, hg, bzr. The possible states are
# disabled, local (only show local info), enabled (show local and remote
# information).
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
# Use one of the supported image preview protocols
set preview_images true
# Set the preview image method. Supported methods:
#
# * w3m (default):
# Preview images in full color with the external command "w3mimgpreview"?
# This requires the console web browser "w3m" and a supported terminal.
# It has been successfully tested with "xterm" and "urxvt" without tmux.
#
# * iterm2:
# Preview images in full color using iTerm2 image previews
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
# with image preview support.
#
# * urxvt:
# Preview images in full color using urxvt image backgrounds. This
# requires using urxvt compiled with pixbuf support.
#
# * urxvt-full:
# The same as urxvt but utilizing not only the preview pane but the
# whole terminal window.
set preview_images_method w3m
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis false
# Show dotfiles in the bookmark preview box?
set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default:
# default, jungle, snow, solarized
set colorscheme default
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
set preview_files true
set preview_directories true
set collapse_preview true
# Save the console history on exit?
set save_console_history true
# Draw the status bar on top of the browser window (default: bottom)
set status_bar_on_top false
# Draw a progress bar in the status bar which displays the average state of all
# currently running tasks which support progress bars?
set draw_progress_bar_in_status_bar true
# Draw borders around columns?
set draw_borders true
# Display the directory name in tabs?
set dirname_in_tabs true
# Enable the mouse support?
set mouse_enabled true
# Display the file size in the main column or status bar?
set display_size_in_main_column true
set display_size_in_status_bar true
# Display files tags in all columns or only in main column?
set display_tags_in_all_columns true
# Set a title for the window?
set update_title false
# Set the title to "ranger" in the tmux program?
set update_tmux_title false
# Shorten the title if it gets long? The number defines how many
# directories are displayed at once, 0 turns off this feature.
set shorten_title 3
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
set tilde_in_titlebar false
# How many directory-changes or console-commands should be kept in history?
set max_history_size 20
set max_console_history_size 50
# Try to keep so much space between the top/bottom border when scrolling:
set scroll_offset 8
# Flush the input after each key hit? (Noticeable when ranger lags)
set flushinput true
# Padding on the right when there's no preview?
# This allows you to click into the space to run the file.
set padding_right true
# Save bookmarks (used with mX and `X) instantly?
# This helps to synchronize bookmarks between multiple ranger
# instances but leads to *slight* performance loss.
# When false, bookmarks are saved when ranger is exited.
set autosave_bookmarks true
set save_backtick_bookmark false
# You can display the "real" cumulative size of directories by using the
# command :get_cumulative_size or typing "dc". The size is expensive to
# calculate and will not be updated automatically. You can choose
# to update it automatically though by turning on this option:
set autoupdate_cumulative_size false
# Turning this on makes sense for screen readers:
set show_cursor false
# One of: size, natural, basename, atime, ctime, mtime, type, random
set sort natural
# Additional sorting options
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
set sort_unicode false
# Enable this if key combinations with the Alt Key don't work for you.
# (Especially on xterm)
set xterm_alt_key false
# Whether to include bookmarks in cd command
set cd_bookmarks true
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
# disable this feature.
set preview_max_size 10000000
# Add the highlighted file to the path in the titlebar
set show_selection_in_titlebar true
# The delay that ranger idly waits for user input, in milliseconds, with a
# resolution of 100ms. Lower delay reduces lag between directory updates but
# increases CPU load.
set idle_delay 2000
# When the metadata manager module looks for metadata, should it only look for
# a ".metadata.json" file in the current directory, or do a deep search and
# check all directories above the current one as well?
set metadata_deep_search false
# Clear all existing filters when leaving a directory
set clear_filters_on_dir_change false
# Disable displaying line numbers in main column
set line_numbers false
# ===================================================================
# == Local Options
# ===================================================================
# You can set local options that only affect a single directory.
# Examples:
# setlocal path=~/downloads sort mtime
# ===================================================================
# == Command Aliases in the Console
# ===================================================================
alias e edit
alias q quit
alias q! quitall
alias qa quitall
alias qall quitall
alias setl setlocal
alias filter scout -prt
alias find scout -feit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefiklst
# ===================================================================
# == Define keys for the browser
# ===================================================================
# Basic
unmap Q
#quit!
unmap q
#quit
copymap q ZZ ZQ
map R reload_cwd
map <C-r> reset
map <C-l> redraw_window
map <C-c> abort
map <esc> change_mode normal
map ~ set viewmode!
map i display_file
map ? help
map W display_log
map w taskview_open
map S shell $SHELL
map : console
map ; console
map ! console shell%space
map @ console -p6 shell %%s
map # console shell -p%space
map s console shell%space
map r chain draw_possible_programs; console open_with%space
map f console find%space
map cd console cd%space
# Change the line mode
map Mf linemode filename
map Mi linemode fileinfo
map Mm linemode mtime
map Mp linemode permissions
map Ms linemode sizemtime
map Mt linemode metatitle
# Tagging / Marking
map t tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map v mark_files all=True toggle=True
map uv mark_files all=True val=False
map V toggle_visual_mode
map uV toggle_visual_mode reverse=True
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
map <DELETE> console delete
map <INSERT> console touch%space
# VIM-like
copymap <UP> k
copymap <DOWN> j
copymap <LEFT> h
copymap <RIGHT> l
copymap <HOME> gg
copymap <END> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
# Jumping around
map H history_go -1
map L history_go 1
map ] move_parent 1
map [ move_parent -1
map } traverse
map gh cd ~
map ge cd /etc
map gu cd /usr
map gd cd /dev
map gl cd -r .
map gL cd -r %f
map go cd /opt
map gv cd /var
map gm cd /media
map gM cd /mnt
map gs cd /srv
map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g/ cd /
map g? cd /usr/share/doc/ranger
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
# Filesystem Operations
map = chmod
map cw console rename%space
map a rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
map pp paste
map po paste overwrite=True
map pP paste append=True
map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
map dD console delete
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map dt cut mode=toggle
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
map yt copy mode=toggle
# Temporary workarounds
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map / console search%space
map n search_next
map N search_next forward=False
map ct search_next order=tag
map cs search_next order=size
map ci search_next order=mimetype
map cc search_next order=ctime
map cm search_next order=mtime
map ca search_next order=atime
map <C-T> terminal
map T eval fm.execute_console("shell tmux send-keys -t 1 'cd " + str(fm.thisdir) + "' 'Enter' \; select-pane -t 1") if 'TMUX' in os.environ.keys() else fm.execute_console("terminal")
#map <C-e> eval cmd("myemacs -n {0}".format(f.thisfile.relative_path))
map <C-e> shell myemacs -n %s
copymap <C-e> e
# Tabs
map <C-n> tab_new ~
map <C-w> tab_close
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
map gt tab_move 1
map gT tab_move -1
map gn tab_new ~
map gc tab_close
map uq tab_restore
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
# Sorting
map or set sort_reverse!
map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
map dC chain mark_files all=True val=True; get_cumulative_size; chain mark_files all=True val=False
# Settings
map zc set collapse_preview!
map zd set sort_directories_first!
map zh set show_hidden!
map <C-h> set show_hidden!
map zI set flushinput!
map zi set preview_images!
map zm set mouse_enabled!
map zp set preview_files!
map zP set preview_directories!
map zs set sort_case_insensitive!
map zu set autoupdate_cumulative_size!
map zv set use_preview_script!
map zf console filter%space
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map m<any> set_bookmark %any
map um<any> unset_bookmark %any
map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# ===================================================================
# == Define keys for the console
# ===================================================================
# Note: Unmapped keys are passed directly to the console.
# Basic
cmap <tab> eval fm.ui.console.tab()
cmap <s-tab> eval fm.ui.console.tab(-1)
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
cmap <C-l> redraw_window
copycmap <ESC> <C-c>
copycmap <CR> <C-j>
# Move around
cmap <up> eval fm.ui.console.history_move(-1)
cmap <down> eval fm.ui.console.history_move(1)
cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
cmap <a-left> eval fm.ui.console.move_word(left=1)
cmap <a-right> eval fm.ui.console.move_word(right=1)
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
# And of course the emacs way
copycmap <up> <C-p>
copycmap <down> <C-n>
copycmap <left> <C-b>
copycmap <right> <C-f>
copycmap <home> <C-a>
copycmap <end> <C-e>
copycmap <delete> <C-d>
copycmap <backspace> <C-h>
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
# and <backspace2> (code 127). To be sure, use both.
copycmap <backspace> <backspace2>
# This special expression allows typing in numerals:
cmap <allow_quantifiers> false
# ===================================================================
# == Pager Keybindings
# ===================================================================
# Movement
pmap <down> pager_move down=1
pmap <up> pager_move up=1
pmap <left> pager_move left=4
pmap <right> pager_move right=4
pmap <home> pager_move to=0
pmap <end> pager_move to=-1
pmap <pagedown> pager_move down=1.0 pages=True
pmap <pageup> pager_move up=1.0 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <C-u> pager_move up=0.5 pages=True
copypmap <UP> k <C-p>
copypmap <DOWN> j <C-n> <CR>
copypmap <LEFT> h
copypmap <RIGHT> l
copypmap <HOME> g
copypmap <END> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
pmap <C-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
# ===================================================================
# == Taskview Keybindings
# ===================================================================
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
# RSYNC
#sync buffer'd files into curr dir :links only
map ps shell -f rsync -rult %c %d

View File

@@ -0,0 +1,212 @@
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
# $1-$9 | The n-th selected file
# $@ | All selected files
#
# If you use the special command "ask", rifle will ask you what program to run.
#
# Prefixing a condition with "!" will negate its result.
# These conditions are currently supported:
# match <regexp> | The regexp matches $1
# ext <regexp> | The regexp matches the extension of $1
# mime <regexp> | The regexp matches the mime type of $1
# name <regexp> | The regexp matches the basename of $1
# path <regexp> | The regexp matches the absolute path of $1
# has <program> | The program is installed (i.e. located in $PATH)
# env <variable> | The environment variable "variable" is non-empty
# file | $1 is a file
# directory | $1 is a directory
# number <n> | change the number of this command to n
# terminal | stdin, stderr and stdout are connected to a terminal
# X | $DISPLAY is not empty (i.e. Xorg runs)
#
# There are also pseudo-conditions which have a "side effect":
# flag <flags> | Change how the program is run. See below.
# label <label> | Assign a label or name to the command so it can
# | be started with :open_with <label> in ranger
# | or `rifle -p <label>` in the standalone executable.
# else | Always true.
#
# Flags are single characters which slightly transform the command:
# f | Fork the program, make it run in the background.
# | New command = setsid $command >& /dev/null &
# r | Execute the command with root permissions
# | New command = sudo $command
# t | Run the program in a new terminal. If $TERMCMD is not defined,
# | rifle will attempt to extract it from $TERM.
# | New command = $TERMCMD -e $command
# Note: The "New command" serves only as an illustration, the exact
# implementation may differ.
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
#-------------------------------------------
# Websites
#-------------------------------------------
# Rarely installed browsers get higher priority; It is assumed that if you
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
# other hand are often only installed as fallback browsers.
ext x?html?, has surf, X, flag f = surf -- file://"$1"
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext x?html?, has dwb, X, flag f = dwb -- "$@"
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
ext x?html?, has luakit, X, flag f = luakit -- "$@"
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
ext x?html?, has midori, X, flag f = midori -- "$@"
ext x?html?, has chromium, X, flag f = chromium -- "$@"
ext x?html?, has opera, X, flag f = opera -- "$@"
ext x?html?, has firefox, X, flag f = firefox -- "$@"
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
ext x?html?, has elinks, terminal = elinks "$@"
ext x?html?, has links2, terminal = links2 "$@"
ext x?html?, has links, terminal = links "$@"
ext x?html?, has lynx, terminal = lynx -- "$@"
ext x?html?, has w3m, terminal = w3m "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
# Define the "editor" for text files as first action
mime ^text, label editor = $VISUAL -- "$@"
mime ^text, label pager = "$PAGER" -- "$@"
mime ^text, label external = $VISUAL -nc -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $VISUAL -- "$@"
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
ext 1 = man "$1"
ext s[wmf]c, has zsnes, X = zsnes "$1"
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
ext nes, has fceux, X = fceux "$1"
ext exe = wine "$1"
name ^[mM]akefile$ = make
#--------------------------------------------
# Code
#-------------------------------------------
ext py = python -- "$1"
ext pl = perl -- "$1"
ext rb = ruby -- "$1"
ext js = node -- "$1"
ext sh = sh -- "$1"
ext php = php -- "$1"
#--------------------------------------------
# Audio without X
#-------------------------------------------
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
#--------------------------------------------
# Video/Audio with a GUI
#-------------------------------------------
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
mime ^video, has mpv, X, flag f = mpv -- "$@"
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
mime ^video|audio, has totem, X, flag f = totem -- "$@"
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
#--------------------------------------------
# Video without X:
#-------------------------------------------
mime ^video, terminal, !X, has mpv = mpv -- "$@"
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has llpp, X, flag f = llpp "$@"
ext pdf, has zathura, X, flag f = zathura -- "$@"
ext pdf, has mupdf, X, flag f = mupdf "$@"
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
ext pdf, has evince, X, flag f = evince -- "$@"
ext pdf, has atril, X, flag f = atril -- "$@"
ext pdf, has okular, X, flag f = okular -- "$@"
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
ext djvu, has zathura,X, flag f = zathura -- "$@"
ext djvu, has evince, X, flag f = evince -- "$@"
ext djvu, has atril, X, flag f = atril -- "$@"
#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
mime ^image, has feh, X, flag f = feh -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has ristretto, X, flag f = ristretto "$@"
mime ^image, has eog, X, flag f = eog -- "$@"
mime ^image, has eom, X, flag f = eom -- "$@"
mime ^image, has gimp, X, flag f = gimp -- "$@"
ext xcf, X, flag f = gimp -- "$@"
#-------------------------------------------
# Archives
#-------------------------------------------
# avoid password prompt by providing empty password
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
# This requires atool
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has als = als -- "$@" | "$PAGER"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als = als -- "$@" | "$PAGER"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has aunpack = aunpack -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack = aunpack -- "$@"
# Fallback:
ext tar|gz, has tar = tar vvtf "$@" | "$PAGER"
ext tar|gz, has tar = tar vvxf "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
# Define the editor for non-text files + pager as last action
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $VISUAL -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
# The very last action, so that it's never triggered accidentally, is to execute a program:
mime application/x-executable = "$1"

121
ranger/.config/ranger/scope.sh Executable file
View File

@@ -0,0 +1,121 @@
#!/usr/bin/env sh
# ranger supports enhanced previews. If the option "use_preview_script"
# is set to True and this file exists, this script will be called and its
# output is displayed in ranger. ANSI color codes are supported.
# NOTES: This script is considered a configuration file. If you upgrade
# ranger, it will be left untouched. (You must update it yourself.)
# Also, ranger disables STDIN here, so interactive scripts won't work properly
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | success. display stdout as preview
# 1 | no preview | failure. display no preview at all
# 2 | plain text | display the plain content of the file
# 3 | fix width | success. Don't reload when width changes
# 4 | fix height | success. Don't reload when height changes
# 5 | fix both | success. Don't ever reload
# 6 | image | success. display the image $cached points to as an image preview
# 7 | image | success. display the file directly as an image
# Meaningful aliases for arguments:
path="$1" # Full path of the selected file
width="$2" # Width of the preview pane (number of fitting characters)
height="$3" # Height of the preview pane (number of fitting characters)
cached="$4" # Path that should be used to cache image previews
preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
# Find out something about the file:
mimetype=$(file --mime-type -Lb "$path")
extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
# Functions:
# runs a command and saves its output into $output. Useful if you need
# the return value AND want to use the output in a pipe
try() { output=$(eval '"$@"'); }
# writes the output of the previously used "try" command
dump() { /bin/echo "$output"; }
# a common post-processing function used after most commands
trim() { head -n "$maxln"; }
# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
safepipe() { "$@"; test $? = 0 -o $? = 141; }
# Image previews, if enabled in ranger.
if [ "$preview_images" = "True" ]; then
case "$mimetype" in
# Image previews for SVG files, disabled by default.
###image/svg+xml)
### convert "$path" "$cached" && exit 6 || exit 1;;
# Image previews for image files. w3mimgdisplay will be called for all
# image files (unless overriden as above), but might fail for
# unsupported types.
image/*)
exit 7;;
# Image preview for video, disabled by default.:
video/*)
ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
esac
fi
case "$extension" in
# Archive extensions:
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
try als "$path" && { dump | trim; exit 0; }
try acat "$path" && { dump | trim; exit 3; }
try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;;
rar)
# avoid password prompt by providing empty password
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
7z)
# avoid password prompt by providing empty password
try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
# PDF documents:
pdf)
try pdftotext -l 10 -nopgbrk -q "$path" - && \
{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
# BitTorrent Files
torrent)
try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
# ODT Files
odt|ods|odp|sxw)
try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
# HTML Pages:
htm|html|xhtml)
try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
;; # fall back to highlight/cat if the text browsers fail
esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
if [ "$(tput colors)" -ge 256 ]; then
pygmentize_format=terminal256
highlight_format=xterm256
else
pygmentize_format=terminal
highlight_format=ansi
fi
try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
exit 2;;
# Ascii-previews of images:
image/*)
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
# Display information about media files:
video/* | audio/*)
exiftool "$path" && exit 5
# Use sed to remove spaces so the output fits into the narrow window
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
esac
exit 1

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --auto

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --same-as eDP1 --output VGA1 --off

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1-1 --primary --mode 1920x1080 --pos 320x1080 --rotate normal --output DP-1-1 --mode 2560x1080 --pos 0x0 --rotate normal --output HDMI-1-1 --off --output DP-1-2 --off --output HDMI-1-2 --off

View File

@@ -0,0 +1,3 @@
#!/bin/sh
xrandr --output VIRTUAL1 --off --output DP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 1920x0 --rotate normal --output VGA1 --off
xrandr --output "DVI-1-0" --off

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP1 --off --output DVI-1 --off --output DP1 --off --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output HDMI1 --off --output DVI-1 --off --output DP-1 --off --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off --auto

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 1080x1080 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate left --output DP2 --mode 2560x1080 --pos 1080x0 --rotate normal

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 2240x1080 --rotate normal --output DP-1 --off --output HDMI-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2 --mode 2560x1080 --pos 1920x0 --rotate normal --output HDMI-2 --off

19
scripts/.bin/btmenu Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
if command -v myrofi >/dev/null 2>&1;
then
program="myrofi -no-show-icons -dmenu"
else
program="dmenu"
fi
bluetoothctl power on
bluetoothctl agent on
bluetoothctl default-agent
# bluetoothctl scan on
list=$(bluetoothctl paired-devices);
device=$(echo -ne "$list" | cut -d' ' -f 3- | $program "$@" )
addr=$(echo "$list" | grep "$device" | cut -d' ' -f2)
bluetoothctl connect "$addr"

4
scripts/.bin/colors.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done

21
scripts/.bin/compose-run Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
CWD=$PWD
if [ -z "$CONTAINER" ];
then
CONTAINER=main
fi
while [ -e "$PWD" -a "$PWD" != "/" ]
do
if [ -e "$PWD/docker-compose.yml" ]; then
docker-compose run --rm main $*
exit $?
else
cd `dirname $PWD`
fi
done
cd $CWD
eval $*

4
scripts/.bin/copybib Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
cat ~/Exported\ Items.bib | sed -n 's/@.*{\(.*\),/\\cite{\1}/p' | xclip -selection clipboard
sleep 1
cat ~/Exported\ Items.bib | xclip -selection clipboard

Some files were not shown because too many files have changed in this diff Show More