From 392a018c86b88f7349cc21930a2fc53e4195d47a Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 1 Apr 2025 19:44:27 +0200 Subject: [PATCH] . --- .gitignore | 39 + .stow-local-ignore | 6 + dots/.config/ranger/bookmarks | 8 - dots/.config/ranger/colorschemes/__init__.py | 0 dots/.config/ranger/colorschemes/__init__.pyo | Bin 137 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 151 -> 0 bytes .../__pycache__/__init__.cpython-37.opt-1.pyc | Bin 137 -> 0 bytes .../__pycache__/tofu.cpython-312.pyc | Bin 1675 -> 0 bytes .../__pycache__/tofu.cpython-37.opt-1.pyc | Bin 993 -> 0 bytes dots/.config/ranger/colorschemes/default.pyo | Bin 1323 -> 0 bytes dots/.config/ranger/colorschemes/tofu.py | 44 - dots/.config/ranger/colorschemes/tofu.pyo | Bin 1314 -> 0 bytes dots/.config/ranger/commands.py | 62 - dots/.config/ranger/commands_full.py | 1836 ----------------- dots/.config/ranger/history | 50 - dots/.config/ranger/rc.conf | 387 ---- dots/.config/ranger/rifle.conf | 76 - dots/.config/ranger/scope.sh | 84 - install.sh | 292 +++ makedir.sh | 94 + makefile | 15 + 21 files changed, 446 insertions(+), 2547 deletions(-) create mode 100644 .gitignore create mode 100644 .stow-local-ignore delete mode 100755 dots/.config/ranger/bookmarks delete mode 100755 dots/.config/ranger/colorschemes/__init__.py delete mode 100755 dots/.config/ranger/colorschemes/__init__.pyo delete mode 100644 dots/.config/ranger/colorschemes/__pycache__/__init__.cpython-312.pyc delete mode 100755 dots/.config/ranger/colorschemes/__pycache__/__init__.cpython-37.opt-1.pyc delete mode 100644 dots/.config/ranger/colorschemes/__pycache__/tofu.cpython-312.pyc delete mode 100755 dots/.config/ranger/colorschemes/__pycache__/tofu.cpython-37.opt-1.pyc delete mode 100755 dots/.config/ranger/colorschemes/default.pyo delete mode 100755 dots/.config/ranger/colorschemes/tofu.py delete mode 100755 dots/.config/ranger/colorschemes/tofu.pyo delete mode 100755 dots/.config/ranger/commands.py delete mode 100755 dots/.config/ranger/commands_full.py delete mode 100755 dots/.config/ranger/history delete mode 100755 dots/.config/ranger/rc.conf delete mode 100755 dots/.config/ranger/rifle.conf delete mode 100755 dots/.config/ranger/scope.sh create mode 100755 install.sh create mode 100755 makedir.sh create mode 100644 makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7630dc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# ---> Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +dotfiles/.icons/defaults/index.theme +dotfiles/.icons/default/index.theme +dotfiles/.local/share/fastfetch/ +dotfiles/.local/share/fish/ +dotfiles/.local/state/ +dotfiles/.local/share/nvim/ +dotfiles/.local/share/composer/ +dotfiles/.local/share/zoxide/ +dotfiles/.config/hypr/card +dotfiles/.icons/index.theme +neovide_backtraces.log + +dotfiles/.config/alacritty +dotfiles/.config/ghostty + +dotfiles/.config/gBar +dotfiles/.config/hyprpanel +dotfiles/.config/waybar + +dotfiles/.config/ranger +dotfiles/.config/lf +dotfiles/.config/yazi +dotfiles/.config/nvim +dotfiles/.config/kitty diff --git a/.stow-local-ignore b/.stow-local-ignore new file mode 100644 index 0000000..e647e48 --- /dev/null +++ b/.stow-local-ignore @@ -0,0 +1,6 @@ +\.git +\.gitignore +\.gitmodules +^/README.* +^/LICENCE.* +^/COPYING diff --git a/dots/.config/ranger/bookmarks b/dots/.config/ranger/bookmarks deleted file mode 100755 index d635feb..0000000 --- a/dots/.config/ranger/bookmarks +++ /dev/null @@ -1,8 +0,0 @@ -c:/home/addy/.config -o:/home/addy/.config/openbox -a:/media/addy/Media/anime -m:/media/addy/Media/movie -t:/media/addy/Media/tv-series -s:/media/addy/Media/musik -i:/home/addy/.fonts -':/home/liveuser/.config/i3status diff --git a/dots/.config/ranger/colorschemes/__init__.py b/dots/.config/ranger/colorschemes/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/dots/.config/ranger/colorschemes/__init__.pyo b/dots/.config/ranger/colorschemes/__init__.pyo deleted file mode 100755 index 419385e42390e1a6e1822e4ff8d2d041b0fb95b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137 zcmZSn%*$0LaXmVj0SXv_v;zg`k0(TbPI1v39M8E(ekl_Ht#VkM~g&~+hlhJP_LlHz^pn322=J(#)dGkiU zXR~Pp^3BK3S{n*Ne+dwYHZ!IlfpLN?WJwPCMV5pmJ5ookgDs=ak)<3VOU3e2$RMPy z^t7`6k1)#;m#)E*_zbtquEUzb8HqGArg<<<5Jq*$LUkD{b=8uNP+jZEWrgdT&28Ml zO*sk!t-?@LZ?aZ@g0Y37jr!)Uui0aFIrLX$Zj>z(skTvk@Z#e{@en8f~`j0zU&r(bw0weCRrxh76`C(R)`Tqd>Elv z6P;a%&?fX`XDvdp2F}F@1?RaGp;!awa)biTdW2$4805bi5oGVHOiXqlP_y)on(r-$o9nzU`--o&luelRjdGEQ zq2fxHVxF>Wf}6}EJ+605vWqRQI<~vZ)rQl>e93kVW-|vjOv01f9%ZiC!CY;79uS*7 z)8$ITw75bbFkyx7hie2=%=q#Q8%@vg2<3XiBNirHYdB_eH_UC)-G?^b=USU!?D7oM zqs(MoDhe*`VbZZFwLO>eM8|AnmziK-O2LLt^c;)pJ?uE%ep%xx#ZHSSnx4z>myFA; zHkTW1u9}PyD*h-g3VCz0y6tsv)v+I9=m4o!AfRQptHgBM0K<xEbseMp|L4XP@i&k)9tXmXG~If0AB4sEt#(Z%bd5Ch6=!?eA1>@F~!b z?;YNoqzk7?L4f;*_b18hT%H&eM_Mt+S{&)cv#cxgSqC*B9D9e}Ya4Nq)g(IVlvd)u+Atu2vc-k;Jp4D}PoiU6DUDFA7ND;Vv zb&q&(x0D)iqv0e3-TWC5@g&I=v50mCix^Crh2;p1^QBYi+*Dqd^C44^Hp(i`g%?$6 zcWt;jm@HnJdFHRKG8?{N*24nVMU}InZ<2Sy@BV~{7bpIm=?Ad9QY1;5ptV0y^|g9c N$`8Nz7l8@_{{#HRn{E7%J*%vSLgnvQ?!5?Ik0kw1=q4io$<0?0aGu|$S${~v0MUW(< zf`m+ZAs1AzD-!y`Lr2^OC&{TSWa9X4`6w=_S19@yf+64Nf-LBF_TF2vrMKh@dd6T6 z(bEpO-ZTD^p%%a~Vhi3Nw&BohEZK##bl})*E?LP6C__^Tb@msRwW*0gAnsak!b6mFY7JTX|rQ^X9 z!0r?4Ra)8&k%3H%g1HTf7-mvfo@eFE@=0DvyP1`d$xJRMG1&I0(x!|HX?dy?5|epc zT5l2y>j7SDiKhS72dSm8TdRGPs9b@z!9;r9o}wu(5FrHN6ITBD9Bs$AG$F7sSn4t&eC%%`@MsM5$!#_AxE(g^U)BQ(<~i9T&5C6O_uc(=#f#=YIr^eHwFQUK0qL}&-#?J zfZlz~?bhY?gx8$*3OW1SX$EYFT^|nu+m0gF$|$m(C@Pewa;JBr=%R}A<^*;yWY|9k zh0W1A!j?3xth1`?S%c?D1~;)zw1YO~w6=_KzPFnyhiR2z-S{5i)0Jht?&0dm>Itdu Vu0?PS1Q*7(51Nc$(EqWz>>u^b2tNP- diff --git a/dots/.config/ranger/colorschemes/default.pyo b/dots/.config/ranger/colorschemes/default.pyo deleted file mode 100755 index 6e77a6c047da8062764f11515f54f205d4b14f19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1323 zcmb_b&2G~`5T3Q&v<)dOrBG1CJ#a`=smBUY;9R7H3jxV;?2YTj_O`ndN>D0Q3J<_D z@C>{QyhOS105CIl+T6j(&VD;TJHPAy-e~@M`r~~J_2<+6f|ffVlF(m44)B(d2f2d6 zgMkMs@j-hqQji4j1z-;FZs0?*0{wP_46{GG|3TJs~?}}Lf^P% z&6l*?E)fkdQ0#-R1@06Q10Rj{80tbx^l>#TErC7dSME5JK7=X?&>TDoBa>{r0M z&}XNcV7~!wEs5`e{SLUj#JLalK(X=;*z1MMpMVdx3VhieRY1IIAsrJK9G3iQ|Gt=$L+^Ndkm4wJ8_zlr|xG~$7t+S zI#)z?tP>1KkZ0vsz%ZX^stPr~3^Bu84aN;;F zj`K|0B6BV?r4z?Rl#*&xVeK3ptHey6h{LJQb92#Vhazw~ABlEsO4Oeac`iq(Y{OJk zB1GFJE(me^gt{lD(A_9Wrri!1jrn4QjZm)z_~~X7otj*W3OE|wzu7#P=ZpaQg{HK zfoI@hIPwBL@c=M0cG{f5$uLZ^!HDEB5iz1H<)@X6CZ)v$>@)6Jf^rR8v)``DK6^=6W1j+@SNBaae|h7OT{l$}gIQr67#MSawSn z@`S|ogm8ncCU`35oivC{Zmg3a#>U3lQu_eLc^FOZz(Y6rl<6zcq*m*a8YE#k3~}l> zE{^j;+ahx=Go=&YB239Nta$Al9jnAl9t+@1=efD+GN34&&J(eYOo{q4BF|-#$~I2L zBt*1bl7bM|Bd&jD3f&Lmc-HTcW0IwP8" in ranger! -class my_edit(Command): - # The so-called doc-string of the class will be visible in the built-in - # help that is accessible by typing "?c" inside ranger. - """:my_edit - - A sample command for demonstration purposes that opens a file in an editor. - """ - - # The execute method is called when you run this command in ranger. - def execute(self): - # self.arg(1) is the first (space-separated) argument to the function. - # This way you can write ":my_edit somefilename". - if self.arg(1): - # self.rest(1) contains self.arg(1) and everything that follows - target_filename = self.rest(1) - else: - # self.fm is a ranger.core.filemanager.FileManager object and gives - # you access to internals of ranger. - # self.fm.thisfile is a ranger.container.file.File object and is a - # reference to the currently selected file. - target_filename = self.fm.thisfile.path - - # This is a generic function to print text in ranger. - self.fm.notify("Let's edit the file " + target_filename + "!") - - # Using bad=True in fm.notify allows you to print error messages: - if not os.path.exists(target_filename): - self.fm.notify("The given file does not exist!", bad=True) - return - - # This executes a function from ranger.core.acitons, a module with a - # variety of subroutines that can help you construct commands. - # Check out the source, or run "pydoc ranger.core.actions" for a list. - self.fm.edit_file(target_filename) - - # The tab method is called when you press tab, and should return a list of - # suggestions that the user will tab through. - # tabnum is 1 for and -1 for by default - def tab(self, tabnum): - # This is a generic tab-completion function that iterates through the - # content of the current directory. - return self._tab_directory_content() diff --git a/dots/.config/ranger/commands_full.py b/dots/.config/ranger/commands_full.py deleted file mode 100755 index d177203..0000000 --- a/dots/.config/ranger/commands_full.py +++ /dev/null @@ -1,1836 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of ranger, the console file manager. -# This configuration file is licensed under the same terms as ranger. -# =================================================================== -# -# NOTE: If you copied this file to /etc/ranger/commands_full.py or -# ~/.config/ranger/commands_full.py, then it will NOT be loaded by ranger, -# and only serve as a reference. -# -# =================================================================== -# This file contains ranger's commands. -# It's all in python; lines beginning with # are comments. -# -# Note that additional commands are automatically generated from the methods -# of the class ranger.core.actions.Actions. -# -# You can customize commands in the files /etc/ranger/commands.py (system-wide) -# and ~/.config/ranger/commands.py (per user). -# They have the same syntax as this file. In fact, you can just copy this -# file to ~/.config/ranger/commands_full.py with -# `ranger --copy-config=commands_full' and make your modifications, don't -# forget to rename it to commands.py. You can also use -# `ranger --copy-config=commands' to copy a short sample commands.py that -# has everything you need to get started. -# But make sure you update your configs when you update ranger. -# -# =================================================================== -# Every class defined here which is a subclass of `Command' will be used as a -# command in ranger. Several methods are defined to interface with ranger: -# execute(): called when the command is executed. -# cancel(): called when closing the console. -# tab(tabnum): called when is pressed. -# quick(): called after each keypress. -# -# tab() argument tabnum is 1 for and -1 for by default -# -# The return values for tab() can be either: -# None: There is no tab completion -# A string: Change the console to this string -# A list/tuple/generator: cycle through every item in it -# -# The return value for quick() can be: -# False: Nothing happens -# True: Execute the command afterwards -# -# The return value for execute() and cancel() doesn't matter. -# -# =================================================================== -# Commands have certain attributes and methods that facilitate parsing of -# the arguments: -# -# self.line: The whole line that was written in the console. -# self.args: A list of all (space-separated) arguments to the command. -# self.quantifier: If this command was mapped to the key "X" and -# the user pressed 6X, self.quantifier will be 6. -# self.arg(n): The n-th argument, or an empty string if it doesn't exist. -# self.rest(n): The n-th argument plus everything that followed. For example, -# if the command was "search foo bar a b c", rest(2) will be "bar a b c" -# self.start(n): Anything before the n-th argument. For example, if the -# command was "search foo bar a b c", start(2) will be "search foo" -# -# =================================================================== -# And this is a little reference for common ranger functions and objects: -# -# self.fm: A reference to the "fm" object which contains most information -# about ranger. -# self.fm.notify(string): Print the given string on the screen. -# self.fm.notify(string, bad=True): Print the given string in RED. -# self.fm.reload_cwd(): Reload the current working directory. -# self.fm.thisdir: The current working directory. (A File object.) -# self.fm.thisfile: The current file. (A File object too.) -# self.fm.thistab.get_selection(): A list of all selected files. -# self.fm.execute_console(string): Execute the string as a ranger command. -# self.fm.open_console(string): Open the console with the given string -# already typed in for you. -# self.fm.move(direction): Moves the cursor in the given direction, which -# can be something like down=3, up=5, right=1, left=1, to=6, ... -# -# File objects (for example self.fm.thisfile) have these useful attributes and -# methods: -# -# tfile.path: The path to the file. -# tfile.basename: The base name only. -# tfile.load_content(): Force a loading of the directories content (which -# obviously works with directories only) -# tfile.is_directory: True/False depending on whether it's a directory. -# -# For advanced commands it is unavoidable to dive a bit into the source code -# of ranger. -# =================================================================== - -from __future__ import (absolute_import, division, print_function) - -from collections import deque -import os -import re - -from ranger.api.commands import Command - - -class alias(Command): - """:alias - - Copies the oldcommand as newcommand. - """ - - context = 'browser' - resolve_macros = False - - def execute(self): - if not self.arg(1) or not self.arg(2): - self.fm.notify('Syntax: alias ', bad=True) - return - - self.fm.commands.alias(self.arg(1), self.rest(2)) - - -class echo(Command): - """:echo - - Display the text in the statusbar. - """ - - def execute(self): - self.fm.notify(self.rest(1)) - - -class cd(Command): - """:cd [-r] - - The cd command changes the directory. - If the path is a file, selects that file. - The command 'cd -' is equivalent to typing ``. - Using the option "-r" will get you to the real path. - """ - - def execute(self): - if self.arg(1) == '-r': - self.shift() - destination = os.path.realpath(self.rest(1)) - if os.path.isfile(destination): - self.fm.select_file(destination) - return - else: - destination = self.rest(1) - - if not destination: - destination = '~' - - if destination == '-': - self.fm.enter_bookmark('`') - else: - self.fm.cd(destination) - - def _tab_args(self): - # dest must be rest because path could contain spaces - if self.arg(1) == '-r': - start = self.start(2) - dest = self.rest(2) - else: - start = self.start(1) - dest = self.rest(1) - - if dest: - head, tail = os.path.split(os.path.expanduser(dest)) - if head: - dest_exp = os.path.join(os.path.normpath(head), tail) - else: - dest_exp = tail - else: - dest_exp = '' - return (start, dest_exp, os.path.join(self.fm.thisdir.path, dest_exp), - dest.endswith(os.path.sep)) - - @staticmethod - def _tab_paths(dest, dest_abs, ends_with_sep): - if not dest: - try: - return next(os.walk(dest_abs))[1], dest_abs - except (OSError, StopIteration): - return [], '' - - if ends_with_sep: - try: - return [os.path.join(dest, path) for path in next(os.walk(dest_abs))[1]], '' - except (OSError, StopIteration): - return [], '' - - return None, None - - def _tab_match(self, path_user, path_file): - if self.fm.settings.cd_tab_case == 'insensitive': - path_user = path_user.lower() - path_file = path_file.lower() - elif self.fm.settings.cd_tab_case == 'smart' and path_user.islower(): - path_file = path_file.lower() - return path_file.startswith(path_user) - - def _tab_normal(self, dest, dest_abs): - dest_dir = os.path.dirname(dest) - dest_base = os.path.basename(dest) - - try: - dirnames = next(os.walk(os.path.dirname(dest_abs)))[1] - except (OSError, StopIteration): - return [], '' - - return [os.path.join(dest_dir, d) for d in dirnames if self._tab_match(dest_base, d)], '' - - def _tab_fuzzy_match(self, basepath, tokens): - """ Find directories matching tokens recursively """ - if not tokens: - tokens = [''] - paths = [basepath] - while True: - token = tokens.pop() - matches = [] - for path in paths: - try: - directories = next(os.walk(path))[1] - except (OSError, StopIteration): - continue - matches += [os.path.join(path, d) for d in directories - if self._tab_match(token, d)] - if not tokens or not matches: - return matches - paths = matches - - return None - - def _tab_fuzzy(self, dest, dest_abs): - tokens = [] - basepath = dest_abs - while True: - basepath_old = basepath - basepath, token = os.path.split(basepath) - if basepath == basepath_old: - break - if os.path.isdir(basepath_old) and not token.startswith('.'): - basepath = basepath_old - break - tokens.append(token) - - 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] - else: - paths_rel = '' - return paths, paths_rel - - def tab(self, tabnum): - from os.path import sep - - start, dest, dest_abs, ends_with_sep = self._tab_args() - - paths, paths_rel = self._tab_paths(dest, dest_abs, ends_with_sep) - if paths is None: - if self.fm.settings.cd_tab_fuzzy: - paths, paths_rel = self._tab_fuzzy(dest, dest_abs) - else: - paths, paths_rel = self._tab_normal(dest, dest_abs) - - paths.sort() - - if self.fm.settings.cd_bookmarks: - paths[0:0] = [ - os.path.relpath(v.path, paths_rel) if paths_rel else v.path - for v in self.fm.bookmarks.dct.values() for path in paths - if v.path.startswith(os.path.join(paths_rel, path) + sep) - ] - - if not paths: - return None - if len(paths) == 1: - return start + paths[0] + sep - return [start + dirname for dirname in paths] - - -class chain(Command): - """:chain ; ; ... - - Calls multiple commands at once, separated by semicolons. - """ - - def execute(self): - if not self.rest(1).strip(): - self.fm.notify('Syntax: chain ; ; ...', bad=True) - return - for command in [s.strip() for s in self.rest(1).split(";")]: - self.fm.execute_console(command) - - -class shell(Command): - escape_macros_for_shell = True - - def execute(self): - if self.arg(1) and self.arg(1)[0] == '-': - flags = self.arg(1)[1:] - command = self.rest(2) - else: - flags = '' - command = self.rest(1) - - if command: - self.fm.execute_command(command, flags=flags) - - def tab(self, tabnum): - from ranger.ext.get_executables import get_executables - if self.arg(1) and self.arg(1)[0] == '-': - command = self.rest(2) - else: - command = self.rest(1) - start = self.line[0:len(self.line) - len(command)] - - try: - position_of_last_space = command.rindex(" ") - except ValueError: - return (start + program + ' ' for program - in get_executables() if program.startswith(command)) - if position_of_last_space == len(command) - 1: - selection = self.fm.thistab.get_selection() - if len(selection) == 1: - return self.line + selection[0].shell_escaped_basename + ' ' - return self.line + '%s ' - - before_word, start_of_word = self.line.rsplit(' ', 1) - return (before_word + ' ' + file.shell_escaped_basename - for file in self.fm.thisdir.files or [] - if file.shell_escaped_basename.startswith(start_of_word)) - - -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()], - app=app, - flags=flags, - mode=mode) - - def tab(self, tabnum): - return self._tab_through_executables() - - def _get_app_flags_mode(self, string): # pylint: disable=too-many-branches,too-many-statements - """Extracts the application, flags and mode from a string. - - examples: - "mplayer f 1" => ("mplayer", "f", 1) - "atool 4" => ("atool", "", 4) - "p" => ("", "p", 0) - "" => None - """ - - app = '' - flags = '' - mode = 0 - split = string.split() - - if len(split) == 1: - part = split[0] - if self._is_app(part): - app = part - elif self._is_flags(part): - flags = part - elif self._is_mode(part): - mode = part - - elif len(split) == 2: - part0 = split[0] - part1 = split[1] - - if self._is_app(part0): - app = part0 - if self._is_flags(part1): - flags = part1 - elif self._is_mode(part1): - mode = part1 - elif self._is_flags(part0): - flags = part0 - if self._is_mode(part1): - mode = part1 - elif self._is_mode(part0): - mode = part0 - if self._is_flags(part1): - flags = part1 - - elif len(split) >= 3: - part0 = split[0] - part1 = split[1] - part2 = split[2] - - if self._is_app(part0): - app = part0 - if self._is_flags(part1): - flags = part1 - if self._is_mode(part2): - mode = part2 - elif self._is_mode(part1): - mode = part1 - if self._is_flags(part2): - flags = part2 - elif self._is_flags(part0): - flags = part0 - if self._is_mode(part1): - mode = part1 - elif self._is_mode(part0): - mode = part0 - if self._is_flags(part1): - flags = part1 - - return app, flags, int(mode) - - def _is_app(self, arg): - return not self._is_flags(arg) and not arg.isdigit() - - @staticmethod - def _is_flags(arg): - from ranger.core.runner import ALLOWED_FLAGS - return all(x in ALLOWED_FLAGS for x in arg) - - @staticmethod - def _is_mode(arg): - return all(x in '0123456789' for x in arg) - - -class set_(Command): - """:set