From 7f729599a960ce3bcb33c393d360d7d289833f26 Mon Sep 17 00:00:00 2001 From: nova Date: Sat, 3 Feb 2024 16:11:27 +0100 Subject: [PATCH] initial commit --- htop/htoprc | 63 +++++++ i3/config | 321 ++++++++++++++++++++++++++++++++ i3/i3blocks.conf | 19 ++ mpv/input.conf | 91 +++++++++ mpv/mpv.conf | 138 ++++++++++++++ ranger/rc.conf | 463 ++++++++++++++++++++++++++++++++++++++++++++++ ranger/rifle.conf | 285 ++++++++++++++++++++++++++++ ranger/scope.sh | 350 +++++++++++++++++++++++++++++++++++ 8 files changed, 1730 insertions(+) create mode 100644 htop/htoprc create mode 100644 i3/config create mode 100644 i3/i3blocks.conf create mode 100644 mpv/input.conf create mode 100644 mpv/mpv.conf create mode 100644 ranger/rc.conf create mode 100644 ranger/rifle.conf create mode 100755 ranger/scope.sh diff --git a/htop/htoprc b/htop/htoprc new file mode 100644 index 0000000..e8a669c --- /dev/null +++ b/htop/htoprc @@ -0,0 +1,63 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +htop_version=3.2.2 +config_reader_min_version=3 +fields=0 48 17 18 38 39 40 2 46 47 49 1 +hide_kernel_threads=1 +hide_userland_threads=0 +hide_running_in_container=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=0 +highlight_base_name=0 +highlight_deleted_exe=1 +shadow_distribution_path_prefix=0 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=0 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +header_margin=1 +screen_tabs=0 +detailed_cpu_time=0 +cpu_count_from_one=0 +show_cpu_usage=1 +show_cpu_frequency=1 +show_cpu_temperature=1 +degree_fahrenheit=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=6 +enable_mouse=1 +delay=15 +hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=LeftCPUs2 Memory Swap +column_meter_modes_0=1 1 1 +column_meters_1=RightCPUs2 Tasks LoadAverage Uptime +column_meter_modes_1=1 2 2 2 +tree_view=1 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=1 +screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view=1 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=1 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..94961f5 --- /dev/null +++ b/i3/config @@ -0,0 +1,321 @@ +# exec_always "setxkbmap -layout de" +exec "gentoo-pipewire-launcher" +exec_always "setxkbmap -layout 'us,de' -variant dvorak-alt-intl, -option grp:caps_toggle" +bindsym Caps_Lock exec "setxkbmap -layout 'us,de' -variant dvorak-alt-intl, -option grp:caps_toggle" + +bindsym --release Caps_Lock exec pkill -SIGRTMIN+10 i3block + +exec thunderbird + +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 +set $alt Mod1 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +#font pango:monospace 8 +font pango:JetBrainsMono Nerd Font Mono 10 +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Start XDG autostart .desktop files using dex. See also +# https://wiki.archlinux.org/index.php/XDG_Autostart +exec --no-startup-id dex --autostart --environment i3 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec /home/toaster/apps/st/st + + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +# bindsym $mod+d exec --no-startup-id "rofi -modi drun,run -show drun" +bindsym $mod+d exec --no-startup-id "/home/toaster/apps/rlaunch/target/x86_64-unknown-linux-gnu/release/rlaunch" +# A more modern dmenu replacement is rofi: +# bindcode $mod+40 exec "rofi -modi drun,run -show drun" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+t focus down +bindsym $mod+n focus up +bindsym $mod+s focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+t move down +bindsym $mod+Shift+n move up +bindsym $mod+Shift+s move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+Shift+v split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +# bindsym $mod+s layout stacking +# bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" +set $ws11 "11" +set $ws12 "12" +set $ws13 "13" +set $ws14 "14" +set $ws15 "15" +set $ws16 "16" +set $ws17 "17" +set $ws18 "18" +set $ws19 "19" +set $ws20 "20" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 +bindsym $mod+F1 workspace number $ws11 +bindsym $mod+F2 workspace number $ws12 +bindsym $mod+F3 workspace number $ws13 +bindsym $mod+F4 workspace number $ws14 +bindsym $mod+F5 workspace number $ws15 +bindsym $mod+F6 workspace number $ws16 +bindsym $mod+F7 workspace number $ws17 +bindsym $mod+F8 workspace number $ws18 +bindsym $mod+F9 workspace number $ws19 +bindsym $mod+F10 workspace number $ws20 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 +bindsym $mod+Shift+F1 move container to workspace number $ws11 +bindsym $mod+Shift+F2 move container to workspace number $ws12 +bindsym $mod+Shift+F3 move container to workspace number $ws13 +bindsym $mod+Shift+F4 move container to workspace number $ws14 +bindsym $mod+Shift+F5 move container to workspace number $ws15 +bindsym $mod+Shift+F6 move container to workspace number $ws16 +bindsym $mod+Shift+F7 move container to workspace number $ws17 +bindsym $mod+Shift+F8 move container to workspace number $ws18 +bindsym $mod+Shift+F9 move container to workspace number $ws19 +bindsym $mod+Shift+F10 move container to workspace number $ws20 + +assign [class="Telegram"] $ws3 +assign [class="firefox"] $ws11 +assign [class="pentablet"] $ws20 + +workspace $ws1 output DisplayPort-0 +workspace $ws2 output DisplayPort-0 +workspace $ws3 output DisplayPort-0 +workspace $ws4 output DisplayPort-0 +workspace $ws5 output DisplayPort-0 +workspace $ws6 output DisplayPort-0 +workspace $ws7 output DisplayPort-0 +workspace $ws8 output DisplayPort-0 +workspace $ws9 output DisplayPort-0 +workspace $ws10 output DisplayPort-0 +workspace $ws11 output DisplayPort-1 +workspace $ws12 output DisplayPort-1 +workspace $ws13 output DisplayPort-1 +workspace $ws14 output DisplayPort-1 +workspace $ws15 output DisplayPort-1 +workspace $ws16 output DisplayPort-1 +workspace $ws17 output DisplayPort-1 +workspace $ws18 output DisplayPort-1 +workspace $ws19 output DisplayPort-1 + +workspace $ws20 output HDMI-0 + + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym t resize grow height 10 px or 10 ppt + bindsym n resize shrink height 10 px or 10 ppt + bindsym s resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + + + +bindsym $mod+r mode "resize" + +bindsym $mod+m exec --no-startup-id /home/toaster/apps/st/st -e /home/toaster/apps/termusic/target/release/termusic +bindsym --release $mod+x exec --no-startup-id import -window "$(xdotool getwindowfocus -f)" /home/toaster/Pictures/screenshots/$(date '+%Y-%m-%d-%H-%M-%S-')screenshot.png +bindsym --release $mod+Shift+x exec import /home/toaster/Pictures/screenshots/$(date '+%Y-%m-%d-%H-%M-%S-')screenshot.png +bindsym $mod+Control+x exec --no-startup-id import root /home/toaster/Pictures/screenshots/$(date '+%Y-%m-%d-%H-%M-%S-')screenshot.png +bindsym $mod+Escape exec /home/toaster/apps/st/st -e htop +#bindsym $mod+y exec --no-startup-id /home/toaster/.config/i3/qr.sh +bindsym $mod+b exec /home/toaster/apps/st/st -e bluetoothctl +bindsym $mod+p exec pavucontrol +bindsym $mod+Shift+f exec firefox + +for_window [class="^.*"] border pixel 1 +# gaps inner 5 +smart_borders on +# smart_gaps on +# gaps outer 5 +# gaps top 5 + +## class border backgr. text indicator child_border +client.focused #75006b #75006b #75006b #f200de #75006b +client.focused_inactive #00001e #00001e #00001e #00001e #00001e +client.unfocused #00001e #00001e #00001e #00001e #00001e +client.background #00001e + +for_window [class="feh" instance="feh"] floating enable, -g 900x900 +for_window [class="mpv" instance="mpv"] floating enable +for_window [class="Steam - News" instance="Steam - News"] floating enable +for_window [class="kcalc" instance="kcalc"] floating enable + +#exec_always feh --bg-scale /home/toaster/Pictures/bg.png +exec_always feh --bg-scale ~/Pictures/bg.png +# exec_always feh --bg-scale '/home/toaster/Pictures/Wallpapers/nyarch 16_9.png' --bg-fill '/home/toaster/Pictures/Wallpapers/nyarch 16_9.png' +# exec_always --no-startup-id killall ~/Pictures/Wallpapers/back4.sh +# exec_always --no-startup-id ~/Pictures/Wallpapers/back4.sh auto ~/Downloads/cheese.gif + +exec_always xrandr --output DisplayPort-0 --primary --mode 2560x1440 --rate 144.00 --output DisplayPort-1 --mode 1920x1080 --rate 60 --right-of DisplayPort-0 +#exec_always xrandr --output DP-2 --primary --mode 2560x1440 --rate 144.00 --output HDMI-0 --mode 1920x1080 --rate 60 --left-of DP-2 --output DP-0 --mode 1920x1080 --rate 60 --right-of DP-2 +#exec_always xinput --map-to-output 'UGTABLET 15.6 inch PenDisplay stylus' HDMI-0 +#exec_always xinput --map-to-output 'UGTABLET 15.6 inch PenDisplay eraser' HDMI-0 + + +#exec_always dunst +# exec --no-startup-id /usr/lib/pentablet/pentablet.sh +# exec_always picom --experimental-backends +#exec_always --no-startup-id $HOME/.config/polybar/launch.sh + +bar { + status_command i3blocks -c /home/toaster/.config/i3/i3blocks.conf + + position top + height 15 + + colors { + background #00001e + statusline #75006b + + focused_workspace #00001e #00001e #75006b + active_workspace #00001e #00001e #825af0 + inactive_workspace #00001e #00001e #825af0 + urgent_workspace #00001e #00001e #e85a00 #00001e + } +} + + +#mouse_warping none +mouse_warping output + +focus_follows_mouse yes + +bindsym $mod+Shift+g exec /home/toaster/apps/st/st -e gentoo-pipewire-launcher +bindsym $mod+c exec --no-startup-id kcalc +bindsym $mod+Control+v exec /home/toaster/qemu/trolling_media diff --git a/i3/i3blocks.conf b/i3/i3blocks.conf new file mode 100644 index 0000000..4e0f183 --- /dev/null +++ b/i3/i3blocks.conf @@ -0,0 +1,19 @@ +# i3blocks configuration file +# +# The i3blocks man page describes the usage of the binary, +# and its website describes the configuration: +# +# https://vivien.github.io/i3blocks + + +[layout] +command=if [[ $(xset -q | grep LED | awk '{ print $10 }') -eq 00000000 ]]; then echo "dvorak-alt-intl"; elif [[ $(xset -q | grep LED | awk '{ print $10 }') -eq 00001000 ]] then echo "de"; else echo "unknown"; fi +interval=once +signal=10 +color=#825af0 + +[time] +command=date '+%Y-%m-%d %H:%M:%S' +interval=1 +color=#e85a00 + diff --git a/mpv/input.conf b/mpv/input.conf new file mode 100644 index 0000000..155384b --- /dev/null +++ b/mpv/input.conf @@ -0,0 +1,91 @@ + +## +## MPlayer-style key bindings +## +## Save it as ~/.config/mpv/input.conf to use it. +## +## Generally, it's recommended to use this as reference-only. +## + +RIGHT seek +10 +LEFT seek -10 +DOWN seek -60 +UP seek +60 +PGUP seek 600 +PGDWN seek -600 +h seek -10 +t seek -60 +n seek +60 +s seek +10 +m cycle mute +SHARP cycle audio # switch audio streams +d add audio-delay 0.100 +D add audio-delay -0.100 +[ multiply speed 0.9091 # scale playback speed +] multiply speed 1.1 +{ multiply speed 0.5 +} multiply speed 2.0 +BS set speed 1.0 # reset speed to normal +q quit +ESC quit +ENTER playlist-next force # skip to next file +p cycle pause +. frame-step # advance one frame and pause +SPACE cycle pause +HOME set playlist-pos 0 # not the same as MPlayer +#END pt_up_step -1 +> playlist-next # skip to next file +< playlist-prev # previous +#INS alt_src_step 1 +#DEL alt_src_step -1 +o osd +I show-text "${filename}" # display filename in osd +P show-progress +z add sub-delay -0.1 # subtract 100 ms delay from subs +x add sub-delay +0.1 # add +- add volume -1 ++ add volume 1 +1 add contrast -1 +2 add contrast 1 +3 add brightness -1 +4 add brightness 1 +5 add hue -1 +6 add hue 1 +7 add saturation -1 +8 add saturation 1 +( add balance -0.1 # adjust audio balance in favor of left +) add balance +0.1 # right +d cycle framedrop +D cycle deinterlace # toggle deinterlacer (auto-inserted filter) +r add sub-pos -1 # move subtitles up +#t add sub-pos +1 # down +#? sub-step +1 # immediately display next subtitle +#? sub-step -1 # previous +#? add sub-scale +0.1 # increase subtitle font size +#? add sub-scale -0.1 # decrease subtitle font size +f cycle fullscreen +T cycle ontop # toggle video window ontop of other windows +w add panscan -0.1 # zoom out with -panscan 0 -fs +e add panscan +0.1 # in +c cycle stream-capture # save (and append) file/stream to stream.dump with -capture +S screenshot # take a screenshot (if you want PNG, use "--screenshot-format=png") + +#b tv_step_chanlist + +#? add chapter -1 # skip to previous dvd chapter +#? add chapter +1 # next + +## +## Advanced seek +## Uncomment the following lines to be able to seek to n% of the media with +## the Fx keys. +## +#F1 seek 10 absolute-percent +#F2 seek 20 absolute-percent +#F3 seek 30 absolute-percent +#F4 seek 40 absolute-percent +#F5 seek 50 absolute-percent +#F6 seek 60 absolute-percent +#F7 seek 70 absolute-percent +#F8 seek 80 absolute-percent +#F9 seek 90 absolute-percent diff --git a/mpv/mpv.conf b/mpv/mpv.conf new file mode 100644 index 0000000..d067562 --- /dev/null +++ b/mpv/mpv.conf @@ -0,0 +1,138 @@ +# +# Example mpv configuration file +# +# Warning: +# +# The commented example options usually do _not_ set the default values. Call +# mpv with --list-options to see the default values for most options. There is +# no builtin or example mpv.conf with all the defaults. +# +# +# Configuration files are read system-wide from /usr/local/etc/mpv.conf +# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override +# system-wide settings, all of which are overridden by the command line. +# +# Configuration file settings and the command line options use the same +# underlying mechanisms. Most options can be put into the configuration file +# by dropping the preceding '--'. See the man page for a complete list of +# options. +# +# Lines starting with '#' are comments and are ignored. +# +# See the CONFIGURATION FILES section in the man page +# for a detailed description of the syntax. +# +# Profiles should be placed at the bottom of the configuration file to ensure +# that settings wanted as defaults are not restricted to specific profiles. + +################## +# video settings # +################## + +# Start in fullscreen mode by default. +#fs=yes + +# force starting with centered window +#geometry=50%:50% + +# don't allow a new window to have a size larger than 90% of the screen size +#autofit-larger=90%x90% + +# Do not close the window on exit. +#keep-open=yes + +# Do not wait with showing the video window until it has loaded. (This will +# resize the window once video is loaded. Also always shows a window with +# audio.) +#force-window=immediate + +# Disable the On Screen Controller (OSC). +#osc=no + +# Keep the player window on top of all other windows. +#ontop=yes + +# Specify high quality video rendering preset (for --vo=gpu only) +# Can cause performance problems with some drivers and GPUs. +#profile=gpu-hq + +# Force video to lock on the display's refresh rate, and change video and audio +# speed to some degree to ensure synchronous playback - can cause problems +# with some drivers and desktop environments. +#video-sync=display-resample + +# Enable hardware decoding if available. Often, this does not work with all +# video outputs, but should work well with default settings on most systems. +# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs +# may or may not help. +#hwdec=auto + +################## +# audio settings # +################## + +# Specify default audio device. You can list devices with: --audio-device=help +# The option takes the device string (the stuff between the '...'). +#audio-device=alsa/default + +# Do not filter audio to keep pitch when changing playback speed. +#audio-pitch-correction=no + +# Output 5.1 audio natively, and upmix/downmix audio with a different format. +#audio-channels=5.1 +# Disable any automatic remix, _if_ the audio output accepts the audio format. +# of the currently played file. See caveats mentioned in the manpage. +# (The default is "auto-safe", see manpage.) +#audio-channels=auto + +################## +# other settings # +################## + +# Pretend to be a web browser. Might fix playback with some streaming sites, +# but also will break with shoutcast streams. +#user-agent="Mozilla/5.0" + +# cache settings +# +# Use a large seekable RAM cache even for local input. +#cache=yes +# +# Use extra large RAM cache (needs cache=yes to make it useful). +#demuxer-max-bytes=500M +#demuxer-max-back-bytes=100M +# +# Disable the behavior that the player will pause if the cache goes below a +# certain fill size. +#cache-pause=no +# +# Store cache payload on the hard disk instead of in RAM. (This may negatively +# impact performance unless used for slow input such as network.) +#cache-dir=~/.cache/ +#cache-on-disk=yes + +# Display English subtitles if available. +#slang=en + +# Play Finnish audio if available, fall back to English otherwise. +#alang=fi,en + +# Change subtitle encoding. For Arabic subtitles use 'cp1256'. +# If the file seems to be valid UTF-8, prefer UTF-8. +# (You can add '+' in front of the codepage to force it.) +#sub-codepage=cp1256 + +# You can also include other configuration files. +#include=/path/to/the/file/you/want/to/include + +############ +# Profiles # +############ + +# The options declared as part of profiles override global default settings, +# but only take effect when the profile is active. + +# The following profile can be enabled on the command line with: --profile=eye-cancer + +#[eye-cancer] +#sharpen=5 diff --git a/ranger/rc.conf b/ranger/rc.conf new file mode 100644 index 0000000..81d9d21 --- /dev/null +++ b/ranger/rc.conf @@ -0,0 +1,463 @@ + # allows flipping through current dir in feh +set open_all_images true +set preview_images true + +# Requires ueberzug as external dependency +set preview_images_method ueberzug + +# Preview files on the rightmost column? +# And collapse (shrink) the last column if there is nothing to preview? +set preview_files true +set preview_directories true +set collapse_preview true + +# Wrap long lines in plain text previews? +set wrap_plaintext_previews true + +# Save the console history on exit? +set save_console_history false + +set draw_borders none + +# Display the directory name in tabs? +set dirname_in_tabs false + +# Enable the mouse support? +set mouse_enabled false + + +# =================================================================== +# == Command Aliases in the Console +# =================================================================== + +alias e edit +alias q quit +alias q! quit! +alias qa quitall +alias qa! quitall! +alias qall quitall +alias qall! quitall! +alias setl setlocal + +alias filter scout -prts +alias find scout -aets +alias mark scout -mr +alias unmark scout -Mr +alias search scout -rs +alias search_inc scout -rts +alias travel scout -aefklst + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +map Q quitall +map q quit +copymap q ZZ ZQ + +map R reload_cwd +map F set freeze_files! +map reset +map redraw_window +map abort +map change_mode normal +map ~ set viewmode! + +map i display_file +map scroll_preview 1 +map scroll_preview -1 +map ? help +map W display_log +map w taskview_open +map B shell $SHELL + +map : console +map ; console +map ! console shell%space +map @ console -p6 shell %%s +map # console shell -p%space +map b console shell%space +map r chain draw_possible_programs; console open_with%space +map f console find%space +map cd console cd%space + +map chain console; eval fm.ui.console.history_move(-1) + +# Change the line mode +map Mf linemode filename +map Mi linemode fileinfo +map Mm linemode mtime +map Mh linemode humanreadablemtime +map Mp linemode permissions +map Ms linemode sizemtime +map MH linemode sizehumanreadablemtime +map Mt linemode metatitle + +# Tagging / Marking +#map t tag_toggle +map ut tag_remove +map " tag_toggle tag=%any +map mark_files toggle=True +map v mark_files all=True toggle=True +map uv mark_files all=True val=False +map V toggle_visual_mode +map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +map help +map rename_append +map display_file +map edit +map copy +map cut +map console mkdir%space +map console delete +#map console trash +map exit + +# In case you work on a keyboard with dvorak layout +map move up=1 +map move down=1 +map move left=1 +map move right=1 +map move to=0 +map move to=-1 +map move down=1 pages=True +map move up=1 pages=True +map move right=1 +#map console delete +map console touch%space + +# VIM-like +copymap n +copymap t +copymap h +copymap s +copymap gg +copymap G +copymap +copymap + +map T move down=0.5 pages=True +map N move up=0.5 pages=True +copymap J +copymap K + +# Jumping around +map H history_go -1 +map S history_go 1 +map ] move_parent 1 +map [ move_parent -1 +map } traverse +map { traverse_backwards +map ) jump_non + +map gh cd ~ +map ge cd /etc +map gu cd /usr +map gd cd /dev +map gl cd -r . +map gL cd -r %f +map go cd /opt +map gv cd /var +map gm cd /media +map gi eval fm.cd('/run/media/' + os.getenv('USER')) +map gM cd /mnt +map gs cd /srv +map gp cd /tmp +map gr cd / +map gR eval fm.cd(ranger.RANGERDIR) +map g/ cd / +map g? cd /usr/share/doc/ranger + +# External Programs +map E edit +map du shell -p du --max-depth=1 -h --apparent-size +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map yp yank path +map yd yank dir +map yn yank name +map y. yank name_without_extension + +# Filesystem Operations +map = chmod + +map cw console rename%space +map a rename_append +map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) +map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) + +map pp paste +map po paste overwrite=True +map pP paste append=True +map pO paste overwrite=True append=True +map pl paste_symlink relative=False +map pL paste_symlink relative=True +map phl paste_hardlink +map pht paste_hardlinked_subtree +map pd console paste dest= +map p` paste dest=%any_path +map p' paste dest=%any_path + +map dD console delete +map dT console trash + +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove +map dt cut mode=toggle + +map yy copy +map uy uncut +map ya copy mode=add +map yr copy mode=remove +map yt copy mode=toggle + +# Temporary workarounds +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + +# Searching +map / console search%space +map l search_next +map L search_next forward=False +map ct search_next order=tag +map cs search_next order=size +map ci search_next order=mimetype +map cc search_next order=ctime +map cm search_next order=mtime +map ca search_next order=atime + +# Tabs +map tab_new +map tab_close +map tab_move 1 +map tab_move -1 +map tab_move 1 +map tab_move -1 +map gt tab_move 1 +map gT tab_move -1 +map gn tab_new +map gc tab_close +map uq tab_restore +map tab_open 1 +map tab_open 2 +map tab_open 3 +map tab_open 4 +map tab_open 5 +map tab_open 6 +map tab_open 7 +map tab_open 8 +map tab_open 9 +map tab_shift 1 +map tab_shift -1 + +# Sorting +map or set sort_reverse! +map oz set sort=random +map os chain set sort=size; set sort_reverse=False +map ob chain set sort=basename; set sort_reverse=False +map on chain set sort=natural; set sort_reverse=False +map om chain set sort=mtime; set sort_reverse=False +map oc chain set sort=ctime; set sort_reverse=False +map oa chain set sort=atime; set sort_reverse=False +map ot chain set sort=type; set sort_reverse=False +map oe chain set sort=extension; set sort_reverse=False + +map oS chain set sort=size; set sort_reverse=True +map oB chain set sort=basename; set sort_reverse=True +map oN chain set sort=natural; set sort_reverse=True +map oM chain set sort=mtime; set sort_reverse=True +map oC chain set sort=ctime; set sort_reverse=True +map oA chain set sort=atime; set sort_reverse=True +map oT chain set sort=type; set sort_reverse=True +map oE chain set sort=extension; set sort_reverse=True + +map dc get_cumulative_size + +# Settings +map zc set collapse_preview! +map zd set sort_directories_first! +map zh set show_hidden! +map set show_hidden! +copymap +copymap +map zI set flushinput! +map zi set preview_images! +map zm set mouse_enabled! +map zp set preview_files! +map zP set preview_directories! +map zs set sort_case_insensitive! +map zu set autoupdate_cumulative_size! +map zv set use_preview_script! +map zf console filter%space +copymap zf zz + +# Filter stack +map .d filter_stack add type d +map .f filter_stack add type f +map .l filter_stack add type l +map .m console filter_stack add mime%space +map .n console filter_stack add name%space +map .# console filter_stack add hash%space +map ." filter_stack add duplicate +map .' filter_stack add unique +map .| filter_stack add or +map .& filter_stack add and +map .! filter_stack add not +map .r filter_stack rotate +map .c filter_stack clear +map .* filter_stack decompose +map .p filter_stack pop +map .. filter_stack show + +# Bookmarks +map ` enter_bookmark %any +map ' enter_bookmark %any +map m set_bookmark %any +map um unset_bookmark %any + +map m draw_bookmarks +copymap m um ` ' + +# Generate all the chmod bindings with some python help: +eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) + +# =================================================================== +# == Define keys for the console +# =================================================================== +# Note: Unmapped keys are passed directly to the console. + +# Basic +cmap eval fm.ui.console.tab() +cmap eval fm.ui.console.tab(-1) +cmap eval fm.ui.console.close() +cmap eval fm.ui.console.execute() +cmap redraw_window + +copycmap +copycmap + +# Move around +cmap eval fm.ui.console.history_move(-1) +cmap eval fm.ui.console.history_move(1) +cmap eval fm.ui.console.move(left=1) +cmap eval fm.ui.console.move(right=1) +cmap eval fm.ui.console.move(right=0, absolute=True) +cmap eval fm.ui.console.move(right=-1, absolute=True) +cmap eval fm.ui.console.move_word(left=1) +cmap eval fm.ui.console.move_word(right=1) + +copycmap +copycmap + +# Line Editing +cmap eval fm.ui.console.delete(-1) +cmap eval fm.ui.console.delete(0) +cmap eval fm.ui.console.delete_word() +cmap eval fm.ui.console.delete_word(backward=False) +cmap eval fm.ui.console.delete_rest(1) +cmap eval fm.ui.console.delete_rest(-1) +cmap eval fm.ui.console.paste() + +# And of course the emacs way +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap + +# Note: There are multiple ways to express backspaces. (code 263) +# and (code 127). To be sure, use both. +copycmap + +# This special expression allows typing in numerals: +cmap false + +# =================================================================== +# == Pager Keybindings +# =================================================================== + +# Movement +pmap pager_move down=1 +pmap pager_move up=1 +pmap pager_move left=4 +pmap pager_move right=4 +pmap pager_move to=0 +pmap pager_move to=-1 +pmap pager_move down=1.0 pages=True +pmap pager_move up=1.0 pages=True +pmap pager_move down=0.5 pages=True +pmap pager_move up=0.5 pages=True + +copypmap n +copypmap t +copypmap h +copypmap s +copypmap g +copypmap G +copypmap d +copypmap u +copypmap p b + +# Basic +pmap redraw_window +pmap pager_close +copypmap q Q i +pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +tmap taskview_move up=1 +tmap taskview_move down=1 +tmap taskview_move to=0 +tmap taskview_move to=-1 +tmap taskview_move down=1.0 pages=True +tmap taskview_move up=1.0 pages=True +tmap taskview_move down=0.5 pages=True +tmap taskview_move up=0.5 pages=True + +copytmap k +copytmap j +copytmap g +copytmap G +copytmap u +copytmap p b + +# Changing priority and deleting tasks +tmap J eval -q fm.ui.taskview.task_move(-1) +tmap K eval -q fm.ui.taskview.task_move(0) +tmap dd eval -q fm.ui.taskview.task_remove() +tmap eval -q fm.ui.taskview.task_move(-1) +tmap eval -q fm.ui.taskview.task_move(0) +tmap eval -q fm.ui.taskview.task_remove() + +# Basic +tmap redraw_window +tmap taskview_close +copytmap q Q w diff --git a/ranger/rifle.conf b/ranger/rifle.conf new file mode 100644 index 0000000..e66a6f6 --- /dev/null +++ b/ranger/rifle.conf @@ -0,0 +1,285 @@ +# vim: ft=cfg +# +# This is the configuration file of "rifle", ranger's file executor/opener. +# Each line consists of conditions and a command. For each line the conditions +# are checked and if they are met, the respective command is run. +# +# Syntax: +# , , ... = command +# +# The command can contain these environment variables: +# $1-$9 | The n-th selected file +# $@ | All selected files +# +# If you use the special command "ask", rifle will ask you what program to run. +# +# Prefixing a condition with "!" will negate its result. +# These conditions are currently supported: +# match | The regexp matches $1 +# ext | The regexp matches the extension of $1 +# mime | The regexp matches the mime type of $1 +# name | The regexp matches the basename of $1 +# path | The regexp matches the absolute path of $1 +# has | The program is installed (i.e. located in $PATH) +# env | The environment variable "variable" is non-empty +# file | $1 is a file +# directory | $1 is a directory +# number | change the number of this command to n +# terminal | stdin, stderr and stdout are connected to a terminal +# X | A graphical environment is available (darwin, Xorg, or Wayland) +# +# There are also pseudo-conditions which have a "side effect": +# flag | Change how the program is run. See below. +# label