From 62c6699cb32ffb347ddb013eee1832dc03f34556 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 23 Jul 2016 16:46:44 +0100 Subject: [PATCH] GitHub deploy at 23/07/2016. --- Makefile | 34 ++++++++++++++ README.md | 10 ++++- apt/README.md | 3 ++ atom/packages.json | 10 +++-- atom/settings.json | 3 +- bash/.bashrc | 16 ++++++- bash/export.sh | 13 ------ bin/json_format | 21 +++++++++ config/export.sh | 6 --- gnome/export.sh | 9 ---- gnome/sound-fix.sh | 9 ++++ yaourt/.yaourtrc | 2 +- yaourt/export.py | 12 ----- yaourt/packages.conf | 85 +++++++++++++++++++++++++++++++++++ yaourt/packages.json | 51 --------------------- yaourt/pacman.conf | 105 +++++++++++++++++++++++++++++++++++++++++++ 16 files changed, 290 insertions(+), 99 deletions(-) create mode 100644 Makefile create mode 100644 apt/README.md delete mode 100644 bash/export.sh create mode 100755 bin/json_format delete mode 100644 config/export.sh delete mode 100644 gnome/export.sh create mode 100644 gnome/sound-fix.sh delete mode 100644 yaourt/export.py create mode 100644 yaourt/packages.conf delete mode 100644 yaourt/packages.json create mode 100644 yaourt/pacman.conf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d162cfa --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +DOTFILES=$(PWD) + + +install: apt bash config gnome yaourt + + +bash: yaourt + ln -sfP $(DOTFILES)/bash/.bashrc ~/.bashrc + ln -sfP /usr/share/nvm/init-nvm.sh ~/.nvm/nvm.sh + +config: yaourt + mkdir -p ~/.config/terminator + cp $(DOTFILES)/config/terminator.conf ~/.config/terminator/config + +gnome: yaourt + rm -rf ~/Templates/* + ln -sfP $(DOTFILES)/gnome/Templates/* ~/Templates/ + +yaourt: pacman python-fix + yaourt -Syau # Install any updates before extra packages + yaourt -S `cat $(DOTFILES)/yaourt/packages.conf` --needed + ln -sfP $(DOTFILES)/yaourt/.yaourtrc ~/.yaourtrc + +pacman: + gpg --recv-keys F7E48EDB # Add custom key for ncurses + sudo ln -sfP $(DOTFILES)/yaourt/pacman.conf /etc/pacman.conf + sudo pacman-key -r 962DDE58 + sudo pacman-key --lsign-key 962DDE58 + gpg --keyserver pool.sks-keyservers.net --recv-keys 2E1AC68ED40814E0 # gotta be a way to add to pacman, not my GPG + +python-fix: + sudo ln -sfP /usr/bin/python2 /usr/bin/python # Set the default python version to be python 2 + +.PHONY: apt bash config gnome yaourt pacman python-fix diff --git a/README.md b/README.md index 4b04c59..7fe3246 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,12 @@ Settings and Preferences for transfer between machines ## Usage -Inside every directory is a file called `export.*`. Simply run this file from inside the directory, and it'll do the rest! +1. run `make` +2. ??? +3. Profit! + +## Extra hotfixes +Some things don't need to be installed everywhere, So they're in seperate scripts listed here! + +#### `gnome/sound-fix.sh` +Disables the sound when you change the volume, and set's the increment to 1. Much nicer if i'm using a volume wheel! diff --git a/apt/README.md b/apt/README.md new file mode 100644 index 0000000..c47dcf7 --- /dev/null +++ b/apt/README.md @@ -0,0 +1,3 @@ +# apt + +The packages here are likely out of date. Now I've switched mostly over to Arch, I don't need to keep ubuntu dotfiles. Must try to keep this list as up-to-date as possible! diff --git a/atom/packages.json b/atom/packages.json index f7ea2df..5710d44 100644 --- a/atom/packages.json +++ b/atom/packages.json @@ -125,7 +125,7 @@ }, { "name": "color-picker", - "version": "2.2.1" + "version": "2.2.2" }, { "name": "command-palette", @@ -197,7 +197,7 @@ }, { "name": "language-babel", - "version": "2.30.1" + "version": "2.31.0" }, { "name": "language-c", @@ -434,7 +434,7 @@ }, { "name": "pigments", - "version": "0.31.0" + "version": "0.31.1" }, { "name": "project-manager", @@ -484,6 +484,10 @@ "version": "1.0.2", "theme": "syntax" }, + { + "name": "sort-lines", + "version": "0.14.0" + }, { "name": "spell-check", "version": "0.67.1" diff --git a/atom/settings.json b/atom/settings.json index eb8e598..4a34eef 100644 --- a/atom/settings.json +++ b/atom/settings.json @@ -21,7 +21,8 @@ "merge-conflicts", "lcov-info", "activate-power-mode", - "encoding-selector" + "encoding-selector", + "sort-lines" ], "themes": [ "one-dark-ui", diff --git a/bash/.bashrc b/bash/.bashrc index 84c63c3..4c4c6c5 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -70,8 +70,13 @@ fi # Load Programs export NVM_DIR="/home/jake/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # Load on ubuntu + eval $(thefuck --alias) +export PATH="~/.pyenv/bin:$PATH" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" + # Export some variables export ANDROID_HOME=/opt/android-sdk @@ -80,7 +85,7 @@ export ANDROID_HOME=/opt/android-sdk export PATH=${PATH}:${ANDROID_HOME}/tools export PATH=${PATH}:${ANDROID_HOME}/platform-tools export PATH=${PATH}:/opt/genymobile/genymotion -export PATH=~/.bin:${PATH} +export PATH=~/.dotfiles/bin:${PATH} # Export Java home on ubuntu if [ -f "$(command -v lsb_release)" ]; then @@ -145,13 +150,18 @@ alias ctfs="cd ~/catfish && ./start && cd - > /dev/null" alias src="source ~/.bashrc" alias refresh="cd $PWD > /dev/null" alias c="clear" +alias yolo="yaourt -Syau" export EDITOR=/bin/nano # git aliases alias gs="git status" alias gd="git diff" gh() { - command git clone git@github.com:${1}/${2} # My bash isnt great... + if [ $# -eq 1 ]; then + command git clone git@github.com:RealOrangeOne/${1} + else + command git clone git@github.com:${1}/${2} + fi } @@ -172,3 +182,5 @@ alias gdu="gd-unlock" alias y="yoga" alias ym="yoga mode" alias serve="python -m SimpleHTTPServer" +alias make-dotfiles="cd ~/.dotfiles/ && make && cd - > /dev/null" +alias edit-dotfiles="atom ~/.dotfiles/" diff --git a/bash/export.sh b/bash/export.sh deleted file mode 100644 index c3739dc..0000000 --- a/bash/export.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -e - -ln -sfP ~/.dotfiles/bash/.bashrc ~/.bashrc -source ~/.bashrc - -# Arch uses python3 by default. Let's fix that... -sudo rm -rf /usr/bin/python -sudo ln -sfP /usr/bin/python2 /usr/bin/python - -# Arch has the nvm script in a weird place. Time to fix! -sudo ln -sfP /usr/share/nvm/init-nvm.sh ~/.nvm/nvm.sh diff --git a/bin/json_format b/bin/json_format new file mode 100755 index 0000000..23934b5 --- /dev/null +++ b/bin/json_format @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +import json +import sys +import os + +ARGS = sys.argv[1:] + +if not os.isatty(0): + data = sys.stdin.read() +else: + with open(ARGS[0]) as f: + data = '\n'.join(f.readlines()) + ARGS.pop(0) + +parsed_data = json.dumps(json.loads(data), indent=2, sort_keys=True) + +if ARGS: + with open(ARGS[0], 'w') as f: + f.write(parsed_data) +else: + sys.stdout.write(parsed_data) diff --git a/config/export.sh b/config/export.sh deleted file mode 100644 index 027432c..0000000 --- a/config/export.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -set -e - -mkdir -p ~/.config/terminator -cp terminator.conf ~/.config/terminator/config diff --git a/gnome/export.sh b/gnome/export.sh deleted file mode 100644 index b0e1872..0000000 --- a/gnome/export.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -echo "Exporting Templates" -rm -rf ~/Templates/* -ln -sfP ~/.dotfiles/gnome/Templates/* ~/Templates/ - - - - diff --git a/gnome/sound-fix.sh b/gnome/sound-fix.sh new file mode 100644 index 0000000..57390bf --- /dev/null +++ b/gnome/sound-fix.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e + +echo "Removing volume change sound..." +gsettings set org.gnome.desktop.sound event-sounds false + +echo "Decreasing volume increment..." +gsettings set org.gnome.settings-daemon.plugins.sound volume-step 1 diff --git a/yaourt/.yaourtrc b/yaourt/.yaourtrc index 1129cad..e900d8e 100644 --- a/yaourt/.yaourtrc +++ b/yaourt/.yaourtrc @@ -43,7 +43,7 @@ #EXPORTDIR="" # If empty, use makepkg's configuration (see makepkg.conf) # Prompt -NOCONFIRM=1 +NOCONFIRM=0 #UP_NOCONFIRM=0 # No prompt while build upgrades (including -Sbu) BUILD_NOCONFIRM=1 # Only prompt for editing files #PU_NOCONFIRM=0 # Add --noconfirm to $PACMAN -U diff --git a/yaourt/export.py b/yaourt/export.py deleted file mode 100644 index 434ae5b..0000000 --- a/yaourt/export.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -import os, json - -# Update pre-installed packages and repo lists -os.system('sudo yaourt -Syau') - -# Install extra packages -packages = " ".join(json.load(open('packages.json'))) -os.system("sudo yaourt -S {} ".format(packages)) - -# Symlink yaourtrc file -os.system('ln -s ~/.dotfiles/yaourt/.yaourtrc ~/.yaourtrc') diff --git a/yaourt/packages.conf b/yaourt/packages.conf new file mode 100644 index 0000000..c913785 --- /dev/null +++ b/yaourt/packages.conf @@ -0,0 +1,85 @@ +android-sdk +android-studio +arduino +atom-editor +bleachbit +blender +bluez-firmware +clamtk +corebird +deluge +desmume +dolphin-emu +dropbox +feedthebeast +filezilla +fontconfig-infinality-ultimate +freac +freetype2-infinality-ultimate +gimp +git +gitkraken +glogg +gnome-settings-daemon-volume-step-patch +gnome-shell-extension-activities-config +gnome-shell-extension-coverflow-alt-tab +gnome-shell-extension-drop-down-terminal-git +gnome-shell-extension-laine-git +gnome-shell-extension-put-window-git +gnome-shell-extension-status-menu-buttons +google-earth +gparted +handbrake +hexchat +hipchat +htop +inkscape +insync +insync-nautilus +jdk +jre +jshon +kodi +minecraft +mupen64plus +nautilus-dropbox +nodejs +numix-themes +nvm +obs-studio +owncloud-client +postgresql +psensor +pyenv +pyenv-virtualenv +python-pip +python-virtualenv +python2-pip +python2-virtualenv +redis +remmina +sl +slack-desktop +smartgit +spotify +steam +sublime-text-dev +teamviewer +telegram-desktop-bin +terminator +thunderbird +ttf-ms-fonts +ttf-wps-fonts +ultra-flat-icons +unified-remote-server +variety +vbam-gtk +virtualbox +vlc +whatsapp-desktop +wps-office +wps-office-extension-english-uk-dictionary +yaourt +yubikey-neo-manager +yubikey-personalization-gui +zeal diff --git a/yaourt/packages.json b/yaourt/packages.json deleted file mode 100644 index 2f5c99f..0000000 --- a/yaourt/packages.json +++ /dev/null @@ -1,51 +0,0 @@ -[ - "yaourt", - "atom-editor-bin", - "spotify", - "teamviewer", - "telegram-desktop-bin", - "dropbox", - "android-sdk", - "android-studio", - "ttf-ms-fonts", - "jdk", - "slack-desktop", - "n1", - "gitkraken", - "arduino", - "google-earth", - "minecraft", - "jre", - "ttf-wps-fonts", - "wps-office", - "wps-office-extension-english-uk-dictionary", - "kodi", - "remmina", - "zeal", - "hipchat", - "virtualbox", - "insync", - "insync-nautilus", - "owncloud-client", - "clamtk", - "filezilla", - "gimp", - "git", - "gparted", - "htop", - "hexchat", - "nautilus-dropbox", - "pypy3-pip", - "pypy3-virtualenv", - "steam-fonts", - "steam", - "terminator", - "thunderbird", - "vlc", - "nodejs", - "astrill", - "ultra-flat-icons", - "numix-themes", - "redis", - "postgresql" -] diff --git a/yaourt/pacman.conf b/yaourt/pacman.conf new file mode 100644 index 0000000..1a73685 --- /dev/null +++ b/yaourt/pacman.conf @@ -0,0 +1,105 @@ +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +#UseDelta = 0.7 +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +#Color +#TotalDownload +CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist + +[community] +Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist +#Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs + +[antergos] +SigLevel = PackageRequired +Include = /etc/pacman.d/antergos-mirrorlist + +# My Custom Repos + +[infinality-bundle] +Server = http://bohoomil.com/repo/$arch