Merge branch 'master' of https://github.com/asmaps/dotfiles
This commit is contained in:
commit
04c4582a97
3 files changed
+27
-7
No files matched your search
@@ -5,6 +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`/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)"
|
||||||
|
|||||||
@@ -53,8 +53,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 debian virtualenvwrapper ssh-agent)
|
plugins=(tmux virtualenvwrapper ssh-agent extract)
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
+24
-6
@@ -34,6 +34,13 @@ 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('~')
|
||||||
|
|
||||||
@@ -44,10 +51,14 @@ keys = [
|
|||||||
),
|
),
|
||||||
Key(
|
Key(
|
||||||
[mod, "control"], "2",
|
[mod, "control"], "2",
|
||||||
lazy.spawn("sh -c " + home + "/.screenlayout/office.sh"),
|
lazy.spawn("sh -c " + home + "/.screenlayout/2screens.sh"),
|
||||||
),
|
),
|
||||||
Key(
|
Key(
|
||||||
[mod, "control"], "3",
|
[mod, "control"], "3",
|
||||||
|
lazy.spawn("sh -c " + home + "/.screenlayout/office.sh"),
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[mod, "control"], "4",
|
||||||
lazy.spawn("sh -c " + home + "/.screenlayout/home.sh"),
|
lazy.spawn("sh -c " + home + "/.screenlayout/home.sh"),
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -94,8 +105,13 @@ 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([], "XF86AudioMute", lazy.spawn("pavucontrol")),
|
||||||
Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 10")),
|
Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 3")),
|
||||||
Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 10")),
|
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()),
|
||||||
@@ -135,8 +151,11 @@ widget_defaults = dict(
|
|||||||
|
|
||||||
def getIp():
|
def getIp():
|
||||||
import requests
|
import requests
|
||||||
|
try:
|
||||||
r = requests.get("http://ipv4.nsupdate.info/myip")
|
r = requests.get("http://ipv4.nsupdate.info/myip")
|
||||||
return r.text
|
return r.text
|
||||||
|
except:
|
||||||
|
return 'No IPv4'
|
||||||
|
|
||||||
|
|
||||||
def getIpv6():
|
def getIpv6():
|
||||||
@@ -163,7 +182,7 @@ screens = [
|
|||||||
bottom=bar.Bar(
|
bottom=bar.Bar(
|
||||||
[
|
[
|
||||||
widget.WindowName(),
|
widget.WindowName(),
|
||||||
widget.Notify(),
|
widget.Notify(default_timeout=10),
|
||||||
widget.GenPollText(func=getIpv6),
|
widget.GenPollText(func=getIpv6),
|
||||||
widget.Sep(),
|
widget.Sep(),
|
||||||
widget.GenPollText(func=getIp),
|
widget.GenPollText(func=getIp),
|
||||||
@@ -226,7 +245,7 @@ def is_running(process):
|
|||||||
def execute_once(process):
|
def execute_once(process):
|
||||||
if not is_running(process):
|
if not is_running(process):
|
||||||
logging.getLogger('libqtile').warning('Starting ' + str(process))
|
logging.getLogger('libqtile').warning('Starting ' + str(process))
|
||||||
return subprocess.Popen(process, shell="/bin/bash")
|
return subprocess.Popen(process)
|
||||||
else:
|
else:
|
||||||
logging.getLogger('libqtile').warning(str(process) + ' already running. Not starting it')
|
logging.getLogger('libqtile').warning(str(process) + ' already running. Not starting it')
|
||||||
|
|
||||||
@@ -234,4 +253,3 @@ def execute_once(process):
|
|||||||
@hook.subscribe.startup
|
@hook.subscribe.startup
|
||||||
def startup():
|
def startup():
|
||||||
execute_once('nm-applet')
|
execute_once('nm-applet')
|
||||||
execute_once('xautolock -detectsleep -time 15 -locker "i3lock -c 000000" & disown'.split())
|
|
||||||
Reference in new issue
Block a user