Browse Source

old stuff removed

many files renamed, possible breakage
pull/842/head
Luke Smith 1 year ago
parent
commit
cba0fcc03d
No known key found for this signature in database GPG Key ID: 4C50B54A911F6252
  1. 40
      .config/bspwm/bspwm/bspwmrc
  2. 34
      .config/bspwm/bspwmrc
  3. 17
      .config/files
  4. 359
      .config/i3/config
  5. 68
      .config/i3blocks/config
  6. 8
      .config/nvim/init.vim
  7. 413
      .config/polybar/config
  8. 85
      .config/ranger/README.MD
  9. 208
      .config/ranger/commands.py
  10. 508
      .config/ranger/rc.conf
  11. 236
      .config/ranger/rifle.conf
  12. 120
      .config/ranger/scope.sh
  13. 0
      .config/ranger/shortcuts.conf
  14. 0
      .config/readline/inputrc
  15. 0
      .config/shell/aliasrc
  16. 0
      .config/shell/directories
  17. 23
      .config/shell/files
  18. 19
      .config/shell/inputrc
  19. 145
      .config/shell/profile
  20. 270
      .config/sxhkd/sxhkdrc
  21. 33
      .config/vifm/colors/luke.vifm
  22. 78
      .config/vifm/vifmrc
  23. 17
      .config/x11/xinitrc
  24. 13
      .config/x11/xprofile
  25. 0
      .config/x11/xresources
  26. 21
      .config/xinitrc
  27. 8
      .config/zsh/.zshrc
  28. 13
      .local/bin/shortcuts
  29. 2
      .profile
  30. 2
      .xinitrc
  31. 17
      .xprofile
  32. 1
      .xprofile
  33. 145
      .zprofile
  34. 1
      .zprofile
  35. 29
      README.md

40
.config/bspwm/bspwm/bspwmrc

@ -1,40 +0,0 @@
#!/bin/sh
# If refreshing bspwm, remove all previous rules to prevent doubling up.
bspc rule -r "*"
xsetroot -cursor_name left_ptr
# We look for a non-laptop monitor to use for default, but use the laptop
# screen (LVDS) if there's nothing else. This is because I assume that if you
# have an extra screen attached to a laptop, you want to use that.
mainmonitor="$(bspc query --monitors --names | grep -v LVDS | head -n 1)"
# if ! echo "$mainmonitor" | grep LVDS >/dev/null 2>&1; then
# xrandr --output "$mainmonitor" --auto --output LVDS1 --off
# else
# mainmonitor="LVDS1"
# xrandr --output LVDS1 --auto
# fi
# Start workspaces on the main monitor.
bspc monitor "$mainmonitor" -d 1 2 3 4 5 6 7 8 9 10
bspc desktop -f 1
# If you want a multi-monitor display or something else, I leave that to you to
# arrange. I have this sensible default for most people's use cases.
bspc config border_width 3
bspc config window_gap 15
bspc config top_padding 24 # top_padding I set equal to polybar's height
bspc config focus_follows_pointer true
bspc rule -a Zathura state=tiled
dropdownname="dropdown"
bspc query -N -n .hidden >/dev/null || setsid -f "$TERMINAL" -n "$dropdownname" -e dropdown >/dev/null 2>&1
bspc rule -a St:$dropdownname hidden=on
bspc rule -a St:$dropdownname sticky=on
bspc rule -a St:$dropdownname state=floating
bspc config external_rules_command "$(which floaters)"

34
.config/bspwm/bspwmrc

@ -1,34 +0,0 @@
#!/bin/sh
# If refreshing bspwm, remove all previous rules to prevent doubling up.
bspc rule -r "*"
# We look for a non-laptop monitor to use for default, but use the laptop
# screen (LVDS) if there's nothing else. This is because I assume that if you
# have an extra screen attached to a laptop, you want to use that.
mainmonitor="$(bspc query --monitors --names | grep -v LVDS | head -n 1)"
if ! echo "$mainmonitor" | grep LVDS >/dev/null 2>&1; then
xrandr --output "$mainmonitor" --auto --output LVDS1 --off
fi
# Start workspaces on the main monitor.
bspc monitor "$mainmonitor" -d 1 2 3 4 5 6 7 8 9 10
bspc desktop -f 1
# If you want a multi-monitor display or something else, I leave that to you to
# arrange. I have this sensible default for most people's use cases.
bspc config border_width 3
bspc config window_gap 15
bspc config top_padding 24 # top_padding I set equal to polybar's height
bspc config focus_follows_pointer true
dropdownname="dropdown"
bspc query -N -n .hidden >/dev/null || setsid -f "$TERMINAL" -n "$dropdownname" -e dropdown >/dev/null 2>&1
bspc rule -a St:$dropdownname hidden=on
bspc rule -a St:$dropdownname sticky=on
bspc rule -a St:$dropdownname state=floating
bspc config external_rules_command "$(which floaters)"

17
.config/files

@ -1,17 +0,0 @@
bf ${XDG_CONFIG_HOME:-$HOME/.config}/files
bd ${XDG_CONFIG_HOME:-$HOME/.config}/directories
bw ${XDG_CONFIG_HOME:-$HOME/.config}/bookmarks
cfa ${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc
cfz $ZDOTDIR/.zshrc
cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim
cft ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/.tmux.conf
cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc
cfx ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources
cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls
cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config
cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings
cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config
cfk ${XDG_CONFIG_HOME:-$HOME/.config}/sxhkd/sxhkdrc
cfi ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config
cfb ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config
cff ${XDG_CONFIG_HOME:-$HOME/.config}/fontconfig/fonts.conf

359
.config/i3/config

@ -1,359 +0,0 @@
# vim: filetype=i3
# File originally by Luke Smith <https://lukesmith.xyz>
# This config file will use environmental variables such as $BROWSER and $TERMINAL.
# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below:
#
# export TERMINAL="st"
# #---Basic Definitions---# #
set $inner_gaps 15
set $outer_gaps 15
set $term --no-startup-id $TERMINAL
set $mod Mod4
set $stoprec --no-startup-id dmenurecord kill
set $shutdown sudo -A shutdown -h now
set $reboot sudo -A reboot
set $netrefresh --no-startup-id sudo -A systemctl restart NetworkManager
set $hibernate sudo -A systemctl suspend
# #---Gaps---# #
for_window [class="^.*"] border pixel 2
gaps inner $inner_gaps
gaps outer $outer_gaps
# #---Dropdown Windows---# #
# General dropdown window traits. The order can matter.
for_window [instance="dropdown_*"] floating enable
for_window [instance="dropdown_*"] move scratchpad
for_window [instance="dropdown_*"] sticky enable
for_window [instance="dropdown_*"] scratchpad show
for_window [instance="dropdown_tmuxdd"] resize set 625 450
for_window [instance="dropdown_dropdowncalc"] resize set 800 300
for_window [instance="dropdown_tmuxdd"] border pixel 3
for_window [instance="dropdown_dropdowncalc"] border pixel 2
for_window [instance="dropdown_*"] move position center
bar {
font pango:mono 10
status_command i3blocks
position top
mode dock
modifier None
}
# #---Basic Bindings---# #
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec --no-startup-id samedir
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+Escape workspace prev
bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3 exit"
# bindsym $mod+BackSpace
bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Reboot computer?" "$reboot"
bindsym $mod+grave exec --no-startup-id dmenuunicode
##bindsym $mod+asciitilde
#STOP/HIDE EVERYTHING:
bindsym $mod+Shift+Delete exec --no-startup-id pulsemixer --mute ; exec --no-startup-id mpc pause && pkill -RTMIN+10 i3blocks ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e lf
# Show selection:
bindsym $mod+Insert exec --no-startup-id notify-send "๐Ÿ“‹ Clipboard contents:" "$(xclip -o -selection clipboard)"
##bindsym $mod+Pause
# #---Letter Key Bindings---# #
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill
bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid`
bindsym $mod+w exec --no-startup-id $BROWSER
bindsym $mod+Shift+w exec $term -e nmtui
bindsym $mod+e exec $term -e neomutt && pkill -RTMIN+12 i3blocks
bindsym $mod+Shift+e exec --no-startup-id tutorialvids
bindsym $mod+r exec $term -e lf
bindsym $mod+Shift+r exec --no-startup-id winresize
bindsym $mod+t split toggle
bindsym $mod+Shift+t gaps inner current set $inner_gaps; gaps outer current set $outer_gaps
bindsym $mod+y exec $term -e calcurse
bindsym $mod+Shift+y exec --no-startup-id i3resize left
bindsym $mod+u exec --no-startup-id ddspawn tmuxdd
bindsym $mod+Shift+u exec --no-startup-id i3resize down
bindsym $mod+i exec $term -e htop
bindsym $mod+Shift+i exec --no-startup-id i3resize up
bindsym $mod+o sticky toggle
bindsym $mod+Shift+o exec --no-startup-id i3resize right
bindsym $mod+p exec --no-startup-id mpc toggle
bindsym $mod+Shift+p exec --no-startup-id mpc pause
bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
bindsym $mod+Shift+a exec $term -e pulsemixer
bindsym $mod+s gaps inner current plus 5
bindsym $mod+Shift+s gaps inner current minus 5
bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0
set $freeze Distraction-free mode (super+shift+f to reactivate bindings)
mode "$freeze" { bindsym $mod+Shift+f mode "default"
}
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f mode "$freeze" ;; exec --no-startup-id notify-send "Distraction-free mode activated." "Press Super+Shift+f to return."
bindsym $mod+g workspace prev
bindsym $mod+Shift+g exec --no-startup-id gimp; workspace $ws5
bindsym $mod+h focus left
bindsym $mod+Shift+h move left 30
bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+j focus down
bindsym $mod+Shift+j move down 30
bindsym $mod+Ctrl+j move workspace to output down
bindsym $mod+k focus up
bindsym $mod+Shift+k move up 30
bindsym $mod+Ctrl+k move workspace to output up
bindsym $mod+l focus right
bindsym $mod+Shift+l move right 30
bindsym $mod+Ctrl+l move workspace to output right
bindsym $mod+z gaps outer current plus 5
bindsym $mod+Shift+z gaps outer current minus 5
bindsym $mod+x exec --no-startup-id xset dpms force off && mpc pause && pauseallmpv && slock &
bindsym $mod+Shift+x exec --no-startup-id prompt "Shutdown computer?" "$shutdown"
bindsym $mod+c exec --no-startup-id cabl
bindsym $mod+Shift+c exec --no-startup-id camtoggle
bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex"
#bindsym $mod+Shift+v
bindsym $mod+b bar mode toggle
bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id hover left
bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks
bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right
bindsym $mod+m exec --no-startup-id $term -e ncmpcpp
bindsym $mod+Shift+m exec --no-startup-id pulsemixer --toggle-mute && pkill -RTMIN+10 i3blocks
# #---Workspace Bindings---# #
bindsym $mod+Home workspace $ws1
bindsym $mod+Shift+Home move container to workspace $ws1
bindsym $mod+End workspace $ws10
bindsym $mod+Shift+End move container to workspace $ws10
bindsym $mod+Prior workspace prev
bindsym $mod+Shift+Prior move container to workspace prev
bindsym $mod+Next workspace next
bindsym $mod+Shift+Next move container to workspace next
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+XF86Back workspace prev
bindsym $mod+Shift+XF86Back move container to workspace prev
bindsym $mod+XF86Forward workspace next
bindsym $mod+Shift+XF86Forward move container to workspace next
bindsym $mod+semicolon workspace next
bindsym $mod+apostrophe split horizontal ;; exec $term
bindsym $mod+slash split vertical ;; exec $term
bindsym $mod+Shift+slash kill
bindsym $mod+backslash workspace back_and_forth
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
for_window [class="Pinentry"] sticky enable
for_window [class="sent"] border pixel 0px
for_window [title="GIMP Startup"] move workspace $ws5
for_window [class="Gimp"] move workspace $ws5
for_window [window_role="GtkFileChooserDialog"] resize set 800 600
for_window [window_role="GtkFileChooserDialog"] move position center
for_window [title="Default - Wine desktop"] floating enable
# Bindings to make the webcam float and stick.
for_window [title="mpvfloat"] floating enable
for_window [title="mpvfloat"] sticky enable
for_window [title="mpvfloat"] border pixel 0
no_focus [title="mpvfloat"]
# #---Function Buttons---# #
bindsym $mod+F1 exec --no-startup-id groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
bindsym $mod+F2 restart
bindsym $mod+F3 exec --no-startup-id displayselect
bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate"
bindsym $mod+F5 exec --no-startup-id $netrefresh
bindsym $mod+F6 exec --no-startup-id torwrap
bindsym $mod+F7 exec --no-startup-id td-toggle
bindsym $mod+F8 exec --no-startup-id mw sync
bindsym $mod+F9 exec --no-startup-id dmenumount
bindsym $mod+F10 exec --no-startup-id dmenuumount
bindsym $mod+F11 exec --no-startup-id ducksearch
bindsym $mod+F12 exec $term -e nmtui
bindsym $mod+Shift+F1 exec --no-startup-id toggle-welcome
# #---Arrow Keys---# #
bindsym $mod+Left focus left
bindsym $mod+Shift+Left move left
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Down focus down
bindsym $mod+Shift+Down move down
bindsym $mod+Ctrl+Down move workspace to output down
bindsym $mod+Up focus up
bindsym $mod+Shift+Up move up
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Right focus right
bindsym $mod+Shift+Right move right
bindsym $mod+Ctrl+Right move workspace to output right
# #---Media Keys---# #
# Volume keys
bindsym $mod+plus exec --no-startup-id pulsemixer --change-volume +5 && pkill -RTMIN+10 i3blocks
bindsym $mod+Shift+plus exec --no-startup-id pulsemixer --change-volume +15 && pkill -RTMIN+10 i3blocks
bindsym $mod+minus exec --no-startup-id pulsemixer --change-volume -5 && pkill -RTMIN+10 i3blocks
bindsym $mod+Shift+minus exec --no-startup-id pulsemixer --change-volume -15 && pkill -RTMIN+10 i3blocks
bindsym $mod+less exec --no-startup-id mpc prev
bindsym $mod+Shift+less exec --no-startup-id mpc seek 0%
bindsym $mod+greater exec --no-startup-id mpc next
bindsym $mod+Shift+greater exec --no-startup-id mpc next
# For advancing forward/backward in an mpd song
bindsym $mod+bracketleft exec --no-startup-id mpc seek -10
bindsym $mod+Shift+bracketleft exec --no-startup-id mpc seek -120
bindsym $mod+bracketright exec --no-startup-id mpc seek +10
bindsym $mod+Shift+bracketright exec --no-startup-id mpc seek +120
# For screenshots and recording
bindsym Print exec --no-startup-id maim pic-full-"$(date '+%y%m%d-%H%M-%S').png"
bindsym Shift+Print exec --no-startup-id maimpick
bindsym $mod+Print exec --no-startup-id dmenurecord
bindsym $mod+Scroll_Lock exec --no-startup-id "killall screenkey || screenkey"
bindsym $mod+Delete exec $stoprec
bindsym XF86Launch1 exec --no-startup-id xset dpms force off
# #---Extra XF86 Keys---# #
bindsym XF86AudioMute exec --no-startup-id pulsemixer --toggle-mute && pkill -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -5 && pkill -RTMIN+10 i3blocks
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -10 && pkill -RTMIN+10 i3blocks
bindsym Control+XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -1 && pkill -RTMIN+10 i3blocks
bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +5 && pkill -RTMIN+10 i3blocks
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +10 && pkill -RTMIN+10 i3blocks
bindsym Control+XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +1 && pkill -RTMIN+10 i3blocks
bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$shutdown"
##bindsym XF86Copy exec
##bindsym XF86Open exec
##bindsym XF86Paste exec
##bindsym XF86Cut exec
##bindsym XF86MenuKB exec
bindsym XF86Calculator exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
##bindsym XF86Sleep This binding is typically mapped by systemd automatically.
##bindsym XF86WakeUp exec
bindsym XF86Explorer exec $term -e lf
##bindsym XF86Send exec
##bindsym XF86Xfer exec
bindsym XF86WWW exec --no-startup-id $BROWSER
##bindsym XF86DOS exec
bindsym XF86ScreenSaver exec exec --no-startup-id lockscreen
##bindsym XF86RotateWindows exec
##bindsym XF86TaskPane exec
##bindsym XF86Favorites exec
bindsym XF86MyComputer exec $term -e lf
##bindsym XF86Back exec
##bindsym XF86Forward exec
bindsym XF86Eject exec --no-startup-id dmenuumount
bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym XF86AudioPrev exec --no-startup-id mpc prev
bindsym XF86AudioStop exec --no-startup-id mpc toggle
##bindsym XF86AudioRecord
bindsym XF86AudioRewind exec --no-startup-id mpc seek -10
bindsym XF86AudioForward exec --no-startup-id mpc seek +10
##bindsym XF86Phone exec
##bindsym XF86Tools exec
bindsym XF86HomePage exec $BROWSER https://lukesmith.xyz
bindsym XF86Reload restart
##bindsym XF86ScrollUp exec
##bindsym XF86ScrollDown exec
##bindsym XF86New exec
##bindsym XF86LaunchA exec
##bindsym XF86LaunchB exec
##bindsym XF86Launch2 exec
##bindsym XF86Launch3 exec
##bindsym XF86Launch4 exec
##bindsym XF86Launch5 exec
##bindsym XF86Launch6 exec
##bindsym XF86Launch7 exec
##bindsym XF86Launch8 exec
##bindsym XF86Launch9 exec
#bindsym XF86AudioMicMute exec $micmute
bindsym XF86TouchpadToggle exec --no-startup-id toggletouchpad
bindsym XF86TouchpadOn exec --no-startup-id synclient TouchpadOff=0
bindsym XF86TouchpadOff exec --no-startup-id synclient TouchpadOff=1
bindsym XF86Suspend exec --no-startup-id lockscreen
bindsym XF86Close kill
bindsym XF86WebCam exec --no-startup-id camtoggle
bindsym XF86Mail exec $term -e neomutt && pkill -RTMIN+12 i3blocks
bindsym XF86Messenger exec $term -e weechat
bindsym XF86Search exec $BROWSER https://duckduckgo.com
##bindsym XF86Go exec
##bindsym XF86Finance exec
##bindsym XF86Game exec
bindsym XF86Shop exec $BROWSER https://ebay.com
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 15
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15
bindsym XF86AudioMedia exec --no-startup-id $term -e ncmpcpp
bindsym XF86Display exec --no-startup-id displayselect
#bindsym XF86KbdLightOnOff exec
#bindsym XF86KbdBrightnessDown exec
#bindsym XF86KbdBrightnessUp exec
##bindsym XF86Reply exec
##bindsym XF86MailForward exec
##bindsym XF86Save exec
bindsym XF86Documents exec $term -e lf ~/Documents
##bindsym XF86Battery exec
##bindsym XF86Bluetooth exec
bindsym XF86WLAN exec $netrefresh

68
.config/i3blocks/config

@ -1,68 +0,0 @@
command=~/.local/bin/statusbar/$BLOCK_NAME
separator_block_width=15
markup=pango
[record]
command=cat /tmp/recordingicon
interval=once
signal=9
[music]
label=๐ŸŽผ
interval=once
signal=11
[news]
interval=once
signal=6
#[iplocate]
#interval=30
[pacpackages]
interval=once
signal=8
[torrent]
interval=20
signal=7
[weather]
interval=18000
signal=5
[mailbox]
interval=180
signal=12
#[memory]
#interval=30
#[cpu]
#interval=15
[volume]
interval=once
signal=10
#[disk]
#interval=60
#command=disk /
#[disk]
#interval=60
#command=disk /home
[battery]
command=battery BAT0
interval=5
[clock]
label=๐Ÿ“…
interval=30
[internet]
interval=10
[help-icon]
interval=once

8
.config/nvim/init.vim

@ -11,13 +11,11 @@ call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"
Plug 'tpope/vim-surround'
Plug 'preservim/nerdtree'
Plug 'junegunn/goyo.vim'
Plug 'PotatoesMaster/i3-vim-syntax'
Plug 'jreybert/vimagit'
Plug 'lukesmithxyz/vimling'
Plug 'vimwiki/vimwiki'
Plug 'bling/vim-airline'
Plug 'tpope/vim-commentary'
Plug 'kovetskiy/sxhkd-vim'
Plug 'ap/vim-css-color'
call plug#end()
@ -114,11 +112,9 @@ set clipboard+=unnamedplus
autocmd BufWritepre * %s/\n\+\%$//e
" When shortcut files are updated, renew bash and ranger configs with new material:
autocmd BufWritePost files,directories !shortcuts
autocmd BufWritePost bm-files,bm-dirs !shortcuts
" Run xrdb whenever Xdefaults or Xresources are updated.
autocmd BufWritePost *Xresources,*Xdefaults !xrdb %
" Update binds when sxhkdrc is updated.
autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd
autocmd BufWritePost *Xresources,*Xdefaults,*xresources,*xdefaults !xrdb %
" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable.
if &diff

413
.config/polybar/config

@ -1,413 +0,0 @@
; 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 = <label-state> <label-mode>
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 = <label-song> <label-time>
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 = <label> <bar>
label = ๏ฏง
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = โ”€
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = โ”€
bar-empty-font = 2
bar-empty-foreground = ${colors.gray}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "๐ŸŒก "
format-prefix-foreground = ${colors.gray}
format-underline = ${colors.red}
label = %percentage%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = "๐Ÿง  "
format-prefix-foreground = ${colors.gray}
format-underline = ${colors.darkcyan}
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0
format-connected = ๏ชจ <label-connected>
format-connected-underline = ${colors.darkmagenta}
label-connected = %essid%
;format-disconnected =
format-disconnected = <label-disconnected>
format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
label-disconnected = ๏ชฉno wifi
label-disconnected-foreground = ${colors.gray}
; <ramp-signal>
ramp-signal-0 = ๎ˆ˜
ramp-signal-1 = ๎ˆ™
ramp-signal-2 = ๎ˆš
ramp-signal-3 = ๎ˆš
ramp-signal-4 = ๎ˆš
ramp-signal-foreground = ${colors.gray}
[module/eth]
type = internal/network
interface = enp0s25
interval = 3.0
format-connected-underline = ${colors.darkgreen}
;format-connected-underline = ${colors.green}
format-connected-prefix = "๏œ€ "
format-connected-prefix-foreground = ${colors.gray}
label-connected = %local_ip%
;format-disconnected =
format-disconnected = <label-disconnected>
format-disconnected-underline = ${self.format-connected-underline}
label-disconnected = ๏œ %ifname%
label-disconnected-foreground = ${colors.gray}
[module/date]
type = internal/date
interval = 60
date = "%Y %b %d (%a)"
time = "%I:%M%p"
# If you're not living in a country where AM and PM is used you can add -alt to the time above this line and comment it using ;, then you can remove the -alt to the time under this line and uncomment it.
;time-alt = " at %H:%M"
;time-alt = %H:%M:%S
;time-alt = %H:%M:%S
format-prefix = "๏ณ "
format-prefix-foreground = ${colors.gray}
format-underline = ${colors.blue}
label = %date% %time%
[module/volume]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = ๏’…
label-volume-foreground = ${root.foreground}
format-muted-prefix = "๏‘ฆ "
format-muted-foreground = ${colors.gray}
label-muted = muted
bar-volume-width = 10
bar-volume-foreground-0 = ${colors.blue}
bar-volume-foreground-1 = ${colors.blue}
bar-volume-foreground-2 = ${colors.green}
bar-volume-foreground-3 = ${colors.green}
bar-volume-foreground-4 = ${colors.green}
bar-volume-foreground-5 = ${colors.yellow}
bar-volume-foreground-6 = ${colors.red}
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = =
bar-volume-fill-font = 2
bar-volume-empty = =
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.gray}
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
;format-charging = Charging... <label-charging>
format-charging = <animation-charging> <label-charging>
format-charging-underline = ${colors.darkyellow}
;format-discharging = <label-discharging>
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = "๎ˆบ "
format-full-prefix-foreground = ${colors.gray}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = ๏‰„
ramp-capacity-1 = ๏‰ƒ
ramp-capacity-2 = ๏‰‚
ramp-capacity-3 = ๏‰
ramp-capacity-4 = ๏‰€
ramp-capacity-foreground = ${colors.gray}
animation-charging-0 = ๏‰„
animation-charging-1 = ๏‰ƒ
animation-charging-2 = ๏‰‚
animation-charging-3 = ๏‰
animation-charging-4 = ๏‰€
animation-charging-foreground = ${colors.gray}
animation-charging-framerate = 500
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = ${colors.red}
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.darkmagenta}
ramp-0 = ๏‹‹
ramp-1 = ๏‹Š
ramp-2 = ๏‹‰
ramp-3 = ๏‹ˆ
ramp-4 = ๏‹‡
ramp-foreground = ${colors.gray}
[module/powermenu]
type = custom/menu
format-spacing = 1
label-open = ๎„Œ
label-open-foreground = ${colors.darkmagenta}
label-close = ๎ฅ cancel
label-close-foreground = ${colors.darkmagenta}
label-separator = |
label-separator-foreground = ${colors.gray}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 5
margin-bottom = 5

85
.config/ranger/README.MD

@ -1,85 +0,0 @@
# Luke's ranger setup
## Basic Ranger shortcuts
These are the basic key binds in ranger, even outside of my configs. Note that they are mostly vim-based.
+ h/j/k/l -- Move left/down/up/right (where left moves up in the directory structure, right moves into a folder)
+ Space -- select/highlight file
+ dd -- cut selected files
+ yy -- copy/yank selected files
+ pp -- paste/move cut/copied files
+ / -- search, when (n/N) next/previous result
+ zh or CTRL-h -- show hidden files
+ Renaming files:
+ cw -- rename file from scratch
+ A -- rename file adding to the end
+ aa -- rename file appending before the extension
+ I -- rename file adding at the beginning
## Shortcuts
As I say in the main readme, there are shortcut commands generated for ranger
based on what bookmarked directories and files you give it. For directory
shortcuts, here are the "verbs":
+ g -- "go or cd"
+ t -- "new tab"
+ m -- "move file"
+ Y -- "yank or copy file"
These "verbs" take "nouns" or "arguments," like these:
+ d -- "~/Documents"
+ D -- "~/Downloads"
+ cf -- "~/.config"
+ And many others, including those you add to `~/.bmdirs`.
Press any "verb" followed by any "argument" to perform a folder operation. "gd" will cd to ~/Documents, for example. "mD" will move the selected file(s) to ~/Downloads. "tcf" will create a new tab in ~/.config, etc. etc.
## Many little additions!
+ Basic additions:
+ V -- Make a new file and edit it in vim
+ cW -- rename *all* selected files, editing in your text editor
+ mkd -- Make a directory/folder
+ sc -- Makes a link/shortcut (ln -sT)
+ D -- delete selected file
+ X -- Extract a zip/rar/tar.gz, whatever. Runs a script that picks the right command for the right archive.
+ Z -- zips a folder up into a .tar.gz archive.
+ CTRL-f -- Fuzzy find a file
+ CTRL-l -- Fuzzy locate a file
+ Document manipulation:
+ p1s -- print this file on the default printer, one-sided (lpr)
+ p2s -- print this file on the default printer, double-sided (lpr)
+ MP -- convert to a .pdf with pandoc (I use this to convert markdown, etc.)
+ MX -- compile selected document in XeLaTeX
+ ML -- compile selected document in LaTeX
+ TC -- clear all non-visible TeX build files in this directory
+ Txa -- copy article template to new file
+ Txs -- copy slideshow/beamer template to new file
+ Txh -- copy handout template to new file
+ Image commands:
+ bg -- makes an image your background (assuming i3 is looking at ~/.local/share/bg for your background)
+ bw -- runs Pywal on the selected image, making it your background and generating a color scheme based off of it.
+ C -- rotates an image (requires imagemagick)
+ F -- flips an image (requires imagemagick)
+ TR -- add transparency to image file
+ mpd/mpc shortcuts
+ MS -- Start mpd
+ MK -- kill mpd
+ MN -- Start playing selected song/folder now
+ Ma -- Enqueue selected song/folder
+ Mp -- Pause
+ Mn -- Next track
+ Mb -- Previous track
+ Mo -- Restart track
+ Audio tagging with eye3D:
+ Ta -- change artist name
+ TA -- change album name
+ Tb -- change album artist
+ Tt -- change title
+ Tn -- change track number
+ Downloading:
+ ytv -- Download online video (paste in url) (requires youtube-dl)
+ yta -- Download audio of online video (paste in url) (requires youtube-dl)

208
.config/ranger/commands.py

@ -1,208 +0,0 @@
# This is a sample commands.py. You can add your own commands here.
#
# Please refer to commands_full.py for all the default commands and a complete
# documentation. Do NOT add them all here, or you may end up with defunct
# commands when upgrading ranger.
# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import *
from ranger.core.loader import CommandLoader
# A simple command for demonstration purposes follows.
#------------------------------------------------------------------------------
# You can import any python module as needed.
import os
# Any class that is a subclass of "Command" will be integrated into ranger as a
# command. Try typing ":my_edit<ENTER>" in ranger!
class my_edit(Command):
# The so-called doc-string of the class will be visible in the built-in
# help that is accessible by typing "?c" inside ranger.
""":my_edit <filename>
A sample command for demonstration purposes that opens a file in an editor.
"""
# The execute method is called when you run this command in ranger.
def execute(self):
# self.arg(1) is the first (space-separated) argument to the function.
# This way you can write ":my_edit somefilename<ENTER>".
if self.arg(1):
# self.rest(1) contains self.arg(1) and everything that follows
target_filename = self.rest(1)
else:
# self.fm is a ranger.core.filemanager.FileManager object and gives
# you access to internals of ranger.
# self.fm.thisfile is a ranger.container.file.File object and is a
# reference to the currently selected file.
target_filename = self.fm.thisfile.path
# This is a generic function to print text in ranger.
self.fm.notify("Let's edit the file " + target_filename + "!")
# Using bad=True in fm.notify allows you to print error messages:
if not os.path.exists(target_filename):
self.fm.notify("The given file does not exist!", bad=True)
return
# This executes a function from ranger.core.acitons, a module with a
# variety of subroutines that can help you construct commands.
# Check out the source, or run "pydoc ranger.core.actions" for a list.
self.fm.edit_file(target_filename)
# The tab method is called when you press tab, and should return a list of
# suggestions that the user will tab through.
def tab(self):
# This is a generic tab-completion function that iterates through the
# content of the current directory.
return self._tab_directory_content()
# https://github.com/ranger/ranger/wiki/Integrating-File-Search-with-fzf
# Now, simply bind this function to a key, by adding this to your ~/.config/ranger/rc.conf: map <C-f> fzf_select
class fzf_select(Command):
"""
:fzf_select
Find a file using fzf.
With a prefix argument select only directories.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
if self.quantifier:
# match only directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
else:
# match files and directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
# fzf_locate
class fzf_locate(Command):
"""
:fzf_locate
Find a file using fzf.
With a prefix argument select only directories.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
if self.quantifier:
command="locate home media | fzf -e -i"
else:
command="locate home media | fzf -e -i"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
class fzf_bring(Command):
"""
:fzf_bring
Find a file using fzf and bring it to the current directory.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
import shutil
if self.quantifier:
# match only directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
else:
# match files and directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
shutil.move(fzf_file, self.fm.thisdir.path)
class compress(Command):
def execute(self):
""" Compress marked files to current directory """
cwd = self.fm.thisdir
marked_files = cwd.get_selection()
if not marked_files:
return
def refresh(_):
cwd = self.fm.get_directory(original_path)
cwd.load_content()
original_path = cwd.path
parts = self.line.split()
au_flags = parts[1:]
descr = "compressing files in: " + os.path.basename(parts[1])
obj = CommandLoader(args=['apack'] + au_flags + \
[os.path.relpath(f.path, cwd.path) for f in marked_files], descr=descr)
obj.signal_bind('after', refresh)
self.fm.loader.add(obj)
def tab(self):
""" Complete with current folder name """
extension = ['.zip', '.tar.gz', '.rar', '.7z']
return ['compress ' + os.path.basename(self.fm.thisdir.path) + ext for ext in extension]
class extracthere(Command):
def execute(self):
""" Extract copied files to current directory """
copied_files = tuple(self.fm.copy_buffer)
if not copied_files:
return
def refresh(_):
cwd = self.fm.get_directory(original_path)
cwd.load_content()
one_file = copied_files[0]
cwd = self.fm.thisdir
original_path = cwd.path
au_flags = ['-X', cwd.path]
au_flags += self.line.split()[1:]
au_flags += ['-e']
self.fm.copy_buffer.clear()
self.fm.cut_buffer = False
if len(copied_files) == 1:
descr = "extracting: " + os.path.basename(one_file.path)
else:
descr = "extracting files from: " + os.path.basename(one_file.dirname)
obj = CommandLoader(args=['aunpack'] + au_flags \
+ [f.path for f in copied_files], descr=descr)
obj.signal_bind('after', refresh)
self.fm.loader.add(obj)

508
.config/ranger/rc.conf

@ -1,508 +0,0 @@
###SETTINGS###
set column_ratios 1,3,4
#set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
set show_hidden false
set confirm_on_delete multiple
set use_preview_script true
set automatically_count_files true
set open_all_images true
set vcs_aware false
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set preview_images true
set preview_images_method ueberzug
set unicode_ellipsis false
set show_hidden_bookmarks false
set colorscheme default
set preview_files true
set preview_directories true
set collapse_preview true
set save_console_history false
set status_bar_on_top false
set draw_progress_bar_in_status_bar true
set draw_borders true
set dirname_in_tabs true
set mouse_enabled true
set display_size_in_main_column true
set display_size_in_status_bar true
set display_tags_in_all_columns true
set update_title false
set update_tmux_title true
set shorten_title 3
set tilde_in_titlebar true
set max_history_size 20
set max_console_history_size 50
set scroll_offset 8
set flushinput true
set padding_right true
set autosave_bookmarks false
set autoupdate_cumulative_size false
set show_cursor false
set sort natural
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
set sort_unicode false
set xterm_alt_key false
set cd_bookmarks false
set preview_max_size 0
set show_selection_in_titlebar true
set idle_delay 2000
set metadata_deep_search false
###ALIASES###
alias e edit
alias q quit
alias q! quitall
alias qa quitall
alias qall quitall
alias setl setlocal
alias filter scout -prt
alias find scout -aeit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefiklst
###BASIC KEYS###
#BASIC
map Q quit!
map q quit
copymap q ZZ ZQ
#map R reload_cwd
map <C-r> reset
#map <C-l> redraw_window
map <C-c> abort
map <esc> change_mode normal
map i display_file
map ? help
#map W display_log
map w taskview_open
map S shell $SHELL
map : console
map ; console
map ! console shell%space
map @ console -p6 shell %s
map # console shell -p%space
#map s console shell%space
map r chain draw_possible_programs; console open_with%%space
map f console find%space
map cd console cd%space
# Change the line mode
#map Mf linemode filename
#map Mi linemode fileinfo
#map Mp linemode permissions
#map Mt linemode metatitle
#moc
#map Mc shell mocp -c
#map Ma shell mocp -a %s
#map Ms shell mocp -p
#map MS shell mocp -S
#map Mp shell mocp -G
#map Mn shell mocp -f
#map Mb shell mocp -r
#map MN shell mocp -s && mocp -c && mocp -a %s && mocp -p
#map Mo shell mocp -j 0%%
#map MK shell killall mocp
# Tagging / Marking
map at tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map va mark_files all=True toggle=True
map uv mark_files all=True val=False
map vs toggle_visual_mode
map uV toggle_visual_mode reverse=True
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F3> display_file
map <F4> edit
map <F5> copy
map <F5> console shell echo "require(rmarkdown); render_site()" | R --vanilla
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
map <DELETE> console delete
map <INSERT> console touch%space
# VIM-like
copymap <UP> k
copymap <DOWN> j
copymap <LEFT> h
copymap <RIGHT> l
copymap <HOME> gg
copymap <END> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
# Jumping around
map H history_go -1
map L history_go 1
map ] move_parent 1
map [ move_parent -1
map } traverse
#DEFAULT MOVEMENT
map ge cd /etc
map gu cd /usr
#map gl cd -r .
map gL cd -r %f
#map gv cd /var
map gM cd /mnt
map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g? cd /usr/share/doc/ranger
# Tabs
map <C-n> tab_new ~
map <C-w> tab_close
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
#map gt tab_move 1
#map gT tab_move -1
map gn tab_new ~
#map gc tab_close
map tt tab_close
map uq tab_restore
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map yp shell -f echo -n %%d/%%f | xsel -i; xsel -o | xsel -i -b
map yd shell -f echo -n %%d | xsel -i; xsel -o | xsel -i -b
map yn shell -f echo -n %%f | xsel -i; xsel -o | xsel -i -b
# Filesystem Operations
map = chmod
map cw console rename%space
map aa rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path)
map I eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7)
map pp paste
map po paste overwrite=True
map pP paste append=True
map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
map dD console delete
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
# Temporary workarounds
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map / console search%space
map n search_next
map N search_next forward=False
map ct search_next order=tag
map cs search_next order=size
map ci search_next order=mimetype
map cc search_next order=ctime
map cm search_next order=mtime
map ca search_next order=atime
# Sorting
map or toggle_option sort_reverse
map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
# Settings
map zc toggle_option collapse_preview
map zd toggle_option sort_directories_first
map zh toggle_option show_hidden
map <C-h> toggle_option show_hidden
map zi toggle_option flushinput
map zm toggle_option mouse_enabled
map zp toggle_option preview_files
map zP toggle_option preview_directories
map zs toggle_option sort_case_insensitive
map zu toggle_option autoupdate_cumulative_size
map zv toggle_option use_preview_script
map zf console filter%space
# Bookmarks
#map `<any> enter_bookmark %any
#map '<any> enter_bookmark %any
#map mm<any> set_bookmark %any
#map um<any> unset_bookmark %any
#map m<bg> draw_bookmarks
#copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
###CONSOLE KEYS###
# Basic
cmap <tab> eval fm.ui.console.tab()
cmap <s-tab> eval fm.ui.console.tab(-1)
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
#cmap <C-l> redraw_window
copycmap <ESC> <C-c>
copycmap <CR> <C-j>
# Move around
cmap <up> eval fm.ui.console.history_move(-1)
cmap <down> eval fm.ui.console.history_move(1)
cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
# And of course the emacs way
#copycmap <up> <C-p>
#copycmap <down> <C-n>
#copycmap <left> <C-b>
#copycmap <right> <C-f>
#copycmap <home> <C-a>
#copycmap <end> <C-e>
#copycmap <delete> <C-d>
#copycmap <backspace> <C-h>
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
# and <backspace2> (code 127). To be sure, use both.
copycmap <backspace> <backspace2>
# This special expression allows typing in numerals:
cmap <allow_quantifiers> false
###PAGER KEYS###
# Movement
pmap <down> pager_move down=1
pmap <up> pager_move up=1
pmap <left> pager_move left=4
pmap <right> pager_move right=4
pmap <home> pager_move to=0
pmap <end> pager_move to=-1
pmap <pagedown> pager_move down=1.0 pages=True
pmap <pageup> pager_move up=1.0 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <C-u> pager_move up=0.5 pages=True
copypmap <UP> k <C-p>
copypmap <DOWN> j <C-n> <CR>
copypmap <LEFT> h
copypmap <RIGHT> l
copypmap <HOME> g
copypmap <END> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
#pmap <C-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
# ===================================================================
# == Taskview Keybindings
# ===================================================================
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
#tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
map sp console shell bash speedvid.sh %f%space
map x shell chmod -x %s
#General
map V console shell vim%space
map cW bulkrename %s
map mkd console mkdir%space
map sc console shell ln -sT%space
map D console delete
map X shell atool -x %f
map Z shell tar -cvzf %f.tar.gz %s
map <C-f> fzf_select
map <C-l> fzf_locate
#Document Manipulation
map p1s shell lpr -o sides=one-sided %f
map p2s shell lpr -o sides=two-sided-long-edge %f
map MP shell pandoc %f -o %f.pdf
map MX shell xelatex %f
map ML shell latex %f
map TC shell texclear
map Txa console shell cp ~/Documents/LaTeX/article.tex%space
map Txs console shell cp ~/Documents/LaTeX/beamer.tex%space
map Txh console shell cp ~/Documents/LaTeX/handout.tex%space
#Image commands
map bg shell setbg %f
map bw shell wal -i %f && setbg %f
map C shell killall w3mimgdisplay && convert -rotate 90 %s %s
map F shell killall w3mimgdisplay && convert -flop %s %s
map bl shell killall w3mimgdisplay && convert %s -resize 1440x1080\> bl_%s
map TR shell convert %s -transparent white %s
#Music (mpd) shortcuts
map MS shell mpd
map MK shell killall mpd
map Ma shell mpc add "%s"
map Ms shell mpc play
map Mp shell mpc toggle
map Mn shell mpc next
map Mb shell mpc prev
map MN shell mpc stop && mpc clear && mpc add "%s"
map Mo shell mpc seek 0%
#Audio tagging (Requires eyeD3)
map Ta eval fm.open_console('shell eyeD3 -a ' + fm.thisfile.relative_path, position=15)
#Artist
map TA eval fm.open_console('shell eyeD3 -A ' + fm.thisfile.relative_path, position=15)
#Album
map Tb eval fm.open_console('shell eyeD3 -b ' + fm.thisfile.relative_path, position=15)
#Album artist
map Tt eval fm.open_console('shell eyeD3 -t "" ' + fm.thisfile.relative_path, position=16)
map Tn eval fm.open_console('shell eyeD3 -n "" ' + fm.thisfile.relative_path, position=16)
#Downloading
map ytv console shell youtube-dl -ic%space
map yta console shell youtube-dl -xic%space
eval cmd('source ' + fm.confpath('shortcuts.conf'))

236
.config/ranger/rifle.conf

@ -1,236 +0,0 @@
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
# $1-$9 | The n-th selected file
# $@ | All selected files
#
# If you use the special command "ask", rifle will ask you what program to run.
#
# Prefixing a condition with "!" will negate its result.
# These conditions are currently supported:
# match <regexp> | The regexp matches $1
# ext <regexp> | The regexp matches the extension of $1
# mime <regexp> | The regexp matches the mime type of $1
# name <regexp> | The regexp matches the basename of $1
# path <regexp> | The regexp matches the absolute path of $1
# has <program> | The program is installed (i.e. located in $PATH)
# env <variable> | The environment variable "variable" is non-empty
# file | $1 is a file
# directory | $1 is a directory
# number <n> | change the number of this command to n
# terminal | stdin, stderr and stdout are connected to a terminal
# X | $DISPLAY is not empty (i.e. Xorg runs)
#
# There are also pseudo-conditions which have a "side effect":
# flag <flags> | Change how the program is run. See below.
# label <label> | Assign a label or name to the command so it can
# | be started with :open_with <label> in ranger
# | or `rifle -p <label>` in the standalone executable.
# else | Always true.
#
# Flags are single characters which slightly transform the command:
# f | Fork the program, make it run in the background.
# | New command = setsid -f $command >& /dev/null
# r | Execute the command with root permissions
# | New command = sudo $command
# t | Run the program in a new terminal. If $TERMCMD is not defined,
# | rifle will attempt to extract it from $TERM.
# | New command = $TERMCMD -e $command
# Note: The "New command" serves only as an illustration, the exact
# implementation may differ.
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
#-------------------------------------------
# Websites
#-------------------------------------------
# Rarely installed browsers get higher priority; It is assumed that if you
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
# other hand are often only installed as fallback browsers.