From 56ab081d6404937847fe3825b43c868cb7269e99 Mon Sep 17 00:00:00 2001 From: id101010 Date: Mon, 24 Sep 2018 14:32:50 +0200 Subject: [PATCH] Manage symlinks with rcm --- README.md | 26 +-- urxvt/Xdefaults => Xdefaults | 60 +++---- dunstrc | 300 ++++++++++++++++++++++++++++++++ {i3wm => i3}/config | 37 ++-- {i3wm => i3}/i3status.conf | 28 +-- {i3wm => i3}/util/volnotid.sh | 0 {i3wm => i3}/util/wallpapers.sh | 0 i3wm/util/authenticator.sh | 37 ---- i3wm/util/i3blur.py | 53 ------ i3wm/util/i3dmenu-wrapper.sh | 8 - setup.sh | 91 ---------- vim/vimrc => vimrc | 1 + xinitrc | 38 ++++ zsh/zshrc | 122 ------------- zshrc | 111 ++++++++++++ 15 files changed, 514 insertions(+), 398 deletions(-) rename urxvt/Xdefaults => Xdefaults (58%) create mode 100644 dunstrc rename {i3wm => i3}/config (90%) rename {i3wm => i3}/i3status.conf (66%) rename {i3wm => i3}/util/volnotid.sh (100%) rename {i3wm => i3}/util/wallpapers.sh (100%) delete mode 100755 i3wm/util/authenticator.sh delete mode 100755 i3wm/util/i3blur.py delete mode 100755 i3wm/util/i3dmenu-wrapper.sh delete mode 100755 setup.sh rename vim/vimrc => vimrc (99%) create mode 100644 xinitrc delete mode 100644 zsh/zshrc create mode 100644 zshrc diff --git a/README.md b/README.md index a7367c0..524f9d3 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,6 @@ # LinuxDotFiles -Personal Linux configuration files for +This repository is part of the ansible-archlinux setup. It contains all my personal linux dotfiles. +All content is managed by [rcm](https://robots.thoughtbot.com/rcm-for-rc-files-in-dotfiles-repos). -- i3wm -- vim -- tmux -- urxvt -- zsh - -# Dependencies - -You'll need the following software for a fully functional setup. - -- i3-wm -- i3status -- i3lock -- dmenu -- zsh -- vim -- rxvt-unicode -- tmux -- feh -- volnoti (AUR, GitHub) -- jauth-git (AUR, GitHub) +The ansible setup will install this repo to ~/.dotfiles and rcm will take care +of all symlinks. diff --git a/urxvt/Xdefaults b/Xdefaults similarity index 58% rename from urxvt/Xdefaults rename to Xdefaults index 9b302f8..43f0067 100644 --- a/urxvt/Xdefaults +++ b/Xdefaults @@ -10,20 +10,15 @@ # Real transparency -> needs composite manager URxvt*depth: 32 -URxvt*background: rgba:0000/0000/0000/cfff +URxvt*background: rgba:0000/0000/0000/CFFF +ARxvt.transparent: true +URxvt.tintColor: white +URxvt.shading: 20 -# Fake transparency -#URxvt.transparent: true -#URxvt.shading: 30 - -#URxvt*tintColor: White +URxvt*tintColor: Black URxvt*saveLines: 9000000 -#URxvt*foreground: Grey -# Fonts For Powerlinefonts: https://github.com/powerline/fonts (Arch linux -> AUR) -#URxvt.font: xft:Droid Sans Mono:pixelsize=18:antialias=true:hinting=true -#URxvt.boldFont: xft:Droid Sans Mono:bold:pixelsize=18:antialias=true:hinting=true -#URxvt.tabbed.font: xft:Droid Sans Mono:pixelsize=18:antialias=true:hinting=true +# Font For Powerlinefonts: https://github.com/powerline/fonts (Arch linux -> AUR) URxvt*font: xft:Roboto Mono for Powerline:pixelsize=15:antialias=true:hinting=false URxvt*boldFont: xft:Roboto Mono for Powerline :bold:pixelsize=14:antialias=true:hinting=true URxvt*tabbed.font: xft:Roboto Mono for Powerline :pixelsize=14:antialias=true:hinting=true @@ -38,6 +33,11 @@ URxvt*tabbed.tab-bg: 1 URxvt*tabbed.secondaryScroll: true URxvt*inheritPixmap: true +#Graphic +Xft*dpi: 96 +Xft*antialias: true +Xft*hinting: full + # Scroll behavior, don't scroll with output URxvt*scrollBar: false URxvt*secondaryScroll: true @@ -51,38 +51,38 @@ URxvt*url-launcher: /usr/bin/xdg-open URxvt*matcher.button: 1 ! special -URxvt*foreground: #93a1a1 -URxvt*background: #002b36 -URxvt*cursorColor: #93a1a1 +*.foreground: #c5c8c6 +*.background: #1d1f21 +*.cursorColor: #c5c8c6 ! black -URxvt*color0: #002b36 -URxvt*color8: #657b83 +*.color0: #282a2e +*.color8: #373b41 ! red -URxvt*color1: #dc322f -URxvt*color9: #dc322f +*.color1: #a54242 +*.color9: #cc6666 ! green -URxvt*color2: #859900 -URxvt*color10: #859900 +*.color2: #8c9440 +*.color10: #b5bd68 ! yellow -URxvt*color3: #b58900 -URxvt*color11: #b58900 +*.color3: #de935f +*.color11: #f0c674 ! blue -URxvt*color4: #268bd2 -URxvt*color12: #268bd2 +*.color4: #5f819d +*.color12: #81a2be ! magenta -URxvt*color5: #6c71c4 -URxvt*color13: #6c71c4 +*.color5: #85678f +*.color13: #b294bb ! cyan -URxvt*color6: #2aa198 -URxvt*color14: #2aa198 +*.color6: #5e8d87 +*.color14: #8abeb7 ! white -URxvt*color7: #93a1a1 -URxvt*color15: #fdf6e3 +*.color7: #707880 +*.color15: #c5c8c6 diff --git a/dunstrc b/dunstrc new file mode 100644 index 0000000..948e3d1 --- /dev/null +++ b/dunstrc @@ -0,0 +1,300 @@ +[global] + font = Cantarell 10 + + # Allow a small subset of html markup: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # If markup is not allowed, those tags will be stripped out of the + # message. + allow_markup = yes + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # Markup is allowed + format = "%s %p\n%b" + + # Sort messages by urgency. + sort = yes + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # The frequency with wich text that is longer than the notification + # window allows bounces back and forth. + # This option conflicts with "word_wrap". + # Set to 0 to disable. + bounce_freq = 5 + + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = no + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectevly. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "0x4-25+25" + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing windowmanager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 15 + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # default 120 + idle_threshold = 120 + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a windowmanager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern windowmanagers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + # The height of a single line. If the height is smaller than the + # font height, it will get raised to the font height. + # This adds empty space above and under the text. + line_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 1 + + # Padding between text and separator. + # padding = 8 + padding = 8 + + # Horizontal padding. + horizontal_padding = 10 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = #454947 + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = palemoon + + # Align icons left/right/off + icon_position = left + + # Paths to default icons. + icon_folders = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + +[frame] + width = 2 + color = "#618789" + +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = mod1+space + + # Close all notifications. + # close_all = ctrl+shift+space + close_all = ctrl+mod1+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". + history = ctrl+mod4+h + + # Context menu. + context = ctrl+mod1+c + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#1d2a30" + foreground = "#c9c1c7" + timeout = 10 + +[urgency_normal] + background = "#1d2a30" + foreground = "#c9c1c7" + timeout = 10 + +[urgency_critical] + background = "#1d2a30" + foreground = "#c9c1c7" + timeout = 0 + + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[Claws Mail] +# appname = claws-mail +# category = email.arrived +# urgency = normal +# background = "#2F899E" +# foreground = "#FFA247" +# +#[mute.sh] +# appname = mute +# category = mute.sound +# script = mute.sh +# +#[JDownloader] +# appname = JDownloader +# category = JD +# background = "#FFA247" +# foreground = "#FFFFFF" +# +#[newsbeuter] +# summary = *Feeds* +# background = "#A8EB41" +# foreground = "#FFFFFF" +# +[irc] + appname = weechat + timeout = 0 + background = "#1d2a30" + foreground = "#c9c1c7" +# +[weechat hl] + appname = weechat + category = weechat.HL + background = "#1d2a30" + foreground = "#c9c1c7" +# +[weechat pn] + appname = weechat + category = weechat.PM + background = "#1d2a30" + foreground = "#c9c1c7" +# +#[CMUS] +# appname = CMUS +# category = cmus +# background = "#6C4AB7" +# foreground = "#FFE756" +# +# +# background = "#30AB70" +# foreground = "#F67245" +# +# vim: ft=cfg diff --git a/i3wm/config b/i3/config similarity index 90% rename from i3wm/config rename to i3/config index a1cc3e2..b578fc6 100644 --- a/i3wm/config +++ b/i3/config @@ -13,7 +13,7 @@ ############################################# # font -set $font "pango:Roboto Mono for Powerline 11" +set $font "pango:Roboto Mono for Powerline 10" font $font # floating modifier @@ -56,24 +56,22 @@ bindym XF86WebCam exec /bin/cheese bindsym XF86Launch1 exec urxvt -e sh -c "sudo wifi-menu wlp3s0" # jauth two factor authenticator -bindsym $mod+F1 exec /opt/JAuth/authenticator.sh google -bindsym $mod+F2 exec /opt/JAuth/authenticator.sh facebook -bindsym $mod+F3 exec /opt/JAuth/authenticator.sh dropbox bindsym $mod+F4 exec --no-startup-id "gnome-screenshot -w" # start dmenu-launcher -bindsym $mod+d exec ~/.i3/util/i3dmenu-wrapper.sh +#bindsym $mod+d exec ~/.i3/util/i3dmenu-wrapper.sh +bindsym $mod+d exec rofi -show drun -theme solarized_alternate -font "mono 10" # lock i3 with i3lock -bindsym $mod+Shift+x exec i3lock-fancy +bindsym $mod+Shift+x exec i3lock-fancy-dualmonitor ############################################# # Keymaps # ############################################# # start terminal -bindsym $mod+Return exec --no-startup-id urxvt -#bindsym $mod+Return exec --no-startup-id urxvtc +#bindsym $mod+Return exec --no-startup-id urxvt +bindsym $mod+Return exec --no-startup-id urxvtc # kill focused window bindsym $mod+Shift+q kill @@ -272,9 +270,6 @@ for_window [class="Nautilus"] floating enable for_window [class="GParted"] floating enable for_window [class="Gedit"] floating enable for_window [class="teamspeak3"] floating enable -for_window [class="rhythmbox"] floating enable -for_window [class="JAuth"] floating enable -for_window [class="plecs"] floating enable # 0px Border #for_window [class="chrome"] border none @@ -291,30 +286,22 @@ for_window [class="Firefox"] border none exec --no-startup-id compton -cCGfb -m1 -D3 --xrender-sync --xrender-sync-fence # terminal daemon -#exec --no-startup-id urxvtd -q -f -o - -# pidgin chat cliente -exec --no-startup-id pidgin +exec --no-startup-id urxvtd -q -f -o # less eye pain -#exec --no-startup-id redshift-gtk +#exec --no-startup-id redshift # no beep! exec --no-startup-id xset b off -# set dpi for my monitor -exec --no-startup-id xrandr --dpi 81 +# Nextcloud Sync +exec --no-startup-id nextcloud -# nm-applet (yehhh vpn ...) -#exec --no-startup-id nm-applet +# nm-applet +exec --no-startup-id nm-applet # dunst for notifications and volnoti daemon exec --no-startup-id dunst -conf ~/.dunstrc -exec --no-startup-id volnoti - -# Drop all the boxes! -#exec dropbox start # wallpapers -#exec --no-startup-id ~/.i3/util/wallpapers.sh exec --no-startup-id feh --bg-fill ~/.wallpapers/puzzle2.png diff --git a/i3wm/i3status.conf b/i3/i3status.conf similarity index 66% rename from i3wm/i3status.conf rename to i3/i3status.conf index 8ebc75a..9775acc 100644 --- a/i3wm/i3status.conf +++ b/i3/i3status.conf @@ -8,20 +8,20 @@ general { } order += "disk /" -order += "disk /home" -order += "wireless wlp1s0" -order += "ethernet enp0s31f6" -order += "cpu_usage" -order += "battery 0" +order += "disk /media/Data1" +order += "disk /media/Data2" +order += "wireless wlp40s0" +order += "ethernet enp35s0" +order += "load" order += "volume master" order += "tztime local" -wireless wlp1s0 { +wireless wlp40s0 { format_up = " WiFi: %ip %quality %essid %bitrate " format_down = " WiFi: (/) " } -ethernet enp0s31f6 { +ethernet enp35s0 { format_up = " LAN: %ip %speed " format_down = " LAN: (/) " } @@ -33,19 +33,27 @@ battery 0 { } tztime local { - format = " Date: %m/%d/%y Time: %H:%M " + format = " Date: %y.%m.%d Time: %H:%M:%S " } cpu_usage { format = " CPU: %usage " } +load { + format = " Load: [%1min, %5min, %15min] " +} + disk "/" { format = " root: %free " } -disk "/home" { - format = " /home: %free " +disk "/media/Data1" { + format = " /data1: %free " +} + +disk "/media/Data2" { + format = " /data2: %free " } volume master { diff --git a/i3wm/util/volnotid.sh b/i3/util/volnotid.sh similarity index 100% rename from i3wm/util/volnotid.sh rename to i3/util/volnotid.sh diff --git a/i3wm/util/wallpapers.sh b/i3/util/wallpapers.sh similarity index 100% rename from i3wm/util/wallpapers.sh rename to i3/util/wallpapers.sh diff --git a/i3wm/util/authenticator.sh b/i3wm/util/authenticator.sh deleted file mode 100755 index 471ded9..0000000 --- a/i3wm/util/authenticator.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -############################### -# _ _ _ # -# (_) | | | | # -# _ __ _ _ _| |_| |__ # -# | |/ _` | | | | __| '_ \ # -# | | (_| | |_| | |_| | | | # -# | |\__,_|\__,_|\__|_| |_| # -# _/ | # -# |__/ # -# # -############################### - -# This script needs jauth-git to work -# jauth can be installed from the arch aur -# -# yaourt -S jauth-git -# - -SECRET_GOOGLE="asdf" -SECRET_FACEBOOK="asdf" -SECRET_DROPBOX="asdf" - -ARG="${1}" - -case ${ARG} in - "google") - jauth -secret=${SECRET_GOOGLE} - ;; - "facebook") - jauth -secret=${SECRET_FACEBOOK} - ;; - "dropbox") - jauth -secret=${SECRET_DROPBOX} - ;; -esac diff --git a/i3wm/util/i3blur.py b/i3wm/util/i3blur.py deleted file mode 100755 index 71d3685..0000000 --- a/i3wm/util/i3blur.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/python2 - -############################### -# _ ____ _ _ # -# (_)___ \| | | | # -# _ __) | |__ | |_ _ _ __ # -# | ||__ <| '_ \| | | | | '__|# -# | |___) | |_) | | |_| | | # -# |_|____/|_.__/|_|\__,_|_| # -# # -############################### - -""" - A simple python script that takes a - screenshot, blurs it and invokes i3lock. -""" - -import gtk.gdk -import os, sys -from PIL import ImageFilter -from PIL import Image - -# Get screen and its size -w = gtk.gdk.get_default_root_window() -sz = w.get_size() - -print "[DEBUG]: The size of the window is %d x %d" % sz - -# Get a drawable with the size of the desktop -scr = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, sz[0], sz[1]) - -# Fill it with the screenshot -scr = scr.get_from_drawable(w, w.get_colormap(), 0, 0, 0, 0, sz[0], sz[1]) - -# Save the screenshot as png -if(scr != None): - scr.save("/tmp/i3screen.png","png") - print "[DEBUG]: Screenshot saved to /tmp/i3screen.png." -else: - print "[DEBUG]: Unable to get the screenshot." - -# Load the screenshot as image and blur it -iml = Image.open("/tmp/i3screen.png") -iml = iml.filter(ImageFilter.GaussianBlur(8)) - -# Save the blured screenshot and call i3lock -if(iml != None): - iml.save("/tmp/i3screenblr.png", "png") - os.system("i3lock -i /tmp/i3screenblr.png") - print "[DEBUG]: Screenshot blured and saved to /tmp/i3screenblr.png." -else: - print "[DEBUG]: Unable to blur the screenshot." - diff --git a/i3wm/util/i3dmenu-wrapper.sh b/i3wm/util/i3dmenu-wrapper.sh deleted file mode 100755 index b9614d9..0000000 --- a/i3wm/util/i3dmenu-wrapper.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -BG="#1c5b98" -FG="#93a1a1" -SBG="#6c71c4" -SFG="#93a1a1" - -i3-dmenu-desktop --dmenu="dmenu -i -nb $BG -nf $FG -sb $SBG -sf $SFG -l 16" diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 8c17ea4..0000000 --- a/setup.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -############################################################# -# _____ _ _ _ # -# / ____| | | (_) | | # -# | (___ ___| |_ _ _ _ __ ___ ___ _ __ _ _ __ | |_ # -# \___ \ / _ \ __| | | | '_ \ / __|/ __| '__| | '_ \| __| # -# ____) | __/ |_| |_| | |_) | \__ \ (__| | | | |_) | |_ # -# |_____/ \___|\__|\__,_| .__/ |___/\___|_| |_| .__/ \__| # -# | | | | # -# |_| |_| # -############################################################# - -# -# ./setup.sh - download repository to $HOME/.dotfiles and symlink everythin ing place -# ./setup.sh clean - backup all files in $BAKFILES to .dotfilebackup -# -# The dependencies for this script are (arch linux repo names): -# - i3-wm -# - i3status -# - i3lock -# - dmenu -# - zsh -# - vim -# - rxvt-unicode -# - tmux -# - feh -# - volnoti (AUR, GitHub) -# - jauth-git (AUR, GitHub) -# - powerline-fonts-git (AUR, GitHub) - -# Files and folders -DOTFILES="$HOME/.dotfiles" - -BAKFILES=".i3 - .zshrc - .tmux.conf - .vimrc - .Xdefaults - .ncmpcpp/config - .mpd/mpd.conf" - -BAKFOLD="$HOME/.dotfilebackup" - -# Clean environment -if [ "$1" == "clean" ]; then - echo "[*] Backing up dotfiles to $BAKFOLD" - - # Create backup folder if it doesn't exist - if [ ! -d $BAKFOLD ]; then - mkdir $BAKFOLD - fi - - # Backup each config file specified by $BAKFILES - for file in $BAKFILES - do - mv -v $HOME/$file $BAKFOLD/$file - done - - exit -fi - -# Clone the repository if it doesn't exist -if [ ! -e $DOTFILES ]; then - git clone https://github.com/id101010/LinuxDotFiles.git $DOTFILES - rm -rf $DOTFILES/.git -fi - -# ------------------------------------------------ Setup I3wm -ln -sfv $DOTFILES/i3wm/ $HOME/.i3 - -# ------------------------------------------------ Setup tmux -ln -sfv $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf - -# ------------------------------------------------ Setup vim -ln -sfv $DOTFILES/vim/vimrc $HOME/.vimrc - -# ------------------------------------------------ Setup zsh -ln -sfv $DOTFILES/zsh/zshrc $HOME/.zshrc - -# ------------------------------------------------ Setup urxvt -ln -sfv $DOTFILES/urxvt/Xdefaults $HOME/.Xdefaults - -# ------------------------------------------------ Setup wallpapers -ln -sfv $DOTFILES/wallpapers/ $HOME/.wallpapers - -# ------------------------------------------------ Setup mpd -ln -sfv $DOTFILES/mpd/ $HOME/.mpd - -# ------------------------------------------------ Setup ncmpcpp -ln -sfv $DOTFILES/ncmpcpp/ $HOME/.ncmpcpp diff --git a/vim/vimrc b/vimrc similarity index 99% rename from vim/vimrc rename to vimrc index 9356d9b..8ec5ca2 100644 --- a/vim/vimrc +++ b/vimrc @@ -126,3 +126,4 @@ set noshowmode " Hide the default mode text (e.g. -- INSERT -- below th "Automaticly reread a file, if file has changed" set autoread + diff --git a/xinitrc b/xinitrc new file mode 100644 index 0000000..8bbaf9a --- /dev/null +++ b/xinitrc @@ -0,0 +1,38 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +eval $(ssh-agent) +setxkbmap ch +cd ~ +#exec i3 +exec i3 # -V >> ~/i3log-$(date +'%F-%k-%M-%S') 2>&1 diff --git a/zsh/zshrc b/zsh/zshrc deleted file mode 100644 index b08b511..0000000 --- a/zsh/zshrc +++ /dev/null @@ -1,122 +0,0 @@ -################################ -# _ # -# | | # -# _______| |__ _ __ ___ # -# |_ / __| '_ \| '__/ __| # -# / /\__ \ | | | | | (__ # -# /___|___/_| |_|_| \___| # -# # -################################ - -# Autoload stuff -autoload -U compinit promptinit -compinit -promptinit - -# History -export HISTSIZE=100000 -export HISTFILE="$HOME/.history" -export SAVEHIST=$HISTSIZE -setopt hist_ignore_all_dups -setopt hist_ignore_space - -# Promptstyle -prompt walters - -# Autocomplete stuff -zstyle ':completion:*' menu select -setopt completealiases -typeset -A key - -# Key settings -key[Home]=${terminfo[khome]} -key[End]=${terminfo[kend]} -key[Insert]=${terminfo[kich1]} -key[Delete]=${terminfo[kdch1]} -key[Up]=${terminfo[kcuu1]} -key[Down]=${terminfo[kcud1]} -key[Left]=${terminfo[kcub1]} -key[Right]=${terminfo[kcuf1]} -key[PageUp]=${terminfo[kpp]} -key[PageDown]=${terminfo[knp]} - -# Key bindings -[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line -[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line -[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode -[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char -[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history -[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history -[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char -[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char -[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history -[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history -[[ -n ${key[Backspace]} ]] && bindkey "${key[Backspace]}" backward-delete-char -[[ -n ${key[Insert]} ]] && bindkey "${key[Insert]}" overwrite-mode -[[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line -[[ -n ${key[PageUp]} ]] && bindkey "${key[PageUp]}" up-line-or-history -[[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char -[[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line -[[ -n ${key[PageDown]} ]] && bindkey "${key[PageDown]}" down-line-or-history -[[ -n ${key[Up]} ]] && bindkey "${key[Up]}" up-line-or-search -[[ -n ${key[Left]} ]] && bindkey "${key[Left]}" backward-char -[[ -n ${key[Down]} ]] && bindkey "${key[Down]}" down-line-or-search -[[ -n ${key[Right]} ]] && bindkey "${key[Right]}" forward-char -[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" history-beginning-search-backward -[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward - -bindkey "[C" forward-word -bindkey "[D" backward-word - -if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then - function zle-line-init () { - printf '%s' "${terminfo[smkx]}" - } - function zle-line-finish () { - printf '%s' "${terminfo[rmkx]}" - } - zle -N zle-line-init - zle -N zle-line-finish -fi - -DIRSTACKFILE="$HOME/.cache/zsh/dirs" -if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then - dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) - [[ -d $dirstack[1] ]] && cd $dirstack[1] -fi - -chpwd() { - print -l $PWD ${(u)dirstack} >$DIRSTACKFILE -} - -DIRSTACKSIZE=20 - -# Colored manpages -man() { - env \ - LESS_TERMCAP_mb=$(printf "\e[1;31m") \ - LESS_TERMCAP_md=$(printf "\e[1;31m") \ - LESS_TERMCAP_me=$(printf "\e[0m") \ - LESS_TERMCAP_se=$(printf "\e[0m") \ - LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ - LESS_TERMCAP_ue=$(printf "\e[0m") \ - LESS_TERMCAP_us=$(printf "\e[1;32m") \ - man "$@" -} - -alias ll="ls -l" -alias llm='ls -al | more' -alias ls='ls --color=auto' -alias grep='grep --color=auto' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' -alias diff='colordiff' -alias ports='netstat -tulanp' -alias cal='cal -m' - -setopt autopushd pushdsilent pushdtohome -setopt pushdignoredups -setopt pushdminus -setopt nohashdirs -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -rehash diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..ded5da7 --- /dev/null +++ b/zshrc @@ -0,0 +1,111 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH +# Path to your oh-my-zsh installation. ZSH=/usr/share/oh-my-zsh/ + +# Set name of the theme to load. Optionally, if you set this to "random" +# it'll load a random theme each time that oh-my-zsh is loaded. +# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes +ZSH_THEME="agnoster" + +# Set list of themes to load +# Setting this variable when ZSH_THEME=random +# cause zsh load theme from this variable instead of +# looking in ~/.oh-my-zsh/themes/ +# An empty array have no effect +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + last-working-dir + fbterm +) + +# User configuration + +# ALT C and D +bindkey "[C" forward-word +bindkey "[D" backward-word + +# Start SSH-Agent alon with new terminal +#if ! pgrep -u "$USER" ssh-agent > /dev/null; then +# ssh-agent > ~/.ssh-agent-thing +#fi +#if [[ "$SSH_AGENT_PID" == "" ]]; then +# eval "$(<~/.ssh-agent-thing)" +#fi + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# ssh +# export SSH_KEY_PATH="~/.ssh/rsa_id" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh +if [[ ! -d $ZSH_CACHE_DIR ]]; then + mkdir $ZSH_CACHE_DIR +fi + +source $ZSH/oh-my-zsh.sh