dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

commit fd37a970d953a920bf9c8ac61e6f90a5363f2777
parent 81564a6f1a8bd14fa4977f2829c6e311ad0a63cc
Author: Ryan Jeffrey <pwishie@gmail.com>
Date:   Sat, 28 Mar 2020 11:48:49 -0700

changed .config

Diffstat:
A.gitignore | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/.gitignore | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/albart | 10++++++++++
Ascripts/faw | 11+++++++++++
Ascripts/ffe | 10++++++++++
Ascripts/init-polybar.sh | 20++++++++++++++++++++
Ascripts/mix | 0
Ascripts/monset.zsh | 12++++++++++++
Ascripts/shuf.zsh | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/ui/gmdx | 9+++++++++
Ascripts/ui/init-polybar.sh | 12++++++++++++
Ascripts/ui/mineinit | 3+++
Ascripts/ui/monset.zsh | 12++++++++++++
Ascripts/ui/sinit | 8++++++++
Ascripts/updoot.zsh | 9+++++++++
Ascripts/updot.zsh | 42++++++++++++++++++++++++++++++++++++++++++
Ascripts/updot.zsh.b | 26++++++++++++++++++++++++++
17 files changed, 393 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,78 @@ +arkanoid/ark +# Created by https://www.gitignore.io/api/cmake,emacs +# Edit at https://www.gitignore.io/?templates=cmake,emacs + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ + +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +# End of https://www.gitignore.io/api/cmake,emacs + +.config/mpd/database +.config/mpd/pid +.config/mpd/state +.config/mpd/sticker.sql+ \ No newline at end of file diff --git a/scripts/.gitignore b/scripts/.gitignore @@ -0,0 +1,79 @@ + +# Created by https://www.gitignore.io/api/cmake,emacs +# Edit at https://www.gitignore.io/?templates=cmake,emacs + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ + +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +# End of https://www.gitignore.io/api/cmake,emacs + +bin/ + +dw + +build/+ \ No newline at end of file diff --git a/scripts/albart b/scripts/albart @@ -0,0 +1,10 @@ +#/usr/bin/env zsh + +OIFS="$IFS" +IFS=$'\n' +for i in `find $1 -type f -name "*.mp3"`; do + file=`echo "$i" | sed 's/ /\\ /g'` + ffmpeg -i $file -i $2 -b 192k -map_metadata 0 -map 0 -map 1 output.mp3 + mv output.mp3 $file + exit +done diff --git a/scripts/faw b/scripts/faw @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh + +default="C:" +search=$default + +[ $ARGC -eq 1 ] && search=$1 + +for file in ./**/*(.); do + grep $search -Hin $file +done + diff --git a/scripts/ffe b/scripts/ffe @@ -0,0 +1,10 @@ +#/usr/bin/env zsh + +default=".c" +search=$default + +[ $ARGC -eq 1 ] && search=$1 + +for file in ./**/*(.); do + echo $file | grep $search -i +done diff --git a/scripts/init-polybar.sh b/scripts/init-polybar.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch Polybar, using default config location ~/.config/polybar/config +if type "xrandr"; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar main & + done +else + polybar --reload main & +fi + +#polybar main & + +echo "Polybar launched..." diff --git a/scripts/mix b/scripts/mix Binary files differ. diff --git a/scripts/monset.zsh b/scripts/monset.zsh @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh + +# Sets up my monitors + +xrandr --output HDMI-A-2 --auto --left-of DisplayPort-1 --output DisplayPort-1 \ + --rate 144 --primary --mode 2560x1440 + +xrandr --output DisplayPort-3 --mode 1920x1080 --same-as HDMI-A-2 + +sleep 2 + +nitrogen --restore diff --git a/scripts/shuf.zsh b/scripts/shuf.zsh @@ -0,0 +1,50 @@ +#!/usr/bin/env zsh + +# This scripts shuffles the inputs and runs them in as music files. + +RED='\033[0;31m' +YELL='\033[;33m' +NC='\033[0m' # No Color + +# Echo to stderr +echoerr() { + echo "$@" 1>&2 +} + +# Alter these values as necessary +# Takes the file extension of the file and returns the music player associated with it +getplayer() { + case $1 in + "mp3") + echo "cvlc" + ;; + "m4a") + echo "cvlc" + ;; + "modPlayer") + echo "cvlc" + ;; + "webm") + echo "cvlc" + ;; + *) + echoerr "The music file type $1 is not supported." + return -1 + ;; + esac +} + +songs=( $(echo "$@" | sed -r 's/(.[^;]*;)/ \1 /g' | tr " " "\n" | shuf | tr -d " " ) ) + +for song in $songs; do + filename=`basename -- "$song"` + extension="${filename##*.}" + + player=$(getplayer "$extension") + + # If getting the type did not failed then play the song + [[ $? == 0 ]] && echo "${YELL}Now playing $song${NC}" && $player "$song" +done + + + diff --git a/scripts/ui/gmdx b/scripts/ui/gmdx @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# Sets up GMDX mod for Deus Ex on Linux + +xgamma -gamma 1.5 + +STEAM_COMPAT_DATA_PATH=~/.proton/ ~/.local/share/Steam/steamapps/common/Proton\ 4.2/proton run /home/ryan/.local/share/Steam/steamapps/common/Deus\ Ex/System/GMDXv10.exe + +xgamma -gamma 1.0 diff --git a/scripts/ui/init-polybar.sh b/scripts/ui/init-polybar.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch Polybar, using default config location ~/.config/polybar/config +polybar main & + +echo "Polybar launched..." diff --git a/scripts/ui/mineinit b/scripts/ui/mineinit @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh + +java -jar ~/bin/TechnicLauncher.jar diff --git a/scripts/ui/monset.zsh b/scripts/ui/monset.zsh @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh + +# Sets up my monitors + +xrandr --output HDMI-A-2 --auto --left-of DisplayPort-2 --output DisplayPort-2 \ + --rate 144 --primary --mode 2560x1440 + +xrandr --output DisplayPort-1 --mode 1920x1080 --same-as HDMI-A-2 + +sleep 3 + +nitrogen --restore diff --git a/scripts/ui/sinit b/scripts/ui/sinit @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh + + +# Starts a Sven coop dedicated server + +cd ~/.local/share/Steam/steamapps/common/Sven\ Co-op\ Dedicated\ Server +./svends_run +ip 25.17.249.130 +port 27015 + diff --git a/scripts/updoot.zsh b/scripts/updoot.zsh @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh + +pacman -Syy && pacman -Su --noconfirm + + +latestKernel=$(mhwd-kernel -l | grep -v rt | tail -1 | sed "s/\s*//g ; s/*//g") +latestInstalled=$(mhwd-kernel -li | grep -v rt | tail -1 | sed "s/\s*//g ; s/*//g") + +[[ $latestKernel != $latestInstalled ]] && mhwd-kernel -i "$latestKernel" diff --git a/scripts/updot.zsh b/scripts/updot.zsh @@ -0,0 +1,42 @@ +#!/usr/bin/env zsh + +# Takes all config files and places them into ~/src/dotfiles/ + +# location of all dotfiles +home_dir="/home/ryan/" + +# Non .config files +dotfile_locals=(".zshrc" ".emacs" ".econfig.org" ".ncmpcpp" "src/scripts") + +# The .config folder +config_dir="$home_dir/.config/" + +# Config files in .config +config_locals=("i3" "i3status" "mupen64plus" "m64py" "mpd" "polybar" "ranger") + +# The folder to place all dotfiles into +dest_dir="/home/ryan/src/dotfiles/" + + + +# folders to exclude from .config (if globbing) +exclude=("Brave") + +cd $dest_dir + +# Copy dotfiles +for config in $dotfile_locals; do + file=$(echo "$home_dir$config") + [[ ${exclude[(ie)$file]} -le ${#exclude} ]] || cp "$file" $config -r +done + +stat .config &>/dev/null || mkdir .config + +cd .config + +# Copy config files +for config in $config_locals; do + file=$(echo "$config_dir$config") + [[ ${exclude[(ie)$file]} -le ${#exclude} ]] || cp "$file" "$config" -r +done + diff --git a/scripts/updot.zsh.b b/scripts/updot.zsh.b @@ -0,0 +1,26 @@ +#!/usr/bin/env zsh + +# Takes all config files and places them into ~/src/dotfiles/ + +# location of all dotfiles +root_dir="/home/ryan/" + +dest_dir="/home/ryan/src/dotfiles/" + +dotfile_locals=(".config/"{i3,i3status,mupen64plus,m64py,mpd/mpd.conf,polybar,ranger} ".zshrc" ".emacs" ".econfig.org" ".ncmpcpp") + + + + +# folders to exclude from .config +exclude=("Brave") + +cd $dest_dir + +# Copy all files +for config in $dotfile_locals; do + file=$(echo "$root_dir$config") + [[ ${exclude[(ie)$file]} -le ${#exclude} ]] || cp "$file" ./. -r +done + +# Move all non-dotfiles back into .config