Conflicts:
	init_server.sh
	ohmyzshrc
master
Arne Schauf 8 years ago
commit 75a72519af
  1. 6
      autolock.sh
  2. 2
      init.sh
  3. 4
      init_server.sh
  4. 9
      ohmyzshrc
  5. 73
      qtile_config.py
  6. 3
      tmux.conf
  7. 14
      vimrc

@ -1,6 +0,0 @@
#!/bin/sh
exec xautolock -detectsleep \
-time 15 -locker "i3lock -c 000000" \
-notify 30 \
-notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 30 seconds'"

@ -5,7 +5,7 @@ ln -snf `pwd`/tmux.conf ~/.tmux.conf
ln -snf `pwd`/qtile_config.py ~/.config/qtile/config.py ln -snf `pwd`/qtile_config.py ~/.config/qtile/config.py
ln -snf `pwd`/gitconfig ~/.gitconfig ln -snf `pwd`/gitconfig ~/.gitconfig
ln -snf `pwd`/gitignore ~/.gitignore ln -snf `pwd`/gitignore ~/.gitignore
ln -snf `pwd`/autolock.sh ~/.autolock.sh ln -snf `pwd`/autostart.sh ~/.autostart.sh
echo "Installing oh-my-zsh..." echo "Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

@ -1,12 +1,8 @@
mkdir -p ~/.backup mkdir -p ~/.backup
ln -snf `pwd`/vimrc ~/.vimrc ln -snf `pwd`/vimrc ~/.vimrc
ln -snf `pwd`/tmux.server.conf ~/.tmux.conf ln -snf `pwd`/tmux.server.conf ~/.tmux.conf
ln -snf `pwd`/zshrc.local ~/.zshrc.local
ln -snf `pwd`/zshrc ~/.zshrc
ln -snf `pwd`/gitconfig ~/.gitconfig ln -snf `pwd`/gitconfig ~/.gitconfig
ln -snf `pwd`/gitignore ~/.gitignore ln -snf `pwd`/gitignore ~/.gitignore
# set up vim
#vim +BundleInstall! +qall
echo "Installing oh-my-zsh..." echo "Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

@ -4,6 +4,7 @@ export ZSH_TMUX_FIXTERM=false
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh export ZSH=~/.oh-my-zsh
export LC_ALL=en_US.UTF-8
# Set name of the theme to load. # Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/ # Look in ~/.oh-my-zsh/themes/
@ -53,8 +54,9 @@ ZSH_THEME="gentoo"
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(git cp dirpersist tmux ssh-agent) plugins=(tmux dirpersist virtualenvwrapper ssh-agent extract node npm)
zstyle ':completion:*' special-dirs true
zstyle :omz:plugins:ssh-agent identities id_rsa zstyle :omz:plugins:ssh-agent identities id_rsa
# User configuration # User configuration
@ -88,3 +90,8 @@ source $ZSH/oh-my-zsh.sh
# Example aliases # Example aliases
# alias zshconfig="mate ~/.zshrc" # alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
alias mkvirtualenv3="mkvirtualenv -p `which python3`"
alias dc="docker-compose"
stty -ixon

@ -26,20 +26,41 @@
import os import os
import subprocess import subprocess
import re
import logging
from libqtile.config import Key, Screen, Group, Drag, Click from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy from libqtile.command import lazy
from libqtile import layout, bar, widget, hook from libqtile import layout, bar, widget, hook
def spawn_with_env_lazy(command, env):
def spawn_env():
subprocess.Popen(command.split(' '), env=env)
return spawn_env
mod = "mod4" mod = "mod4"
home = os.path.expanduser('~') home = os.path.expanduser('~')
keys = [ keys = [
Key( Key(
[mod, "control"], "1", [mod, "control"], "1",
lazy.spawn("sh -c " + home + "/.screenlayout/1screen.sh"),
),
Key(
[mod, "control"], "2",
lazy.spawn("sh -c " + home + "/.screenlayout/2screens.sh"),
),
Key(
[mod, "control"], "3",
lazy.spawn("sh -c " + home + "/.screenlayout/office.sh"), lazy.spawn("sh -c " + home + "/.screenlayout/office.sh"),
), ),
Key(
[mod, "control"], "4",
lazy.spawn("sh -c " + home + "/.screenlayout/home.sh"),
),
# Switch between windows in current stack pane # Switch between windows in current stack pane
Key( Key(
@ -83,6 +104,14 @@ keys = [
), ),
Key([mod], "Return", lazy.spawn("terminator")), Key([mod], "Return", lazy.spawn("terminator")),
Key(["control", "mod1"], "l", lazy.spawn("xautolock -locknow")), Key(["control", "mod1"], "l", lazy.spawn("xautolock -locknow")),
Key([], "XF86AudioMute", lazy.spawn("pavucontrol")),
Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 3")),
Key(["shift"], "XF86MonBrightnessUp", lazy.spawn("xbacklight -set 100")),
Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 3")),
Key(["shift"], "XF86MonBrightnessDown", lazy.spawn("xbacklight -set 1")),
Key([], "XF86LaunchA", lazy.spawn("xinput set-prop 11 \"Device Enabled\" 0")),
Key(["shift"], "XF86LaunchA", lazy.spawn("xinput set-prop 11 \"Device Enabled\" 1")),
Key(['mod1', "control"], "f", lazy.spawn('/home/ars/start_ff.sh')),
# Toggle between different layouts as defined below # Toggle between different layouts as defined below
Key([mod], "Tab", lazy.next_layout()), Key([mod], "Tab", lazy.next_layout()),
@ -122,8 +151,20 @@ widget_defaults = dict(
def getIp(): def getIp():
import requests import requests
r = requests.get("http://ipv4.nsupdate.info/myip") try:
return r.text r = requests.get("http://ipv4.nsupdate.info/myip")
return r.text
except:
return 'No IPv4'
def getIpv6():
import requests
try:
r = requests.get("http://ipv6.nsupdate.info/myip")
return r.text
except:
return 'No IPv6'
screens = [ screens = [
Screen( Screen(
@ -141,7 +182,9 @@ screens = [
bottom=bar.Bar( bottom=bar.Bar(
[ [
widget.WindowName(), widget.WindowName(),
widget.Notify(), widget.Notify(default_timeout=10),
widget.GenPollText(func=getIpv6),
widget.Sep(),
widget.GenPollText(func=getIp), widget.GenPollText(func=getIp),
widget.Sep(), widget.Sep(),
widget.ThermalSensor(tag_sensor='Core 0'), widget.ThermalSensor(tag_sensor='Core 0'),
@ -186,3 +229,27 @@ auto_fullscreen = True
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in # We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist. # java that happens to be on java's whitelist.
wmname = "LG3D" wmname = "LG3D"
def is_running(process):
s = subprocess.Popen(["ps", "axuw"], stdout=subprocess.PIPE)
if isinstance(process, list):
process = process[0]
for x in s.stdout:
if re.search(process.encode(), x):
return True
return False
def execute_once(process):
if not is_running(process):
logging.getLogger('libqtile').warning('Starting ' + str(process))
return subprocess.Popen(process)
else:
logging.getLogger('libqtile').warning(str(process) + ' already running. Not starting it')
@hook.subscribe.startup
def startup():
execute_once('nm-applet')

@ -9,6 +9,9 @@ set -g prefix C-a
bind a send-prefix bind a send-prefix
bind-key C-a last-window bind-key C-a last-window
# new window with current pwd
bind c new-window -c "#{pane_current_path}"
# basic settings # basic settings
set -g history-limit 30000 set -g history-limit 30000
set-option -g default-shell /usr/bin/zsh set-option -g default-shell /usr/bin/zsh

14
vimrc

@ -32,6 +32,7 @@ set undofile
set undodir=~/.backup/ set undodir=~/.backup/
set backup set backup
set backupdir=~/.backup/ set backupdir=~/.backup/
set backupcopy=yes
"" tabs and stuff "" tabs and stuff
set nosmartindent set nosmartindent
@ -79,9 +80,6 @@ autocmd BufNewFile,BufReadPost *.md set formatoptions+=t
autocmd BufNewFile,BufReadPost Dockerfile set filetype=dockerfile autocmd BufNewFile,BufReadPost Dockerfile set filetype=dockerfile
au BufNewFile,BufRead *.mustache,*.hogan,*.hulk,*.hjs set filetype=html.mustache syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
au BufNewFile,BufRead *.handlebars,*.hbs set filetype=html.handlebars syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
"" Vundle "" Vundle
" Setting up Vundle - the vim plugin bundler " Setting up Vundle - the vim plugin bundler
@ -166,3 +164,13 @@ Bundle 'trevorrjohn/vim-obsidian'
colorscheme obsidian colorscheme obsidian
Plugin 'othree/html5.vim' Plugin 'othree/html5.vim'
Plugin 'othree/yajs.vim', { 'for': 'html' }
Plugin 'othree/javascript-libraries-syntax.vim'
Plugin 'vim-scripts/SyntaxComplete'
Plugin 'pangloss/vim-javascript'
Plugin 'posva/vim-vue'
au BufNewFile,BufRead *.vue set filetype=html
au BufNewFile,BufReadPost *.vue set shiftwidth=2
au BufNewFile,BufReadPost *.vue set softtabstop=2
au BufNewFile,BufReadPost *.js set shiftwidth=2
au BufNewFile,BufReadPost *.js set softtabstop=2

Loading…
Cancel
Save