use pywal to color alacritty and vim

This commit is contained in:
2024-05-15 22:27:50 +02:00
parent ebe7002e78
commit bfda0a9e27
41 changed files with 1532 additions and 658 deletions

View File

@@ -1,11 +1,13 @@
from ranger.api.commands import Command
class paste_as_root(Command):
def execute(self):
if self.fm.do_cut:
self.fm.execute_console('shell sudo mv %c .')
else:
self.fm.execute_console('shell sudo cp -r %c .')
def execute(self):
if self.fm.do_cut:
self.fm.execute_console("shell sudo mv %c .")
else:
self.fm.execute_console("shell sudo cp -r %c .")
class fzf_select(Command):
"""
@@ -17,22 +19,26 @@ class fzf_select(Command):
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
import os.path
if self.quantifier:
# match only directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
command = "find -L . ( -path '*/.*' -o -fstype 'dev' -o -fstype 'proc' ) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse --header='Jump to file'"
else:
# match files and directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
command = "find -L . ( -path '*/.*' -o -fstype 'dev' -o -fstype 'proc' ) -prune \
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse --header='Jump to filemap <C-f> fzf_select'"
fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE)
fzf = self.fm.execute_command(
command, universal_newlines=True, stdout=subprocess.PIPE
)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.rstrip('\n'))
fzf_file = os.path.abspath(stdout.rstrip("\n"))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
self.fm.select_file(fzf_file)

View File

@@ -1,4 +1,3 @@
#!/bin/sh
export RANGERCD=true
$TERM

View File

@@ -97,7 +97,7 @@ set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default:
# default, jungle, snow, solarized
set colorscheme default
#set colorscheme default
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
@@ -116,7 +116,7 @@ set status_bar_on_top false
set draw_progress_bar_in_status_bar true
# Draw borders around columns?
set draw_borders true
set draw_borders false
# Display the directory name in tabs?
set dirname_in_tabs false