Compare commits
36 Commits
89a45d70e0
...
8910cd3c51
Author | SHA1 | Date |
---|---|---|
lelgenio | 8910cd3c51 | |
lelgenio | 56ffb19a27 | |
lelgenio | e041b01434 | |
lelgenio | d55c5a1581 | |
lelgenio | 7971b8ddc7 | |
lelgenio | 7a139163ae | |
lelgenio | 109a6a774f | |
lelgenio | d74315e837 | |
lelgenio | ef9ffb2565 | |
lelgenio | a94e774f53 | |
lelgenio | 5854c04af1 | |
lelgenio | 181a0f0f6a | |
lelgenio | b6fc7138a1 | |
lelgenio | 1c776d7104 | |
lelgenio | a367ee5fd7 | |
lelgenio | 9141b97b85 | |
lelgenio | b36d32adad | |
lelgenio | 145aa32f0e | |
lelgenio | becd04d486 | |
lelgenio | 748d416775 | |
lelgenio | b34d892604 | |
lelgenio | d868661c5d | |
lelgenio | 21d185e2c1 | |
lelgenio | 1c0ae12c47 | |
lelgenio | 50dc11df7e | |
lelgenio | 741a316272 | |
lelgenio | a8fa5280ad | |
lelgenio | 06ec0bbfc5 | |
lelgenio | 8fdb383f8e | |
lelgenio | e78a3fb325 | |
lelgenio | 96227a844f | |
lelgenio | 3d84426808 | |
lelgenio | 9642055e9c | |
lelgenio | e8dd5f6436 | |
lelgenio | 0549ffaadc | |
lelgenio | 72a501d3a7 |
|
@ -3,7 +3,7 @@
|
|||
* sway / Waybar
|
||||
* kitty (only way to get ranger image previews on wayland)
|
||||
* fish (fight me!)
|
||||
* nvim / vim-lsp (pure vimscript)
|
||||
* kakoune
|
||||
* qutebrowser
|
||||
* zathura
|
||||
* mpd (optionally playerctl if installed)
|
||||
|
@ -12,9 +12,9 @@
|
|||
|
||||
## Install:
|
||||
Most files need to be pre-prossesed with dotdrop.
|
||||
By default mapped to Colemak, edit config.yaml to remap.
|
||||
If you're on Arch this will install all packages automatically.
|
||||
```bash
|
||||
pip install --user dotdrop
|
||||
dotdrop -c config.yaml install -p dark
|
||||
dotdrop -c config.yaml install -p main
|
||||
```
|
||||
![image.png](./image.png)
|
||||
|
|
39
config.yaml
39
config.yaml
|
@ -9,8 +9,11 @@ variables:
|
|||
username: lelgenio
|
||||
mail: disroot.org
|
||||
cursor_size: 24
|
||||
editor: kak
|
||||
key_layout: colemak
|
||||
launcher: bmenu
|
||||
terminal: kitty
|
||||
file_manager: thunar
|
||||
bar: waybar
|
||||
bar_pos: top
|
||||
|
||||
|
@ -54,9 +57,9 @@ profiles:
|
|||
type: light
|
||||
bg: '#FAFAFA'
|
||||
bg_light: '#A0A0A0'
|
||||
bg_dark: '#999999'
|
||||
bg_dark: '#EAEAEA'
|
||||
txt: '#303030'
|
||||
nontxt: '#A0A0A0'
|
||||
nontxt: '#F0F0F0'
|
||||
|
||||
normal:
|
||||
black: '#555555'
|
||||
|
@ -138,16 +141,8 @@ config: # {{{
|
|||
func_file:
|
||||
- funcs.py
|
||||
dynvariables:
|
||||
key_layout: |
|
||||
if test -n "$_KEYBOARD_LAYOUT"; then
|
||||
echo "$_KEYBOARD_LAYOUT"
|
||||
else
|
||||
grep lelgenio /etc/passwd &>/dev/null &&
|
||||
echo colemak || echo qwerty
|
||||
fi
|
||||
color_type: test -n "$_COLOR_TYPE" && echo "$_COLOR_TYPE" || echo dark
|
||||
accent_color_name: test -n "$_ACCENT_COLOR" && echo "$_ACCENT_COLOR" || echo red
|
||||
editor: test -n "$EDITOR" && echo "$EDITOR" || echo nvim
|
||||
blender_version: blender --version | head -n1 | sed -E 's|^Blender (.*)\..*|\1|g'
|
||||
# }}}
|
||||
dotfiles: # {{{
|
||||
|
@ -157,13 +152,13 @@ dotfiles: # {{{
|
|||
actions:
|
||||
- vimplug
|
||||
sway:
|
||||
src: sway.conf
|
||||
dst: ~/.config/sway/config
|
||||
src: sway
|
||||
dst: ~/.config/sway
|
||||
actions:
|
||||
- reload_sway
|
||||
fish:
|
||||
src: fish.fish
|
||||
dst: ~/.config/fish/config.fish
|
||||
src: fish
|
||||
dst: ~/.config/fish
|
||||
actions:
|
||||
- reload_fish
|
||||
mako:
|
||||
|
@ -182,8 +177,8 @@ dotfiles: # {{{
|
|||
actions:
|
||||
- reload_fish
|
||||
qutebrowser:
|
||||
src: qutebrowser.py
|
||||
dst: ~/.config/qutebrowser/config.py
|
||||
src: qutebrowser
|
||||
dst: ~/.config/qutebrowser
|
||||
lesskey:
|
||||
src: lesskey
|
||||
dst: ~/.lesskey
|
||||
|
@ -275,6 +270,16 @@ dotfiles: # {{{
|
|||
kakoune:
|
||||
src: kak
|
||||
dst: ~/.config/kak
|
||||
packages:
|
||||
src: metaPKGBUILD
|
||||
dst: ~/.local/share/metapkg/PKGBUILD
|
||||
actions:
|
||||
- install_meta
|
||||
bat:
|
||||
src: bat
|
||||
dst: ~/.config/bat/config
|
||||
|
||||
|
||||
# }}}
|
||||
actions: #{{{
|
||||
notify: notify-send "Updating dotfiles" "{{@@ _dotfile_abs_dst.lstrip(env['HOME']) @@}}"
|
||||
|
@ -314,5 +319,7 @@ actions: #{{{
|
|||
pam_gpg: _pam-gpg-strap
|
||||
make_theme:
|
||||
~/.local/bin/_make_theme
|
||||
install_meta:
|
||||
~/.local/bin/install_meta
|
||||
# }}}
|
||||
# vim: fdm=marker
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# {{@@ header() @@}}
|
||||
#
|
||||
# This is `bat`s configuration file. Each line either contains a comment or
|
||||
# a command-line option that you want to pass to `bat` by default. You can
|
||||
# run `bat --help` to get a list of all possible configuration options.
|
||||
|
||||
# {%@@ if color.type == "light" @@%} #
|
||||
--theme GitHub
|
||||
# {%@@ endif @@%} #
|
||||
|
||||
# Enable this to use italic text on the terminal. This is not supported on all
|
||||
# terminal emulators (like tmux, by default):
|
||||
#--italic-text=always
|
||||
|
||||
# Uncomment the following line to disable automatic paging:
|
||||
#--paging=never
|
||||
|
||||
# Uncomment the following line if you are using less version >= 551 and want to
|
||||
# enable mouse scrolling support in `bat` when running inside tmux. This might
|
||||
# disable text selection, unless you press shift.
|
||||
#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
|
||||
|
||||
# Syntax mappings: map a certain filename pattern to a language.
|
||||
# Example 1: use the C++ syntax for .ino files
|
||||
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
|
||||
#--map-syntax "*.ino:C++"
|
||||
#--map-syntax ".ignore:Git Ignore"
|
||||
|
||||
# vim: ft=sh
|
|
@ -11,7 +11,7 @@ default_calendar = calendar_local
|
|||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
dateformat = %d
|
||||
dateformat = %d/%m
|
||||
longdateformat = %d/%m/%Y
|
||||
datetimeformat = %H:%M %d/%m
|
||||
longdatetimeformat = %H:%M %d/%m/%Y
|
||||
|
|
|
@ -1,361 +0,0 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
# Environment Vairables {{{
|
||||
set -x QT_QPA_PLATFORMTHEME gtk3
|
||||
set -x PATH ~/.local/bin ~/.cargo/bin $PATH
|
||||
set -x ESCDELAY 0
|
||||
|
||||
set -x EDITOR {{@@ editor @@}}
|
||||
set -x VISUAL {{@@ editor @@}}
|
||||
set -x BROWSER qutebrowser
|
||||
set -x PAGER less
|
||||
|
||||
# if test -n "$XDG_VTRN"; and test -z "$DISPLAY"
|
||||
# or command -qs systemctl;and systemctl -q is-enabled ly
|
||||
|
||||
|
||||
# keep my dirs clean
|
||||
set -x PYTHONPYCACHEPREFIX $HOME/.cache/python
|
||||
|
||||
# end
|
||||
|
||||
#}}}
|
||||
# Aliases{{{
|
||||
|
||||
abbr v {{@@ editor @@}}
|
||||
|
||||
command -qs sudo &&
|
||||
abbr rv sudo {{@@ editor @@}}
|
||||
command -qs doas &&
|
||||
abbr rv doas {{@@ editor @@}}
|
||||
|
||||
command -qs trash &&
|
||||
alias rm trash
|
||||
|
||||
command -qs exa &&
|
||||
alias ls 'exa --git'
|
||||
{%@@ set bat_command = "bat " + ("--theme GitHub" * (color.type == "light")) @@%}
|
||||
command -qs bat &&
|
||||
alias cat "{{@@ bat_command @@}}"
|
||||
|
||||
command -qs zoxide &&
|
||||
zoxide init fish | source
|
||||
|
||||
command -qs khard &&
|
||||
function fish_greeting
|
||||
set -l khalList khal list now 10d --format " {title}"
|
||||
$khalList &> /dev/null
|
||||
or return
|
||||
$khalList | grep '^No events$' &> /dev/null
|
||||
and return
|
||||
$khalList
|
||||
end
|
||||
|
||||
abbr mpn ncmpcpp
|
||||
|
||||
abbr gs git status
|
||||
abbr gd git diff
|
||||
abbr gp 'git pull; git push'
|
||||
|
||||
set -x _KEYBOARD_LAYOUT "{{@@ key_layout @@}}"
|
||||
set -x _COLOR_TYPE "{{@@ color_type @@}}"
|
||||
set -x _ACCENT_COLOR "{{@@ accent_color_name @@}}"
|
||||
|
||||
set -x DOTDROP_CONFIG "{{@@ _dotdrop_cfgpath @@}}"
|
||||
set -x DOTDROP_PROFILE "{{@@ profile @@}}"
|
||||
abbr dot "dotdrop install -f"
|
||||
|
||||
# }}}
|
||||
# Functions {{{
|
||||
|
||||
function edit-config #{{{
|
||||
pushd "{{@@ parent_dir ( _dotdrop_dotpath ) @@}}"
|
||||
{{@@ editor @@}} (git ls-files | wdmenu)
|
||||
popd
|
||||
end
|
||||
abbr ec edit-config
|
||||
|
||||
#}}}
|
||||
# alias mutt #{{{
|
||||
|
||||
function mutt --wraps=neomutt
|
||||
neomutt $argv;
|
||||
pkill -RTMIN+4 waybar
|
||||
end
|
||||
abbr neomutt mutt
|
||||
#}}}
|
||||
function rcd #{{{
|
||||
set file (mktemp)
|
||||
|
||||
ranger --choosedir=$file
|
||||
cd (cat $file)
|
||||
|
||||
rm $file
|
||||
clear
|
||||
ls
|
||||
fish_prompt
|
||||
end
|
||||
|
||||
# force-repaint to redraw prompt
|
||||
bind -M insert \cr rcd
|
||||
#}}}
|
||||
function etc #{{{
|
||||
pushd /etc/
|
||||
set file /etc/(fzf)
|
||||
popd
|
||||
test -f "$file"
|
||||
and sudo {{@@ editor @@}} $file
|
||||
end
|
||||
#}}}
|
||||
# cd ...{{{
|
||||
for i in (seq 3 10)
|
||||
set -l dots (string repeat -n $i .)
|
||||
set -l segs (string repeat -n $i ./.)
|
||||
alias $dots "cd $segs"
|
||||
end
|
||||
#}}}
|
||||
# Autoreload{{{
|
||||
function _fish_autoreload --on-signal SIGHUP
|
||||
source {{@@ _dotfile_abs_dst @@}}
|
||||
kitty @ set-colors -a ~/.config/kitty/kitty.conf
|
||||
kitty @ set-background-opacity "{{@@ opacity @@}}"
|
||||
end
|
||||
#}}}
|
||||
function dark_toggle # {{{
|
||||
if test "$_COLOR_TYPE" = "dark"
|
||||
set _COLOR_TYPE "light"
|
||||
else
|
||||
set _COLOR_TYPE "dark"
|
||||
end
|
||||
|
||||
dotdrop install -f
|
||||
|
||||
end
|
||||
|
||||
# }}}
|
||||
# Open{{{
|
||||
functions -q _fish_open
|
||||
or functions -c open _fish_open
|
||||
function open
|
||||
_fish_open $argv &> /dev/null
|
||||
end
|
||||
#}}}
|
||||
|
||||
# }}}
|
||||
# Keys{{{
|
||||
|
||||
set fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
if test $fish_key_bindings = fish_vi_key_bindings
|
||||
|
||||
bind {{@@ key.left @@}} backward-char
|
||||
bind -M visual {{@@ key.left @@}} backward-char
|
||||
bind {{@@ key.down @@}} down-or-search
|
||||
bind -M visual {{@@ key.down @@}} down-line
|
||||
bind {{@@ key.up @@}} up-or-search
|
||||
bind -M visual {{@@ key.up @@}} up-line
|
||||
bind {{@@ key.right @@}} forward-char
|
||||
bind -M visual {{@@ key.right @@}} forward-char
|
||||
|
||||
bind -m insert {{@@ key.insertMode @@}} repaint-mode
|
||||
bind -m insert {{@@ key.insertMode.upper() @@}} beginning-of-line repaint-mode
|
||||
|
||||
bind -M insert {{@@ key.insertQuit @@}} repaint-mode -m default
|
||||
|
||||
bind yy fish_clipboard_copy
|
||||
|
||||
end
|
||||
|
||||
#}}}
|
||||
# start window manager if using tty1 {{{
|
||||
#
|
||||
|
||||
function esway
|
||||
clear
|
||||
|
||||
set -x _JAVA_AWT_WM_NONREPARENTING 1
|
||||
|
||||
set -x GTK_CSD 0
|
||||
test -f '/usr/lib/libgtk3-nocsd.so.0' &&
|
||||
set -x LD_PRELOAD '/usr/lib/libgtk3-nocsd.so.0'
|
||||
|
||||
# set -x QT_SCALE_FACTOR 1.0001
|
||||
# set -x QPA_PLATFORM wayland
|
||||
# set -x QT_QPA_PLATFORM wayland
|
||||
|
||||
set -x XDG_CURRENT_DESKTOP sway
|
||||
set -x XDG_SESSION_TYPE wayland
|
||||
|
||||
pidof sway || exec sway
|
||||
end
|
||||
|
||||
if test "$XDG_VTNR" = 1 -a -z "$DISPLAY"
|
||||
esway &| tee .swaylog
|
||||
# ei3 &> .i3log
|
||||
# ebsp &> .bsplog
|
||||
end
|
||||
|
||||
# }}}
|
||||
# use tmux{{{
|
||||
|
||||
if test -z "$TMUX" -a -n "$DISPLAY" -a -z "$GNOME_TERMINAL_SCREEN"
|
||||
and not string match -qr kitty "$TERM"
|
||||
and status is-interactive
|
||||
|
||||
set attach_session (tmux 2> /dev/null ls -F \
|
||||
'#{session_attached} #{?#{==:#{session_last_attached},},1,#{session_last_attached}} #{session_id}' |
|
||||
awk '/^0/ { if ($2 > t) { t = $2; s = $3 } }; END { if (s) printf "%s", s }')
|
||||
if test -n "$attach_session"
|
||||
exec tmux attach -t "$attach_session"
|
||||
else
|
||||
exec tmux
|
||||
end
|
||||
end
|
||||
|
||||
# }}}
|
||||
# Prompt customization{{{
|
||||
|
||||
# Fine, I'll do it myself
|
||||
function fish_vi_cursor;end
|
||||
function fish_mode_prompt;end
|
||||
|
||||
function _fish_prompt_color -a color
|
||||
# separate line needed for bold normal
|
||||
set_color $color
|
||||
set_color --bold
|
||||
set -e argv[1]
|
||||
echo -en $argv
|
||||
end
|
||||
|
||||
alias _fish_prompt_accent "_fish_prompt_color '{{@@ accent_color @@}}'"
|
||||
alias _fish_prompt_warn "_fish_prompt_color 'yellow'"
|
||||
|
||||
alias _fish_prompt_normal "_fish_prompt_color 'normal'"
|
||||
|
||||
function _fish_prompt_git_status
|
||||
git status -s | grep "^$argv[1]" &> /dev/null &&
|
||||
_fish_prompt_color $argv[3] $argv[2]
|
||||
end
|
||||
|
||||
function fish_prompt
|
||||
set _status $status
|
||||
|
||||
_fish_prompt_accent $USER
|
||||
_fish_prompt_normal " in "
|
||||
_fish_prompt_accent (prompt_pwd)
|
||||
if set _git_branch (git branch --show-current 2> /dev/null)
|
||||
and test -n "$_git_branch"
|
||||
|
||||
_fish_prompt_normal " on "
|
||||
|
||||
_fish_prompt_git_status '.M' '~' '{{@@ color.normal.yellow @@}}'
|
||||
_fish_prompt_git_status '.D' '-' '{{@@ color.normal.red @@}}'
|
||||
|
||||
_fish_prompt_git_status '??' '?' '{{@@ color.txt @@}}'
|
||||
_fish_prompt_accent "$_git_branch"
|
||||
for remote in (git remote)
|
||||
if not git branch --remotes |
|
||||
grep "$remote"/"$_git_branch" &> /dev/null
|
||||
continue
|
||||
end
|
||||
if not git diff --quiet\
|
||||
HEAD "$remote"/"$_git_branch"
|
||||
_fish_prompt_color '{{@@ color.txt @@}}' '↑'
|
||||
end
|
||||
end
|
||||
|
||||
_fish_prompt_git_status 'A.' '+' '{{@@ color.normal.green @@}}'
|
||||
_fish_prompt_git_status 'M.' '~' '{{@@ color.normal.green @@}}'
|
||||
_fish_prompt_git_status 'D.' '-' '{{@@ color.normal.red @@}}'
|
||||
end
|
||||
|
||||
echo
|
||||
|
||||
if test $fish_key_bindings = fish_vi_key_bindings
|
||||
|
||||
# Set cursor shape
|
||||
if test $fish_bind_mode = insert
|
||||
printf '\e[5 q' # Bar
|
||||
else
|
||||
printf '\e[1 q' # Block
|
||||
end
|
||||
|
||||
_fish_prompt_accent (
|
||||
switch $fish_bind_mode
|
||||
case replace_one
|
||||
printf 'o'
|
||||
case default
|
||||
printf 'n'
|
||||
case '*'
|
||||
printf (string match -r '^.' $fish_bind_mode )
|
||||
end | string upper
|
||||
)' '
|
||||
end
|
||||
|
||||
if test $_status -ne 0
|
||||
_fish_prompt_warn "$_status "
|
||||
end
|
||||
|
||||
if test $USER = root
|
||||
_fish_prompt_normal '# '
|
||||
else
|
||||
_fish_prompt_normal '$ '
|
||||
end
|
||||
|
||||
set_color normal
|
||||
end
|
||||
|
||||
# set fish_cursor_default block blink
|
||||
# set fish_cursor_insert line blink
|
||||
# set fish_cursor_replace_one underscore blink
|
||||
# set fish_cursor_visual block
|
||||
|
||||
#}}}
|
||||
# Fish colors{{{
|
||||
|
||||
set fish_color_comment yellow
|
||||
|
||||
set fish_color_redirection purple
|
||||
set fish_color_end purple
|
||||
set fish_color_operator purple
|
||||
|
||||
set fish_color_command green
|
||||
set fish_color_param default
|
||||
set fish_color_autosuggestion --dim default
|
||||
|
||||
set fish_pager_color_selected_background --background={{@@ color.bg_light @@}}
|
||||
set fish_pager_color_prefix default --bold
|
||||
set fish_pager_color_completion default
|
||||
set fish_pager_color_description yellow
|
||||
|
||||
#}}}
|
||||
# Color man pages{{{
|
||||
|
||||
set -xU LESS_TERMCAP_md (printf "\e[01;31m")
|
||||
set -xU LESS_TERMCAP_me (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_se (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_so (printf "\e[01;44;33m")
|
||||
set -xU LESS_TERMCAP_ue (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
|
||||
|
||||
#}}}
|
||||
# Fzf settings{{{
|
||||
|
||||
set -x FZF_DEFAULT_OPTS "\
|
||||
--preview '{{@@ bat_command @@}} --style=numbers --color=always {}' \
|
||||
--color='\
|
||||
bg+:{{@@ color.bg_light @@}},\
|
||||
hl+:{{@@ color.normal.green @@}},\
|
||||
gutter:{{@@ color.bg @@}},\
|
||||
prompt:{{@@ accent_color @@}},\
|
||||
pointer:{{@@ accent_color @@}},\
|
||||
spinner:{{@@ accent_color @@}}\
|
||||
'"
|
||||
|
||||
#}}}
|
||||
# vim:foldmethod=marker
|
|
@ -0,0 +1,93 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
abbr mpn ncmpcpp
|
||||
abbr dot "dotdrop install -f"
|
||||
abbr p "paru"
|
||||
|
||||
################################################################
|
||||
# Editor
|
||||
################################################################
|
||||
|
||||
abbr v {{@@ editor @@}}
|
||||
|
||||
command -qs sudo &&
|
||||
abbr rv sudo {{@@ editor @@}}
|
||||
command -qs doas &&
|
||||
abbr rv doas {{@@ editor @@}}
|
||||
|
||||
|
||||
################################################################
|
||||
# Safe guard for rm
|
||||
################################################################
|
||||
|
||||
alias rm 'trash'
|
||||
alias crm 'command rm -i'
|
||||
|
||||
################################################################
|
||||
# ls and cat
|
||||
################################################################
|
||||
|
||||
command -qs exa &&
|
||||
alias ls 'exa --git'
|
||||
command -qs bat &&
|
||||
alias cat "bat"
|
||||
|
||||
################################################################
|
||||
# The ever usefull "z" command
|
||||
################################################################
|
||||
|
||||
command -qs zoxide &&
|
||||
zoxide init fish | source
|
||||
|
||||
################################################################
|
||||
# Show reminders on startup
|
||||
################################################################
|
||||
|
||||
command -qs khard &&
|
||||
function fish_greeting
|
||||
set -l khalList khal list now 10d --format " {title}"
|
||||
$khalList &> /dev/null
|
||||
or return
|
||||
$khalList | grep '^No events$' &> /dev/null
|
||||
and return
|
||||
$khalList
|
||||
end
|
||||
|
||||
|
||||
################################################################
|
||||
# Git
|
||||
################################################################
|
||||
|
||||
abbr g 'git'
|
||||
abbr gs 'git status'
|
||||
abbr gd 'git diff'
|
||||
abbr gp 'git pull; git push'
|
||||
abbr gc 'git commit -v'
|
||||
|
||||
|
||||
################################################################
|
||||
# cd ...
|
||||
################################################################
|
||||
|
||||
for i in (seq 3 10)
|
||||
set -l dots (string repeat -n $i .)
|
||||
set -l segs (string repeat -n $i ./.)
|
||||
alias $dots "cd $segs"
|
||||
end
|
||||
|
||||
|
||||
################################################################
|
||||
# quickly edit dotfiles
|
||||
################################################################
|
||||
|
||||
function edit-config
|
||||
pushd "{{@@ parent_dir ( _dotdrop_dotpath ) @@}}"
|
||||
{{@@ editor @@}} (git ls-files | wdmenu)
|
||||
popd
|
||||
end
|
||||
abbr ec edit-config
|
|
@ -0,0 +1,23 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
set fish_color_comment yellow
|
||||
|
||||
set fish_color_redirection purple
|
||||
set fish_color_end purple
|
||||
set fish_color_operator purple
|
||||
|
||||
set fish_color_command green
|
||||
set fish_color_error red
|
||||
set fish_color_param default
|
||||
set fish_color_autosuggestion --dim default
|
||||
|
||||
set fish_pager_color_selected_background --background={{@@ color.bg_light @@}}
|
||||
set fish_pager_color_prefix default --bold
|
||||
set fish_pager_color_completion default
|
||||
set fish_pager_color_description yellow
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
|
||||
source {$__fish_config_dir}/env.fish
|
||||
source {$__fish_config_dir}/alias.fish
|
||||
source {$__fish_config_dir}/keys.fish
|
||||
source {$__fish_config_dir}/wm.fish
|
||||
source {$__fish_config_dir}/tmux.fish
|
||||
source {$__fish_config_dir}/colors.fish
|
||||
source {$__fish_config_dir}/prompt.fish
|
||||
|
||||
|
||||
function _fish_autoreload --on-signal SIGHUP
|
||||
source {$__fish_config_dir}/config.fish
|
||||
kitty @ set-colors -a ~/.config/kitty/kitty.conf
|
||||
kitty @ set-background-opacity "{{@@ opacity @@}}"
|
||||
end
|
|
@ -0,0 +1,63 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
set -x QT_QPA_PLATFORMTHEME gtk3
|
||||
set -x PATH ~/.local/bin ~/.cargo/bin $PATH
|
||||
set -x ESCDELAY 0
|
||||
|
||||
################################################################
|
||||
# Default applications
|
||||
################################################################
|
||||
set -x EDITOR {{@@ editor @@}}
|
||||
set -x VISUAL {{@@ editor @@}}
|
||||
set -x BROWSER qutebrowser
|
||||
set -x PAGER less
|
||||
|
||||
################################################################
|
||||
# keep my dirs clean
|
||||
################################################################
|
||||
set -x PYTHONPYCACHEPREFIX "$HOME/.cache/python"
|
||||
set -x MYPY_CACHE_DIR "$HOME/.cache/mypy"
|
||||
|
||||
################################################################
|
||||
# Color man pages
|
||||
################################################################
|
||||
|
||||
set -xU LESS_TERMCAP_md (printf "\e[01;31m")
|
||||
set -xU LESS_TERMCAP_me (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_se (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_so (printf "\e[01;44;33m")
|
||||
set -xU LESS_TERMCAP_ue (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
|
||||
|
||||
|
||||
################################################################
|
||||
# Fzf settings
|
||||
################################################################
|
||||
|
||||
set -x FZF_DEFAULT_OPTS "\
|
||||
--preview 'bat --style=numbers --color=always {}' \
|
||||
--color='\
|
||||
bg+:{{@@ color.bg_light @@}},\
|
||||
hl+:{{@@ color.normal.green @@}},\
|
||||
gutter:{{@@ color.bg @@}},\
|
||||
prompt:{{@@ accent_color @@}},\
|
||||
pointer:{{@@ accent_color @@}},\
|
||||
spinner:{{@@ accent_color @@}}\
|
||||
'"
|
||||
|
||||
|
||||
################################################################
|
||||
# Dotdrop
|
||||
################################################################
|
||||
|
||||
set -x _KEYBOARD_LAYOUT "{{@@ key_layout @@}}"
|
||||
set -x _COLOR_TYPE "{{@@ color_type @@}}"
|
||||
set -x _ACCENT_COLOR "{{@@ accent_color_name @@}}"
|
||||
|
||||
set -x DOTDROP_CONFIG "{{@@ _dotdrop_cfgpath @@}}"
|
||||
set -x DOTDROP_PROFILE "{{@@ profile @@}}"
|
|
@ -0,0 +1,30 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
|
||||
set fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
if test $fish_key_bindings = fish_vi_key_bindings
|
||||
|
||||
bind {{@@ key.left @@}} backward-char
|
||||
bind -M visual {{@@ key.left @@}} backward-char
|
||||
bind {{@@ key.down @@}} down-or-search
|
||||
bind -M visual {{@@ key.down @@}} down-line
|
||||
bind {{@@ key.up @@}} up-or-search
|
||||
bind -M visual {{@@ key.up @@}} up-line
|
||||
bind {{@@ key.right @@}} forward-char
|
||||
bind -M visual {{@@ key.right @@}} forward-char
|
||||
|
||||
bind -m insert {{@@ key.insertMode @@}} repaint-mode
|
||||
bind -m insert {{@@ key.insertMode.upper() @@}} beginning-of-line repaint-mode
|
||||
|
||||
bind -M insert {{@@ key.insertQuit @@}} repaint-mode -m default
|
||||
|
||||
bind yy fish_clipboard_copy
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
#{{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
|
||||
# Fine, I'll do it myself
|
||||
function fish_vi_cursor;end
|
||||
function fish_mode_prompt;end
|
||||
|
||||
|
||||
############################################################
|
||||
# Color helpers
|
||||
############################################################
|
||||
|
||||
function _fish_prompt_color -a color
|
||||
# separate line needed for bold normal
|
||||
set_color $color
|
||||
set_color --bold
|
||||
set -e argv[1]
|
||||
echo -en $argv
|
||||
end
|
||||
|
||||
alias _fish_prompt_accent "_fish_prompt_color '{{@@ accent_color @@}}'"
|
||||
alias _fish_prompt_warn "_fish_prompt_color 'yellow'"
|
||||
|
||||
alias _fish_prompt_normal "_fish_prompt_color 'normal'"
|
||||
|
||||
function _fish_prompt_git_status
|
||||
git status -s | grep "^$argv[1]" &> /dev/null &&
|
||||
_fish_prompt_color $argv[3] $argv[2]
|
||||
end
|
||||
|
||||
|
||||
############################################################
|
||||
# Git
|
||||
############################################################
|
||||
|
||||
function fish_git_prompt
|
||||
|
||||
set _git_branch (git branch --show-current 2> /dev/null)
|
||||
if not test -n "$_git_branch"
|
||||
return
|
||||
end
|
||||
|
||||
_fish_prompt_normal " on "
|
||||
|
||||
############################################################
|
||||
# Left side represents Index/Filesystem
|
||||
############################################################
|
||||
# Modified
|
||||
_fish_prompt_git_status '.M' '~' '{{@@ color.normal.yellow @@}}'
|
||||
# Deleted
|
||||
_fish_prompt_git_status '.D' '-' '{{@@ color.normal.red @@}}'
|
||||
|
||||
# Untraked files exist
|
||||
_fish_prompt_git_status '??' '?' '{{@@ color.txt @@}}'
|
||||
|
||||
# Print name of branch and a "↑" if ahead of origin
|
||||
_fish_prompt_accent "$_git_branch"
|
||||
for remote in (git remote)
|
||||
if not git branch --remotes |
|
||||
grep "$remote"/"$_git_branch" &> /dev/null
|
||||
continue
|
||||
end
|
||||
if not git diff --quiet -- HEAD "$remote"/"$_git_branch"
|
||||
_fish_prompt_color '{{@@ color.txt @@}}' '↑'
|
||||
end
|
||||
end
|
||||
|
||||
############################################################
|
||||
# Right side represents WorkTree/Staged
|
||||
############################################################
|
||||
# New file
|
||||
_fish_prompt_git_status 'A.' '+' '{{@@ color.normal.green @@}}'
|
||||
# Modified
|
||||
_fish_prompt_git_status 'M.' '~' '{{@@ color.normal.green @@}}'
|
||||
# Deletion staged
|
||||
_fish_prompt_git_status 'D.' '-' '{{@@ color.normal.red @@}}'
|
||||
end
|
||||
|
||||
|
||||
############################################################
|
||||
# Vi mode indicator
|
||||
############################################################
|
||||
|
||||
function fish_vimode_prompt # Not fish_mode_prompt!
|
||||
|
||||
if not test $fish_key_bindings = fish_vi_key_bindings
|
||||
return
|
||||
end
|
||||
|
||||
# Set cursor shape
|
||||
if test $fish_bind_mode = insert
|
||||
printf '\e[5 q' # Bar
|
||||
else
|
||||
printf '\e[1 q' # Block
|
||||
end
|
||||
|
||||
# Print mode symbol, N for normal, I for insert, etc...
|
||||
# on most cases first letter of mode name
|
||||
_fish_prompt_accent (
|
||||
switch $fish_bind_mode
|
||||
case replace_one
|
||||
printf 'o'
|
||||
case default
|
||||
printf 'n'
|
||||
case '*'
|
||||
printf (string match -r '^.' $fish_bind_mode )
|
||||
end | string upper
|
||||
)' '
|
||||
end
|
||||
|
||||
|
||||
############################################################
|
||||
# Main prompt
|
||||
############################################################
|
||||
|
||||
function fish_prompt
|
||||
# Save current status as it may be overwritten before usage
|
||||
set _status $status
|
||||
|
||||
_fish_prompt_accent $USER
|
||||
_fish_prompt_normal " in "
|
||||
_fish_prompt_accent (prompt_pwd)
|
||||
|
||||
fish_git_prompt
|
||||
|
||||
# Line break
|
||||
echo
|
||||
|
||||
fish_vimode_prompt
|
||||
|
||||
if test $_status -ne 0
|
||||
_fish_prompt_warn "$_status "
|
||||
end
|
||||
|
||||
if test $USER = root
|
||||
_fish_prompt_normal '# '
|
||||
else
|
||||
_fish_prompt_normal '$ '
|
||||
end
|
||||
|
||||
# Reset colors
|
||||
set_color normal
|
||||
end
|
||||
|
||||
|
||||
# These don't seem to work
|
||||
# set fish_cursor_default block blink
|
||||
# set fish_cursor_insert line blink
|
||||
# set fish_cursor_replace_one underscore blink
|
||||
# set fish_cursor_visual block
|
|
@ -0,0 +1,21 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
if test -z "$TMUX" -a -n "$DISPLAY" -a -z "$GNOME_TERMINAL_SCREEN"
|
||||
and not string match -qr kitty "$TERM"
|
||||
and status is-interactive
|
||||
|
||||
set attach_session (tmux 2> /dev/null ls -F \
|
||||
'#{session_attached} #{?#{==:#{session_last_attached},},1,#{session_last_attached}} #{session_id}' |
|
||||
awk '/^0/ { if ($2 > t) { t = $2; s = $3 } }; END { if (s) printf "%s", s }')
|
||||
if test -n "$attach_session"
|
||||
exec tmux attach -t "$attach_session"
|
||||
else
|
||||
exec tmux
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
# {{@@ header() @@}}
|
||||
# __ _ _
|
||||
# / _(_)___| |__
|
||||
# | |_| / __| '_ \
|
||||
# | _| \__ \ | | |
|
||||
# |_| |_|___/_| |_|
|
||||
|
||||
########################################################
|
||||
# start window manager if using tty1
|
||||
########################################################
|
||||
function esway
|
||||
|
||||
# fix buggy java apps
|
||||
set -x _JAVA_AWT_WM_NONREPARENTING 1
|
||||
|
||||
# Allow sway decoration on gtk3 apps
|
||||
set -x GTK_CSD 0
|
||||
test -f '/usr/lib/libgtk3-nocsd.so.0' &&
|
||||
set -x LD_PRELOAD '/usr/lib/libgtk3-nocsd.so.0'
|
||||
|
||||
# set -x QT_SCALE_FACTOR 1.0001
|
||||
# set -x QPA_PLATFORM wayland
|
||||
# set -x QT_QPA_PLATFORM wayland
|
||||
|
||||
# Neede for xdg-dektop-portal
|
||||
set -x XDG_CURRENT_DESKTOP sway
|
||||
set -x XDG_SESSION_TYPE wayland
|
||||
|
||||
# this should not be necessary, but whatever
|
||||
pidof sway || exec sway
|
||||
|
||||
end
|
||||
|
||||
if test "$XDG_VTNR" = 1
|
||||
and test -z "$DISPLAY"
|
||||
|
||||
esway &| tee .swaylog
|
||||
# ei3 &> .i3log
|
||||
# ebsp &> .bsplog
|
||||
|
||||
end
|
||||
|
|
@ -7,3 +7,9 @@
|
|||
|
||||
[pull]
|
||||
rebase = false
|
||||
|
||||
[pager]
|
||||
# differ is a program that shows word-by-word diff
|
||||
log = diffr | less
|
||||
show = diffr | less
|
||||
diff = diffr | less
|
||||
|
|
|
@ -43,6 +43,7 @@ x = close
|
|||
f = fullscreen
|
||||
d = overlay
|
||||
p = exec echo $imv_current_file
|
||||
d = exec trash $imv_current_file; next
|
||||
c = center
|
||||
{{@@ key.next @@}} = scaling next
|
||||
<Shift+{{@@ key.next.upper() @@}}> = upscaling next
|
||||
|
|
|
@ -38,14 +38,14 @@ face global Default default,default
|
|||
|
||||
face global PrimaryCursor default,{{@@ accent @@}}+fg
|
||||
face global PrimaryCursorEol PrimaryCursor
|
||||
face global PrimarySelection white,black+fg
|
||||
face global PrimarySelection default,{{@@ bg_light @@}}+fg
|
||||
|
||||
face global SecondaryCursor default,default+rfg
|
||||
face global SecondaryCursorEol SecondaryCursor
|
||||
face global SecondarySelection white,black+fg
|
||||
face global SecondarySelection default,{{@@ bg_light @@}}+fg
|
||||
|
||||
face global MenuForeground white,{{@@ accent @@}}
|
||||
face global MenuBackground white,{{@@ bg_dark @@}}
|
||||
face global MenuForeground default,{{@@ accent @@}}
|
||||
face global MenuBackground default,{{@@ bg_dark @@}}
|
||||
face global MenuInfo cyan
|
||||
|
||||
face global Information default,{{@@ bg_dark @@}}
|
||||
|
@ -64,12 +64,13 @@ face global MatchingChar default,default+b
|
|||
add-highlighter global/ number-lines -relative -hlcursor
|
||||
face global LineNumbers {{@@ bg_light @@}},default
|
||||
face global LineNumberCursor white,{{@@ bg_dark @@}}
|
||||
face global LineNumbersWrapped red,default
|
||||
|
||||
add-highlighter global/ show-whitespaces
|
||||
face global Whitespace {{@@ nontxt @@}},default+f
|
||||
face global BufferPadding {{@@ nontxt @@}},default
|
||||
# highlight trailing whitespace
|
||||
add-highlighter global/ regex '\h*$' 0:red,red+g
|
||||
# add-highlighter global/ regex '\h*$' 0:red,red+g
|
||||
|
||||
|
||||
# Lsp
|
|
@ -1,9 +1,5 @@
|
|||
# {{@@ header() @@}}
|
||||
|
||||
# not exactly hooks but ok
|
||||
set global tabstop 4
|
||||
set global scrolloff 8,8
|
||||
|
||||
# use spaces insted of tabs
|
||||
hook global InsertChar \t %{ exec -draft -itersel h@ } -group kakrc-replace-tabs-with-spaces
|
||||
|
||||
|
@ -18,10 +14,6 @@ hook global BufOpenFile .* %{
|
|||
lsp-enable
|
||||
}
|
||||
|
||||
hook global WinCreate .* %{
|
||||
manual-indent-enable
|
||||
}
|
||||
|
||||
#completion with tab
|
||||
hook global InsertCompletionShow .* %{ try %{
|
||||
execute-keys -draft 'h<a-K>\h<ret>'
|
||||
|
@ -38,3 +30,7 @@ hook global RegisterModified '"' %{ nop %sh{
|
|||
printf %s "$kak_main_reg_dquote" | wl-copy > /dev/null 2>&1 &
|
||||
}}
|
||||
|
||||
# Trim trailing whitespace
|
||||
hook global BufWritePre .* %{ try %{
|
||||
execute-keys -draft \%s\h+$<ret>d
|
||||
} }
|
|
@ -6,8 +6,12 @@
|
|||
# |_|\_\__,_|_|\_\___/ \__,_|_| |_|\___|
|
||||
|
||||
|
||||
source "%val{config}/rc/plug.kak"
|
||||
source "%val{config}/rc/keys.kak"
|
||||
source "%val{config}/rc/usermode.kak"
|
||||
source "%val{config}/rc/hooks.kak"
|
||||
source "%val{config}/rc/colors.kak"
|
||||
set global tabstop 4
|
||||
set global scrolloff 8,8
|
||||
add-highlighter global/ wrap
|
||||
|
||||
source "%val{config}/plug.kak"
|
||||
source "%val{config}/keys.kak"
|
||||
source "%val{config}/usermode.kak"
|
||||
source "%val{config}/hooks.kak"
|
||||
source "%val{config}/colors.kak"
|
||||
|
|
|
@ -24,14 +24,6 @@
|
|||
map global normal <a-{{@@ NEW @@}}> <a-{{@@ OLD @@}}>
|
||||
{%@@ endfor @@%}
|
||||
|
||||
{%@@ for old, new in {
|
||||
"j": key.down,
|
||||
"k": key.up,
|
||||
}.items() @@%}
|
||||
map global normal <a-{{@@ new @@}}> 10{{@@ old @@}}
|
||||
map global normal <a-{{@@ new.upper() @@}}> 10{{@@ old.upper() @@}}
|
||||
{%@@ endfor @@%}
|
||||
|
||||
{%@@ if key.layout == 'colemak' @@%}
|
||||
map global normal k s
|
||||
map global normal K S
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
source "%val{config}/plugins/plug.kak/rc/plug.kak"
|
||||
|
||||
{%@@ for p in [ 'prelude', 'auto-pairs', 'manual-indent' ] @@%}
|
||||
{%@@ for p in [ 'prelude', 'auto-pairs', ] @@%}
|
||||
plug 'alexherbo2/{{@@ p @@}}.kak'
|
||||
require-module '{{@@ p @@}}'
|
||||
{%@@ endfor @@%}
|
||||
|
@ -13,9 +13,7 @@ plug 'h-youhei/kakoune-surround'
|
|||
plug 'delapouite/kakoune-palette'
|
||||
plug 'insipx/kak-crosshairs'
|
||||
|
||||
plug "kak-lsp/kak-lsp" do %{
|
||||
cargo install --locked --force --path .
|
||||
}
|
||||
plug "kak-lsp/kak-lsp"
|
||||
|
||||
def -hidden complete-snippets %{
|
||||
try %{
|
|
@ -1,15 +1,8 @@
|
|||
{{@@ key.up @@}} back-line
|
||||
{{@@ key.down @@}} forw-line
|
||||
|
||||
|
||||
# {%@@ if editor == "kak" @@%} #
|
||||
\e{{@@ key.up @@}} back-scroll
|
||||
\e{{@@ key.down @@}} forw-scroll
|
||||
# {%@@ else @@%} #
|
||||
{{@@ key.up .upper() @@}} back-scroll
|
||||
{{@@ key.down.upper() @@}} forw-scroll
|
||||
# {%@@ endif @@%} #
|
||||
|
||||
|
||||
{{@@ key.next @@}} repeat-search
|
||||
{{@@ key.next.upper() @@}} reverse-search
|
||||
|
|
|
@ -24,7 +24,7 @@ depends=(
|
|||
dotdrop
|
||||
|
||||
# Packages
|
||||
pkgfile yay
|
||||
pkgfile paru
|
||||
|
||||
# passwords and auth
|
||||
pass gnupg pam-gnupg
|
||||
|
@ -50,8 +50,8 @@ depends=(
|
|||
ranger atool p7zip tree jq fzf
|
||||
neofetch htop
|
||||
# Replacements
|
||||
#ls cat rm -rf grep find sed cd
|
||||
exa bat trash-cli ripgrep fd sd zoxide
|
||||
#ls cat rm -rf grep find sed diff cd
|
||||
exa bat trash-cli ripgrep fd sd diffr zoxide
|
||||
|
||||
# Network
|
||||
iwd dhcpcd
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
[Default Applications]
|
||||
|
||||
text/plain=nvim.desktop
|
||||
inode/directory=thunar.desktop
|
||||
text/plain={{@@ editor @@}}.desktop
|
||||
inode/directory={{@@ file_manager @@}}.desktop
|
||||
|
||||
application/pdf=org.pwmt.zathura.desktop
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Name=Kakoune
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text files
|
||||
TryExec=kak
|
||||
Exec=kak %F
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Keywords=Text;editor;
|
||||
Icon=kak.desktop
|
||||
Categories=Utility;TextEditor;
|
||||
StartupNotify=false
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
|
@ -1 +1,10 @@
|
|||
text/html; xdg-open %s ; nametemplate=%s.html
|
||||
text/plain; $EDITOR %s ;
|
||||
|
||||
image/*; xdg-open %s &;
|
||||
video/*; xdg-open %s &; copiousoutput
|
||||
audio/*; xdg-open %s &;
|
||||
|
||||
application/pdf; xdg-open %s &;
|
||||
|
||||
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput
|
||||
|
|
|
@ -126,7 +126,7 @@ macro index,pager a \
|
|||
# macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
|
||||
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
|
||||
macro index O "<shell-escape>mbsync -a<enter>" "run mbsync to sync all mail"
|
||||
#macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
|
||||
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
|
||||
#macro index A "<limit>all\n" "show all messages (undo limit)"
|
||||
|
||||
# }}}
|
||||
|
@ -154,7 +154,7 @@ set markers = no # Disables the `+` displayed at line wraps
|
|||
set date_format="%m/%d %H:%M"
|
||||
set index_format="%2C %zs %?X?A& ? %D %-15.15F %s"
|
||||
|
||||
set display_filter = 'sed -e "s/ */\n/g"'
|
||||
# set display_filter = 'sed -e "s/ */\n/g"'
|
||||
|
||||
#}}}
|
||||
# colors{{{
|
||||
|
|
|
@ -1,337 +0,0 @@
|
|||
#!/bin/env python
|
||||
# {{@@ header() @@}}
|
||||
|
||||
# Ignore import error
|
||||
# pylint: disable=E0401,E0602
|
||||
# type: ignore
|
||||
from qutebrowser.config.configfiles import ConfigAPI
|
||||
from qutebrowser.config.config import ConfigContainer
|
||||
|
||||
config = config
|
||||
c = c
|
||||
# Ignore undefined
|
||||
config: ConfigAPI
|
||||
c: ConfigContainer
|
||||
|
||||
# Behavior {{{
|
||||
|
||||
c.aliases = {
|
||||
"q": "close",
|
||||
"qa": "quit",
|
||||
"w": "session-save",
|
||||
"wq": "quit --save",
|
||||
"wqa": "quit --save",
|
||||
}
|
||||
|
||||
# Load a restored tab as soon as it takes focus.
|
||||
c.session.lazy_restore = True
|
||||
|
||||
# Enable screensharing for wayland
|
||||
c.qt.args = ['enable-features=WebRTCPipeWireCapturer']
|
||||
|
||||
# Always restore open sites when qutebrowser is reopened.
|
||||
c.auto_save.session = True
|
||||
|
||||
config.set("content.cookies.accept", "all", "chrome-devtools://*")
|
||||
|
||||
config.set("content.cookies.accept", "all", "devtools://*")
|
||||
|
||||
# Allow websites to request geolocations.
|
||||
config.set("content.geolocation", True, "https://openweathermap.org")
|
||||
|
||||
c.content.headers.user_agent = """\
|
||||
Mozilla/5.0 ({os_info})
|
||||
AppleWebKit/{webkit_version} (KHTML, like Gecko)
|
||||
{qt_key}/{qt_version}
|
||||
{upstream_browser_key}/{upstream_browser_version}
|
||||
Safari/{webkit_version}""".replace("\n", "")
|
||||
|
||||
# Enable JavaScript.
|
||||
config.set("content.javascript.enabled", True, "file://*")
|
||||
config.set("content.javascript.enabled", True, "chrome-devtools://*")
|
||||
config.set("content.javascript.enabled", True, "devtools://*")
|
||||
config.set("content.javascript.enabled", True, "chrome://*/*")
|
||||
config.set("content.javascript.enabled", True, "qute://*/*")
|
||||
|
||||
# Allow websites to record audio/video.
|
||||
# config.set("content.media_capture", True, "https://ca.bbcollab.com")
|
||||
config.set("content.media.audio_video_capture", True,
|
||||
"https://ca.bbcollab.com")
|
||||
config.set("content.autoplay", True, "https://ca.bbcollab.com")
|
||||
config.set("content.mute", False, "https://ca.bbcollab.com")
|
||||
|
||||
# Allow websites to show notifications.
|
||||
config.set("content.notifications", False, "*")
|
||||
|
||||
# Allow websites to register protocol handlers via
|
||||
config.set('content.register_protocol_handler', False,
|
||||
'https://mail.disroot.org?mailto&to=%25s')
|
||||
|
||||
c.content.mute = True
|
||||
c.content.autoplay = False
|
||||
|
||||
editor = "{{@@ editor @@}}"
|
||||
c.editor.command = ["terminal", editor, "{file}", "+{line}"]
|
||||
|
||||
# }}}
|
||||
# UI {{{
|
||||
# Shrink the completion to be smaller than the configured size if there
|
||||
# are no scrollbars.
|
||||
# Type: Bool
|
||||
c.completion.shrink = True
|
||||
|
||||
# CSS border value for hints.
|
||||
# Type: String
|
||||
c.hints.border = "2px solid {{@@ accent_color @@}}"
|
||||
|
||||
# Characters used for hint strings.
|
||||
# {%@@ if key_layout == "colemak" @@%} #
|
||||
c.hints.chars = "asrtdhneio"
|
||||
# {%@@ elif key_layout == "dvorak" @@%} #
|
||||
c.hints.chars = "aoeuidnths"
|
||||
# {%@@ endif @@%}
|
||||
|
||||
# c.input.insert_mode.auto_leave = False
|
||||
|
||||
# Scrollbar style
|
||||
c.scrolling.bar = 'overlay'
|
||||
|
||||
c.scrolling.smooth = True
|
||||
|
||||
c.statusbar.widgets = ["keypress", "url", "scroll", "history", "tabs"]
|
||||
|
||||
c.tabs.favicons.show = "always"
|
||||
c.tabs.select_on_remove = "last-used"
|
||||
|
||||
# When to show the status/tab bar.
|
||||
c.tabs.show = "always"
|
||||
c.statusbar.show = "always"
|
||||
|
||||
c.tabs.show_switching_delay = 2000
|
||||
c.tabs.title.format = "{audio} {current_title}"
|
||||
c.tabs.indicator.width = 0
|
||||
# }}}
|
||||
# Search {{{
|
||||
|
||||
# {%@@ set search_engine = "start.duckduckgo.com" @@%} #
|
||||
|
||||
|
||||
c.url.default_page = "{{@@ search_engine @@}}"
|
||||
|
||||
c.url.searchengines = {
|
||||
"DEFAULT": "{{@@ search_engine @@}}?q={}",
|
||||
"!aw": "wiki.archlinux.org?search={}",
|
||||
"!w": "wikipedia.org/w?search={}",
|
||||
"!wpt": "pt.wikipedia.org/w?search={}",
|
||||
"!au": "aur.archlinux.org/packages/?K={}",
|
||||
"!alt": "alternativeto.net/browse/search?q={}",
|
||||
"!gw": "wiki.gentoo.org/?search={}",
|
||||
"!yt": "youtube.com/results?q={}",
|
||||
}
|
||||
|
||||
# Page(s) to open at the start.
|
||||
# Type: List of FuzzyUrl, or FuzzyUrl
|
||||
c.url.start_pages = "{{@@ search_engine @@}}"
|
||||
# }}}
|
||||
# Colors {{{
|
||||
|
||||
|
||||
class color:
|
||||
accent = "{{@@ accent_color @@}}"
|
||||
txt = "{{@@ color.txt @@}}"
|
||||
bg = "{{@@ color.bg @@}}"
|
||||
bg_dark = "{{@@ color.bg_dark @@}}"
|
||||
bg_light = "{{@@ color.bg_light @@}}"
|
||||
|
||||
|
||||
c.colors.completion.category.fg = color.txt
|
||||
c.colors.completion.category.bg = color.bg_light
|
||||
c.colors.completion.category.border.top = color.bg_dark
|
||||
c.colors.completion.category.border.bottom = color.bg_dark
|
||||
|
||||
c.colors.completion.item.selected.fg = color.txt
|
||||
c.colors.completion.item.selected.bg = color.accent
|
||||
c.colors.completion.item.selected.border.top = color.bg_dark
|
||||
c.colors.completion.item.selected.border.bottom = color.bg_dark
|
||||
|
||||
c.colors.completion.fg = color.txt
|
||||
c.colors.completion.even.bg = color.bg
|
||||
c.colors.completion.odd.bg = color.bg
|
||||
c.colors.completion.item.selected.match.fg = color.txt
|
||||
c.colors.completion.scrollbar.bg = color.bg_light
|
||||
|
||||
|
||||
c.colors.downloads.bar.bg = color.bg
|
||||
c.colors.downloads.start.bg = "{{@@ color.normal.blue @@}}"
|
||||
c.colors.downloads.stop.bg = "{{@@ color.normal.green @@}}"
|
||||
|
||||
|
||||
c.colors.hints.fg = color.txt
|
||||
c.colors.hints.bg = color.bg
|
||||
c.colors.hints.match.fg = color.accent
|
||||
|
||||
|
||||
c.colors.keyhint.suffix.fg = color.accent
|
||||
c.colors.keyhint.fg = color.txt
|
||||
c.colors.keyhint.bg = "rgba({{@@ hex2rgb(color.bg) @@}}, {{@@ opacity @@}})"
|
||||
|
||||
|
||||
c.colors.statusbar.normal.fg = color.txt
|
||||
c.colors.statusbar.normal.bg = color.bg
|
||||
c.colors.statusbar.insert.bg = color.bg
|
||||
c.colors.statusbar.command.fg = color.txt
|
||||
c.colors.statusbar.command.bg = color.bg
|
||||
c.colors.statusbar.caret.selection.bg = color.accent
|
||||
c.colors.statusbar.url.success.https.fg = color.txt
|
||||
c.colors.statusbar.url.success.http.fg = "{{@@ color.normal.yellow @@}}"
|
||||
c.colors.statusbar.url.hover.fg = "{{@@ color.normal.cyan @@}}"
|
||||
c.colors.statusbar.insert.fg = "{{@@ color.normal.green @@}}"
|
||||
|
||||
|
||||
c.colors.tabs.bar.bg = color.bg
|
||||
c.colors.tabs.even.fg = color.txt
|
||||
c.colors.tabs.odd.fg = color.txt
|
||||
c.colors.tabs.even.bg = color.bg
|
||||
c.colors.tabs.odd.bg = color.bg
|
||||
|
||||
c.colors.tabs.selected.even.fg = color.txt
|
||||
c.colors.tabs.selected.odd.fg = color.txt
|
||||
c.colors.tabs.selected.even.bg = color.accent
|
||||
c.colors.tabs.selected.odd.bg = color.accent
|
||||
|
||||
c.colors.tabs.pinned.selected.odd.bg = color.accent
|
||||
c.colors.tabs.pinned.selected.even.bg = color.accent
|
||||
|
||||
|
||||
c.colors.contextmenu.menu.bg = color.bg
|
||||
c.colors.contextmenu.menu.fg = color.txt
|
||||
c.colors.contextmenu.selected.bg = color.accent
|
||||
c.colors.contextmenu.disabled.fg = color.bg_light
|
||||
|
||||
|
||||
# {%@@ if color.type == "dark" @@%} #
|
||||
c.colors.webpage.bg = color.bg
|
||||
c.colors.webpage.prefers_color_scheme_dark = True
|
||||
c.colors.webpage.darkmode.enabled = True
|
||||
c.colors.webpage.darkmode.threshold.background = 256 // 2
|
||||
c.colors.webpage.darkmode.threshold.text = 256 // 2
|
||||
# {%@@ endif @@%}
|
||||
|
||||
|
||||
# }}}
|
||||
# Fonts {{{
|
||||
|
||||
class fonts:
|
||||
DEF_MONO = "{{@@ font.size.medium @@}}px {{@@ font.mono @@}}"
|
||||
BIG_MONO = "{{@@ font.size.big @@}}px {{@@ font.mono @@}}"
|
||||
DEF_INTER = "{{@@ font.size.medium @@}}px {{@@ font.interface @@}}"
|
||||
BIG_INTER = "{{@@ font.size.big @@}}px {{@@ font.interface @@}}"
|
||||
|
||||
|
||||
c.fonts.completion.entry = fonts.BIG_INTER
|
||||
|
||||
c.fonts.completion.category = fonts.BIG_INTER
|
||||
c.fonts.debug_console = fonts.BIG_INTER
|
||||
c.fonts.hints = 'bold ' + fonts.BIG_MONO
|
||||
c.fonts.keyhint = fonts.BIG_INTER
|
||||
|
||||
c.fonts.messages.error = fonts.BIG_INTER
|
||||
c.fonts.messages.info = fonts.BIG_INTER
|
||||
c.fonts.messages.warning = fonts.BIG_INTER
|
||||
|
||||
c.fonts.statusbar = fonts.DEF_MONO
|
||||
|
||||
c.fonts.tabs.selected = fonts.DEF_INTER
|
||||
c.fonts.tabs.unselected = fonts.DEF_INTER
|
||||
|
||||
c.fonts.prompts = fonts.BIG_INTER
|
||||
c.fonts.downloads = fonts.BIG_INTER
|
||||
|
||||
# }}}
|
||||
# Bindings {{{
|
||||
# Bindings for normal mode
|
||||
|
||||
|
||||
class key:
|
||||
up = "{{@@ key.up @@}}"
|
||||
down = "{{@@ key.down @@}}"
|
||||
left = "{{@@ key.left @@}}"
|
||||
right = "{{@@ key.right @@}}"
|
||||
|
||||
tabL = "{{@@ key.tabL @@}}"
|
||||
tabR = "{{@@ key.tabR @@}}"
|
||||
|
||||
insert = "{{@@ key.insertMode @@}}"
|
||||
next = "{{@@ key.next @@}}"
|
||||
|
||||
|
||||
def edbind(k, v):
|
||||
if editor == "kak":
|
||||
config.bind("<Alt-{}>".format(k), v)
|
||||
config.bind(k.upper(), "nop")
|
||||
else:
|
||||
config.bind(k.upper(), v)
|
||||
|
||||
|
||||
config.bind(",d", "spawn --verbose youtube-dl -fbest[ext=mp4] {url}")
|
||||
config.bind(",m", "spawn --userscript view_in_mpv")
|
||||
config.bind(",r", "spawn --userscript readability")
|
||||
config.bind(";e", "hint links spawn deemix '{hint-url}'")
|
||||
config.bind(";m", "hint links spawn mpv --fs {hint-url}")
|
||||
|
||||
# {%@@ if key_layout == "colemak" @@%} #
|
||||
|
||||
config.bind("t", "hint all")
|
||||
config.bind("h", "set-cmd-text -s :open")
|
||||
|
||||
for k, v in {
|
||||
"T": "hint all tab",
|
||||
"H": "set-cmd-text -s :open -t",
|
||||
}.items():
|
||||
edbind(k, v)
|
||||
|
||||
# {%@@ endif @@%}
|
||||
|
||||
config.bind(key.insert, "enter-mode insert")
|
||||
|
||||
config.bind(key.next, "search-next")
|
||||
config.bind(key.next.upper(), "search-prev")
|
||||
|
||||
|
||||
config.bind(key.left, "scroll left")
|
||||
config.bind(key.down, "scroll down")
|
||||
config.bind(key.up, "scroll up")
|
||||
config.bind(key.right, "scroll right")
|
||||
|
||||
for k, v in {
|
||||
key.up: "scroll-px 0 -100",
|
||||
key.down: "scroll-px 0 100",
|
||||
key.left: "back",
|
||||
key.right: "forward",
|
||||
key.tabL: "tab-prev",
|
||||
key.tabR: "tab-next",
|
||||
}.items():
|
||||
edbind(k, v)
|
||||
|
||||
# Bindings for caret mode
|
||||
config.bind(key.left, "move-to-prev-char", mode="caret")
|
||||
config.bind(key.up, "move-to-prev-line", mode="caret")
|
||||
config.bind(key.down, "move-to-next-line", mode="caret")
|
||||
config.bind(key.right, "move-to-next-char", mode="caret")
|
||||
|
||||
# devtools
|
||||
config.unbind("wIh")
|
||||
config.unbind("wIj")
|
||||
config.unbind("wIk")
|
||||
config.unbind("wIl")
|
||||
|
||||
config.bind("wIf", "devtools-focus")
|
||||
config.bind("wIw", "devtools window")
|
||||
config.bind("wI" + key.left, "devtools left")
|
||||
config.bind("wI" + key.down, "devtools bottom")
|
||||
config.bind("wI" + key.up, "devtools top")
|
||||
config.bind("wI" + key.right, "devtools right")
|
||||
|
||||
# }}}
|
||||
|
||||
# vim: fdm=marker
|
|
@ -0,0 +1,126 @@
|
|||
colors:
|
||||
########################################################
|
||||
# Tabs
|
||||
########################################################
|
||||
tabs:
|
||||
bar:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
odd:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
even:
|
||||
bg: "{{@@ color.bg_dark @@}}"
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
selected:
|
||||
odd:
|
||||
bg: "{{@@ accent_color @@}}"
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
even:
|
||||
bg: "{{@@ accent_color @@}}"
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
pinned:
|
||||
selected:
|
||||
odd:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
even:
|
||||
bg: "{{@@ color.bg_dark @@}}"
|
||||
########################################################
|
||||
# Completion for urls and commands
|
||||
########################################################
|
||||
completion:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
even:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
odd:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
scrollbar:
|
||||
bg: "{{@@ color.bg_light @@}}"
|
||||
category:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
bg: "{{@@ color.bg_light @@}}"
|
||||
border:
|
||||
top: "{{@@ color.bg_dark @@}}"
|
||||
bottom: "{{@@ color.bg_dark @@}}"
|
||||
item:
|
||||
selected:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
bg: "{{@@ accent_color @@}}"
|
||||
border:
|
||||
top: "{{@@ color.bg_dark @@}}"
|
||||
bottom: "{{@@ color.bg_dark @@}}"
|
||||
match:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
########################################################
|
||||
# Statusbar
|
||||
########################################################
|
||||
statusbar:
|
||||
normal:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
insert:
|
||||
fg: "{{@@ color.normal.green @@}}"
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
command:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
caret:
|
||||
selection:
|
||||
bg: "{{@@ accent_color @@}}"
|
||||
url:
|
||||
success:
|
||||
https:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
fg: "{{@@ color.normal.yellow @@}}"
|
||||
hover:
|
||||
fg: "{{@@ color.normal.cyan @@}}"
|
||||
########################################################
|
||||
# Downloads
|
||||
########################################################
|
||||
downloads:
|
||||
start:
|
||||
bg: "{{@@ color.normal.blue @@}}"
|
||||
stop:
|
||||
bg: "{{@@ color.normal.green @@}}"
|
||||
bar:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
########################################################
|
||||
# Choice of what element should be clicked
|
||||
########################################################
|
||||
hints:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
match:
|
||||
fg: "{{@@ accent_color @@}}"
|
||||
########################################################
|
||||
# List of what each keybinding does
|
||||
########################################################
|
||||
keyhint:
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
bg: "rgba({{@@ hex2rgb(color.bg) @@}}, {{@@ opacity @@}})"
|
||||
suffix:
|
||||
fg: "{{@@ accent_color @@}}"
|
||||
########################################################
|
||||
# Right click menu
|
||||
########################################################
|
||||
contextmenu:
|
||||
menu:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
fg: "{{@@ color.txt @@}}"
|
||||
selected:
|
||||
bg: "{{@@ accent_color @@}}"
|
||||
disabled:
|
||||
fg: "{{@@ color.bg_light @@}}"
|
||||
|
||||
########################################################
|
||||
# Dark theme
|
||||
########################################################
|
||||
# {%@@ if color.type == "dark" @@%} #
|
||||
webpage:
|
||||
bg: "{{@@ color.bg @@}}"
|
||||
prefers_color_scheme_dark: True
|
||||
darkmode:
|
||||
enabled: True
|
||||
threshold:
|
||||
background: {{@@ 256 // 2 @@}}
|
||||
text: {{@@ 256 // 2 @@}}
|
||||
# {%@@ endif @@%}
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/env python
|
||||
# {{@@ header() @@}}
|
||||
|
||||
from source_yaml import source_yaml
|
||||
|
||||
from qutebrowser.config.configfiles import ConfigAPI # type: ignore
|
||||
from qutebrowser.config.config import ConfigContainer # type: ignore
|
||||
|
||||
# {%@@ if False @@%}
|
||||
config = ConfigAPI()
|
||||
c = ConfigContainer()
|
||||
# {%@@ endif @@%}
|
||||
|
||||
########################################################################
|
||||
# Imports
|
||||
########################################################################
|
||||
|
||||
source_yaml(config, "colors.yaml")
|
||||
source_yaml(config, "fonts.yaml")
|
||||
config.source("keys.py")
|
||||
config.source("ui.py")
|
||||
config.source("permissons.py")
|
||||
|
||||
########################################################################
|
||||
# General options
|
||||
########################################################################
|
||||
|
||||
# Load a restored tab as soon as it takes focus.
|
||||
c.session.lazy_restore = True
|
||||
# Always restore open sites when qutebrowser is reopened.
|
||||
c.auto_save.session = True
|
||||
|
||||
# what command to run on [InsertMode]ctrl+e (default)
|
||||
c.editor.command = ["terminal", "{{@@ editor @@}}", "{file}", "+{line}"]
|
||||
|
||||
########################################################################
|
||||
# Search
|
||||
########################################################################
|
||||
|
||||
search_engine = "start.duckduckgo.com"
|
||||
|
||||
c.url.default_page = search_engine
|
||||
c.url.start_pages = search_engine
|
||||
c.url.searchengines = {
|
||||
"DEFAULT": search_engine + "?q={}",
|
||||
"!aw": "wiki.archlinux.org?search={}",
|
||||
"!w": "wikipedia.org/w?search={}",
|
||||
"!wpt": "pt.wikipedia.org/w?search={}",
|
||||
"!au": "aur.archlinux.org/packages/?K={}",
|
||||
"!alt": "alternativeto.net/browse/search?q={}",
|
||||
"!gw": "wiki.gentoo.org/?search={}",
|
||||
"!yt": "youtube.com/results?q={}",
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{%@@ set DEF_MONO = "{}px {}".format(font.size.medium, font.mono) @@%}
|
||||
{%@@ set BIG_MONO = "{}px {}".format(font.size.big, font.mono) @@%}
|
||||
{%@@ set DEF_INTER = "{}px {}".format(font.size.medium, font.interface) @@%}
|
||||
{%@@ set BIG_INTER = "{}px {}".format(font.size.big, font.interface) @@%}
|
||||
|
||||
fonts:
|
||||
debug_console: "{{@@ BIG_INTER @@}}"
|
||||
downloads: "{{@@ BIG_INTER @@}}"
|
||||
hints: "{{@@ 'bold ' + BIG_MONO @@}}"
|
||||
keyhint: "{{@@ BIG_INTER @@}}"
|
||||
prompts: "{{@@ BIG_INTER @@}}"
|
||||
statusbar: "{{@@ DEF_MONO @@}}"
|
||||
completion:
|
||||
entry: "{{@@ BIG_INTER @@}}"
|
||||
category: "{{@@ BIG_INTER @@}}"
|
||||
messages:
|
||||
error: "{{@@ BIG_INTER @@}}"
|
||||
info: "{{@@ BIG_INTER @@}}"
|
||||
warning: "{{@@ BIG_INTER @@}}"
|
||||
tabs:
|
||||
selected: "{{@@ DEF_INTER @@}}"
|
||||
unselected: "{{@@ DEF_INTER @@}}"
|
||||
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
from qutebrowser.config.configfiles import ConfigAPI # type: ignore
|
||||
from qutebrowser.config.config import ConfigContainer # type: ignore
|
||||
|
||||
# {%@@ if False @@%}
|
||||
config = ConfigAPI()
|
||||
c = ConfigContainer()
|
||||
# {%@@ endif @@%}
|
||||
|
||||
|
||||
##########################################################
|
||||
# Helpers
|
||||
##########################################################
|
||||
|
||||
class key:
|
||||
"Object mapping of templated key bindings"
|
||||
up = "{{@@ key.up @@}}"
|
||||
down = "{{@@ key.down @@}}"
|
||||
left = "{{@@ key.left @@}}"
|
||||
right = "{{@@ key.right @@}}"
|
||||
|
||||
tabL = "{{@@ key.tabL @@}}"
|
||||
tabR = "{{@@ key.tabR @@}}"
|
||||
|
||||
insert = "{{@@ key.insertMode @@}}"
|
||||
next = "{{@@ key.next @@}}"
|
||||
|
||||
|
||||
##########################################################
|
||||
# Usermode
|
||||
##########################################################
|
||||
|
||||
config.bind(",d", "spawn --verbose youtube-dl -fbest[ext=mp4] {url}")
|
||||
config.bind(",m", "spawn --userscript view_in_mpv")
|
||||
config.bind(",r", "spawn --userscript readability")
|
||||
config.bind(";e", "hint links spawn deemix '{hint-url}'")
|
||||
|
||||
mpvcom = "hint links spawn mpv --fs {hint-url} "
|
||||
config.bind(";m", mpvcom)
|
||||
config.bind(";M", mpvcom + "--ytdl-format='best[height<=360]'" )
|
||||
|
||||
|
||||
##########################################################
|
||||
# Layout specific
|
||||
##########################################################
|
||||
|
||||
key_layout = "{{@@ key_layout @@}}"
|
||||
if key_layout == "colemak":
|
||||
config.bind("t", "hint all")
|
||||
config.bind("h", "set-cmd-text -s :open")
|
||||
|
||||
config.bind("T".upper(), "hint all tab")
|
||||
config.bind("H".upper(), "set-cmd-text -s :open -t")
|
||||
|
||||
c.hints.chars = "arstwfuyneio"
|
||||
|
||||
elif key_layout == "dvorak":
|
||||
c.hints.chars = "aoeuidnths"
|
||||
|
||||
|
||||
##########################################################
|
||||
# Movement
|
||||
##########################################################
|
||||
|
||||
config.bind(key.left, "scroll left")
|
||||
config.bind(key.down, "scroll down")
|
||||
config.bind(key.up, "scroll up")
|
||||
config.bind(key.right, "scroll right")
|
||||
|
||||
config.bind(key.next, "search-next")
|
||||
config.bind(key.next.upper(), "search-prev")
|
||||
|
||||
for k, v in {
|
||||
key.up: "scroll-px 0 -100",
|
||||
key.down: "scroll-px 0 100",
|
||||
key.left: "back",
|
||||
key.right: "forward",
|
||||
key.tabL: "tab-prev",
|
||||
key.tabR: "tab-next",
|
||||
}.items():
|
||||
config.bind(k.upper(), v)
|
||||
|
||||
|
||||
##########################################################
|
||||
# Insert mode
|
||||
##########################################################
|
||||
|
||||
config.bind(key.insert, "enter-mode insert")
|
||||
|
||||
c.input.insert_mode.auto_leave = False
|
||||
|
||||
|
||||
##########################################################
|
||||
# Caret mode
|
||||
##########################################################
|
||||
|
||||
config.bind(key.left, "move-to-prev-char", mode="caret")
|
||||
config.bind(key.up, "move-to-prev-line", mode="caret")
|
||||
config.bind(key.down, "move-to-next-line", mode="caret")
|
||||
config.bind(key.right, "move-to-next-char", mode="caret")
|
||||
|
||||
|
||||
##########################################################
|
||||
# devtools
|
||||
##########################################################
|
||||
|
||||
# Clear old binds
|
||||
config.unbind("wIh")
|
||||
config.unbind("wIj")
|
||||
config.unbind("wIk")
|
||||
config.unbind("wIl")
|
||||
|
||||
config.bind("wIf", "devtools-focus")
|
||||
config.bind("wIw", "devtools window")
|
||||
config.bind("wI" + key.left, "devtools left")
|
||||
config.bind("wI" + key.down, "devtools bottom")
|
||||
config.bind("wI" + key.up, "devtools top")
|
||||
config.bind("wI" + key.right, "devtools right")
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/env python
|
||||
# {{@@ header() @@}}
|
||||
|
||||
from qutebrowser.config.configfiles import ConfigAPI # type: ignore
|
||||
from qutebrowser.config.config import ConfigContainer # type: ignore
|
||||
|
||||
# {%@@ if False @@%}
|
||||
config = ConfigAPI()
|
||||
c = ConfigContainer()
|
||||
# {%@@ endif @@%}
|
||||
|
||||
|
||||
###############################################################
|
||||
# Global
|
||||
###############################################################
|
||||
|
||||
c.content.mute = True
|
||||
c.content.autoplay = False
|
||||
|
||||
c.content.headers.user_agent = """\
|
||||
Mozilla/5.0 ({os_info})
|
||||
AppleWebKit/{webkit_version} (KHTML, like Gecko)
|
||||
{qt_key}/{qt_version}
|
||||
{upstream_browser_key}/{upstream_browser_version}
|
||||
Safari/{webkit_version}""".replace("\n", "")
|
||||
|
||||
|
||||
# STFU
|
||||
config.set("content.notifications", False, "*")
|
||||
config.set('content.register_protocol_handler', False, '*')
|
||||
|
||||
###############################################################
|
||||
# Single website settings
|
||||
###############################################################
|
||||
|
||||
# Allow websites to request geolocations.
|
||||
config.set("content.geolocation", True, "https://openweathermap.org")
|
||||
|
||||
# Allow websites to record audio/video.
|
||||
# config.set("content.media_capture", True, "https://ca.bbcollab.com")
|
||||
config.set("content.media.audio_video_capture", True,
|
||||
"https://ca.bbcollab.com")
|
||||
config.set("content.autoplay", True, "https://ca.bbcollab.com")
|
||||
config.set("content.mute", False, "https://ca.bbcollab.com")
|
||||
|
||||
|
||||
###############################################################
|
||||
# Internals
|
||||
###############################################################
|
||||
|
||||
# Enable JavaScript.
|
||||
config.set("content.javascript.enabled", True, "file://*")
|
||||
config.set("content.javascript.enabled", True, "chrome-devtools://*")
|
||||
config.set("content.javascript.enabled", True, "devtools://*")
|
||||
config.set("content.javascript.enabled", True, "chrome://*/*")
|
||||
config.set("content.javascript.enabled", True, "qute://*/*")
|
||||
|
||||
config.set("content.cookies.accept", "all", "chrome-devtools://*")
|
||||
|
||||
config.set("content.cookies.accept", "all", "devtools://*")
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/env python
|
||||
# {{@@ header() @@}}
|
||||
|
||||
import yaml
|
||||
|
||||
from qutebrowser.config.configfiles import ConfigAPI # type: ignore
|
||||
|
||||
|
||||
def dict_attrs(obj, path=''):
|
||||
if isinstance(obj, dict):
|
||||
for k, v in obj.items():
|
||||
yield from dict_attrs(v, '{}.{}'.format(path, k) if path else k)
|
||||
else:
|
||||
yield path, obj
|
||||
|
||||
|
||||
def source_yaml(config: ConfigAPI, filename: str):
|
||||
|
||||
with (config.configdir / filename).open() as f:
|
||||
yaml_data = yaml.safe_load(f)
|
||||
|
||||
for k, v in dict_attrs(yaml_data):
|
||||
config.set(k, v)
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/env python
|
||||
# {{@@ header() @@}}
|
||||
|
||||
from qutebrowser.config.configfiles import ConfigAPI # type: ignore
|
||||
from qutebrowser.config.config import ConfigContainer # type: ignore
|
||||
|
||||
# {%@@ if False @@%}
|
||||
config = ConfigAPI()
|
||||
c = ConfigContainer()
|
||||
# {%@@ endif @@%}
|
||||
|
||||
|
||||
#################################################
|
||||
# Hints
|
||||
#################################################
|
||||
|
||||
c.hints.border = "2px solid {{@@ accent_color @@}}"
|
||||
|
||||
#################################################
|
||||
# Scrolling
|
||||
#################################################
|
||||
|
||||
c.scrolling.bar = 'overlay'
|
||||
c.scrolling.smooth = True
|
||||
|
||||
#################################################
|
||||
# Tabs
|
||||
#################################################
|
||||
|
||||
c.tabs.show = "multiple"
|
||||
|
||||
c.tabs.favicons.show = "always"
|
||||
c.tabs.title.format = "{audio} {current_title}"
|
||||
c.tabs.indicator.width = 0
|
||||
|
||||
c.tabs.select_on_remove = "last-used"
|
||||
c.tabs.show_switching_delay = 2000
|
||||
|
||||
#################################################
|
||||
# Statusbar
|
||||
#################################################
|
||||
|
||||
c.statusbar.show = "always"
|
||||
c.completion.shrink = True
|
||||
c.statusbar.widgets = ["keypress", "url", "scroll", "history", "tabs"]
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
# Copyright Cédric Picard 2014 -- License WTFPL
|
||||
# Inspired by Ranger's -- See https://github.com/hut/ranger
|
||||
#
|
||||
|
@ -37,8 +37,10 @@ sed -i -- '1d' "${namebase}.2"
|
|||
{
|
||||
echo '# Please review/modify this script or empty it to do nothing'
|
||||
while read -r l1 <&3 && read -r l2 <&4; do
|
||||
[ "$l1" = "$l2" ] || printf "mv -Ti -- %q %q\n" "$l1" "$l2"
|
||||
done 3<"${namebase}.1" 4<"${namebase}.2"
|
||||
[ "$l1" = "$l2" ] || printf "%s\n%s\n" "$l1" "$l2"
|
||||
done 3<"${namebase}.1" 4<"${namebase}.2" |
|
||||
sed 's/\([\\"$`]\)/\\\1/g;s/^.*$/"&"/' |
|
||||
xargs -d"\n" -L2 echo 'mv -Ti --'
|
||||
} > "${namebase}.sh"
|
||||
|
||||
"$EDITOR" -- "${namebase}.sh"
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/bin/diffr \
|
||||
--colors 'refine-added:foreground:green:underline' \
|
||||
--colors 'refine-added:background:none' \
|
||||
--colors 'refine-removed:foreground:red:underline' \
|
||||
--colors 'refine-removed:background:none' \
|
||||
--colors 'added:foreground:green' \
|
||||
--colors 'added:background:none' \
|
||||
--colors 'removed:foreground:red' \
|
||||
--colors 'removed:background:none' \
|
||||
$@
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
command -v makepkg &> /dev/null ||
|
||||
exit 1
|
||||
|
||||
install_pikaur(){
|
||||
PIKDIR="$HOME/.cache/pikaur/build/pikaur"
|
||||
test -d "$PIKDIR" ||
|
||||
git clone \
|
||||
https://aur.archlinux.org/pikaur.git \
|
||||
"$PIKDIR"
|
||||
|
||||
cd "$PIKDIR"
|
||||
|
||||
makepkg -si --noconfirm --needed
|
||||
}
|
||||
|
||||
command -v pikaur &> /dev/null ||
|
||||
install_pikaur
|
||||
|
||||
cd "$HOME/.local/share/metapkg/"
|
||||
|
||||
pikaur \
|
||||
--pkgbuild \
|
||||
--install \
|
||||
--rebuild \
|
||||
--noconfirm \
|
||||
--keepbuilddep
|
|
@ -13,7 +13,7 @@ test -d "$SAVES_DIR" || exit 1
|
|||
test_rsync(){
|
||||
test -d "$1" && {
|
||||
mkdir -p $(dirname "$2")
|
||||
cp --recursive --no-target-directory "$1" "$2"
|
||||
cp --recursive --no-target-directory --reflink=always "$1" "$2"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ game_save(){
|
|||
|
||||
game_save mindustry "~/.local/share/Mindustry" 'previews'
|
||||
game_save minecraft "~/.minecraft/saves"
|
||||
game_save factorio "~/.factorio" '_autosave*.zip' '*.sync-conflict-*' 'doc-html' 'temp'
|
||||
game_save factorio "~/Games/factorio" '_autosave*.zip' '*.sync-conflict-*' 'doc-html' 'temp' 'data' 'bin'
|
||||
game_save cuphead "~/Games/cuphead/drive_c/users/$USER/Application Data/Cuphead"
|
||||
game_save dusk "~/Games/dusk/game/saves"
|
||||
game_save marioW "~/Games/super-mario-world/"
|
||||
|
|
|
@ -1,392 +0,0 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
# Variables {{{
|
||||
#
|
||||
# Logo key.
|
||||
set $mod Mod4
|
||||
# Home row direction keys, like vim
|
||||
set $left {{@@ key.left @@}}
|
||||
set $down {{@@ key.down @@}}
|
||||
set $up {{@@ key.up @@}}
|
||||
set $right {{@@ key.right @@}}
|
||||
set $menu s
|
||||
set $mus r
|
||||
|
||||
set $term terminal
|
||||
# set $menu wofi --show drun --allow-images --insensitive --term $term -p'Iniciar: '
|
||||
# set $menu bmenu run $term
|
||||
font {{@@ font.interface @@}} {{@@ font.size.medium @@}}px
|
||||
|
||||
#{%@@ if color.type == 'dark' @@%}#
|
||||
set $wallPath ~/.local/share/wallpapers/assembly.png
|
||||
#{%@@ else @@%}#
|
||||
set $wallPath ~/.local/share/wallpapers/austria.jpg
|
||||
#{%@@ endif @@%}#
|
||||
|
||||
# }}}
|
||||
# Output configuration {{{
|
||||
#
|
||||
# output * bg '#252525' solid_color
|
||||
output * bg $wallPath fill
|
||||
# Output HDMI-A-1 resolution 1280x720
|
||||
|
||||
# Disable laptop screen if closed, --reload is important
|
||||
set $laptop eDP-1
|
||||
bindswitch --reload lid:on output $laptop disable
|
||||
bindswitch --reload lid:off output $laptop enable
|
||||
|
||||
# output $laptop disable
|
||||
# bindsym $mod+o output eDP-1 toggle
|
||||
# exec_always swaymsg -t get_outputs | grep HDMI || swaymsg 'output eDP-1 enable'
|
||||
|
||||
# Backlight settings for laptops
|
||||
exec light -N 1
|
||||
bindsym XF86MonBrightnessUp exec light -A 5
|
||||
bindsym XF86MonBrightnessDown exec light -U 5
|
||||
|
||||
# }}}
|
||||
# Input configuration {{{
|
||||
|
||||
#hide the mouse after 10 seconds
|
||||
seat * hide_cursor 10000
|
||||
seat * xcursor_theme {{@@ cursor_theme @@}} {{@@ cursor_size @@}}
|
||||
|
||||
input "type:touchpad" {
|
||||
#disable while typing
|
||||
dwt disabled
|
||||
natural_scroll enabled
|
||||
tap enabled
|
||||
}
|
||||
|
||||
input * {
|
||||
# {%@@ if key_layout == "colemak" @@%}
|
||||
#
|
||||
xkb_layout "us(colemak),br"
|
||||
xkb_options "lv3:lsgt_switch,grp:shifts_toggle"
|
||||
# {%@@ elif key_layout == "dvorak" @@%}
|
||||
#
|
||||
xkb_layout us(dvorak)
|
||||
# {%@@ endif @@%}
|
||||
xkb_options caps:backspace
|
||||
xkb_numlock enabled
|
||||
}
|
||||
|
||||
# }}}
|
||||
# Key bindings: {{{
|
||||
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
bindsym {
|
||||
# Basic {{{
|
||||
|
||||
# Start a terminal
|
||||
$mod+Return exec $term
|
||||
|
||||
#start web browser
|
||||
$mod+b exec qutebrowser
|
||||
|
||||
#start file manager
|
||||
$mod+Control+Return exec thunar
|
||||
|
||||
$mod+g exec emoji
|
||||
|
||||
# Kill focused window
|
||||
$mod+x kill
|
||||
|
||||
# Start your launcher
|
||||
$mod+$menu exec launcher
|
||||
|
||||
# Fill passwords
|
||||
$mod+p exec wpass
|
||||
|
||||
# Reload the configuration file
|
||||
$mod+Shift+c reload
|
||||
|
||||
# Lock Sway
|
||||
--locked $mod+Control+z exec loginctl suspend || systemctl suspend
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
$mod+Shift+q exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
|
||||
Control+Alt+delete exit
|
||||
|
||||
# }}}
|
||||
# Moving around: {{{
|
||||
|
||||
# Move your focus around
|
||||
#{%@@ for d in "up,down,left,right".split(',') @@%}#
|
||||
$mod+${{@@ d @@}} focus {{@@ d @@}}
|
||||
$mod+{{@@ d.capitalize() @@}} focus {{@@ d @@}}
|
||||
$mod+Shift+${{@@ d @@}} move {{@@ d @@}}
|
||||
#{%@@ endfor @@%}#
|
||||
|
||||
# Resizing containers:
|
||||
$mod+Control+$left resize shrink width 20px
|
||||
$mod+Control+$down resize grow height 20px
|
||||
$mod+Control+$up resize shrink height 20px
|
||||
$mod+Control+$right resize grow width 20px
|
||||
|
||||
#}}}
|
||||
# Workspaces: {{{
|
||||
|
||||
# Mouse prev/next button
|
||||
--whole-window $mod+button8 workspace next_on_output
|
||||
--whole-window $mod+button9 workspace prev_on_output
|
||||
|
||||
$mod+{{@@ key.tabL @@}} workspace prev_on_output
|
||||
$mod+{{@@ key.tabR @@}} workspace next_on_output
|
||||
|
||||
$mod+Shift+{{@@ key.tabL @@}} move workspace prev_on_output
|
||||
$mod+Shift+{{@@ key.tabR @@}} move workspace next_on_output
|
||||
|
||||
# Switch to workspace
|
||||
# Move focused container to workspace
|
||||
#{%@@ for i in range(1,11) @@%}#
|
||||
$mod+{{@@ i % 10 @@}} workspace {{@@ i @@}}
|
||||
$mod+Shift+{{@@ i % 10 @@}} move container to workspace {{@@ i @@}}
|
||||
#{%@@ endfor @@%}#
|
||||
|
||||
# }}}
|
||||
# Layout stuff: {{{
|
||||
#
|
||||
# Splits
|
||||
# bindsym $mod+b splith
|
||||
$mod+v splitv
|
||||
|
||||
# Layout styles
|
||||
$mod+t layout tabbed
|
||||
$mod+r layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
$mod+f fullscreen
|
||||
|
||||
# Floating
|
||||
$mod+Shift+space floating toggle
|
||||
$mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
$mod+a focus parent
|
||||
$mod+z focus child
|
||||
|
||||
# }}}
|
||||
# Screenshots: {{{
|
||||
|
||||
# Screens to file
|
||||
Print exec screenshotsh def
|
||||
|
||||
# Screen area to file
|
||||
Shift+Print exec screenshotsh area
|
||||
|
||||
# Screen area to clipboard
|
||||
Control+Shift+Print exec screenshotsh area-clip
|
||||
|
||||
# Focused monitor to clipboard
|
||||
Control+Print exec screenshotsh clip
|
||||
|
||||
# Screen recorder
|
||||
Control+Alt+Shift+r exec wf-recorder -a
|
||||
|
||||
# Mirror selection as window
|
||||
$mod+Alt+r exec sssway
|
||||
|
||||
# Color picker
|
||||
$mod+c exec color-picker
|
||||
|
||||
# show keys being pressed
|
||||
$mod+k exec showkeys
|
||||
|
||||
# }}}
|
||||
# Audio: {{{
|
||||
|
||||
# Volume controll
|
||||
# script in dotfiles
|
||||
--locked XF86AudioRaiseVolume exec volumesh -i 10
|
||||
--locked XF86AudioLowerVolume exec volumesh -d 10
|
||||
--locked XF86AudioMute exec volumesh -t
|
||||
|
||||
# Media player controls
|
||||
--locked XF86AudioPlay exec mpc toggle
|
||||
--locked XF86AudioNext exec mpc next
|
||||
--locked XF86AudioPrev exec mpc prev
|
||||
|
||||
# }}}
|
||||
# Special Keys{{{
|
||||
|
||||
XF86Calculator exec $term ipython
|
||||
XF86Mail exec $term neomutt
|
||||
XF86Explorer exec thunar
|
||||
XF86HomePage exec xdg-open http://start.duckduckgo.com
|
||||
|
||||
|
||||
# }}}
|
||||
}
|
||||
# Modes {{{
|
||||
|
||||
set $dexec mode default;exec
|
||||
|
||||
# Music {{{
|
||||
bindsym $mod+m mode Music
|
||||
mode Music bindsym {
|
||||
|
||||
m exec volumesh -t
|
||||
{{@@ key.tabL @@}} exec volumesh -d 10
|
||||
{{@@ key.tabR @@}} exec volumesh -i 10
|
||||
|
||||
{{@@ key.right @@}} exec mpc next
|
||||
{{@@ key.left @@}} exec mpc prev
|
||||
{{@@ key.up @@}} exec volumesh --mpd -i 10
|
||||
{{@@ key.down @@}} exec volumesh --mpd -d 10
|
||||
|
||||
space $dexec mpc toggle
|
||||
p $dexec mpc toggle
|
||||
|
||||
d $dexec musmenu delete
|
||||
f $dexec musmenu search
|
||||
a $dexec dzadd
|
||||
s $dexec pulse-sink
|
||||
|
||||
escape mode default
|
||||
q mode default
|
||||
|
||||
}
|
||||
# }}}
|
||||
|
||||
mode Passthrough {
|
||||
bindsym $mod+escape mode default
|
||||
}
|
||||
bindsym $mod+escape mode Passthrough
|
||||
|
||||
# }}}
|
||||
# }}}
|
||||
# Visual: {{{
|
||||
#
|
||||
set $accent {{@@ accent_color @@}}
|
||||
set $fg_color {{@@ color.txt @@}}
|
||||
set $bg_color {{@@ color.bg_dark @@}}
|
||||
set $alert #000000
|
||||
|
||||
# border background text indicator child_border
|
||||
client.focused $accent $accent $fg_color $accent $accent
|
||||
client.focused_inactive $bg_color $bg_color $fg_color $bg_color $bg_color
|
||||
client.unfocused $bg_color $bg_color $fg_color $bg_color $bg_color
|
||||
client.urgent $alert $alert $fg_color $alert $alert
|
||||
|
||||
{%@@ if bar == "waybar" @@%}
|
||||
# Wake up pulseaudio
|
||||
exec pactl set-sink-volume @DEFAULT_SINK@ +0%
|
||||
|
||||
bar swaybar_command waybar
|
||||
{%@@ else @@%}
|
||||
# I rarely use this
|
||||
bar {
|
||||
position {{@@ bar_pos @@}}
|
||||
# status_command i3blocks
|
||||
|
||||
# gaps 5px
|
||||
icon_theme {{@@ icon_theme @@}}
|
||||
|
||||
font {{@@ font.interface @@}} 14px
|
||||
|
||||
colors {
|
||||
statusline $fg_color
|
||||
background $bg_color
|
||||
focused_workspace $accent $bg_color $fg_color
|
||||
}
|
||||
}
|
||||
{%@@ endif @@%}
|
||||
|
||||
default_border pixel 2px
|
||||
default_floating_border normal 2px
|
||||
gaps inner 5px
|
||||
|
||||
smart_gaps on
|
||||
smart_borders on
|
||||
|
||||
# for_window [app_id=mpv] floating enable
|
||||
for_window [app_id=weather] fullscreen
|
||||
# for_window [app_id=weather] resize set 635px 700px
|
||||
# for_window [app_id=weather] resize set 1500px 750px
|
||||
|
||||
# set theme
|
||||
set $gnome-schema org.gnome.desktop.interface
|
||||
exec_always {
|
||||
kvantummanager --set '{{@@ kvantum_theme @@}}'
|
||||
gsettings set $gnome-schema gtk-theme '{{@@ gtk_theme @@}}'
|
||||
gsettings set $gnome-schema icon-theme '{{@@ icon_theme @@}}'
|
||||
gsettings set $gnome-schema cursor-theme '{{@@ cursor_theme @@}}'
|
||||
}
|
||||
|
||||
# }}}
|
||||
# Assigns {{{
|
||||
|
||||
for_window [app_id=pavucontrol] floating enable
|
||||
|
||||
assign [app_id=qutebrowser] workspace 2
|
||||
assign [class=qutebrowser] workspace 2
|
||||
assign [class=Steam] workspace 9
|
||||
|
||||
assign [app_id=telegram.?desktop] workspace 10
|
||||
assign [class=TelegramDesktop] workspace 10
|
||||
|
||||
assign [class=discord] workspace 10
|
||||
|
||||
#}}}
|
||||
# Daemons {{{
|
||||
#
|
||||
|
||||
# start dbusd just in case
|
||||
exec 'dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus'
|
||||
|
||||
#Notification Daemon
|
||||
exec_always pidof mako || mako
|
||||
# Block device Mounter to /run/media/<username>
|
||||
exec udiskie
|
||||
# gesture daemon
|
||||
exec fusuma
|
||||
# exec sh -c 'pkill fusuma; fusuma'
|
||||
# Blue light filter
|
||||
exec_always pidof redshift || redshift
|
||||
|
||||
# kde connect
|
||||
exec /usr/lib/kdeconnectd
|
||||
exec kdeconnect-indicator
|
||||
# Telegram
|
||||
exec telegram-desktop-bin || telegram-desktop
|
||||
# Music Player Daemon
|
||||
exec pidof mpd || mpd
|
||||
exec pgrep -f mpDris2|| mpDris2
|
||||
|
||||
# Prevent the screen from locking if fullscreen
|
||||
for_window [title=.*] inhibit_idle fullscreen
|
||||
|
||||
# Lock configuration
|
||||
set $lock swaylock -f \
|
||||
--image $wallPath \
|
||||
--font '{{@@ font.interface @@}}' \
|
||||
|
||||
set $screenReload \
|
||||
pkill kanshi; \
|
||||
kanshi & disown\
|
||||
|
||||
# Idle daemon
|
||||
exec_always pkill swayidle && false || \
|
||||
exec swayidle -w \
|
||||
before-sleep '$lock' \
|
||||
after-resume '$screenReload' \
|
||||
timeout 360 '$lock' \
|
||||
resume '$screenReload' \
|
||||
timeout 1800 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on";$screenReload' \
|
||||
|
||||
# Screen manager
|
||||
exec_always $screenReload
|
||||
|
||||
include /etc/sway/config.d/
|
||||
#}}}
|
||||
# vim:filetype=sh:foldmethod=marker
|
|
@ -0,0 +1,33 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
###############################################################
|
||||
# Assigns
|
||||
###############################################################
|
||||
|
||||
for_window [app_id=pavucontrol] floating enable
|
||||
|
||||
for_window [app_id=weather] fullscreen
|
||||
|
||||
|
||||
###############################################################
|
||||
# Workspaces
|
||||
###############################################################
|
||||
|
||||
assign [app_id=qutebrowser] workspace 2
|
||||
assign [class=qutebrowser] workspace 2
|
||||
|
||||
assign [class=Steam] workspace 9
|
||||
assign [title=^steam] workspace 9
|
||||
|
||||
assign [app_id=telegram.?desktop] workspace 10
|
||||
assign [class=TelegramDesktop] workspace 10
|
||||
|
||||
assign [class=discord] workspace 10
|
||||
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,52 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
###############################################################
|
||||
# Variables
|
||||
###############################################################
|
||||
|
||||
# Logo key.
|
||||
set $mod Mod4
|
||||
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Home row direction keys, like vim
|
||||
set $left {{@@ key.left @@}}
|
||||
set $down {{@@ key.down @@}}
|
||||
set $up {{@@ key.up @@}}
|
||||
set $right {{@@ key.right @@}}
|
||||
set $menu s
|
||||
set $mus r
|
||||
|
||||
set $wallPath\
|
||||
{%@@ if color.type == 'dark' @@%}
|
||||
~/.local/share/wallpapers/assembly.png
|
||||
{%@@ else @@%}
|
||||
~/.local/share/wallpapers/austria.jpg
|
||||
{%@@ endif @@%}
|
||||
|
||||
###############################################################
|
||||
# Includes
|
||||
###############################################################
|
||||
|
||||
include input
|
||||
|
||||
include visual
|
||||
|
||||
include keys-window
|
||||
include keys-run
|
||||
include keys-special
|
||||
include modes
|
||||
|
||||
include assigns
|
||||
include daemons
|
||||
|
||||
|
||||
include /etc/sway/config.d/
|
||||
|
||||
# vim:ft=i3
|
|
@ -0,0 +1,81 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
###############################################################
|
||||
# User Programs
|
||||
###############################################################
|
||||
|
||||
# kde connect
|
||||
exec /usr/lib/kdeconnectd
|
||||
exec kdeconnect-indicator
|
||||
# Telegram
|
||||
exec telegram-desktop-bin || telegram-desktop
|
||||
# Music Player Daemon
|
||||
exec pidof mpd || mpd
|
||||
exec pgrep -f mpDris2|| mpDris2
|
||||
|
||||
|
||||
###############################################################
|
||||
# Screen locking
|
||||
###############################################################
|
||||
|
||||
# Lock configuration
|
||||
set $lock \
|
||||
pkill caffeinated;\
|
||||
swaylock -f \
|
||||
--image $wallPath \
|
||||
--font '{{@@ font.interface @@}}' \
|
||||
|
||||
set $screenReload \
|
||||
pkill kanshi; \
|
||||
kanshi & disown\
|
||||
|
||||
###############################################################
|
||||
# System Daemons
|
||||
###############################################################
|
||||
|
||||
# start dbusd just in case
|
||||
exec 'dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus'
|
||||
|
||||
#Notification Daemon
|
||||
exec_always pidof mako || mako
|
||||
|
||||
# Block device Mounter to /run/media/<username>
|
||||
exec udiskie
|
||||
|
||||
# gesture daemon
|
||||
exec fusuma
|
||||
|
||||
# Blue light filter
|
||||
exec_always pidof redshift || redshift
|
||||
|
||||
# Screen manager
|
||||
exec_always $screenReload
|
||||
|
||||
# Set minimum brightness to 1 instead of 0
|
||||
# not exactly a daemon
|
||||
exec light -N 1
|
||||
|
||||
###############################################################
|
||||
# Idle
|
||||
###############################################################
|
||||
|
||||
# Prevent the screen from locking if fullscreen
|
||||
for_window [title=.*] inhibit_idle fullscreen
|
||||
|
||||
# Idle daemon
|
||||
exec_always pkill swayidle && false || \
|
||||
exec swayidle -w \
|
||||
before-sleep '$lock' \
|
||||
after-resume '$screenReload' \
|
||||
timeout 360 '$lock' \
|
||||
resume '$screenReload' \
|
||||
timeout 1800 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on";$screenReload' \
|
||||
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,32 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
# Hide the mouse after 10 seconds
|
||||
seat * hide_cursor 10000
|
||||
|
||||
input "type:touchpad" {
|
||||
# Disable While Typing
|
||||
dwt disabled
|
||||
natural_scroll enabled
|
||||
tap enabled
|
||||
}
|
||||
|
||||
input * {
|
||||
{%@@ if key_layout == "colemak" @@%}
|
||||
xkb_layout "us(colemak),br"
|
||||
xkb_options "lv3:lsgt_switch,grp:shifts_toggle"
|
||||
{%@@ elif key_layout == "dvorak" @@%}
|
||||
xkb_layout "us(dvorak)"
|
||||
xkb_options "caps:backspace"
|
||||
{%@@ else @@%}
|
||||
xkb_options "caps:backspace"
|
||||
{%@@ endif @@%}
|
||||
|
||||
xkb_numlock enabled
|
||||
}
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,42 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
bindsym {
|
||||
|
||||
# Start a terminal
|
||||
$mod+Return exec terminal
|
||||
|
||||
#start web browser
|
||||
$mod+b exec qutebrowser
|
||||
|
||||
#start file manager
|
||||
$mod+Control+Return exec {{@@ file_manager @@}}
|
||||
|
||||
# Insert special characters
|
||||
$mod+g exec emoji
|
||||
|
||||
# Kill focused window
|
||||
$mod+x kill
|
||||
|
||||
# Start your launcher
|
||||
$mod+$menu exec launcher
|
||||
|
||||
# Fill passwords
|
||||
$mod+p exec wpass
|
||||
|
||||
# Reload the configuration file
|
||||
$mod+Shift+c reload
|
||||
|
||||
# Lock Sway and suspend
|
||||
--locked $mod+Control+z exec loginctl suspend || systemctl suspend
|
||||
|
||||
# Exit sway
|
||||
Control+Alt+delete exit
|
||||
|
||||
}
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,73 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
bindsym {
|
||||
|
||||
###############################################################
|
||||
# Screenshots
|
||||
###############################################################
|
||||
|
||||
# Screens to file
|
||||
Print exec screenshotsh def
|
||||
|
||||
# Screen area to file
|
||||
Shift+Print exec screenshotsh area
|
||||
|
||||
# Screen area to clipboard
|
||||
Control+Shift+Print exec screenshotsh area-clip
|
||||
|
||||
# Focused monitor to clipboard
|
||||
Control+Print exec screenshotsh clip
|
||||
|
||||
# Screen recorder
|
||||
Control+Alt+Shift+r exec wf-recorder -a
|
||||
|
||||
# Mirror selection as window
|
||||
$mod+Alt+r exec sssway
|
||||
|
||||
# Color picker
|
||||
$mod+c exec color-picker
|
||||
|
||||
# show keys being pressed
|
||||
$mod+k exec showkeys
|
||||
|
||||
|
||||
###############################################################
|
||||
# Audio
|
||||
###############################################################
|
||||
|
||||
# Volume controll, script in dotfiles
|
||||
--locked XF86AudioRaiseVolume exec volumesh -i 10
|
||||
--locked XF86AudioLowerVolume exec volumesh -d 10
|
||||
--locked XF86AudioMute exec volumesh -t
|
||||
|
||||
# Media player controls
|
||||
--locked XF86AudioPlay exec mpc toggle
|
||||
--locked XF86AudioNext exec mpc next
|
||||
--locked XF86AudioPrev exec mpc prev
|
||||
|
||||
###############################################################
|
||||
# Backlight settings for laptops
|
||||
###############################################################
|
||||
|
||||
XF86MonBrightnessUp exec light -A 5
|
||||
XF86MonBrightnessDown exec light -U 5
|
||||
|
||||
|
||||
###############################################################
|
||||
# Special Keys
|
||||
###############################################################
|
||||
|
||||
XF86Calculator exec terminal ipython
|
||||
XF86Mail exec terminal neomutt
|
||||
XF86Explorer exec {{@@ file_manager @@}}
|
||||
XF86HomePage exec xdg-open http://start.duckduckgo.com
|
||||
|
||||
|
||||
}
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,79 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
bindsym {
|
||||
|
||||
###############################################################
|
||||
# Moving around
|
||||
###############################################################
|
||||
|
||||
# Move your focus around
|
||||
{%@@ for dir in "up,down,left,right".split(',') @@%}
|
||||
{%@@ set DIR = dir.capitalize() @@%}
|
||||
$mod+${{@@ dir @@}} focus {{@@ dir @@}}
|
||||
$mod+{{@@ DIR @@}} focus {{@@ dir @@}}
|
||||
$mod+Shift+${{@@ dir @@}} move {{@@ dir @@}}
|
||||
{%@@ endfor @@%}
|
||||
|
||||
# Resizing containers:
|
||||
$mod+Control+$left resize shrink width 20px
|
||||
$mod+Control+$down resize grow height 20px
|
||||
$mod+Control+$up resize shrink height 20px
|
||||
$mod+Control+$right resize grow width 20px
|
||||
|
||||
|
||||
###############################################################
|
||||
# Workspaces
|
||||
###############################################################
|
||||
|
||||
# Switch to workspace
|
||||
# Move focused container to workspace
|
||||
{%@@ for i in range(1,11) @@%}
|
||||
$mod+{{@@ i%10 @@}} workspace {{@@ i @@}}
|
||||
$mod+Shift+{{@@ i%10 @@}} move container workspace {{@@ i @@}}
|
||||
{%@@ endfor @@%}
|
||||
|
||||
# go/move to Workspaces
|
||||
# button8,9 = Mouse next/prev button
|
||||
{%@@ for targ, buttons in {
|
||||
"prev_on_output": [ key.tabL, "bracketleft", "button9", ],
|
||||
"next_on_output": [ key.tabR, "bracketright", "button8", ],
|
||||
}.items() @@%}
|
||||
{%@@ for button in buttons @@%}
|
||||
{%@@ set pref = ("--whole-window " if "button" in button) @@%}
|
||||
{{@@ pref @@}}$mod+{{@@ button @@}} workspace {{@@ targ @@}}
|
||||
{{@@ pref @@}}$mod+Shift+{{@@ button @@}} move workspace {{@@ targ @@}}
|
||||
{%@@ endfor @@%}
|
||||
{%@@ endfor @@%}
|
||||
|
||||
|
||||
###############################################################
|
||||
# Layout
|
||||
###############################################################
|
||||
|
||||
# Splits
|
||||
$mod+v splitv
|
||||
# No splith since we can just mod+r
|
||||
|
||||
# Layout styles
|
||||
$mod+t layout tabbed
|
||||
$mod+r layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
$mod+f fullscreen
|
||||
|
||||
# Floating
|
||||
$mod+Shift+space floating toggle
|
||||
$mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
$mod+a focus parent
|
||||
$mod+z focus child
|
||||
|
||||
}
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,48 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
set $dexec mode default;exec
|
||||
|
||||
###############################################################
|
||||
# Music
|
||||
###############################################################
|
||||
|
||||
bindsym $mod+m mode Music
|
||||
mode Music bindsym {
|
||||
|
||||
m exec volumesh -t
|
||||
{{@@ key.tabL @@}} exec volumesh -d 10
|
||||
{{@@ key.tabR @@}} exec volumesh -i 10
|
||||
|
||||
{{@@ key.right @@}} exec mpc next
|
||||
{{@@ key.left @@}} exec mpc prev
|
||||
{{@@ key.up @@}} exec volumesh --mpd -i 10
|
||||
{{@@ key.down @@}} exec volumesh --mpd -d 10
|
||||
|
||||
space $dexec mpc toggle
|
||||
p $dexec mpc toggle
|
||||
|
||||
d $dexec musmenu delete
|
||||
f $dexec musmenu search
|
||||
a $dexec dzadd
|
||||
s $dexec pulse-sink
|
||||
|
||||
escape mode default
|
||||
q mode default
|
||||
|
||||
}
|
||||
|
||||
###############################################################
|
||||
# Passthrough
|
||||
###############################################################
|
||||
|
||||
mode Passthrough {
|
||||
bindsym $mod+escape mode default
|
||||
}
|
||||
bindsym $mod+escape mode Passthrough
|
||||
|
||||
# vim: ft=i3
|
|
@ -0,0 +1,90 @@
|
|||
# {{@@ header() @@}}
|
||||
# _____ ____ _ _ _
|
||||
# / __\ \ /\ / / _` | | | |
|
||||
# \__ \\ V V / (_| | |_| |
|
||||
# |___/ \_/\_/ \__,_|\__, |
|
||||
# |___/
|
||||
|
||||
|
||||
###############################################################
|
||||
# Variables
|
||||
###############################################################
|
||||
|
||||
set $accent {{@@ accent_color @@}}
|
||||
set $fg_color {{@@ color.txt @@}}
|
||||
set $bg_color {{@@ color.bg_dark @@}}
|
||||
set $alert #000000
|
||||
|
||||
font {{@@ font.interface @@}} {{@@ font.size.medium @@}}px
|
||||
output * bg $wallPath fill
|
||||
|
||||
###############################################################
|
||||
# window decoration, aka border
|
||||
###############################################################
|
||||
|
||||
default_border pixel 2px
|
||||
default_floating_border normal 2px
|
||||
|
||||
# border background text indicator child_border
|
||||
client.focused $accent $accent $fg_color $accent $accent
|
||||
client.focused_inactive $bg_color $bg_color $fg_color $bg_color $bg_color
|
||||
client.unfocused $bg_color $bg_color $fg_color $bg_color $bg_color
|
||||
client.urgent $alert $alert $fg_color $alert $alert
|
||||
|
||||
|
||||
###############################################################
|
||||
# Bar configuration
|
||||
###############################################################
|
||||
|
||||
{%@@ if bar == "waybar" @@%}
|
||||
# Wake up pulseaudio
|
||||
exec pactl set-sink-volume @DEFAULT_SINK@ +0%
|
||||
|
||||
bar swaybar_command waybar
|
||||
{%@@ else @@%}
|
||||
# I rarely use this
|
||||
bar {
|
||||
position {{@@ bar_pos @@}}
|
||||
# status_command i3blocks
|
||||
|
||||
# gaps 5px
|
||||
icon_theme {{@@ icon_theme @@}}
|
||||
|
||||
font {{@@ font.interface @@}} {{@@ font.size.medium @@}}px
|
||||
|
||||
colors {
|
||||
statusline $fg_color
|
||||
background $bg_color
|
||||
focused_workspace $accent $bg_color $fg_color
|
||||
}
|
||||
}
|
||||
{%@@ endif @@%}
|
||||
|
||||
###############################################################
|
||||
# Gaps
|
||||
###############################################################
|
||||
|
||||
smart_gaps on
|
||||
smart_borders on
|
||||
|
||||
gaps inner 5px
|
||||
|
||||
|
||||
###############################################################
|
||||
# Themes
|
||||
###############################################################
|
||||
|
||||
set $gnome-schema org.gnome.desktop.interface
|
||||
exec_always {
|
||||
# In case of errors, kvantummanager opens a window
|
||||
# this is retarded
|
||||
timeout 1s kvantummanager --set '{{@@ kvantum_theme @@}}'
|
||||
gsettings set $gnome-schema gtk-theme '{{@@ gtk_theme @@}}'
|
||||
gsettings set $gnome-schema icon-theme '{{@@ icon_theme @@}}'
|
||||
gsettings set $gnome-schema cursor-theme '{{@@ cursor_theme @@}}'
|
||||
}
|
||||
|
||||
seat * xcursor_theme "{{@@ cursor_theme @@}}" "{{@@ cursor_size @@}}"
|
||||
|
||||
|
||||
# vim: ft=i3
|
|
@ -9,13 +9,8 @@ map {{@@ key.down @@}} scroll down
|
|||
map {{@@ key.up @@}} scroll up
|
||||
map {{@@ key.right @@}} scroll right
|
||||
|
||||
# {%@@ if editor == "kak" @@%} #
|
||||
map <A-{{@@ key.down @@}}> navigate next
|
||||
map <A-{{@@ key.up @@}}> navigate previous
|
||||
# {%@@ else @@%} #
|
||||
map {{@@ key.down.upper() @@}} navigate next
|
||||
map {{@@ key.up .upper() @@}} navigate previous
|
||||
# {%@@ endif @@%} #
|
||||
|
||||
map {{@@ key.next @@}} search forward
|
||||
map {{@@ key.next.upper() @@}} search backward
|
||||
|
|
Reference in New Issue