From 6efac1a12c8ab0b7d96a8d342fbd74fce35e8c42 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Tue, 18 Aug 2015 02:38:33 +0200 Subject: Organise everything systematically. --- Xinit/README.md | 7 ++ Xinit/Xdefaults | 59 ++++++++++++++ Xinit/Xresources | 28 +++++++ Xinit/gtkrc | 22 ++++++ Xinit/xinitrc | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 347 insertions(+) create mode 100644 Xinit/README.md create mode 100644 Xinit/Xdefaults create mode 100644 Xinit/Xresources create mode 100644 Xinit/gtkrc create mode 100755 Xinit/xinitrc (limited to 'Xinit') diff --git a/Xinit/README.md b/Xinit/README.md new file mode 100644 index 0000000..19e5b66 --- /dev/null +++ b/Xinit/README.md @@ -0,0 +1,7 @@ +``` +ln -s ~/dotfiles/Xinit/xinitrc ~/.xinitrc +ln -s ~/dotfiles/Xinit/Xresources ~/.Xresources +ln -s ~/dotfiles/Xinit/Xdefaults ~/.Xdefaults +ln -s ~/dotfiles/Xinit/gtkrc ~/.gtkrc +ln -s ~/dotfiles/Xinit/gtkrc ~/.gtkrc-2.0 +``` diff --git a/Xinit/Xdefaults b/Xinit/Xdefaults new file mode 100644 index 0000000..8130535 --- /dev/null +++ b/Xinit/Xdefaults @@ -0,0 +1,59 @@ +!------------------------------------------------------------------------------- +! Xft settings +!------------------------------------------------------------------------------- + +Xft.dpi: 96 +Xft.antialias: true +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.geometry: 90x30 +URxvt.transparent: false +URxvt.fading: 0 +! URxvt.urgentOnBell: true +! URxvt.visualBell: true +URxvt.loginShell: true +URxvt.lineSpace: 0 + +! Fonts +URxvt.allow_bold: true +URxvt.font: xft:DejaVu Sans Mono:pixelsize=11 + +! 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: uzbl-browser + +! Cursor +URxvt.cursorBlink: true +URxvt.cursorColor: #657b83 +URxvt.cursorUnderline: false + +!URxvt*depth: 32 +URxvt*saveLines: 12000 + +! M-t for text select M-s for search +URxvt.perl-ext-common: default,matcher,keyboard-select,url-select +URxvt.keysym.M-t: perl:keyboard-select:activate +URxvt.keysym.M-s: perl:keyboard-select:search + +! M-u to select open copy links +!URxvt.perl-ext-common: ...,url-select +URxvt.keysym.M-u: perl:url-select:select_next +URxvt.url-select.launcher: /home/vasko/.tools/firesend + diff --git a/Xinit/Xresources b/Xinit/Xresources new file mode 100644 index 0000000..3fa2ad8 --- /dev/null +++ b/Xinit/Xresources @@ -0,0 +1,28 @@ +Xcursor.theme: XcursorHuman +XTerm*locale: true + +*background: #1c1c1c +*foreground: #fdf6e3 +*fading: 40 +*fadeColor: #eee8d5 +*cursorColor: #fdf6e3 +!*pointerColorBackground:S_base1 +!*pointerColorForeground:S_base01 + +urxvt.scrollBar :false +xterm.scrollBar :false + +xterm*faceName: DejaVu Sans Mono Book +xterm*faceSize: 11 + +! Enable copy paste +xterm*metaSendsEscape: true +xterm*eightBitInput: false +xterm*allowSendEvents: true + +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb diff --git a/Xinit/gtkrc b/Xinit/gtkrc new file mode 100644 index 0000000..fa40040 --- /dev/null +++ b/Xinit/gtkrc @@ -0,0 +1,22 @@ +style "default-style" +{ + # modify the x/ythickness, used for spacing all over the place +# xthickness = 3 +# ythickness = 3 + + # one can set so called "style properties" +# GtkRange::slider-width = 15 + + # set the background to a light grey + bg[NORMAL] = "#fdf6e3" + bg[PRELIGHT] = "#eee8d5" + bg[SELECTED] = "#93a1a1" + bg[ACTIVE] = "#93a1a1" + # and the forground to black + fg[NORMAL] = "#657b83" + fg[PRELIGHT] = "#657b83" + fg[SELECTED] = "#657b83" + fg[ACTIVE] = "#657b83" +} + +class "GtkWidget" style "default-style" diff --git a/Xinit/xinitrc b/Xinit/xinitrc new file mode 100755 index 0000000..18b7844 --- /dev/null +++ b/Xinit/xinitrc @@ -0,0 +1,231 @@ +#!/usr/bin/bash +# Inspiration: +# http://www.desertsol.com/~kevin/ratpoison/ +tools_dir=$HOME/.tools +xtoolwait="timeout --signal=KILL 5 $tools_dir/xtoolwait -noprop" +workspace="rpws" +screen_run="$tools_dir/screen_run" +term="/usr/bin/urxvt -e" + + +####################################################################### +# +# If this script is run with no arguments, tools and all workspaces are loaded. +# If a workspace number is given as the argument, only that workspace is initialized. +# +####################################################################### + +# Launch config files +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +# Make C-v always insert selection (disabled due to too much cpu wakepus) +#autocutsel -fork & +#autocutsel -selection PRIMARY -fork & + +# give cursor +xsetroot -cursor_name left_ptr + +# Fix annoying blank java bug +wmname LG3D + +# Background +~/.tools/wp change & + +# Init clipboard +~/.tools/clipboard init + +#Run dropbox +#dropboxd & +#~/bin/mountsecure + +# Allow user to edit brightness +sudo /usr/bin/brightchown + +# Custom +~/.custom + +#Keyboard Bindings +setxkbmap us -variant colemak +xcape -t 300 -e 'Shift_L=parenleft;Shift_R=parenright;Hyper_L=Shift_L|exclam;Hyper_R=Shift_L|question' & +xset r 64 +xset r rate 170 60 +xset m 0 0 +xset -b + +# Launch locking program +xautolock -detectsleep -locker '~/.tools/lock' -time 11 -corners 0-00 & + +# Load xterm colors +xrdb -merge ~/.Xresources +xrdb -merge ~/.Xdefaults +# Start some programs +#dropbox start +~/bin/offline-run & +#xflux -z 24531 -l 56 -g 13 +#nm-applet & + +#Disable annoying point tap +synclient PalmDetect=1 +synclient TapButton1=1 +synclient TapButton2=3 +synclient TapButton3=2 +synclient TapAndDragGesture=0 +synclient VertEdgeScroll=0 RTCornerButton=0 RBCornerButton=0 LTCornerButton=0 LBCornerButton=0 FingerHigh=37 FingerLow=35 FingerPress=100 +#Natural Scrolling +xmodmap -e "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" + +# Detect secondary monitor and automatically adjust +#if [ `xrandr| grep -c HDMI1` -gt 0 ]; then +# xrandr --output HDMI1 --mode `xrandr | awk 'NR==9 {print $1}'` --right-of LVDS1 +# xrandr --output HDMI1 --mode 1920x1080 --right-of LVDS1 +#fi + + +if [ $# -lt 1 ]; then + # if no arguments given, run everything + run_everything=true + run_workspace=all +else + # if 1 argument given, run that workspace + run_everything=false + run_workspace=$1 +fi + +# +# Startup the window manager +if [ $run_everything = true ]; then + ratpoison 2>&1 & +# ~/.config/bspwm/bspwmrc +# compton & + wmpid=$! + sleep 1 & +fi +####################################################################### +# +# I create a section for each workspace so that individual workspaces +# can be reloaded without reloading tools, which doesn't work so well. +# +####################################################################### + +# workspace 0 : volume workspace +# window 1: volume +#if [ $run_everything = true -o $run_workspace = 2 ]; then +# $workspace 0 +# $xtoolwait $term alsamixer +# number_and_title 0 "volume" +#fi + + +# workspace 1 : Ranger workspace +# window 1+: Ranger +if [ $run_everything = true -o $run_workspace = 1 ]; then + $workspace 1 + $xtoolwait $term ranger +fi + +# workspace 2 is at the end (pentadactyl) slowing down + +# workspace 3 : newsbeuter +if [ $run_everything = true -o $run_workspace = 3 ]; then + $workspace 3 + $xtoolwait $term newsbeuter +fi + +# workspace 4 : admin workspace +# window 1: screen (see screenrc.admin for the screen config) +if [ $run_everything = true -o $run_workspace = 4 ]; then + $workspace 4 +# $xtoolwait $term $screen_run admin +fi + +# workspace 5 : School +# windows 1: screen notebok +if [ $run_everything = true -o $run_workspace = 5 ]; then + $workspace 5 + cd $HOME/Sync/notes +# $xtoolwait $term $screen_run school +fi +# +## workspace 7 : kde workspace (VNC session) +#if [ $run_everything = true -o $run_workspace = 7 ]; then +# $workspace ^7 +# $xtoolwait vncviewer nerd:1 +# number_and_title 0 "kde" +#fi + +# workspace 7 : skype workspace +if [ $run_everything = true -o $run_workspace = 7 ]; then + $workspace 7 +# skype & +# number_and_title 0 "skype" + sleep 6 +fi + +# +## workspace 8 : windows workspace (VMware session) +#if [ $run_everything = true -o $run_workspace = 8 ]; then +# $workspace ^8 +# #$xtoolwait gnomesu -c /stor/vmware/bin/vmware +# #number_and_title 0 "windows xp" +#fi +# + +# workspace 9 : email workspace +# window 1: mutt +if [ $run_everything = true -o $run_workspace = 2 ]; then + $workspace 8 + $xtoolwait $term mutt +fi + +# workspace 10 : irc workspace +# window 1: irc +if [ $run_everything = true -o $run_workspace = 2 ]; then + $workspace 10 + $xtoolwait $term $screen_run irssi +# $xtoolwait $term irssi +fi + +# workspace 11 : wifi workspace +# window 1: wicd +if [ $run_everything = true -o $run_workspace = 2 ]; then + $workspace ^10 + $xtoolwait $term sudo /usr/bin/safeconnect +fi + +# workspace 12 : music workspace +# window 1: music +if [ $run_everything = true -o $run_workspace = 2 ]; then + $workspace 12 + mpd & + $xtoolwait $term ncmpcpp +fi + +# workspace 13 : volume workspace +# window 1: volume +if [ $run_everything = true -o $run_workspace = 2 ]; then + $workspace 13 + $xtoolwait $term alsamixer +fi + +# workspace 2 : Vimb workspace +if [ $run_everything = true -o $run_workspace = 2 ]; then + $workspace 2 + vimb & +fi + +# Default workspace: 1(ranger) +# $workspace ^1 + +~/.tools/panel/panel & +#sleep 2 && rpbar + +####################################################################### +sleep 1 +if [ $run_everything = true ]; then + wait $wmpid +fi -- cgit v1.2.3-54-g00ecf