Everything I'm using now

This commit is contained in:
pancakes 2024-11-29 00:21:54 +10:00
parent 8ee54322bb
commit d5dba5bf0c
No known key found for this signature in database
GPG key ID: ED53D426432B861B
46 changed files with 1119 additions and 4108 deletions

View file

@ -1,248 +0,0 @@
#? Config file for btop v. 1.3.2
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
color_theme = "/usr/share/btop/themes/tokyo-night.theme"
#* If the theme set background should be shown, set to False if you want terminal background transparency.
theme_background = False
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor = True
#* Set to true to force tty mode regardless if a real tty has been detected or not.
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = False
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
#* Use whitespace " " as separator between different presets.
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = True
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = False
#* Default symbols to use for graph creation, "braille", "block" or "tty".
#* "braille" offers the highest resolution but might not be included in all fonts.
#* "block" has half the resolution of braille but uses more common characters.
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
graph_symbol = "braille"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = "default"
# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty".
graph_symbol_gpu = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_net = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
shown_boxes = "cpu mem proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 2000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False.
proc_reversed = False
#* Show processes as a tree.
proc_tree = False
#* Use the cpu graph colors in the process list.
proc_colors = True
#* Use a darkening gradient in the process list.
proc_gradient = True
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = False
#* Show process memory as bytes instead of percent.
proc_mem_bytes = True
#* Show cpu graph for each process.
proc_cpu_graphs = True
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
proc_info_smaps = False
#* Show proc box on left side of screen instead of right.
proc_left = False
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = False
#* In tree-view, always accumulate child process resources in the parent process.
proc_aggregate = False
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "Auto"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "Auto"
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
show_gpu_info = "Auto"
#* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = True
#* Set to True to completely disable the lower CPU graph.
cpu_single_graph = False
#* Show cpu box at bottom of screen instead of top.
cpu_bottom = False
#* Shows the system uptime in the CPU box.
show_uptime = True
#* Show cpu temperature.
check_temp = True
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor = "Auto"
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
show_coretemp = True
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
#* Example: "4:0 5:1 6:3"
cpu_core_map = ""
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
temp_scale = "celsius"
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
base_10_sizes = False
#* Show CPU frequency.
show_cpu_freq = True
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
clock_format = "%X"
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
background_update = True
#* Custom cpu model name, empty string to disable.
custom_cpu_name = ""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
disks_filter = ""
#* Show graphs instead of meters for memory values.
mem_graphs = True
#* Show mem box below net box instead of above.
mem_below_net = False
#* Count ZFS ARC in cached and available memory.
zfs_arc_cached = True
#* If swap memory should be shown in memory box.
show_swap = True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True
#* If mem box should be split to also show disks info.
show_disks = True
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = True
#* Read disks list from /etc/fstab. This also disables only_physical.
use_fstab = True
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
zfs_hide_datasets = False
#* Set to true to show available disk space for privileged users.
disk_free_priv = False
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
#* Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = ""
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 100
net_upload = 100
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = True
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = True
#* Starts with the Network Interface specified here.
net_iface = ""
#* Show battery stats in top right if battery is present.
show_battery = True
#* Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = "Auto"
#* Show power stats of battery next to charge indicator.
show_battery_watts = True
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING"
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
nvml_measure_pcie_speeds = True
#* Horizontally mirror the GPU graph.
gpu_mirror_graph = True
#* Custom gpu0 model name, empty string to disable.
custom_gpu_name0 = ""
#* Custom gpu1 model name, empty string to disable.
custom_gpu_name1 = ""
#* Custom gpu2 model name, empty string to disable.
custom_gpu_name2 = ""
#* Custom gpu3 model name, empty string to disable.
custom_gpu_name3 = ""
#* Custom gpu4 model name, empty string to disable.
custom_gpu_name4 = ""
#* Custom gpu5 model name, empty string to disable.
custom_gpu_name5 = ""

View file

@ -34,5 +34,10 @@
"window.restoreWindows": "one",
"window.zoomLevel": 2,
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "none"
"workbench.startupEditor": "none",
"svelte.enable-ts-plugin": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"workbench.colorTheme": "Tokyo Night"
}

View file

@ -0,0 +1,35 @@
[main]
font=FiraCode Nerd Font:size=13
box-drawings-uses-font-glyphs=yes
[environment]
RANGER_LOAD_DEFAULT_RC="FALSE"
[bell]
urgent=yes
notify=yes
visual=yes
[mouse]
hide-when-typing=yes
[colors]
foreground=a9b1d6
background=1a1b26
regular0=32344a
regular1=f7768e
regular2=9ece6a
regular3=e0af68
regular4=7aa2f7
regular5=ad8ee6
regular6=449dab
regular7=787c99
bright0=444b6a
bright1=ff7a93
bright2=b9f27c
bright3=ff9e64
bright4=7da6ff
bright5=bb9af7
bright6=0db9d7
bright7=acb0d0
alpha=0.9

View file

@ -1,21 +0,0 @@
font=Noto Sans:size=14
prompt=":3 "
icon-theme=Adwaita
show-actions=yes
terminal=alacritty -e
horizontal-pad=8
vertical-pad=8
inner-pad=8
[colors]
background=1a1b26e6
text=c0caf5ff
match=bb9af7ff
selection=bb9af7ff
selection-text=1a1b26e6
selection-match=c0caf5ff
border=414868ff
[border]
width=2
radius=0

View file

@ -1,2 +0,0 @@
[Settings]
gtk-application-prefer-dark-theme = true

181
justfile
View file

@ -4,121 +4,110 @@ username := env_var('USER')
default:
@just --list --justfile {{justfile()}}
install-codecs:
sudo pacman -S gst-libav gst-plugin-va gst-plugins-bad gst-plugins-base gst-plugins-good gstreamer
# Install C# dev environment
install-dev-csharp:
sudo pacman -S aspnet-runtime aspnet-targeting-pack dotnet-sdk dotnet-runtime dotnet-targeting-pack
sudo dotnet workload install wasm-tools
install-dev-node:
sudo pacman -S nodejs npm
install-dev-python:
sudo pacman -S python python-pip
# Install Rust dev environment
install-dev-rust:
sudo pacman -S rustup
rustup install stable
# Install Docker and docker-compose
install-docker:
sudo pacman -S docker docker-compose
sudo systemctl enable docker.socket
install-essentials-cli:
sudo pacman -S base-devel btop curl eza fastfetch ffmpeg flatpak fwupd fzf hunspell hunspell-en_au hunspell-en_us man-db man-pages nvtop openssh p7zip reflector ripgrep unrar vim vulkan-tools xdg-user-dirs yt-dlp
install-essentials-gui:
sudo pacman -S audacity blue-utils code easyeffects firefox freerdp2 gamemode gimp goverlay kate kdeconnect libva-vdpau-driver libva-utils libvdpau-va-gl lsp-plugins-lv2 mangohud mesa-vdpau mpv power-profiles-daemon steam syncthing ttf-firacode-nerd ttf-liberation wine wine-gecko wine-mono winetricks wqy-zenhei
ame install arrpc protontricks vesktop
flatpak install ca.parallel_launcher.ParallelLauncher com.heroicgameslauncher.hgl com.logseq.Logseq com.obsproject.Studio net.davidotek.pupgui2 org.prismlauncher.PrismLauncher
systemctl enable --now --user arrpc
sudo systemctl enable --now bluetooth
sudo systemctl enable --now power-profiles-daemon
systemctl enable --now --user syncthing
# Install fish and plugin manager
install-fish:
sudo pacman -S fish pkgfile
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
# Setup reflector and enable timer
setup-arch-mirrors:
# Arch Linux package mirrors & timer for fetching best mirrors
arch-mirrors:
sudo reflector --country 'Australia,New Zealand,' --latest 15 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
sudo systemctl enable --now reflector.timer
# Installs the ame AUR helper
setup-aur:
# Arch User Repository
aur:
rustup install stable
rm -rf /tmp/ame
git clone https://aur.archlinux.org/ame.git /tmp/ame
cd /tmp/ame; makepkg -si
rm -rf /tmp/ame
rm -rf /tmp/paru-git
git clone https://aur.archlinux.org/paru-git.git /tmp/paru-git
cd /tmp/paru-git; makepkg -si
rm -rf /tmp/paru-git
# Installs VSCodium extensions
setup-code:
code-oss --install-extension davidanson.vscode-markdownlint
code-oss --install-extension irongeek.vscode-env
code-oss --install-extension kokakiwi.vscode-just
code-oss --install-extension ms-vscode.live-server
code-oss --install-extension naumovs.color-highlight
code-oss --install-extension pkief.material-icon-theme
code-oss --install-extension redhat.vscode-yaml
code-oss --install-extension rust-lang.rust-analyzer
code-oss --install-extension serayuzgur.crates
code-oss --install-extension spgoding.datapack-language-server
code-oss --install-extension tamasfe.even-better-toml
code-oss --install-extension usernamehw.errorlens
# Essential CLI tools & utils
cli:
sudo pacman -S base-devel btop curl eza fastfetch ffmpeg fwupd fzf man-db man-pages nvtop openssh reflector ripgrep unrar vim vulkan-tools xdg-user-dirs yt-dlp
setup-flatpak:
# ranger terminal file browser
cli-ranger:
sudo pacman -S atool ffmpegthumbnailer highlight mediainfo p7zip transmission-cli unzip w3m zip
paru -S ranger-git
pipx install no_vtf python-bidi
stow --dotfiles -S ranger
codecs:
sudo pacman -S gst-libav gst-plugin-va gst-plugins-bad gst-plugins-base gst-plugins-good gstreamer
# C#/.NET dev environment & Rider editor
dev-csharp:
sudo pacman -S aspnet-runtime aspnet-targeting-pack dotnet-sdk dotnet-runtime dotnet-targeting-pack
sudo dotnet workload install wasm-tools
paru -S rider
# Node dev environment
dev-node:
sudo pacman -S nodejs npm
# Python dev environment & PyCharm editor
dev-python:
sudo pacman -S pycharm-community-edition python python-pip python-pipx python-venv
fish -c "fish_add_path $HOME/.local/bin"
# Rust dev environment
dev-rust:
sudo pacman -S rustup
rustup install stable
# Docker container runtime
docker:
sudo pacman -S docker docker-compose
sudo systemctl enable --now docker
# Flatpak & Flathub package repository
flatpak:
sudo pacman -S flatpak flatpak-xdg-utils
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Set up git global config. Still need to manually set user.signingkey
setup-git:
# foot terminal emulator
foot:
sudo pacman -S foot foot-terminfo
stow --dotfiles -S foot
# Steam, Heroic, Prism Launcher, Gamescope, MangoHud & other utils
games:
sudo pacman -S gamemode gamescope goverlay mangohud steam ttf-liberation wine wine-gecko wine-mono winetricks wqy-zenhei
paru -S protontricks
flatpak install ca.parallel_launcher.ParallelLauncher com.heroicgameslauncher.hgl net.davidotek.pupgui2 org.prismlauncher.PrismLauncher
# git global config
git:
git config --global commit.gpgsign true
git config --global init.defaultBranch "main"
git config --global user.email "trypancakes@tutanota.com"
git config --global user.name "pancakes"
# Installs mpv scripts
setup-mpv:
mkdir -p ~/.config/mpv/scripts
curl https://raw.githubusercontent.com/mpv-player/mpv/master/TOOLS/lua/autodeint.lua -o ~/.config/mpv/scripts/autodeint.lua
curl https://raw.githubusercontent.com/po5/thumbfast/master/thumbfast.lua -o ~/.config/mpv/scripts/thumbfast.lua
curl -fsSL https://raw.githubusercontent.com/tomasklaen/uosc/HEAD/installers/unix.sh | bash
# Syncthing file sync
syncthing:
sudo pacman -S syncthing
systemctl enable --now --user syncthing
# Configure fish and plugins
setup-shell:
chsh -s /usr/bin/fish
fish -c "set -U fish_greeting"
fish -c "set -U MOZ_ENABLE_WAYLAND 1"
fish -c "set -U MOZ_USE_XINPUT2 1"
fish -c "set -U VISUAL vim"
fish -c "curl -sL https://raw.githubusercontent.com/folke/tokyonight.nvim/main/extras/fish/tokyonight_night.fish | source"
fish -c "fisher install franciscolourenco/done"
fish -c "fisher install jorgebucaran/autopair.fish"
fish -c "fisher install jorgebucaran/hydro"
fish -c "fisher install meaningful-ooo/sponge"
fish -c "fisher install nickeb96/puffer-fish"
# Enable and authenticate with Tailscale
setup-tailscale:
# Tailscale private VPN
tailscale:
sudo pacman -S tailscale
sudo systemctl enable --now tailscaled
sudo tailscale up --operator={{username}} --ssh=true
# Installs Waydroid with GAPPS
setup-waydroid:
# Waydroid Android emulator with Google Apps
waydroid:
ame install binder_linux-dkms waydroid
sudo waydroid init -s GAPPS
sudo systemctl enable --now waydroid-container
waydroid session start &
# Stows all dotfiles into the correct locations
stow:
stow btop
stow code
stow mangohud
stow mpv
# window manager and required programs
wm:
sudo pacman -S bluez bluez-utils cliphist easyeffects firefox fuzzel gdm gnome-keyring gtklock hunspell hunspell-en_au hunspell-en_us mako niri noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra power-profiles-daemon swayidle swww ttf-firacode-nerd ttf-font-awesome waybar wl-clipboard xdg-desktop-portal-gnome
paru -S xwayland-satellite
flatpak install it.mijorus.smile
sudo systemctl enable --now bluetooth
sudo systemctl enable gdm
sudo systemctl enable --now power-profiles-daemon
stow --dotfiles -S wm

View file

@ -1,33 +0,0 @@
profile amida {
output "AOC 27G2G4 GYGL9HA232568" {
adaptive_sync on
mode 1920x1080@144Hz
}
exec pkill swaybg; riverctl spawn "swaybg -i ~/.wallpaper -m fill"
}
profile amida2 {
output "AOC 27G2G4 GYGL9HA232568" {
adaptive_sync on
mode 1920x1080@144Hz
position 1080,350
}
output "AOC 2470W GGJH9HA056165" {
adaptive_sync off
mode 1920x1080@60Hz
position 0,0
transform 90
}
exec pkill swaybg; riverctl spawn "swaybg -i ~/.wallpaper -m fill"
}
profile vlam {
output eDP-1 {
scale 1.5
}
exec pkill swaybg; riverctl spawn "swaybg -i ~/.wallpaper -m fill"
}

View file

@ -1,45 +0,0 @@
# vim:ft=kitty
## name: Tokyo Night
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_night.conf
background #1a1b26
foreground #c0caf5
selection_background #33467C
selection_foreground #c0caf5
url_color #73daca
cursor #c0caf5
# Tabs
active_tab_background #7aa2f7
active_tab_foreground #1f2335
inactive_tab_background #292e42
inactive_tab_foreground #545c7e
#tab_bar_background #15161E
# normal
color0 #15161E
color1 #f7768e
color2 #9ece6a
color3 #e0af68
color4 #7aa2f7
color5 #bb9af7
color6 #7dcfff
color7 #a9b1d6
# bright
color8 #414868
color9 #f7768e
color10 #9ece6a
color11 #e0af68
color12 #7aa2f7
color13 #bb9af7
color14 #7dcfff
color15 #c0caf5
# extended colors
color16 #ff9e64
color17 #db4b4b

File diff suppressed because it is too large Load diff

View file

@ -1,219 +0,0 @@
# interpreter for shell commands
set shell sh
# set '-eu' options for shell commands
# These options are used to have safer shell commands. Option '-e' is used to
# exit on error and option '-u' is used to give error for unset variables.
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
# $fx variables contain names with '*' or '?' characters. However, this option
# is used selectively within individual commands as it can be limiting at
# times.
set shellopts '-eu'
# set internal field separator (IFS) to "\n" for shell commands
# This is useful to automatically split file names in $fs and $fx properly
# since default file separator used in these variables (i.e. 'filesep' option)
# is newline. You need to consider the values of these options and create your
# commands accordingly.
set ifs "\n"
# leave some space at the top and the bottom of the screen
set scrolloff 10
# Use the `dim` attribute instead of underline for the cursor in the preview pane
set cursorpreviewfmt "\033[7;2m"
# Image previews
set cleaner ~/.config/lf/scripts/lf_kitty_clean
set previewer ~/.config/lf/scripts/lf_kitty_preview
# automatic refresh
set period 1
# file and dir size
set info size
set dircounts
# remap goto top and bottom
map J bottom
map gg
map K top
# cool dirs and shit
map gc cd ~/Projects
map gC cd ~/config
map gd cd ~/Documents
map gD cd ~/Downloads
# games
map gge cd ~/Emulation
map ggm cd ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances
map ggs cd ~/.local/share/Steam/steamapps/common
# music
map gm cd ~/Music
# pictures
map gps cd ~/Pictures/Screenshots
map gpp cd ~/Pictures
map gpw cd ~/Pictures/Wallpapers
# videos
map gvr cd ~/Videos/Recording
map gvv cd ~/Videos
# use enter for shell commands
map <enter> shell
# show the result of execution of previous commands
map ` !true
# execute current file (must be executable)
map x $$f
map X !$f
# dedicated keys for file opener actions
map o &mimeopen $f
map O $mimeopen --ask $f
# define a custom 'open' command
# This command is called when current file is not a directory. You may want to
# use either file extensions and/or mime types here. Below uses an editor for
# text files and a file opener for the rest.
cmd open &{{
case $(file --mime-type -Lb $f) in
text/*) lf -remote "send $id \$$EDITOR \$fx";;
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
esac
}}
# mkdir command. See wiki if you want it to select created dir
map a :push %mkdir<space>
# define a custom 'rename' command without prompt for overwrite
# cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
# map r push :rename<space>
# make sure trash folder exists
# %mkdir -p ~/.trash
# move current file or selected files to trash folder
cmd trash %trash-put $fx
# use '<delete>' key for either 'trash' or 'delete' command
map <delete> trash
map D trash
# map <delete> delete
# extract the current file with the right command
# (xkcd link: https://xkcd.com/1168/)
cmd extract ${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}
# compress current file or selected files with tar and gunzip
cmd tar ${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}
# compress current file or selected files with zip
cmd zip ${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}
# use eza instead of ls for file info
cmd on-select &{{
lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f")\""
}}
cmd on-cd &{{
# display repository status in your prompt
if [ -d .git ] || [ -f .git ]; then
branch=$(git branch --show-current 2>/dev/null) || true
remote=$(git config --get branch.$branch.remote 2>/dev/null) || true
url=$(git remote get-url $remote 2>/dev/null) || true
fmt="\033[32;1m%u@%h\033[0m:\033[34;1m%w\033[0m\033[33;1m [GIT BRANCH:> $branch >> $url]\033[0m"
elif [ -d .hg ]; then
hg=$(hg branch 2>/dev/null) || true
fmt="\033[32;1m%u@%h\033[0m:\033[34;1m%w\033[0m\033[33;1m [HG BRANCH:> $hg]\033[0m"
elif [ -d .svn ]; then
svn=$(svn info 2>/dev/null | awk '/^URL: /{print $2}') || true
fmt="\033[32;1m%u@%h\033[0m:\033[34;1m%w\033[0m\033[33;1m [SVN URL:> $svn]\033[0m"
else
fmt="\033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m"
fi
lf -remote "send $id set promptfmt \"$fmt\""
# update terminal name
printf "\033]0; ${PWD/#$HOME/\~}\007" > /dev/tty
}}
on-cd
# search all files for text
cmd fzf_search ${{
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
res="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX ''" \
fzf --bind "change:reload:$RG_PREFIX {q} || true" \
--ansi --layout=reverse --header 'Search in files' \
| cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g'
)"
[ -n "$res" ] && lf -remote "send $id select \"$res\""
}}
map ? :fzf_search
# Use rsync for paste
cmd paste &{{
set -- $(cat ~/.local/share/lf/files)
mode="$1"
shift
case "$mode" in
copy)
rsync -av --ignore-existing --progress -- "$@" . |
stdbuf -i0 -o0 -e0 tr '\r' '\n' |
while IFS= read -r line; do
lf -remote "send $id echo $line"
done
;;
move) mv -n -- "$@" .;;
esac
rm ~/.local/share/lf/files
lf -remote "send clear"
}}
# follow symlinks
cmd follow_link %{{
lf -remote "send ${id} select '$(readlink $f)'"
}}
map gL follow_link
# move selected files to new folder
cmd newfold ${{
set -f
printf "Directory name: "
read newd
mkdir -- "$newd"
mv -- $fx "$newd"
}}
map <a-n> newfold
cmd open-with-gui &$@ $fx ## opens with a gui application outside lf client
cmd open-with-cli $$@ $fx ## opens with a cli application inside lf client
map O push :open-with-gui<space> ## input application
map o push :open-with-cli<space> ## input application

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# From https://github.com/gokcehan/lf/wiki/Previews#with-kitty-and-pistol
kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
# From https://github.com/gokcehan/lf/wiki/Previews#with-kitty-and-pistol
# Includes fallback for non-images
file=$1
w=$2
h=$3
x=$4
y=$5
case "$(file -Lb --mime-type -- "$1")" in
image/*)
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty
exit 1
;;
*)
cat "$1"
;;
esac

View file

@ -1,8 +0,0 @@
font=Noto Sans 16
background-color=#1a1b26e6
text-color=#c0caf5
width=500
height=400
padding=8
border-color=#414868
default-timeout=15000

View file

@ -1,6 +0,0 @@
hwdec=auto-safe,no
osd-bar=no
profile=gpu-hq
video-sync=display-resample
vo=dmabuf-wayland,gpu,sdl
ytdl-raw-options="format-sort=res:1080"

View file

@ -1,233 +0,0 @@
# Display style of current position. available: line, bar
timeline_style=line
# Line display style config
timeline_line_width=2
# Timeline size when fully expanded, in pixels, 0 to disable
timeline_size=40
# Comma separated states when element should always be fully visible.
# Available: paused, audio, image, video, idle, windowed, fullscreen
timeline_persistency=
# Top border of background color to help visually separate timeline from video
timeline_border=1
# When scrolling above timeline, wheel will seek by this amount of seconds
timeline_step=5
# Render cache indicators for streaming content
timeline_cache=yes
# When to display an always visible progress bar (minimized timeline). Can be: windowed, fullscreen, always, never
# Can also be toggled on demand with `toggle-progress` command.
progress=windowed
progress_size=2
progress_line_width=20
# A comma delimited list of controls above the timeline. Set to `never` to disable.
# Parameter spec: enclosed in `{}` means value, enclosed in `[]` means optional
# Full item syntax: `[<[!]{disposition1}[,[!]{dispositionN}]>]{element}[:{paramN}][#{badge}[>{limit}]][?{tooltip}]`
# Common properties:
# `{icon}` - parameter used to specify an icon name (example: `face`)
# - pick here: https://fonts.google.com/icons?icon.platform=web&icon.set=Material+Icons&icon.style=Rounded
# `{element}`s and their parameters:
# `{shorthand}` - preconfigured shorthands:
# `play-pause`, `menu`, `subtitles`, `audio`, `video`, `playlist`,
# `chapters`, `editions`, `stream-quality`, `open-file`, `items`,
# `next`, `prev`, `first`, `last`, `audio-device`, `fullscreen`,
# `loop-playlist`, `loop-file`, `shuffle`
# `speed[:{scale}]` - display speed slider, [{scale}] - factor of controls_size, default: 1.3
# `command:{icon}:{command}` - button that executes a {command} when pressed
# `toggle:{icon}:{prop}[@{owner}]` - button that toggles mpv property
# `cycle:{default_icon}:{prop}[@{owner}]:{value1}[={icon1}][!]/{valueN}[={iconN}][!]`
# - button that cycles mpv property between values, each optionally having different icon and active flag
# - presence of `!` at the end will style the button as active
# - `{owner}` is the name of a script that manages this property if any
# `gap[:{scale}]` - display an empty gap
# {scale} - factor of controls_size, default: 0.3
# `space` - fills all available space between previous and next item, useful to align items to the right
# - multiple spaces divide the available space among themselves, which can be used for centering
# Item visibility control:
# `<[!]{disposition1}[,[!]{dispositionN}]>` - optional prefix to control element's visibility
# - `{disposition}` can be one of:
# - `idle` - true if mpv is in idle mode (no file loaded)
# - `image` - true if current file is a single image
# - `audio` - true for audio only files
# - `video` - true for files with a video track
# - `has_many_video` - true for files with more than one video track
# - `has_image` - true for files with a cover or other image track
# - `has_audio` - true for files with an audio track
# - `has_many_audio` - true for files with more than one audio track
# - `has_sub` - true for files with an subtitle track
# - `has_many_sub` - true for files with more than one subtitle track
# - `has_many_edition` - true for files with more than one edition
# - `has_chapter` - true for files with chapter list
# - `stream` - true if current file is read from a stream
# - `has_playlist` - true if current playlist has 2 or more items in it
# - prefix with `!` to negate the required disposition
# Examples:
# - `<stream>stream-quality` - show stream quality button only for streams
# - `<has_audio,!audio>audio` - show audio tracks button for all files that have
# an audio track, but are not exclusively audio only files
# Place `#{badge}[>{limit}]` after the element params to give it a badge. Available badges:
# `sub`, `audio`, `video` - track type counters
# `{mpv_prop}` - any mpv prop that makes sense to you: https://mpv.io/manual/master/#property-list
# - if prop value is an array it'll display its size
# `>{limit}` will display the badge only if it's numerical value is above this threshold.
# Example: `#audio>1`
# Place `?{tooltip}` after the element config to give it a tooltip.
# Example implementations:
# menu = command:menu:script-binding uosc/menu-blurred?Menu
# subtitles = command:subtitles:script-binding uosc/subtitles#sub?Subtitles
# fullscreen = cycle:crop_free:fullscreen:no/yes=fullscreen_exit!?Fullscreen
# loop-playlist = cycle:repeat:loop-playlist:no/inf!?Loop playlist
# toggle:{icon}:{prop} = cycle:{icon}:{prop}:no/yes!
controls=menu,gap,subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen
controls_size=32
controls_margin=8
controls_spacing=2
controls_persistency=
# Where to display volume controls: none, left, right
volume=right
volume_size=40
volume_border=1
volume_step=1
volume_persistency=
# Playback speed widget: mouse drag or wheel to change, click to reset
speed_step=0.1
speed_step_is_factor=no
speed_persistency=
# Controls all menus, such as context menu, subtitle loader/selector, etc
menu_item_height=36
menu_min_width=260
menu_padding=4
# Determines if `/` or `ctrl+f` is required to activate the search, or if typing
# any text is sufficient.
# When enabled, you can no longer toggle a menu off with the same key that opened it, if the key is a unicode character.
menu_type_to_search=yes
# Top bar with window controls and media title
# Can be: never, no-border, always
top_bar=no-border
top_bar_size=40
top_bar_controls=yes
# Can be: `no` (hide), `yes` (inherit title from mpv.conf), or a custom template string
top_bar_title=yes
# Template string to enable alternative top bar title. If alt title matches main title,
# it'll be hidden. Tip: use `${media-title}` for main, and `${filename}` for alt title.
top_bar_alt_title=
# Can be:
# `below` => display alt title below the main one
# `toggle` => toggle the top bar title text between main and alt by clicking
# the top bar, or calling `toggle-title` binding
top_bar_alt_title_place=below
# Flash top bar when any of these file types is loaded. Available: audio,image,video
top_bar_flash_on=video,audio
top_bar_persistency=
# Window border drawn in no-border mode
window_border_size=1
# If there's no playlist and file ends, load next file in the directory
# Requires `keep-open=yes` in `mpv.conf`.
autoload=no
# What types to accept as next item when autoloading or requesting to play next file
# Can be: video, audio, image, subtitle
autoload_types=video,audio,image
# Enable uosc's playlist/directory shuffle mode
# This simply makes the next selected playlist or directory item be random, just
# like any other player in the world. It also has an easily togglable control button.
shuffle=no
# Scale the interface by this factor
scale=1
# Scale in fullscreen
scale_fullscreen=1.3
# Adjust the text scaling to fit your font
font_scale=1
# Border of text and icons when drawn directly on top of video
text_border=1.2
# Border radius of buttons, menus, and all other rectangles
border_radius=4
# A comma delimited list of color overrides in RGB HEX format. Defaults:
# foreground=ffffff,foreground_text=000000,background=000000,background_text=ffffff,curtain=111111,success=a5e075,error=ff616e
color=
# A comma delimited list of opacity overrides for various UI element backgrounds and shapes.
# This does not affect any text, which is always rendered fully opaque. Defaults:
# timeline=0.9,position=1,chapters=0.8,slider=0.9,slider_gauge=1,controls=0,speed=0.6,menu=1,submenu=0.4,border=1,title=1,tooltip=1,thumbnail=1,curtain=0.8,idle_indicator=0.8,audio_indicator=0.5,buffering_indicator=0.3,playlist_position=0.8
opacity=
# A comma delimited list of features to refine at a cost of some performance impact.
# text_width - Use a more accurate text width measurement that measures each text string individually
# instead of just measuring the width of known letters once and adding them up.
# sorting - Use filename sorting that handles non-english languages better, especially asian ones.
# At the moment, this is only available on windows, and has no effect on other platforms.
refine=
# Duration of animations in milliseconds
animation_duration=100
# Execute command for background clicks shorter than this number of milliseconds, 0 to disable
# Execution always waits for `input-doubleclick-time` to filter out double-clicks
click_threshold=0
click_command=cycle pause; script-binding uosc/flash-pause-indicator
# Flash duration in milliseconds used by `flash-{element}` commands
flash_duration=1000
# Distances in pixels below which elements are fully faded in/out
proximity_in=40
proximity_out=120
# Use only bold font weight throughout the whole UI
font_bold=no
# One of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file)
destination_time=playtime-remaining
# Display sub second fraction in timestamps up to this precision
time_precision=0
# Display stream's buffered time in timeline if it's lower than this amount of seconds, 0 to disable
buffered_time_threshold=60
# Hide UI when mpv autohides the cursor. Timing is controlled by `cursor-autohide` in `mpv.conf` (in milliseconds).
autohide=no
# Can be: flash, static, manual (controlled by flash-pause-indicator and decide-pause-indicator commands)
pause_indicator=flash
# Sizes to list in stream quality menu
stream_quality_options=4320,2160,1440,1080,720,480,360,240,144
# Types to identify media files
video_types=3g2,3gp,asf,avi,f4v,flv,h264,h265,m2ts,m4v,mkv,mov,mp4,mp4v,mpeg,mpg,ogm,ogv,rm,rmvb,ts,vob,webm,wmv,y4m
audio_types=aac,ac3,aiff,ape,au,cue,dsf,dts,flac,m4a,mid,midi,mka,mp3,mp4a,oga,ogg,opus,spx,tak,tta,wav,weba,wma,wv
image_types=apng,avif,bmp,gif,j2k,jp2,jfif,jpeg,jpg,jxl,mj2,png,svg,tga,tif,tiff,webp
subtitle_types=aqt,ass,gsub,idx,jss,lrc,mks,pgs,pjs,psb,rt,sbv,slt,smi,sub,sup,srt,ssa,ssf,ttxt,txt,usf,vt,vtt
# Default open-file menu directory
default_directory=~/
# List hidden files when reading directories. Due to environment limitations, this currently only hides
# files starting with a dot. Doesn't hide hidden files on windows (we have no way to tell they're hidden).
show_hidden_files=no
# Move files to trash (recycle bin) when deleting files. Dependencies:
# - Linux: `sudo apt install trash-cli`
# - MacOS: `brew install trash`
use_trash=no
# Adjusted osd margins based on the visibility of UI elements
adjust_osd_margins=yes
# Adds chapter range indicators to some common chapter types.
# Additionally to displaying the start of the chapter as a diamond icon on top of the timeline,
# the portion of the timeline of that chapter range is also colored based on the config below.
#
# The syntax is a comma-delimited list of `{type}:{color}` pairs, where:
# `{type}` => range type. Currently supported ones are:
# - `openings`, `endings` => anime openings/endings
# - `intros`, `outros` => video intros/outros
# - `ads` => segments created by sponsor-block software like https://github.com/po5/mpv_sponsorblock
# `{color}` => an RGB(A) HEX color code (`rrggbb`, or `rrggbbaa`)
#
# To exclude marking any of the range types, simply remove them from the list.
chapter_ranges=openings:30abf964,endings:30abf964,ads:c54e4e80
# Add alternative lua patterns to identify beginnings of simple chapter ranges (except for `ads`)
# Syntax: `{type}:{pattern}[,{patternN}][;{type}:{pattern}[,{patternN}]]`
chapter_range_patterns=openings:オープニング;endings:エンディング
# Localization language priority from highest to lowest.
# Also controls what languages are fetched by `download-subtitles` menu.
# Built in languages can be found in `uosc/intl`.
# `slang` is a keyword to inherit values from `--slang` mpv config.
# Supports paths to custom json files: `languages=~~/custom.json,slang,en`
languages=slang,en
# A comma separated list of element IDs to disable. Available IDs:
# window_border, top_bar, timeline, controls, volume,
# idle_indicator, audio_indicator, buffering_indicator, pause_indicator
disable_elements=

View file

@ -39,7 +39,7 @@ set show_hidden false
# Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete multiple
set confirm_on_delete always
# Use non-default path for file preview script?
# ranger ships with scope.sh, a script that calls external programs (see
@ -57,7 +57,7 @@ set automatically_count_files true
set open_all_images true
# Be aware of version control systems and display information.
set vcs_aware true
set vcs_aware false
# State of the four backends git, hg, bzr, svn. The possible states are
# disabled, local (only show local info), enabled (show local and remote
@ -114,7 +114,7 @@ set preview_images true
# Preview images in full color with the external command "ueberzug".
# Images are shown by using a child window.
# Only for users who run X11 in GNU/Linux.
set preview_images_method kitty
set preview_images_method sixel
# Delay in seconds before displaying an image with the w3m method.
# Increase it in case of experiencing display corruption.
@ -128,11 +128,11 @@ set iterm2_font_width 8
set iterm2_font_height 11
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis false
set unicode_ellipsis true
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
# Requires the python-bidi pip package
set bidi_support false
set bidi_support true
# Show dotfiles in the bookmark preview box?
set show_hidden_bookmarks true
@ -148,7 +148,7 @@ set preview_directories true
set collapse_preview true
# Wrap long lines in plain text previews?
set wrap_plaintext_previews false
set wrap_plaintext_previews true
# Save the console history on exit?
set save_console_history true
@ -164,7 +164,7 @@ set draw_progress_bar_in_status_bar true
# Separators are vertical lines between columns.
# Outline draws a box around all the columns.
# Both combines the two.
set draw_borders none
set draw_borders separators
# Display the directory name in tabs?
set dirname_in_tabs true
@ -447,30 +447,21 @@ map } traverse
map { traverse_backwards
map ) jump_non
map gh cd ~
map ge cd /etc
map gm cd /media
map ghh cd ~
map ghc cd ~/config
map ghC cd ~/.config
map ghd cd ~/Documents
map ghD cd ~/Downloads
map ghgm cd ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher
map ghgs cd ~/.local/share/Steam/steamapps/common
map ghm cd ~/Music
map ghp cd ~/Pictures
map ghP cd ~/Projects
map ghv cd ~/Videos
map gl cd -r .
map gL cd -r %f
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
map gM cd /mnt
map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g/ cd /
map g? cd /usr/share/doc/ranger
map gd cd ~/Documents
map gD cd ~/Downloads
map gm cd ~/Music
map gpp cd ~/Pictures
map gps cd ~/Pictures/Screenshots
map gpw cd ~/Pictures/Wallpapers
map gvv cd ~/Videos
map gvr cd ~/Videos/Recording
map ggd cd ~/.var/app/org.zdoom.GZDoom/.config/gzdoom
map ggh cd ~/Games/Heroic
map ggl cd ~/Games/Lutris
map ggm cd ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances
map ggs cd ~/.local/share/Steam/steamapps/common
map gr cd /run/media/ollie
# External Programs
map E edit
@ -480,7 +471,6 @@ map yp yank path
map yd yank dir
map yn yank name
map y. yank name_without_extension
map F open_with nautilus f
# Filesystem Operations
map = chmod
@ -765,4 +755,3 @@ tmap <delete> eval -q fm.ui.taskview.task_remove()
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>

356
ranger/dot-config/ranger/scope.sh Executable file
View file

@ -0,0 +1,356 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
## If the option `use_preview_script` is set to `true`,
## then this script will be called and its output will be displayed in ranger.
## ANSI color codes are supported.
## STDIN is disabled, so interactive scripts won't work properly
## This script is considered a configuration file and must be updated manually.
## It will be left untouched if you upgrade ranger.
## Because of some automated testing we do on the script #'s for comments need
## to be doubled up. Code that is commented out, because it's an alternative for
## example, gets only one #.
## Meanings of exit codes:
## code | meaning | action of ranger
## -----+------------+-------------------------------------------
## 0 | success | Display stdout as preview
## 1 | no preview | Display no preview at all
## 2 | plain text | Display the plain content of the file
## 3 | fix width | Don't reload when width changes
## 4 | fix height | Don't reload when height changes
## 5 | fix both | Don't ever reload
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
## 7 | image | Display the file directly as an image
## Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
## Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
## Archive
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1;;
rar)
## Avoid password prompt by providing empty password
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1;;
7z)
## Avoid password prompt by providing empty password
7z l -p -- "${FILE_PATH}" && exit 5
exit 1;;
## PDF
pdf)
## Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
fmt -w "${PV_WIDTH}" && exit 5
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## BitTorrent
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1;;
## OpenDocument
odt|ods|odp|sxw)
## Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## XLSX
xlsx)
## Preview as csv conversion
## Uses: https://github.com/dilshod/xlsx2csv
xlsx2csv -- "${FILE_PATH}" && exit 5
exit 1;;
## HTML
htm|html|xhtml)
## Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
;;
## JSON
json)
jq --color-output . "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
;;
## Valve Texture Format
vtf)
# You need to install no_vtf with pipx
no_vtf --always-write --no-progress -f "png|apng" -O "${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" && exit 6
;;
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
## by file(1).
dff|dsf|wv|wvc)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
esac
}
handle_image() {
## Size of the preview if there are multiple options or it has to be
## rendered from vector graphics. If the conversion program allows
## specifying only one dimension while keeping the aspect ratio, the width
## will be used.
local DEFAULT_SIZE="1920x1080"
local mimetype="${1}"
case "${mimetype}" in
## SVG
# image/svg+xml|image/svg)
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
# exit 1;;
## DjVu
# image/vnd.djvu)
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
# && exit 6 || exit 1;;
## Image
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
## If orientation data is present and the image actually
## needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
## ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
## `w3mimgdisplay` will be called for all images (unless overriden
## as above), but might fail for unsupported types.
exit 7;;
## Video
# video/*)
# # Thumbnail
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
# exit 1;;
## PDF
# application/pdf)
# pdftoppm -f 1 -l 1 \
# -scale-to-x "${DEFAULT_SIZE%x*}" \
# -scale-to-y -1 \
# -singlefile \
# -jpeg -tiffcompression jpeg \
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
# && exit 6 || exit 1;;
## ePub, MOBI, FB2 (using Calibre)
# application/epub+zip|application/x-mobipocket-ebook|\
# application/x-fictionbook+xml)
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
# "${DEFAULT_SIZE%x*}" && exit 6
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
# >/dev/null && exit 6
# exit 1;;
## Font
application/font*|application/*opentype)
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
if fontimage -o "${preview_png}" \
--pixelsize "120" \
--fontname \
--pixelsize "80" \
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
--text " abcdefghijklmnopqrstuvwxyz " \
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
--text " The quick brown fox jumps over the lazy dog. " \
"${FILE_PATH}";
then
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
&& rm "${preview_png}" \
&& exit 6
else
exit 1
fi
;;
## Preview archives using the first image inside.
## (Very useful for comic book collections for example.)
# application/zip|application/x-rar|application/x-7z-compressed|\
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
# local fn=""; local fe=""
# local zip=""; local rar=""; local tar=""; local bsd=""
# case "${mimetype}" in
# application/zip) zip=1 ;;
# application/x-rar) rar=1 ;;
# application/x-7z-compressed) ;;
# *) tar=1 ;;
# esac
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
#
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
# [ print(l, end='') for l in sys.stdin if \
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
# sort -V | head -n 1)
# [ "$fn" = "" ] && return
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
#
# [ "$tar" ] && tar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
# [ "$bsd" ] && bsdtar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
# ;;
esac
# openscad_image() {
# TMPPNG="$(mktemp -t XXXXXX.png)"
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
# -o "${TMPPNG}" "${1}"
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
# }
# case "${FILE_EXTENSION_LOWER}" in
# ## 3D models
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
# ## is hardcoded as jpeg. So we make a tempfile.png and just
# ## move/rename it to jpg. This works because image libraries are
# ## smart enough to handle it.
# csg|scad)
# openscad_image "${FILE_PATH}" && exit 6
# ;;
# 3mf|amf|dxf|off|stl)
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
# ;;
# esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
## RTF and DOC
text/rtf|*msword)
## Preview as text conversion
## note: catdoc does not always work for .doc files
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
catdoc -- "${FILE_PATH}" && exit 5
exit 1;;
## DOCX, ePub, FB2 (using markdown)
## You might want to remove "|epub" and/or "|fb2" below if you have
## uncommented other methods to preview those formats
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## XLS
*ms-excel)
## Preview as csv conversion
## xls2csv comes with catdoc:
## http://www.wagner.pp.ru/~vitus/software/catdoc/
xls2csv -- "${FILE_PATH}" && exit 5
exit 1;;
## Text
text/* | */xml)
## Syntax highlight
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$( tput colors )" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
--out-format="${highlight_format}" \
--force -- "${FILE_PATH}" && exit 5
env COLORTERM=8bit bat --color=always --style="plain" \
-- "${FILE_PATH}" && exit 5
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
-- "${FILE_PATH}" && exit 5
exit 2;;
## DjVu
image/vnd.djvu)
## Preview as text conversion (requires djvulibre)
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Image
image/*)
## Preview as text conversion
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Video and audio
video/* | audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

View file

@ -1,220 +0,0 @@
#!/bin/sh
# Make Flatpaks visible in Fuzzel and other places
export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:~/.local/share/flatpak/exports/share:$XDG_DATA_DIRS
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
TERMINAL=kitty
cp -f ~/Pictures/Wallpapers/$(ls ~/Pictures/Wallpapers -b | shuf -n 1) ~/.wallpaper
## Autostart
riverctl spawn kanshi # Output management
riverctl spawn /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Authentication GUI
riverctl spawn mako # Notifications
riverctl spawn nm-applet # NetworkManager tray
riverctl spawn "udiskie -t -f '$TERMINAL -e ranger'" # Removeable storage management
riverctl spawn "wl-paste --type text --watch cliphist store" # Stores only text data
riverctl spawn "wl-paste --type image --watch cliphist store" # Stores only image data
riverctl spawn waybar # Bar
riverctl spawn "gnome-keyring-daemon --start --components=secrets" # Secret service
# Per device apps
while read program; do
riverctl spawn "$program"
done < ~/.config/autostart
## Behaviour
riverctl default-attach-mode below
# Window rules
riverctl rule-add ssd # Use server side decorations for everything (surely this will not break shit)
riverctl rule-add -app-id blueberry.py float # Float Blueberry
riverctl rule-add -app-id Element tags 16 # Move Element to tag 5
riverctl rule-add -app-id pavucontrol float # Float pavucontrol
riverctl rule-add -app-id steam -title "Friends List" float # Float Steam Friends
riverctl rule-add -app-id steam tags 32 # Move Steam to tag 6
riverctl rule-add -app-id tf_linux64 fullscreen # Fullscreen Team Fortress 2 (running in borderless window)
riverctl rule-add -app-id vesktop tags 8 # Move Vesktop to tag 4
riverctl rule-add -app-id "waydroid*" fullscreen # Fullscreen all Waydroid applications
riverctl rule-add -app-id windowkill csd
riverctl rule-add -app-id windowkill float
riverctl rule-add -app-id windowkill position 0 0
# If on amida and second monitor connected
if [ "$HOSTNAME" = "amida" ] && wlr-randr | grep -q "Model: 2470W"; then
riverctl rule-add -app-id Element output "AOC 2470W GGJH9HA056165" # Move Element to second monitor
riverctl rule-add -app-id Element tags 2 # Move Element to tag 2
riverctl rule-add -app-id steam output "AOC 2470W GGJH9HA056165" # Move Steam to second monitor
riverctl rule-add -app-id steam tags 4 # Move Steam to tag 3
riverctl rule-add -app-id vesktop output "AOC 2470W GGJH9HA056165" # Move Vesktop to second monitor
riverctl rule-add -app-id vesktop tags 1 # Move Vesktop to tag 1
fi
## Appearance
# Set background and border color
riverctl background-color 0x15161e
riverctl border-color-focused 0xbb9af7
riverctl border-color-unfocused 0x414868
riverctl border-color-urgent 0xe0af68
# Enable prefer-dark
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
## Inputs
riverctl focus-follows-cursor disabled
riverctl set-cursor-warp on-output-change
# Logitech G703
riverctl input pointer-1133-16518-Logitech_G703_LS accel-profile flat
# ThinkPad T480 trackpad
T480_POINTER=pointer-1739-0-Synaptics_TM3276-022
riverctl input $T480_POINTER click-method clickfinger
riverctl input $T480_POINTER drag enabled
riverctl input $T480_POINTER drag-locked enabled
riverctl input $T480_POINTER disable-while-typing disabled
riverctl input $T480_POINTER natural-scroll enabled
riverctl input $T480_POINTER tap enabled
riverctl input $T480_POINTER tap-button-map left-right-middle
# Lock screen after 5 mins idle or before sleep
riverctl spawn "swayidle -w timeout 300 'swaylock -f --fade-in=1 --grace=30' timeout 600 'wlopm --off \*' resume 'wlopm --on \*' before-sleep 'swaylock -f'"
## Mappings
# Applications
riverctl map normal Super D spawn fuzzel
riverctl map normal Super Return spawn $TERMINAL
riverctl map normal Super E spawn "$TERMINAL -e lf"
riverctl map normal Super+Shift E spawn thunar
riverctl map normal Control+Shift Escape spawn "$TERMINAL -e btop"
riverctl map normal Super Period spawn bemoji # Emoji picker
riverctl map normal Super Slash spawn "xdg-open https://wiki.archlinux.org" # tech support :3
# Screenshots
mkdir -p ~/Pictures/Screenshots # Make screenshots folder if missing
riverctl map normal None Print spawn "~/config/screenshot.sh ~/Pictures/Screenshots full true"
riverctl map normal Super Print spawn "~/config/screenshot.sh ~/Pictures/Screenshots display true"
riverctl map normal Alt Print spawn "~/config/screenshot.sh ~/Pictures/Screenshots region true"
# Clipboard
riverctl map normal Super V spawn "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"
# Super+Shift+Escape to lock the screen
riverctl map normal Super+Shift Escape spawn swaylock
# Super+Alt+Shift+Escape to exit session
riverctl map normal Super+Alt+Shift Escape exit
# Toggle microphone mute
riverctl map normal Super M spawn 'pamixer --default-source -t && notify-send "$([[ $(pamixer --default-source --get-mute) == "true" ]] && echo "Microphone muted" || echo "Microphone unmuted")" -t 2000'
# Super+Q to close the focused view
riverctl map normal Super+Shift Q close
# Super+J and Super+K to focus the next/previous view in the layout stack
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
# view in the layout stack
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
# Super+H and Super+L to focus the previous/next output
riverctl map normal Super H focus-output previous
riverctl map normal Super L focus-output next
# Super+Shift+H and Super+Shift+L to send the focused view to the next/previous output
riverctl map normal Super+Shift H send-to-output previous
riverctl map normal Super+Shift L send-to-output next
# Super+Return to bump the focused view to the top of the layout stack
riverctl map normal Super I zoom
# Super+- and Super+= to decrease/increase the main ratio of rivertile(1)
riverctl map normal Super Minus send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super Equal send-layout-cmd rivertile "main-ratio +0.05"
# Super+Shift+- and Super+Shift+= to decrement/increment the main count of rivertile(1)
riverctl map normal Super+Shift Minus send-layout-cmd rivertile "main-count -1"
riverctl map normal Super+Shift Equal send-layout-cmd rivertile "main-count +1"
# Super + Left Mouse Button to move views
riverctl map-pointer normal Super BTN_LEFT move-view
# Super + Right Mouse Button to resize views
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Super + Middle Mouse Button to toggle float
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i set-focused-tags $tags
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i set-view-tags $tags
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i toggle-focused-tags $tags
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
done
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 set-focused-tags $all_tags
riverctl map normal Super+Shift 0 set-view-tags $all_tags
# Super+Space to toggle float
riverctl map normal Super Space toggle-float
# Super+Shift+Space to toggle fullscreen
riverctl map normal Super+Shift Space toggle-fullscreen
# Super+{Up,Right,Down,Left} to change layout orientation
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough
# Super+F11 to enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough
# Super+F11 to return to normal mode
riverctl map passthrough Super F11 enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
# Control audio volume
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness
riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl s +5%'
riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl s 5%-'
done
# Set the default layout generator to be rivertile and start it.
# Leave this at the bottom
riverctl default-layout rivertile
rivertile -view-padding 4 -outer-padding 4 &

View file

@ -1,3 +0,0 @@
[screencast]
chooser_type=default
max_fps=60

View file

@ -1,4 +0,0 @@
[portal]
DBusName=org.freedesktop.secrets
Interfaces=org.freedesktop.impl.portal.Secret
UseIn=river

View file

@ -1,4 +0,0 @@
[preferred]
default=gtk
org.freedesktop.impl.portal.Screenshot=wlr
org.freedesktop.impl.portal.ScreenCast=wlr

View file

@ -1,41 +0,0 @@
#!/usr/bin/env bash
# pancakes' wayland screenshot script
# takes screenshots, saves them, copies to clipboard, and notifies you
# depends on grim, libnotify, slurp, and wl-copy
set -e
if [ -z $2 ]; then
echo "Usage: $0 path full|display|region [notify=true|false]"
exit
fi
FILENAME="$1/$(date +%F_%H-%M-%S)_$2.png"
case $2 in
"full")
# capture full screen screenshot with cursor
grim -c $FILENAME
;;
"display")
# capture display screenshot with cursor
grim -c -g "$(slurp -o)" $FILENAME
;;
"region")
# capture screenshot of slurped region
grim -g "$(slurp)" $FILENAME
;;
*)
echo "Mode must be either full, display, or region"
exit
;;
esac
NOTIFY=$3
if [ ${NOTIFY:=false} = true ]; then
notify-send "Screenshot captured" "$FILENAME"
fi
# copy screenshot to clipboard
wl-copy < $FILENAME

2
ssh/dot-ssh/config Normal file
View file

@ -0,0 +1,2 @@
Host *
SetEnv TERM=xterm-256color

View file

@ -1,26 +0,0 @@
daemonize
clock
indicator
show-failed-attempts
image=~/.wallpaper
scaling=fill
bs-hl-color=e0af68
caps-lock-bs-hl-color=f7768e
caps-lock-key-hl-color=7dcfff
font=Noto Sans
font-size=24
inside-color=1a1b26e6
inside-clear-color=e0af68e6
inside-caps-lock-color=7dcfffe6
inside-ver-color=7aa2f7e6
inside-wrong-color=f7768ee6
key-hl-color=bb9af7
ring-color=bb9af7
ring-clear-color=e0af68
ring-caps-lock-color=7dcfff
ring-ver-color=7aa2f7
ring-wrong-color=f7768e
text-color=c0caf5
text-caps-lock-color=c0caf5
effect-blur=10x3
effect-greyscale

View file

@ -1,101 +0,0 @@
{
"layer": "top",
"output": "!HDMI-A-1",
"spacing": 4,
"modules-left": [
"river/tags",
"tray",
"privacy"
],
"modules-center": [],
"modules-right": [
"custom/micmute",
"gamemode",
"idle_inhibitor",
"network",
"bluetooth",
"wireplumber",
"backlight",
"battery",
"clock",
"custom/exit"
],
"tray": {
"icon-size": 16,
"spacing": 10
},
"custom/micmute": {
"exec": "~/.config/waybar/scripts/micmute.sh",
"interval": 2
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"clock": {
"tooltip-format": "{:%Y-%m-%d}",
"format-alt": "{:%Y-%m-%d}"
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": [
"",
"",
"",
"",
"",
"",
"",
"",
""
]
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} {time}",
"format-icons": [
" ",
" ",
" ",
" ",
" "
]
},
"bluetooth": {
"on-click": "blueberry",
"tooltip-format": "{controller_alias}\t{controller_address}",
"tooltip-format-connected": "{controller_alias:20}\t{controller_address}\n\n{num_connections} connected:{device_enumerate}",
"tooltip-format-enumerate-connected": "\n{device_alias}\t\t{device_address}"
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ipaddr}/{cidr}",
"tooltip-format": " {ifname} via {gwaddr}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": "⚠ Disconnected",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"wireplumber": {
"format": "{icon} {volume}%",
"format-muted": "",
"format-icons": [
"",
" ",
" "
],
"on-click": "pavucontrol"
},
"custom/exit": {
"format": " ",
"on-click": "wlogout -s -b 5 -L 200 -R 200 -T 400 -B 400"
}
}

View file

@ -1,2 +0,0 @@
#!/bin/sh
[[ $(pamixer --default-source --get-mute) == "true" ]] && echo " Muted" || echo ""

View file

@ -1,163 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, "Noto Sans", sans-serif;
font-size: 18px;
}
window#waybar {
background-color: rgba(26, 27, 38, 0.9);
color: #c0caf5;
}
window#waybar.hidden {
opacity: 0.2;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -2px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
button:hover {
background: inherit;
box-shadow: inset 0 -2px #414868;
}
#tags button {
color: #c0caf5;
padding: 0 5px;
}
#tags button:hover {
background: inherit;
border: none;
box-shadow: inset 0 -2px #414868;
text-shadow: inherit;
}
#tags button.focused {
box-shadow: inset 0 -2px #bb9af7;
}
#tags button.urgent {
box-shadow: inset 0 -2px #e0af68;
}
#custom-micmute,
#bluetooth,
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#mpd {
padding: 0 10px;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left>widget:first-child>#workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right>widget:last-child>#workspaces {
margin-right: 0;
}
#custom-micmute {
box-shadow: inset 0 -2px #f7768e;
}
#battery {}
#battery.charging,
#battery.plugged {
box-shadow: inset 0 -2px #9ece6a;
}
#battery.critical:not(.charging) {
box-shadow: inset 0 -2px #f7768e;
}
label:focus {
background-color: rgba(26, 27, 38, 0.9);
border: 2px solid #414868;
}
#idle_inhibitor.activated {
box-shadow: inset 0 -2px #e0af68;
}
#backlight {}
#network {}
#network.disconnected {
box-shadow: inset 0 -2px #f7768e;
}
#network.linked {
box-shadow: inset 0 -2px #e0af68;
}
#privacy {
box-shadow: inset 0 -2px #e0af68;
}
#wireplumber {}
#wireplumber.muted {}
#tray {}
#tray>.passive {
-gtk-icon-effect: dim;
}
#tray>.needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {}
#idle_inhibitor.activated {}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

View file

@ -1,30 +0,0 @@
{
"label" : "lock",
"action" : "swaylock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "logout",
"action" : "riverctl exit",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}

View file

@ -1,87 +0,0 @@
* {
background-image: none;
box-shadow: none;
font-family: "Noto Sans", sans-serif;
font-weight: bold;
}
window {
background-color: rgba(26, 27, 38, 0.9);
}
button {
text-decoration-color: #c0caf5;
color: #c0caf5;
background-color: #414868;
background-repeat: no-repeat;
background-position: center;
background-size: 40%;
}
button:focus,
button:active,
button:hover {
color: rgb(26, 27, 38);
outline-style: none;
}
#lock {
background-image: image(url("icons/lock.png"));
}
#lock:focus,
#lock:active,
#lock:hover {
background-color: #bb9af7;
background-image: image(url("icons/lock-hover.png"));
background-size: 50%;
}
#logout {
background-image: image(url("icons/logout.png"));
}
#logout:focus,
#logout:active,
#logout:hover {
background-color: #9ece6a;
background-image: image(url("icons/logout-hover.png"));
background-size: 50%;
}
#suspend {
background-image: image(url("icons/suspend.png"));
}
#suspend:focus,
#suspend:active,
#suspend:hover {
background-color: #e0af68;
background-image: image(url("icons/suspend-hover.png"));
background-size: 50%;
}
#shutdown {
background-image: image(url("icons/shutdown.png"));
}
#shutdown:focus,
#shutdown:active,
#shutdown:hover {
background-color: #f7768e;
background-image: image(url("icons/shutdown-hover.png"));
background-size: 50%;
}
#reboot {
background-image: image(url("icons/reboot.png"));
}
#reboot:focus,
#reboot:active,
#reboot:hover {
background-color: #f7768e;
background-image: image(url("icons/reboot-hover.png"));
background-size: 50%;
}

View file

@ -0,0 +1,29 @@
[main]
font=Noto Sans:size=13
use-bold=yes
dpi-aware=no
placeholder=program name
prompt=":3 "
show-actions=yes
terminal=alacritty -e
y-margin=15
lines=5
horizontal-pad=5
vertical-pad=5
inner-pad=5
[colors]
background=1a1b26e5
text=a9b1d6ff
prompt=bb9af7ff
placeholder=bb9af7b2
input=bb9af7ff
match=bb9af7ff
selection=bb9af7ff
selection-text=565f89ff
selection-match=1a1b26ff
border=bb9af7ff
[border]
width=2
radius=5

View file

@ -0,0 +1,6 @@
[main]
gtk-theme=Adwaita-dark
background=Pictures/Wallpapers/cafe.png
idle-hide=true
idle-timeout=30
start-hidden=true

14
wm/dot-config/mako/config Normal file
View file

@ -0,0 +1,14 @@
font=Noto Sans 13
background-color=#1a1b26e5
text-color=#a9b1d6ff
width=400
height=200
border-color=#bb9af7ff
margin=15
border-radius=5
format=<b>%a - %s</b>\n%b
default-timeout=30000
group-by=app-name,summary
[grouped]
format=(%g) <b>%a - %s</b>\n%b

View file

@ -0,0 +1,373 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// Input device configuration.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
}
}
touchpad {
tap
// dwt
// dwtp
natural-scroll
scroll-method "two-finger"
disabled-on-external-mouse
}
mouse {
accel-profile "flat"
}
// warp-mouse-to-focus
}
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// Remember to uncomment the node by removing "/-"!
output "eDP-1" {
scale 1.5
}
output "LG Electronics LG ULTRAGEAR 404NTCZ0R931" {
scale 1.5
// variable-refresh-rate
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 10
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "on-overflow"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
preset-window-heights {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
// You can change the default width of the new windows.
// default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
default-column-width {}
focus-ring {
off
}
border {
width 2
active-color "#bb9af7"
inactive-color "#565f89"
}
}
environment {
DISPLAY ":10"
MOZ_ENABLE_WAYLAND "1"
MOZ_USE_XINPUT2 "1"
}
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart
// Services
spawn-at-startup "mako"
spawn-at-startup "xwayland-satellite" ":10"
spawn-at-startup "swayidle" "-w"
spawn-at-startup "waybar"
spawn-at-startup "swww-daemon"
spawn-at-startup "wl-paste" "--watch" "cliphist" "store"
spawn-at-startup "flatpak" "run" "it.mijorus.smile" "--start-hidden"
// Applications
spawn-at-startup "firefox"
spawn-at-startup "easyeffects"
spawn-at-startup "vesktop"
spawn-at-startup "foot" "-e" "btop"
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some rounded corners.
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
workspace "web"
workspace "chat"
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
// Round corners
window-rule {
geometry-corner-radius 5
clip-to-geometry true
}
// Firefox
window-rule {
match app-id="firefox"
open-on-workspace "web"
}
// Chat applications
window-rule {
match app-id="vesktop"
block-out-from "screencast"
open-maximized true
open-on-workspace "chat"
}
window-rule {
match app-id="com.github.wwmm.easyeffects"
open-on-workspace "chat"
}
// Steam
window-rule {
match app-id="steam" title="Steam"
open-maximized true
}
window-rule {
match app-id="gamescope"
open-fullscreen true
}
// foot
window-rule {
match app-id="foot"
default-column-width { proportion 0.5; }
}
// Hide private stuff :3
window-rule {
match app-id="firefox" title=r#"^Extension: \(Bitwarden Password Manager\)"#
match app-id="org.gnome.Nautilus"
block-out-from "screencast"
}
binds {
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return { spawn "foot"; }
Mod+D { spawn "fuzzel"; }
Mod+E { spawn "foot" "-e" "ranger"; }
Mod+Alt+L { spawn "gtklock" "-d"; }
Mod+V { spawn "sh" "-c" "cliphist list | fuzzel -d -p '> ' --placeholder=clipboard | cliphist decode | wl-copy"; }
Mod+slash { spawn "flatpak" "run" "it.mijorus.smile"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
Mod+Shift+Q { close-window; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Shift+H { move-column-left; }
Mod+Shift+J { move-window-down; }
Mod+Shift+K { move-window-up; }
Mod+Shift+L { move-column-right; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Shift+Home { move-column-to-first; }
Mod+Shift+End { move-column-to-last; }
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Shift+1 { move-window-to-workspace 1; }
Mod+Shift+2 { move-window-to-workspace 2; }
Mod+Shift+3 { move-window-to-workspace 3; }
Mod+Shift+4 { move-window-to-workspace 4; }
Mod+Shift+5 { move-window-to-workspace 5; }
Mod+Shift+6 { move-window-to-workspace 6; }
Mod+Shift+7 { move-window-to-workspace 7; }
Mod+Shift+8 { move-window-to-workspace 8; }
Mod+Shift+9 { move-window-to-workspace 9; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
Mod+Comma { consume-window-into-column; }
Mod+Period { expel-window-from-column; }
// There are also commands that consume or expel a single window to the side.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}
hotkey-overlay {
skip-at-startup
}

View file

@ -0,0 +1,3 @@
timeout 300 'gtklock -d'
timeout 600 'niri msg action power-off-monitors'
before-sleep 'gtklock -d'

View file

@ -0,0 +1,93 @@
{
// make sure this renders above all non-fullscreen windows
"layer": "top",
// modules
"modules-left": [
"niri/workspaces",
"niri/window"
],
"modules-center": [
"clock"
],
"modules-right": [
"privacy",
"gamemode",
"tray",
"idle_inhibitor",
"battery",
"wireplumber",
"bluetooth",
"network"
],
// config
"niri/workspaces": {
"format": "{icon}{name}",
"format-icons": {
"web": " ",
"chat": " "
}
},
"niri/window": {
// "format": "{app_id} | {title}"
},
"clock": {
"format": "{:%a %R}",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode": "month",
"weeks-pos": "right",
"format": {
"months": "<span color='#9ece6a'><b>{}</b></span>",
"days": "<span color='#a9b1d6'><b>{}</b></span>",
"weeks": "<span color='#f7768e'><b>W{}</b></span>",
"weekdays": "<span color='#7aa2f7'><b>{}</b></span>",
"today": "<span color='#bb9af7'><b><u>{}</u></b></span>"
}
}
},
"privacy": {
"icon-size": 13,
"icon-spacing": 5
},
"gamemode": {
"icon-size": 13
},
"tray": {
"reverse-direction": true,
"show-passive-items": true,
"spacing": 5
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"wireplumber": {
"format": "{icon} {volume}%",
"format-icons": [
"",
"",
" "
],
"format-muted": "",
"on-click": "pavucontrol",
"on-click-right": "helvum"
},
"bluetooth": {
"format": "",
"format-connected": " {num_connections}",
"format-disabled": "",
"tooltip-format": "{controller_alias} <tt>{controller_address}</tt>",
"tooltip-format-connected": "{controller_alias} <tt>{controller_address}</tt>\n\n{num_connections} connected:\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias} <tt>{device_address}</tt>"
},
"network": {
"format-disconnected": "Disconnected",
"format-ethernet": "",
"format-wifi": " {essid}",
"tooltip-format-ethernet": "{ipaddr}/{cidr} via {ifname}",
"tooltip-format-wifi": "{ipaddr}/{cidr} via {ifname}\n{signalStrength}% signal"
}
}

View file

@ -0,0 +1,97 @@
* {
border: none;
border-radius: 0;
font-family: "Noto Sans", sans-serif;
font-size: 13px;
min-height: 0;
}
window#waybar {
background: rgba(26, 27, 38, 0.9);
color: #a9b1d6;
}
tooltip {
background: rgba(26, 27, 38, 0.9);
border: 2px solid #565f89;
border-radius: 5px;
}
tooltip label {
color: #a9b1d6;
}
#workspaces button {
margin: 5px 5px;
padding: 2px 5px;
background: transparent;
border-radius: 5px;
color: #a9b1d6;
}
#workspaces button.focused {
background: #bb9af7;
color: #1a1b26;
}
#window,
#clock,
#privacy,
#gamemode,
#tray,
#idle_inhibitor,
#battery,
#wireplumber,
#bluetooth,
#network {
margin: 5px 5px;
padding: 0 5px;
border-radius: 5px;
}
#window,
#tray {
background-color: #24283b;
}
#privacy {
background-color: #e0af68;
color: black;
}
#gamemode.running {
background-color: #7dcfff;
color: black;
}
#idle_inhibitor.activated {
background-color: #ff9e64;
color: black;
}
#battery {
background-color: #ffffff;
color: black;
}
#battery.charging {
background-color: #9ece6a;
color: #1a1b26;
}
#battery.warning:not(.charging),
#network.disconnected {
background: #f7768e;
color: #1a1b26;
}
#bluetooth.connected {
background: #7aa2f7;
color: #1a1b26;
}
#network.ethernet,
#network.wifi {
background: #73daca;
color: #1a1b26;
}