Browse Source

Removed old unused configs

master
Josh Wolfe 8 months ago
parent
commit
28241578fe

+ 0
- 154
fish/.config/fish/config.fish View File

@@ -1,154 +0,0 @@
##
## B I N D I N G S
##
function hybrid_bindings --description "Vi-style bindings that inherit emacs-style bindings in all modes"
for mode in default insert visual
fish_default_key_bindings -M $mode
end
fish_vi_key_bindings --no-erase
end
set -g fish_key_bindings hybrid_bindings

##
## S E T T I N G S
##

# Colors
set -gx CLICOLOR 1
set -gx TERM xterm-256color

# Colored man pages
set -x LESS_TERMCAP_mb (printf "\033[01;31m")
set -x LESS_TERMCAP_md (printf "\033[01;31m")
set -x LESS_TERMCAP_me (printf "\033[0m")
set -x LESS_TERMCAP_se (printf "\033[0m")
set -x LESS_TERMCAP_so (printf "\033[01;44;33m")
set -x LESS_TERMCAP_ue (printf "\033[0m")
set -x LESS_TERMCAP_us (printf "\033[01;32m")

##
## A L I A S E S
##
# Misc
alias :q 'exit'
alias less 'less -R'
alias grep 'grep --color=always'
alias ed '/usr/bin/ed -p:'
alias f 'fg'
alias j 'jobs'
# List directory contents
alias lsa 'ls -lah --color'
alias l 'ls --color'
alias ll 'ls++'
alias la 'ls -A --color'
alias ls 'ls --color'
# Push and pop directories on directory stack
alias md 'mkdir -p'
alias rd rmdir
alias d 'dirs -v | head -10'
# Emacs clients
alias e 'emacs -nw'
alias et 'emacsclient -t'
alias ec 'emacsclient -c'
alias magit 'ed -eval "(progn (magit-status)(delete-other-windows))"'

##
## P R O M P T
##
function fish_prompt --description 'Write out the prompt'
if not set -q __fish_git_prompt_show_informative_status
set -g __fish_git_prompt_show_informative_status 1
end
if not set -q __fish_git_prompt_hide_untrackedfiles
set -g __fish_git_prompt_hide_untrackedfiles 1
end

if not set -q __fish_git_prompt_color_branch
set -g __fish_git_prompt_color_branch magenta --bold
end
if not set -q __fish_git_prompt_showupstream
set -g __fish_git_prompt_showupstream "informative"
end
if not set -q __fish_git_prompt_char_upstream_ahead
set -g __fish_git_prompt_char_upstream_ahead "↑"
end
if not set -q __fish_git_prompt_char_upstream_behind
set -g __fish_git_prompt_char_upstream_behind "↓"
end
if not set -q __fish_git_prompt_char_upstream_prefix
set -g __fish_git_prompt_char_upstream_prefix ""
end

if not set -q __fish_git_prompt_char_stagedstate
set -g __fish_git_prompt_char_stagedstate "●"
end
if not set -q __fish_git_prompt_char_dirtystate
set -g __fish_git_prompt_char_dirtystate "✚"
end
if not set -q __fish_git_prompt_char_untrackedfiles
set -g __fish_git_prompt_char_untrackedfiles "…"
end
if not set -q __fish_git_prompt_char_conflictedstate
set -g __fish_git_prompt_char_conflictedstate "✖"
end
if not set -q __fish_git_prompt_char_cleanstate
set -g __fish_git_prompt_char_cleanstate "✔"
end

if not set -q __fish_git_prompt_color_dirtystate
set -g __fish_git_prompt_color_dirtystate blue
end
if not set -q __fish_git_prompt_color_stagedstate
set -g __fish_git_prompt_color_stagedstate yellow
end
if not set -q __fish_git_prompt_color_invalidstate
set -g __fish_git_prompt_color_invalidstate red
end
if not set -q __fish_git_prompt_color_untrackedfiles
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
end
if not set -q __fish_git_prompt_color_cleanstate
set -g __fish_git_prompt_color_cleanstate green --bold
end

set -l last_status $status

if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end

set -l color_cwd
set -l prefix
switch $USER
case root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
else
set color_cwd $fish_color_cwd
end
set suffix '#'
case '*'
set color_cwd $fish_color_cwd
set suffix '$'
end

# PWD
set_color --bold blue #$color_cwd
echo -n (echo $PWD | sed -e "s|^$HOME|~|")
set_color normal

printf '%s ' (__fish_vcs_prompt)

if not test $last_status -eq 0
set_color $fish_color_error
end

echo -n "$suffix "

set_color normal
end

function fish_right_prompt -d "Write out the right prompt"
echo (jobs -c ^ /dev/null | head -1) "["(date +%H:%M:%S)"]"
end


+ 0
- 32
fish/.config/fish/fishd.silversurfer View File

@@ -1,32 +0,0 @@
# This file is automatically generated by the fish.
# Do NOT edit it directly, your changes will be overwritten.
SET __fish_classic_git_prompt_initialized:\x1d
SET __fish_init_2_39_8:\x1d
SET __fish_init_2_3_0:\x1d
SET fish_color_autosuggestion:9C9C9C
SET fish_color_command:F4F4F4
SET fish_color_comment:B0B0B0
SET fish_color_cwd:green
SET fish_color_cwd_root:red
SET fish_color_end:00ff5f
SET fish_color_error:ff0000
SET fish_color_escape:bryellow\x1e\x2d\x2dbold
SET fish_color_history_current:\x2d\x2dbold
SET fish_color_host:normal
SET fish_color_match:\x2d\x2dbackground\x3dbrblue
SET fish_color_normal:normal
SET fish_color_operator:bryellow
SET fish_color_param:ffffff
SET fish_color_quote:ff8700
SET fish_color_redirection:5fafff
SET fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SET fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SET fish_color_status:red
SET fish_color_user:brgreen
SET fish_color_valid_path:\x2d\x2dunderline
SET fish_greeting:\x1d
SET fish_key_bindings:fish_default_key_bindings
SET fish_pager_color_completion:\x1d
SET fish_pager_color_description:B3A06D\x1eyellow
SET fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SET fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan

+ 0
- 92
fish/.config/fish/functions/fish_prompt.fish View File

@@ -1,92 +0,0 @@
function fish_prompt --description 'Write out the prompt'
if not set -q __fish_git_prompt_show_informative_status
set -g __fish_git_prompt_show_informative_status 1
end
if not set -q __fish_git_prompt_hide_untrackedfiles
set -g __fish_git_prompt_hide_untrackedfiles 1
end

if not set -q __fish_git_prompt_color_branch
set -g __fish_git_prompt_color_branch magenta --bold
end
if not set -q __fish_git_prompt_showupstream
set -g __fish_git_prompt_showupstream "informative"
end
if not set -q __fish_git_prompt_char_upstream_ahead
set -g __fish_git_prompt_char_upstream_ahead "↑"
end
if not set -q __fish_git_prompt_char_upstream_behind
set -g __fish_git_prompt_char_upstream_behind "↓"
end
if not set -q __fish_git_prompt_char_upstream_prefix
set -g __fish_git_prompt_char_upstream_prefix ""
end

if not set -q __fish_git_prompt_char_stagedstate
set -g __fish_git_prompt_char_stagedstate "●"
end
if not set -q __fish_git_prompt_char_dirtystate
set -g __fish_git_prompt_char_dirtystate "✚"
end
if not set -q __fish_git_prompt_char_untrackedfiles
set -g __fish_git_prompt_char_untrackedfiles "…"
end
if not set -q __fish_git_prompt_char_conflictedstate
set -g __fish_git_prompt_char_conflictedstate "✖"
end
if not set -q __fish_git_prompt_char_cleanstate
set -g __fish_git_prompt_char_cleanstate "✔"
end

if not set -q __fish_git_prompt_color_dirtystate
set -g __fish_git_prompt_color_dirtystate blue
end
if not set -q __fish_git_prompt_color_stagedstate
set -g __fish_git_prompt_color_stagedstate yellow
end
if not set -q __fish_git_prompt_color_invalidstate
set -g __fish_git_prompt_color_invalidstate red
end
if not set -q __fish_git_prompt_color_untrackedfiles
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
end
if not set -q __fish_git_prompt_color_cleanstate
set -g __fish_git_prompt_color_cleanstate green --bold
end

set -l last_status $status

if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end

set -l color_cwd
set -l prefix
switch $USER
case root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
else
set color_cwd $fish_color_cwd
end
set suffix '#'
case '*'
set color_cwd $fish_color_cwd
set suffix '$'
end

# PWD
set_color $color_cwd
echo -n (prompt_pwd)
set_color normal

printf '%s ' (__fish_vcs_prompt)

if not test $last_status -eq 0
set_color $fish_color_error
end

echo -n "$suffix "

set_color normal
end

+ 0
- 144
windows/desktop_switcher.ahk View File

@@ -1,144 +0,0 @@
#SingleInstance force
; Globals
DesktopCount = 2 ; Windows starts with 2 desktops at boot
CurrentDesktop = 1 ; Desktop count is 1-indexed (Microsoft numbers them this way)

;
; This function examines the registry to build an accurate list of the current virtual desktops and which one we're currently on.
; Current desktop UUID appears to be in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\1\VirtualDesktops
; List of desktops appears to be in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops
;
mapDesktopsFromRegistry() {
global CurrentDesktop, DesktopCount

; Get the current desktop UUID. Length should be 32 always, but there's no guarantee this couldn't change in a later Windows release so we check.
IdLength := 32
SessionId := getSessionId()
if (SessionId) {
RegRead, CurrentDesktopId, HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\%SessionId%\VirtualDesktops, CurrentVirtualDesktop
if (CurrentDesktopId) {
IdLength := StrLen(CurrentDesktopId)
}
}

; Get a list of the UUIDs for all virtual desktops on the system
RegRead, DesktopList, HKEY_CURRENT_USER, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops, VirtualDesktopIDs
if (DesktopList) {
DesktopListLength := StrLen(DesktopList)
; Figure out how many virtual desktops there are
DesktopCount := DesktopListLength / IdLength
}
else {
DesktopCount := 1
}

; Parse the REG_DATA string that stores the array of UUID's for virtual desktops in the registry.
i := 0
while (CurrentDesktopId and i < DesktopCount) {
StartPos := (i * IdLength) + 1
DesktopIter := SubStr(DesktopList, StartPos, IdLength)
OutputDebug, The iterator is pointing at %DesktopIter% and count is %i%.

; Break out if we find a match in the list. If we didn't find anything, keep the
; old guess and pray we're still correct :-D.
if (DesktopIter = CurrentDesktopId) {
CurrentDesktop := i + 1
OutputDebug, Current desktop number is %CurrentDesktop% with an ID of %DesktopIter%.
break
}
i++
}
}

;
; This functions finds out ID of current session.
;
getSessionId()
{
ProcessId := DllCall("GetCurrentProcessId", "UInt")
if ErrorLevel {
OutputDebug, Error getting current process id: %ErrorLevel%
return
}
OutputDebug, Current Process Id: %ProcessId%

DllCall("ProcessIdToSessionId", "UInt", ProcessId, "UInt*", SessionId)
if ErrorLevel {
OutputDebug, Error getting session id: %ErrorLevel%
return
}
OutputDebug, Current Session Id: %SessionId%
return SessionId
}

;
; This function switches to the desktop number provided.
;
switchDesktopByNumber(targetDesktop)
{
global CurrentDesktop, DesktopCount

; Re-generate the list of desktops and where we fit in that. We do this because
; the user may have switched desktops via some other means than the script.
mapDesktopsFromRegistry()

; Don't attempt to switch to an invalid desktop
if (targetDesktop > DesktopCount || targetDesktop < 1) {
OutputDebug, [invalid] target: %targetDesktop% current: %CurrentDesktop%
return
}

; Go right until we reach the desktop we want
while(CurrentDesktop < targetDesktop) {
Send ^#{Right}
CurrentDesktop++
OutputDebug, [right] target: %targetDesktop% current: %CurrentDesktop%
}

; Go left until we reach the desktop we want
while(CurrentDesktop > targetDesktop) {
Send ^#{Left}
CurrentDesktop--
OutputDebug, [left] target: %targetDesktop% current: %CurrentDesktop%
}
}

;
; This function creates a new virtual desktop and switches to it
;
createVirtualDesktop()
{
global CurrentDesktop, DesktopCount
Send, #^d
DesktopCount++
CurrentDesktop = %DesktopCount%
OutputDebug, [create] desktops: %DesktopCount% current: %CurrentDesktop%
}

;
; This function deletes the current virtual desktop
;
deleteVirtualDesktop()
{
global CurrentDesktop, DesktopCount
Send, #^{F4}
DesktopCount--
CurrentDesktop--
OutputDebug, [delete] desktops: %DesktopCount% current: %CurrentDesktop%
}

; Main
SetKeyDelay, 75
mapDesktopsFromRegistry()
OutputDebug, [loading] desktops: %DesktopCount% current: %CurrentDesktop%

; User config!
#&::switchDesktopByNumber(1)
#[::switchDesktopByNumber(2)
#{::switchDesktopByNumber(3)
#}::switchDesktopByNumber(4)
#(::switchDesktopByNumber(5)
#=::switchDesktopByNumber(6)
#*::switchDesktopByNumber(7)
#)::switchDesktopByNumber(8)
#+::switchDesktopByNumber(9)

+ 0
- 16
windows/hotkeys.ahk View File

@@ -1,16 +0,0 @@
#SingleInstance force
#include %A_ScriptDir%\desktop_switcher.ahk

#F12::Edit

;; Launch Firefox
#c::run firefox

;; Launch Emacs
#\::Run C:\emacs\bin\runemacs.exe, C:\

;; Minimize current window
$Insert::WinMinimize, A

;; Pause autohotkey
$ScrollLock::Suspend

+ 0
- 1
windows/windows_setup.bat View File

@@ -1 +0,0 @@
mklink "%USERPROFILE%\Start Menu\Programs\Startup\hotkeys.ahk" "%~dp0hotkeys.ahk"

Loading…
Cancel
Save