diff --git a/.config/flavours/config.toml b/.config/flavours/config.toml new file mode 100644 index 0000000..669b514 --- /dev/null +++ b/.config/flavours/config.toml @@ -0,0 +1,82 @@ +shell = "zsh -c '{}'" + +#[[item]] +#file = "~/.config/sway/border.svg" +#template = "svg-circle" +#rewrite = true +#hook = "~/.config/sway/rendersvg.sh border" + +#[[item]] +#file = "~/.config/sway/border-selected.svg" +#template = "svg-circle" +#subtemplate = "selected" +#rewrite = true +#hook = "~/.config/sway/rendersvg.sh border-selected" + +[[item]] +file = "~/.config/nvim/colors/base16.vim" +template = "vim" +rewrite = true +hook = "reloadnvim" + +[[item]] +file= "~/.config/zathura/zathurarc" +template = "zathura" + +[[item]] +file = "~/.config/rofi/themes/colors.rasi" +template = "rofi" +subtemplate = "colors" +rewrite = true + +[[item]] +file = "~/.config/kitty/colors.conf" +template = "kitty" +subtemplate = "default-256" + +[[item]] +file = "~/.config/polybar/colors.ini" +template = "polybar" +rewrite = true +hook="killall -q polybar && ~/.config/polybar/launch.sh" + +[[item]] +file = "~/.config/twmn/twmn.conf" +template = "twmn" +rewrite = true + +[[item]] +file = "~/.config/i3/config" +template = "i3" +light = false +hook = "i3-msg reload" + +[[item]] +file = "~/.themes/FlatColor/colors3" +template = "gtk-flatcolor" +subtemplate = "gtk-3" +rewrite = true +hook = "xsettings" + +[[item]] +file = "~/.themes/FlatColor/colors2" +template = "gtk-flatcolor" +subtemplate = "gtk-2" +rewrite = true + +[[item]] +file = "~/.config/alacritty/alacritty.yml" +template = "alacritty" +subtemplate = "default-256" + +[[item]] +file = "~/.config/lightdm-mini-greeter/mini-greeter.conf" +template = "mini-greeter" +rewrite = false + +[[item]] +file = "~/.fzf/fzf-base16.conf" +template = "fzf" +rewrite = true + + diff --git a/.config/ranger/commands.py b/.config/ranger/commands.py index 644d968..43c4993 100644 --- a/.config/ranger/commands.py +++ b/.config/ranger/commands.py @@ -94,7 +94,9 @@ from __future__ import (absolute_import, division, print_function) from collections import deque import os import re +from io import open +from ranger import PY3 from ranger.api.commands import Command @@ -243,8 +245,9 @@ class cd(Command): paths = self._tab_fuzzy_match(basepath, tokens) if not os.path.isabs(dest): - paths_rel = basepath - paths = [os.path.relpath(path, paths_rel) for path in paths] + paths_rel = self.fm.thisdir.path + paths = [os.path.relpath(os.path.join(basepath, path), paths_rel) + for path in paths] else: paths_rel = '' return paths, paths_rel @@ -274,7 +277,7 @@ class cd(Command): return None if len(paths) == 1: return start + paths[0] + sep - return [start + dirname for dirname in paths] + return [start + dirname + sep for dirname in paths] class chain(Command): @@ -282,6 +285,7 @@ class chain(Command): Calls multiple commands at once, separated by semicolons. """ + resolve_macros = False def execute(self): if not self.rest(1).strip(): @@ -335,7 +339,7 @@ class open_with(Command): def execute(self): app, flags, mode = self._get_app_flags_mode(self.rest(1)) self.fm.execute_file( - files=[f for f in self.fm.thistab.get_selection()], + files=self.fm.thistab.get_selection(), app=app, flags=flags, mode=mode) @@ -478,36 +482,106 @@ class set_(Command): return None -class setlocal(set_): - """:setlocal path=