From f1f06cb48b0cf259b5a7684766cb17db29ef1153 Mon Sep 17 00:00:00 2001 From: Tommy Harris Date: Wed, 30 Dec 2020 21:28:29 -0700 Subject: [PATCH] Initial changes for switching to 'stow' * remove install script; use Makefile (thanks jamestomasino & benharri) * move configs to individual folders * remove bookmarks --- Makefile | 68 +++ bookmarks.json | 140 ------ {.config => bspwm/.config}/bspwm/bspwmrc | 1 + {.config => dunst/.config}/dunst/dunstrc | 0 .spacemacs => emacs/.spacemacs | 3 + install.sh | 126 ------ polybar/.config/polybar/another-config | 413 ++++++++++++++++++ {.config => polybar/.config}/polybar/config | 0 .../.config}/polybar/launch.sh | 0 sxhkd/.config/sxhkd/lsmith-sxhkdrc | 270 ++++++++++++ {.config => sxhkd/.config}/sxhkd/sxhkdrc | 0 .zshrc => zsh/.zshrc | 0 12 files changed, 755 insertions(+), 266 deletions(-) create mode 100644 Makefile delete mode 100644 bookmarks.json rename {.config => bspwm/.config}/bspwm/bspwmrc (94%) rename {.config => dunst/.config}/dunst/dunstrc (100%) rename .spacemacs => emacs/.spacemacs (99%) delete mode 100755 install.sh create mode 100644 polybar/.config/polybar/another-config rename {.config => polybar/.config}/polybar/config (100%) rename {.config => polybar/.config}/polybar/launch.sh (100%) create mode 100644 sxhkd/.config/sxhkd/lsmith-sxhkdrc rename {.config => sxhkd/.config}/sxhkd/sxhkdrc (100%) rename .zshrc => zsh/.zshrc (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3db9213 --- /dev/null +++ b/Makefile @@ -0,0 +1,68 @@ +YELLOW = $$(tput setaf 226) +GREEN = $$(tput setaf 46) +RED = $$(tput setaf 196) +RESET = $$(tput sgr0) + +ifeq ($(OS),Windows_NT) + UNAME = Windows +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + UNAME = Linux + endif + UNAME ?= Other +endif + +install: + @make $(UNAME) + +Linux: bspwm dunst emacs oh-my-zsh polybar sxhkd zsh +Windows: bash git vim +Other: bash git vim + +clean: + @printf "$(RED)--- clean -----------------------------------------------\n$(RESET)" + stow -t "$$HOME" -D bspwm + stow -t "$$HOME" -D dunst + stow -t "$$HOME" -D emacs + stow -t "$$HOME" -D oh-my-zsh + stow -t "$$HOME" -D polybar + stow -t "$$HOME" -D sxhkd + stow -t "$$HOME" -D zsh + +bspwm: + @printf "$(YELLOW)--- bspwm ----------------------------------------------\n$(RESET)" + stow -t "$$HOME" bspwm + +dunst: + @printf "$(YELLOW)--- dunst ----------------------------------------------\n$(RESET)" + stow -t "$$HOME" dunst + +emacs: + @printf "$(YELLOW)--- emacs ----------------------------------------------\n$(RESET)" + git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d + stow -t "$$HOME" emacs + +oh-my-zsh: + @printf "$(YELLOW)--- oh-my-zsh ------------------------------------------\n$(RESET)" + git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh + cp oh-my-zsh/themes/agnoster.zsh-theme ~/.oh-my-zsh/themes/ + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting + +polybar: + @printf "$(YELLOW)--- polybar --------------------------------------------\n$(RESET)" + stow -t "$$HOME" polybar + +sxhkd: + @printf "$(YELLOW)--- sxhkd ----------------------------------------------\n$(RESET)" + stow -t "$$HOME" sxhkd + +zsh: + @printf "$(YELLOW)--- zsh ------------------------------------------------\n$(RESET)" + stow -t "$$HOME" zsh + +nuke: + @printf "$(RED)--- nuking existing files ------------------------------\n$(RESET)" + rm -rf ~/.config/{bspwm,dunst,polybar,sxhkd} ~/.emacs.d ~/.spacemacs ~/.oh-my-zsh ~/.zshrc + +.PHONY: bspwm dunst emacs oh-my-zsh polybar sxhkd zsh clean install nuke Windows Linux Other diff --git a/bookmarks.json b/bookmarks.json deleted file mode 100644 index 59d9dc9..0000000 --- a/bookmarks.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "guid": "root________", - "title": "", - "index": 0, - "dateAdded": 1607387719952000, - "lastModified": 1608252914991000, - "id": 1, - "typeCode": 2, - "type": "text/x-moz-place-container", - "root": "placesRoot", - "children": [ - { - "guid": "menu________", - "title": "menu", - "index": 0, - "dateAdded": 1607387719952000, - "lastModified": 1608252914991000, - "id": 2, - "typeCode": 2, - "type": "text/x-moz-place-container", - "root": "bookmarksMenuFolder" - }, - { - "guid": "toolbar_____", - "title": "toolbar", - "index": 1, - "dateAdded": 1607387719952000, - "lastModified": 1608252627565000, - "id": 3, - "typeCode": 2, - "type": "text/x-moz-place-container", - "root": "toolbarFolder", - "children": [ - { - "guid": "SdMSRThe6zpG", - "title": "x-zvf/dotfiles: My Dotfiles for Arch Linux with i3-gaps, vim, tmux", - "index": 0, - "dateAdded": 1608144300566000, - "lastModified": 1608144300566000, - "id": 15, - "typeCode": 1, - "iconuri": "https://github.githubassets.com/favicons/favicon.svg", - "type": "text/x-moz-place", - "uri": "https://github.com/x-zvf/dotfiles" - }, - { - "guid": "PF0SaeegwHa2", - "title": "QEMU NAT", - "index": 1, - "dateAdded": 1608252591159000, - "lastModified": 1608252627565000, - "id": 16, - "typeCode": 2, - "type": "text/x-moz-place-container", - "children": [ - { - "guid": "63izSjOptaFC", - "title": "Qemu Networking Setup", - "index": 0, - "dateAdded": 1607577486660000, - "lastModified": 1608252601249000, - "id": 13, - "typeCode": 1, - "iconuri": "https://apiraino.github.io/assets/favicon.ico", - "type": "text/x-moz-place", - "uri": "https://apiraino.github.io/qemu-bridge-networking/" - }, - { - "guid": "cJnvfU1FykWS", - "title": "Custom NAT-based network \u2014 libvirt Networking Handbook \u2014 Jamie Nguyen", - "index": 1, - "dateAdded": 1607581205383000, - "lastModified": 1608252607390000, - "id": 14, - "typeCode": 1, - "type": "text/x-moz-place", - "uri": "https://jamielinux.com/docs/libvirt-networking-handbook/custom-nat-based-network.html" - }, - { - "guid": "G5SMj3S-pQ0V", - "title": "Dummy interface on RHEL \u2014 libvirt Networking Handbook \u2014 Jamie Nguyen", - "index": 2, - "dateAdded": 1608252615510000, - "lastModified": 1608252615510000, - "id": 17, - "typeCode": 1, - "type": "text/x-moz-place", - "uri": "https://jamielinux.com/docs/libvirt-networking-handbook/appendix/dummy-interface-on-rhel.html" - }, - { - "guid": "Yb-AIcTQEFSI", - "title": "NAT virtual bridge on RHEL \u2014 libvirt Networking Handbook \u2014 Jamie Nguyen", - "index": 3, - "dateAdded": 1608252622074000, - "lastModified": 1608252622074000, - "id": 18, - "typeCode": 1, - "type": "text/x-moz-place", - "uri": "https://jamielinux.com/docs/libvirt-networking-handbook/appendix/nat-virtual-bridge-on-rhel.html" - }, - { - "guid": "3T3nef_GGCOe", - "title": "VirtualNetworking - Libvirt Wiki", - "index": 4, - "dateAdded": 1608252627565000, - "lastModified": 1608252627565000, - "id": 19, - "typeCode": 1, - "iconuri": "https://wiki.libvirt.org/apple-touch-icon.png", - "type": "text/x-moz-place", - "uri": "https://wiki.libvirt.org/page/VirtualNetworking#The_default_configuration" - } - ] - } - ] - }, - { - "guid": "unfiled_____", - "title": "unfiled", - "index": 3, - "dateAdded": 1607387719952000, - "lastModified": 1607577515408000, - "id": 5, - "typeCode": 2, - "type": "text/x-moz-place-container", - "root": "unfiledBookmarksFolder" - }, - { - "guid": "mobile______", - "title": "mobile", - "index": 4, - "dateAdded": 1607387720015000, - "lastModified": 1607387720182000, - "id": 6, - "typeCode": 2, - "type": "text/x-moz-place-container", - "root": "mobileFolder" - } - ] -} diff --git a/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc similarity index 94% rename from .config/bspwm/bspwmrc rename to bspwm/.config/bspwm/bspwmrc index a64fb7b..21e3d6a 100755 --- a/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -19,6 +19,7 @@ bspc config gapless_monocle true bspc rule -a Gimp desktop='^8' state=floating follow=on bspc rule -a Emacs state=tiled bspc rule -a Virt-manager state=floating +bspc rule -a Thunderbird state=floating bspc rule -a firefox state=floating bspc rule -a mplayer2 state=floating bspc rule -a Kupfer.py focus=on diff --git a/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc similarity index 100% rename from .config/dunst/dunstrc rename to dunst/.config/dunst/dunstrc diff --git a/.spacemacs b/emacs/.spacemacs similarity index 99% rename from .spacemacs rename to emacs/.spacemacs index 953b586..dad55ad 100644 --- a/.spacemacs +++ b/emacs/.spacemacs @@ -376,6 +376,9 @@ before packages are loaded. If you are unsure, you should try in setting them in '(85 . 50) '(100 . 100))))) (global-set-key (kbd "C-c t") 'toggle-transparency) + ;; follow symlinks by default + (setq vc-follow-symlinks t) + ) (defun dotspacemacs/user-config () diff --git a/install.sh b/install.sh deleted file mode 100755 index f37feea..0000000 --- a/install.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -### -# emacs/spacemacs -### -echo "Setting up emacs/spacemacs..." - -# only create the link if it either doesn't exist or is not a link -if ! [[ -e ~/.spacemacs ]] || ! [[ -L ~/.spacemacs ]]; then - echo " --> linking .spacemacs to home" - ln -sf $PWD/.spacemacs ~/.spacemacs -else - echo " --> .spacemacs is already linked!" -fi - -echo " --> setting up spacemacs folder (.emacs.d)" -if ! [[ -d $HOME/.emacs.d ]] ; then - printf "\nNo .emacs.d folder found - downloading spacemacs...\n" - git clone https://github.com/syl20bnr/spacemacs $HOME/.emacs.d -elif [[ -d ~/.emacs.d ]] && ! [[ -e ~/.emacs.d/spacemacs.mk ]] ; then - printf "\n --> .emacs.d present, but not spacemacs. Let's get it.\n\n" - echo " --> renaming .emacs.d to .emacs.d.old" - mv ~/.emacs.d ~/.emacs.d.OLD - git clone https://github.com/syl20bnr/spacemacs $HOME/.emacs.d -else - echo "Spacemacs already present! Skipping download." -fi - -### -# zsh -### - -echo ; echo "Setting up zsh" - -# only create the link if it either doesn't exist or is not a link -if ! [[ -e ~/.zshrc ]] || ! [[ -L ~/.zshrc ]]; then - echo " --> backing up and linking .zshrc to home" - cp ~/.zshrc ~/.zshrc.bak 2>/dev/null - ln -sf $PWD/.zshrc ~/.zshrc -else - echo " --> .zshrc is already linked!" -fi - -echo " --> setting up plugins and linked files..." -echo " --> setting up oh-my-zsh" - -if ! [[ -d ~/.oh-my-zsh ]]; then - echo " --> no oh-my-zsh - cloning..." - git clone https://github.com/ohmyzsh/ohmyzsh ~/.oh-my-zsh -else - echo " --> oh-my-zsh folder already exists" -fi - -echo " --> setting up zsh-syntax-highlighting..." -if ! [[ -d ~/.oh-my-zsh/plugins/zsh-syntax-highlighting ]]; then - echo " --> cloning zsh-syntax-highlighting..." - git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/plugins/zsh-syntax-highlighting - echo " --> copying zsh theme customizations..." - cp oh-my-zsh/themes/agnoster.zsh-theme $HOME/.oh-my-zsh/themes/ -else - echo " --> zsh-syntax-highlighting already installed!" -fi - -echo "Adding functions, aliases, and exports..." -echo " --> creating ~/scripts/shell" -mkdir -p ~/scripts/shell - -echo " --> linking files..." -ln -sf $PWD/scripts/shell/aliases.sh ~/scripts/shell/aliases.sh -ln -sf $PWD/scripts/shell/functions.sh ~/scripts/shell/functions.sh -ln -sf $PWD/scripts/shell/exports.sh ~/scripts/shell/exports.sh - -echo "Sourcing ~/.zshrc" -source ~/.zshrc - -### -# bspwm+sxhkd+polybar -### - -echo "bspwm - checking for process and installing files..." - -# check to see if we're running bspwm and then link files -if [[ `pgrep bspwm` ]] ; then - echo " --> bspwm found! installing files." - mkdir -p ~/.config/{bspwm,sxhkd} - ln -sf $PWD/.config/bspwm/bspwmrc ~/.config/bspwm/bspwmrc - ln -sf $PWD/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc - ln -sf $PWD/.config/polybar ~/.config/polybar -else - echo " --> bspwm not found; skipping this!" -fi - -### -# private repo files -### - -echo "Checking and installing private repo" - -# check for ssh-agent -if ! [[ -d $PWD/private ]] ; then - if ! [[ `ssh-add -l | grep -i I6M0VOSO7` ]] ; then - echo " --> ssh key not found in agent, trying to add it" - sagent - else - echo " --> ssh key found in agent; can continue!" - fi - - if ! [[ `ssh-add -l | grep -i I6M0VOSO7` ]] ; then - echo " --> prompting for ssh key passowrd:" - ssh-add - fi - - if ! [[ `ssh-add -l | grep -i I6M0VOSO7` ]] ; then - echo " --> still not able to retrieve ssh key; cannot install private repo" - else - echo " --> ssh key found, installing private repo" - git submodule add git@github.com:tobraha/private.git - fi -else - echo " --> prviate repo already exists!" -fi - -# source private aliasrc -source $HOME/dotfiles/private/aliasrc - -echo ; echo "Done!" diff --git a/polybar/.config/polybar/another-config b/polybar/.config/polybar/another-config new file mode 100644 index 0000000..d89c016 --- /dev/null +++ b/polybar/.config/polybar/another-config @@ -0,0 +1,413 @@ +; vim:ft=dosini +;===================================================== +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains alot of information +; +;===================================================== + +[colors] +black = ${xrdb:color0:#1d2021} +darkred = ${xrdb:color1:#cc241d} +darkgreen = ${xrdb:color2:#98971a} +darkyellow = ${xrdb:color3:#d79921} +darkblue = ${xrdb:color4:#458588} +darkmagenta = ${xrdb:color5:#b16286} +darkcyan = ${xrdb:color6:#689d6a} +lightgray = ${xrdb:color7:#a89984} +gray = ${xrdb:color8:#928374} +red = ${xrdb:color9:#fb4934} +green = ${xrdb:color10:#b8bb26} +yellow = ${xrdb:color11:#fabd2f} +blue = ${xrdb:color12:#83a598} +magenta = ${xrdb:color13:#d3869b} +cyan = ${xrdb:color14:#8ec07c} +white = ${xrdb:color15:#ebdbb2} +background = ${xrdb:color256:#1d2021} +foreground = ${xrdb:color257:#ebdbb2} + +[bar/default] +;monitor = ${env:MONITOR:LVDS-1} +;monitor = ${env:MONITOR:HDMI-1} +enable-ipc = true +width = 100% +height = 24 +;offset-x = 1% +;offset-y = 1% +;radius = 6.0 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = {$xrdb:red} + +border-size = 0 +border-color = ${colors.white} + +padding-left = 0 +padding-right = 0 + +module-margin-left = 1 +module-margin-right = 1 + +font-0 = mono:pixelsize=9;1 +font-1 = Inconsolata Nerd Font:size=8;1 +font-2 = Noto Color Emoji:scale=10:style=Regular;2 +font-3 = Symbola:pixelsize=9;1 + + +; Other modules: xkeyboard filesystem xbacklight backlight-acpi cpu memory temperature powermenu weather +modules-left = bspwm xwindow +;modules-center = +modules-right = mpd volume mutt-wizard wlan eth battery date + +tray-position = right +tray-padding = 0 + +wm-restack = bspwm + +;override-redirect = true + +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev + +[module/mutt-wizard] + +type = custom/script +exec = mailbox +interval = 5 +format-prefix = " " +format-underline = ${colors.red} + +click-left = $TERMINAL -e neomutt + + +[module/weather] + +type = custom/script +exec = weather +interval = 5000 +;format-underline = + +[module/xwindow] +type = internal/xwindow +label = %title:0:45:...% +format-foreground = ${colors.blue} + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +format-prefix = " " +format-prefix-foreground = ${colors.gray} +format-prefix-underline = ${colors.darkmagenta} + +label-layout = %layout% +label-layout-underline = ${colors.darkmagenta} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-background = ${colors.darkmagenta} +label-indicator-underline = ${colors.darkmagenta} + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / +mount-1 = /home + +label-mounted-underline = ${colors.cyan} +label-mounted = /: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.gray} + +[module/bspwm] +type = internal/bspwm + +label-focused = %index% +label-focused-foreground = ${colors.black} +label-focused-background = ${colors.blue} +label-focused-underline= ${colors.yellow} +label-focused-padding = 1 + +label-occupied = %index% +label-occupied-underline = ${colors.blue} +label-occupied-padding = 1 + +label-urgent = %index%! +label-urgent-background = ${colors.red} +label-urgent-padding = 1 + +label-empty = %index% +label-empty-foreground = ${colors.lightgray} +label-empty-padding = 1 + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 2 +label-mode-foreground = ${colors.white} +label-mode-background = ${colors.darkyellow} + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${colors:black} +;label-focused-background = ${module/bspwm.label-focused-background} +label-focused-underline = ${module/bspwm.label-focused-underline} +label-focused-padding = ${module/bspwm.label-focused-padding} + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = ${module/bspwm.label-occupied-padding} + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${module/bspwm.label-urgent-background} +label-urgent-padding = ${module/bspwm.label-urgent-padding} + +[module/mpd] +type = internal/mpd +format-online = + +click-left = $TERMINAL -e ncmpcpp +click-right = mpc toggle + +label-song = %artist% - %title% +label-song-maxlen = 70 +label-song-ellipsis = true + +format-paused-foreground = ${colors.gray} + +[module/xbacklight] +type = internal/xbacklight + +format =