Added rofi / sourced aliases / dlkiller
This commit is contained in:
parent
43e094e25d
commit
ea5cd95099
4 changed files with 47 additions and 7 deletions
|
|
@ -13,6 +13,10 @@ alias xournal='xournalpp'
|
||||||
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|
||||||
alias javafx='java --module-path /usr/lib/jvm/default/lib/ --add-modules javafx.base,javafx.controls,javafx.graphics,javafx.media,javafx.swing,javafx.web'
|
alias javafx='java --module-path /usr/lib/jvm/default/lib/ --add-modules javafx.base,javafx.controls,javafx.graphics,javafx.media,javafx.swing,javafx.web'
|
||||||
alias sxiv='nsxiv'
|
alias sxiv='nsxiv'
|
||||||
|
alias blueman='blueman-manager'
|
||||||
|
alias spotify='spotify-launcher'
|
||||||
|
alias spotify-launcher='dlkiller spotify-launcher'
|
||||||
|
alias zoom='dlkiller zoom'
|
||||||
|
|
||||||
# Some wsl stuff
|
# Some wsl stuff
|
||||||
alias clip=/mnt/c/Windows/System32/clip.exe
|
alias clip=/mnt/c/Windows/System32/clip.exe
|
||||||
|
|
@ -33,7 +37,7 @@ alias egrep='egrep --color=auto'
|
||||||
alias diff='diff --color=auto'
|
alias diff='diff --color=auto'
|
||||||
alias ip='ip --color=auto'
|
alias ip='ip --color=auto'
|
||||||
|
|
||||||
## KEYBINDS ##
|
## FUNCTIONS ##
|
||||||
|
|
||||||
# Use lf to switch directories and bind it to ctrl-o
|
# Use lf to switch directories and bind it to ctrl-o
|
||||||
lfcd () {
|
lfcd () {
|
||||||
|
|
@ -50,7 +54,30 @@ lfcd () {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
bindkey -s '^o' 'lfcd\n'
|
|
||||||
|
# This script was automatically generated by the broot program
|
||||||
|
# More information can be found in https://github.com/Canop/broot
|
||||||
|
# This function starts broot and executes the command
|
||||||
|
# it produces, if any.
|
||||||
|
# It's needed because some shell commands, like `cd`,
|
||||||
|
# have no useful effect if executed in a subshell.
|
||||||
|
function br {
|
||||||
|
local cmd cmd_file code
|
||||||
|
cmd_file=$(mktemp)
|
||||||
|
if broot --outcmd "$cmd_file" "$@"; then
|
||||||
|
cmd=$(<"$cmd_file")
|
||||||
|
command rm -f "$cmd_file"
|
||||||
|
eval "$cmd"
|
||||||
|
else
|
||||||
|
code=$?
|
||||||
|
command rm -f "$cmd_file"
|
||||||
|
return "$code"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## KEYBINDS ##
|
||||||
|
|
||||||
|
bindkey -s '^e' 'lfcd\n'
|
||||||
|
|
||||||
# Enable completion features
|
# Enable completion features
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Alias for dmenu_run
|
|
||||||
|
|
||||||
blueman-manager
|
|
||||||
|
|
||||||
13
.local/bin/dlkiller
Executable file
13
.local/bin/dlkiller
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/sh
|
||||||
|
# For the programs that create a ~/Downloads folder on startup (ie: spotify, zoom)
|
||||||
|
# Look in the program settings to redirect the Downloads folder before trying this solution
|
||||||
|
# Usage: 'dlkiller $my-program'
|
||||||
|
# Must have $SHELL variable set to your preferred shell
|
||||||
|
|
||||||
|
$1 &
|
||||||
|
|
||||||
|
sleep 4
|
||||||
|
if [ -d ~/Downloads ] && [ -z "$(ls -A ~/Downloads)" ]; then
|
||||||
|
rm -r ~/Downloads
|
||||||
|
fi
|
||||||
|
|
||||||
5
.local/bin/rofi-alias
Executable file
5
.local/bin/rofi-alias
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/sh
|
||||||
|
# Script to have rofi show and run aliases
|
||||||
|
|
||||||
|
rofi -run-list-command "alias | awk -F= \"{print \\\$1}\"" -run-command "/usr/bin/zsh -i -c '{cmd}'" -rnow -show run
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue