From a02c9aa7bcfd80f4009d3d28d465eff98a372378 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Mon, 23 Jul 2018 13:30:23 -0400 Subject: [PATCH] [gitbot] autocommit --- ubuntu/.config/.compton.conf | 6 + ubuntu/.config/i3/config | 231 +++++++++++++++++++++++++++++++++ ubuntu/.config/i3status/config | 46 +++++++ ubuntu/.zshrc | 215 +++++++++++++++++++----------- 4 files changed, 422 insertions(+), 76 deletions(-) create mode 100644 ubuntu/.config/.compton.conf create mode 100644 ubuntu/.config/i3/config create mode 100644 ubuntu/.config/i3status/config diff --git a/ubuntu/.config/.compton.conf b/ubuntu/.config/.compton.conf new file mode 100644 index 0000000..d2df2bb --- /dev/null +++ b/ubuntu/.config/.compton.conf @@ -0,0 +1,6 @@ +# Fading +fading = true; # Fade windows during opacity changes. +fade-delta = 12; # The time between steps in a fade in milliseconds. (default 10). +fade-in-step = 0.15; # Opacity change between steps while fading in. (default 0.028). +fade-out-step = 0.15; # Opacity change between steps while fading out. (default 0.03). +no-fading-openclose = false; # Fade windows in/out when opening/closing. diff --git a/ubuntu/.config/i3/config b/ubuntu/.config/i3/config new file mode 100644 index 0000000..77a8de3 --- /dev/null +++ b/ubuntu/.config/i3/config @@ -0,0 +1,231 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +#bindsym $mod+d exec dmenu_run + +# use rofi instead + +bindsym $mod+d exec rofi -show run -lines 3 -eh 2 -width 100 -padding 800 -opacity "85" -bw 0 -bc "$bg-color" -bg "$bg-color" -fg "$text-color" -hlbg "$bg-color" -hlfg "#9575cd" + +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +exec --no-startup-id nitrogen --restore +exec_always --no-startup-id compton -f + +# gaps + +gaps outer 5 +gaps inner 10 + +#smart_gaps on + +# windows style workspace switcher + +bindsym $mod+Control+Right workspace next +bindsym $mod+Control+Left workspace prev + +workspace_auto_back_and_forth yes + +# Set window focusing to only focus if requester is on screen + +focus_on_window_activation smart + +# Audio Manager + +bindsym $mod+Shift+a exec pavucontrol + +# window lock + +bindsym Control+Mod1+l exec i3lock-fancy + +# Go to sleep + +bindsym Control+Mod1+s exec systemctl suspend + +# Screen Shots +bindsym Print exec scrot '%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv $f ~/Pictures/' +bindsym Control+Print exec gnome-screenshot -i + +# Network Manager + +exec_always --no-startup-id nm-applet + + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + colors { + background #2f343f + statusline #2f343f + separator #4b5262 + + # colour of border, background, and text + focused_workspace #2f343f #bf616a #d8dee8 + active_workspace #2f343f #2f343f #d8dee8 + inactive_workspace #2f343f #2f343f #d8dee8 + urgent_workspace #2f343f #ebcb8b #2f343f + } + status_command i3status + position top +} + +new_window 1pixel diff --git a/ubuntu/.config/i3status/config b/ubuntu/.config/i3status/config new file mode 100644 index 0000000..e0d9a51 --- /dev/null +++ b/ubuntu/.config/i3status/config @@ -0,0 +1,46 @@ +general { + output_format = "i3bar" + colors = false + markup = pango + interval = 5 + color_good = '#2f343f' + color_degraded = '#ebcb8b' + color_bad = '#ba5e57' +} + +order += "load" +order += "cpu_temperature 0" +order += "disk /" +order += "disk /home" +order += "ethernet enp1s0" +order += "wireless wlp2s0" +order += "volume master" +order += "battery 1" +order += "tztime local" + +load { + format = " %5min Load " +} + +cpu_temperature 0 { + format = " TEMP: %degrees °C " + path = "/sys/class/thermal/thermal_zone0/temp" +} + +disk "/" { + format = " HDD2: %free Free " +} + +volume master { + format = " VOL: %volume " + format_muted = "VOL: Muted " + device = "default" + mixer = "Master" + mixer_idx = 0 +} + + +tztime local { + format = " %time " + format_time = "%a %-d %b %H:%M" +} diff --git a/ubuntu/.zshrc b/ubuntu/.zshrc index 5aa139c..1456eb1 100644 --- a/ubuntu/.zshrc +++ b/ubuntu/.zshrc @@ -1,97 +1,160 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +# The following lines were added by compinstall -# Path to your oh-my-zsh installation. - export ZSH=/home/evan/.oh-my-zsh +zstyle ':completion:*' completer _complete _ignored +zstyle :compinstall filename '/home/chronos/user/.zshrc' -# 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="robbyrussell" +autoload -Uz compinit +compinit +# End of lines added by compinstall +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +unsetopt beep +bindkey -v +# End of lines configured by zsh-newuser-install -# 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" ) +#git clone https://github.com/zsh-users/zsh-syntax-highlighting.git +#echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc +#source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" +# prompt stuff +autoload -U colors && colors +NEWLINE=$'\n' +export PROMPT="%{$fg[green]%}%n@%M %{$fg[cyan]%}%~ $ %{$reset_color%}" +setopt prompt_subst +autoload -Uz vcs_info +zstyle ':vcs_info:*' actionformats \ + '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' +zstyle ':vcs_info:*' formats \ + '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f ' +zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' -# Uncomment the following line to use hyphen-insensitive completion. Case -# sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" +zstyle ':vcs_info:*' enable git cvs svn -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" +# or use pre_cmd, see man zshcontrib +vcs_info_wrapper() { + vcs_info + if [ -n "$vcs_info_msg_0_" ]; then + echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del" + fi +} +export RPROMPT=$'%@ $(vcs_info_wrapper) %?' +#other stuff -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 +# clear +# screenfetch -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" +#dont mess with this +alias ls="ls --color=auto" -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" +alias pip="python3 -m pip" -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" +# aliases -# Uncomment the following line to display red dots whilst waiting for completion. -# COMPLETION_WAITING_DOTS="true" +#pandoc +alias docx="pandoc -s -o" -# 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" +alias school="cd /media/removable/SD\ Card/School" +alias sdcard="cd /media/removable/SD\ Card/" +alias ll="ls -l" +alias la="ls -a" +alias please='sudo $(history -p !!)' +# alias vi=vim +alias :q="exit" +alias :wq="exit" +alias cls=clear +alias zshreload="source ~/.zshrc" +alias lip="ip addr | grep inet | grep wlan0" +alias p4='ping 4.2.2.2 -c 4' -# 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" +sci(){ + if [ $# != 1 ]; then + crew -h + else + crew install $1 + fi +} -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder +search(){ + if [ $# != 1 ]; then + echo "please enter a name to search for" + else + ls | grep "$1" + fi +} -# 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 -) +csearch(){ + if [ $# != 1 ]; then + echo "Usage: csearch " + else + crew search | grep -e "$1" + fi +} -source $ZSH/oh-my-zsh.sh +mkcd() { + if [ $# != 1 ]; then + echo "Usage: mkcd " + else + mkdir -p $1 && cd $1 + fi +} -# User configuration +cl() +{ + last_dir="$(ls -Frt | grep '/$' | tail -n1)" + if [ -d "$last_dir" ]; then + cd "$last_dir" + fi +} -# export MANPATH="/usr/local/man:$MANPATH" +sud() { # do sudo, or sudo the last command if no argument given + if [[ $# == 0 ]]; then + sudo $(history -p '!!') + else + sudo "$@" + fi +} -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 +up(){ + local d="" + limit=$1 + for ((i=1 ; i <= limit ; i++)) + do + d=$d/.. + done + d=$(echo $d | sed 's/^\///') + if [ -z "$d" ]; then + d=.. + fi + cd $d +} -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi +extract () { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xvjf $1 ;; + *.tar.gz) tar xvzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xvf $1 ;; + *.tbz2) tar xvjf $1 ;; + *.tgz) tar xvzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "don't know how to extract '$1'..." ;; + esac + else + echo "'$1' is not a valid file!" + fi +} +#cls +#screenfetch +#source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh +#source /home/chronos/user/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -# 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" - -# custom stuff -screenfetch +#eval $(thefuck --alias) +#export PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/local/share/texlive/2017/bin/x86_64-linux +#export MANPATH=/usr/local/share/man:/usr/share/man:/usr/local/share/texlive/2017/bin/texmf-dist/doc/man