···11-{lib, config, pkgs, inputs, ...}:
22-33-{
44- xsession.windowManager.bspwm =
55- {
66- enable = true;
77- monitors = {
88- eDP-1-1 = [
99- "[1]"
1010- "[2]"
1111- "[3]"
1212- "[4]"
1313- "[5]"
1414- "[6]"
1515- ];
1616- };
1717- rules = {
1818- "mpv" = {
1919- state = "pseudo_tiled";
2020- };
2121- "TelegramDesktop" = {
2222- state = "floating";
2323- };
2424- # "Zathura" = {
2525- # state = "floating";
2626- # };
2727- "Peek" = {
2828- state = "floating";
2929- };
3030- "ZenlessZoneZero.exe" = {
3131- state = "floating";
3232- };
3333- "floorp" = {
3434- desktop = "^1";
3535- };
3636- "vesktop" = {
3737- desktop = "^6";
3838- state = "fullscreen";
3939- };
4040- # "" = {
4141- # state = ;
4242- # };
4343- };
4444- settings = lib.mkForce {
4545- border_width = 3;
4646- window_gap = 4;
4747- focused_border_color = "#0060FF";
4848- normal_border_color = "#7700AE";
4949- active_border_color = "#0060FF";
5050- pointer_modifier = "mod1";
5151- focus_follows_pointer = true;
5252- split_ratio = 0.5;
5353- borderless_monocle = true;
5454- gapless_monocle = true;
5555- single_monocle = true;
5656-5757- };
5858- # extraConfig = ''
5959- # pgrep -x sxhkd > /dev/null || sxhkd &
6060- # '';
6161- };
6262- services.sxhkd = {
6363- enable = true;
6464- keybindings = {
6565- "super + t" = "kitty";
6666- "super + space" = "rofi -show";
6767- "super + x" = "xfce4-session-logout";
6868- # Gui apps
6969- "super + {w,f}" = "{floorp,thunar}";
7070- # Tuu apps
7171- "super + {g,m,h,n}" = "kitty -e {qalc,ncmpcpp,btop,nvim}";
7272- # Screenshot
7373- "Print" = "flameshot gui";
7474- # MPD
7575- "shift + alt + {p,n,b,k,l,c}" = "mpc {toggle,next,prev,volume -5,volume +5,clear}";
7676- # Media keys
7777- "{XF86AudioRaiseVolume,XF86AudioLowerVolume}" = "pamixer -{i,d} 2";
7878- "XF86AudioMute" = "pamixer -t";
7979- # reload sxhkd config
8080- "super + Escape" = "pkill -USR1 -x sxhkd";
8181- # BSPwm hotkeys
8282- # quit/restart bspwm
8383- "super + alt + {q,r}" = "bspc {quit,wm -r}";
8484- # close and kill window
8585- "super + {_,shift + }q" = "bspc node -{c,k}";
8686- # alternate between the tiled and monocle layout
8787- "super + shift + m" = "bspc desktop -l next";
8888- # set the window state
8989- "super + shift + {t,s,f}" = "bspc node -t {tiled,floating,fullscreen}";
9090- # focus the node in the given direction
9191- "super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
9292- # focus the next/previous window in the current desktop
9393- "alt + {_,shift + }Tab" = "bspc node -f {next,prev}.local.!hidden.window";
9494- # focus the next/previous desktop in the current monitor
9595- "super + {a,s}" = "bspc desktop -f {prev,next}.local";
9696- # focus or send to the given desktop
9797- "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '^{1-9,10}'";
9898- # preselect the direction
9999- "super + ctrl + {Left,Down,Up,Right}" = "bspc node -p {west,south,north,east}";
100100- # preselect the ratio
101101- "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}";
102102- # cancel the preselection for the focused node
103103- "super + ctrl + space" = "bspc node -p cancel";
104104- # expand a window by moving one of its side outward
105105- "super + alt + {Left,Down,Up,Right}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
106106- # contract a window by moving one of its side inward
107107- "super + alt + shift + {Left,Down,Up,Right}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
108108- # move a floating window
109109- "alt + shift + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
110110- };
111111- extraConfig = /*sxhkdrc*/ ''
112112-super + c
113113- /home/ladas552/.local/bin/word-lookup.sh
114114-super + l
115115- betterlockscreen -l dimblur
116116-shift + alt + m
117117- /home/ladas552/.local/bin/musnow.sh
118118-## send the newest marked node to the newest preselected node
119119-##super + y
120120-## bspc node newest.marked.local -n newest.!automatic.local
121121-## swap the current node and the biggest window
122122-##super + g
123123-## bspc node -s biggest.window
124124-## state/flags
125125-## set the node flags
126126-##super + ctrl + {m,x,y,z}
127127-## bspc node -g {marked,locked,sticky,private}
128128-## focus/swap
129129-## focus the node for the given path jump
130130-##super + {p,b,comma,period}
131131-## bspc node -f @{parent,brother,first,second}
132132-## focus the last node/desktop
133133-##super + {grave,Tab}
134134-## bspc {node,desktop} -f last
135135-## focus the older or newer node in the focus history
136136-##super + {o,i}
137137-## bspc wm -h off; \
138138-## bspc node {older,newer} -f; \
139139-## bspc wm -h on
140140-## preselect
141141-## cancel the preselection for the focused desktop
142142-super + ctrl + shift + space
143143- bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
144144-# '';
145145- };
146146-}
-309
Home-Manager/desktop/fileconfigs/config.kdl
···11-// This config is in the KDL format: https://kdl.dev
22-// "/-" comments out the following node.
33-// Check the wiki for a full description of the configuration:
44-// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
55-66-input {
77- keyboard {
88- xkb {
99- layout "us,kz"
1010- options "grp:caps_toggle"
1111- }
1212- }
1313-//Libinput method
1414- touchpad {
1515- tap
1616- // dwt
1717- // dwtp
1818- natural-scroll
1919- // accel-speed 0.2
2020- // accel-profile "flat"
2121- }
2222-2323- mouse {
2424- // natural-scroll
2525- // accel-speed 0.2
2626- accel-profile "flat"
2727- }
2828-2929- // Uncomment this to make the mouse warp to the center of newly focused windows.
3030- // warp-mouse-to-focus
3131-3232- // Focus windows and outputs automatically when moving the mouse into them.
3333- // focus-follows-mouse
3434-}
3535-3636-// Settings that influence how windows are positioned and sized.
3737-// Find more information on the wiki:
3838-// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
3939-layout {
4040- gaps 12
4141-4242- center-focused-column "on-overflow"
4343-4444- preset-column-widths {
4545- proportion 0.25
4646- proportion 0.5
4747- proportion 0.75
4848- proportion 1.0
4949- }
5050-5151- // You can change the default width of the new windows.
5252- default-column-width { proportion 0.5; }
5353- // If you leave the brackets empty, the windows themselves will decide their initial width.
5454- // default-column-width {}
5555-5656- // You can change how the focus ring looks.
5757- focus-ring {
5858- // Uncomment this line to disable the focus ring.
5959- // off
6060-6161- // How many logical pixels the ring extends out from the windows.
6262- width 4
6363-6464- // Colors can be set in a variety of ways:
6565- // - CSS named colors: "red"
6666- // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
6767- // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
6868-6969- // Color of the ring on the active monitor.
7070- // active-color "#7fc8ff"
7171- active-color "#0060FF"
7272-7373- // Color of the ring on inactive monitors.
7474- // inactive-color "#505050"
7575- inactive-color "#7700AE"
7676-7777- // active-gradient from="#80c8ff" to="#bbddff" angle=45
7878-7979- // You can also color the gradient relative to the entire view
8080- // of the workspace, rather than relative to just the window itself.
8181- // To do that, set relative-to="workspace-view".
8282- //
8383- // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
8484- }
8585-8686- // You can also add a border. It's similar to the focus ring, but always visible.
8787- border {
8888- // The settings are the same as for the focus ring.
8989- // If you enable the border, you probably want to disable the focus ring.
9090- off
9191-9292- width 4
9393- // active-color "#ffc87f"
9494- active-color "#0060FF"
9595- // inactive-color "#505050"
9696- inactive-color "#7700AE"
9797-9898- // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
9999- // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
100100- }
101101-102102- // Struts shrink the area occupied by windows, similarly to layer-shell panels.
103103- // You can think of them as a kind of outer gaps. They are set in logical pixels.
104104- // Left and right struts will cause the next window to the side to always be visible.
105105- // Top and bottom struts will simply add outer gaps in addition to the area occupied by
106106- // layer-shell panels and regular gaps.
107107- struts {
108108- // left 64
109109- // right 64
110110- // top 64
111111- // bottom 64
112112- }
113113-}
114114-// AutoStart
115115-116116-//spawn-at-startup "xfce4-panel"
117117-118118-// No Decorations
119119-prefer-no-csd
120120-121121-// You can change the path where screenshots are saved.
122122-// The path is formatted with strftime(3) to give you the screenshot date and time.
123123-screenshot-path "~/Pictures/screenshots/Niri%Y-%m-%d %H-%M-%S.png"
124124-125125-// You can also set this to null to disable saving screenshots to disk.
126126-// screenshot-path null
127127-128128-// Animation settings.
129129-// The wiki explains how to configure individual animations:
130130-// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
131131-animations {
132132- // Uncomment to turn off all animations.
133133- // off
134134-135135- // Slow down all animations by this factor. Values below 1 speed them up instead.
136136- // slowdown 3.0
137137-}
138138-139139-// Window rules let you adjust behavior for individual windows.
140140-// Find more information on the wiki:
141141-// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
142142-143143-window-rule {
144144- match app-id="vesktop"
145145-146146- default-column-width { proportion 1.00; }
147147-}
148148-149149-// Example: block out two password managers from screen capture.
150150-// (This example rule is commented out with a "/-" in front.)
151151-window-rule {
152152- match app-id=r#"^org\.keepassxc\.KeePassXC$"#
153153- match app-id=r#"^org\.gnome\.World\.Secrets$"#
154154-155155- block-out-from "screen-capture"
156156-157157- // Use this instead if you want them visible on third-party screenshot tools.
158158- // block-out-from "screencast"
159159-}
160160-// Keybinds
161161-binds {
162162- // shows a list of important hotkeys.
163163- Mod+Shift+T { show-hotkey-overlay; }
164164-165165- // Apps
166166-167167- Mod+T { spawn "kitty"; }
168168- Mod+Space { spawn "rofi -show"; }
169169- Super+Alt+L { spawn "swaylock"; }
170170- Super+W { spawn "floorp"; }
171171-172172- // You can also use a shell:
173173- // Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
174174-175175- // Example volume keys mappings for PipeWire & WirePlumber.
176176- // The allow-when-locked=true property makes them work even when the session is locked.
177177- XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
178178- XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
179179- XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
180180- XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
181181-182182- Mod+Q { close-window; }
183183-184184- Mod+Left { focus-column-left; }
185185- Mod+Down { focus-window-down; }
186186- Mod+Up { focus-window-up; }
187187- Mod+Right { focus-column-right; }
188188- Mod+A { focus-column-left; }
189189- Mod+S { focus-column-right; }
190190- Mod+J { focus-window-down; }
191191- Mod+K { focus-window-up; }
192192-193193- Mod+Shift+Left { move-column-left; }
194194- Mod+Shift+Down { move-window-down; }
195195- Mod+Shift+Up { move-window-up; }
196196- Mod+Shift+Right { move-column-right; }
197197- Mod+Shift+A { move-column-left; }
198198- Mod+Shift+S { move-column-right; }
199199- Mod+Ctrl+H { move-column-left; }
200200- Mod+Ctrl+J { move-window-down; }
201201- Mod+Ctrl+K { move-window-up; }
202202- Mod+Ctrl+L { move-column-right; }
203203-204204- Mod+Home { focus-column-first; }
205205- Mod+End { focus-column-last; }
206206- Mod+Ctrl+Home { move-column-to-first; }
207207- Mod+Ctrl+End { move-column-to-last; }
208208-209209- Mod+Shift+H { focus-monitor-left; }
210210- Mod+Shift+J { focus-monitor-down; }
211211- Mod+Shift+K { focus-monitor-up; }
212212- Mod+Shift+L { focus-monitor-right; }
213213-214214- Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
215215- Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
216216- Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
217217- Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
218218- Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
219219- Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
220220- Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
221221- Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
222222-223223- Mod+Page_Up { focus-workspace-up; }
224224- Mod+Page_Down { focus-workspace-down; }
225225- Mod+Ctrl+A { focus-workspace-up; }
226226- Mod+Ctrl+S { focus-workspace-down; }
227227- Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
228228- Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
229229- Mod+Shift+Ctrl+A { move-column-to-workspace-up; }
230230- Mod+Shift+Ctrl+S { move-column-to-workspace-down; }
231231-232232- Mod+Shift+Page_Down { move-workspace-down; }
233233- Mod+Shift+Page_Up { move-workspace-up; }
234234-235235- Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
236236- Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
237237- Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
238238- Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
239239-240240- Mod+WheelScrollRight { focus-column-right; }
241241- Mod+WheelScrollLeft { focus-column-left; }
242242- Mod+Ctrl+WheelScrollRight { move-column-right; }
243243- Mod+Ctrl+WheelScrollLeft { move-column-left; }
244244-245245- // Usually scrolling up and down with Shift in applications results in
246246- // horizontal scrolling; these binds replicate that.
247247- Mod+Shift+WheelScrollDown { focus-column-right; }
248248- Mod+Shift+WheelScrollUp { focus-column-left; }
249249- Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
250250- Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
251251-252252- // Worlspaces
253253-254254- Mod+1 { focus-workspace 1; }
255255- Mod+2 { focus-workspace 2; }
256256- Mod+3 { focus-workspace 3; }
257257- Mod+Shift+1 { move-column-to-workspace 1; }
258258- Mod+Shift+2 { move-column-to-workspace 2; }
259259- Mod+Shift+3 { move-column-to-workspace 3; }
260260-261261- // Switches focus between the current and the previous workspace.
262262- Mod+Tab { focus-workspace-previous; }
263263-264264- Mod+Comma { consume-window-into-column; }
265265- Mod+Period { expel-window-from-column; }
266266-267267- // There are also commands that consume or expel a single window to the side.
268268- Mod+BracketLeft { consume-or-expel-window-left; }
269269- Mod+BracketRight { consume-or-expel-window-right; }
270270-271271- Mod+R { switch-preset-column-width; }
272272- Mod+F { maximize-column; }
273273- Mod+Shift+F { fullscreen-window; }
274274- Mod+C { center-column; }
275275-276276- // Finer width adjustments.
277277- // This command can also:
278278- // * set width in pixels: "1000"
279279- // * adjust width in pixels: "-5" or "+5"
280280- // * set width as a percentage of screen width: "25%"
281281- // * adjust width as a percentage of screen width: "-10%" or "+10%"
282282- // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
283283- // set-column-width "100" will make the column occupy 200 physical screen pixels.
284284- Mod+Minus { set-column-width "-10%"; }
285285- Mod+Equal { set-column-width "+10%"; }
286286-287287- // Finer height adjustments when in column with other windows.
288288- Mod+Shift+Minus { set-window-height "-10%"; }
289289- Mod+Shift+Equal { set-window-height "+10%"; }
290290-291291- // Actions to switch layouts.
292292- // Note: if you uncomment these, make sure you do NOT have
293293- // a matching layout switch hotkey configured in xkb options above.
294294- // Having both at once on the same hotkey will break the switching,
295295- // since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
296296- // Mod+Space { switch-layout "next"; }
297297- // Mod+Shift+Space { switch-layout "prev"; }
298298-299299- Print { screenshot; }
300300- Ctrl+Print { screenshot-screen; }
301301- Alt+Print { screenshot-window; }
302302-303303- // The quit action will show a confirmation dialog to avoid accidental exits.
304304- Mod+Ctrl+Shift+Q { quit; }
305305-306306- // Powers off the monitors. To turn them back on, do any input like
307307- // moving the mouse or pressing any other key.
308308- Mod+Shift+P { power-off-monitors; }
309309-}
···11-{ config, pkgs, inputs, ... }:
22-33-{
44- programs.ranger = {
55- enable = true;
66- extraConfig = ''
77- set viewmode miller
88- set column_ratios 1,3,4
99- set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
1010- set show_hidden false
1111- set confirm_on_delete multiple
1212- set use_preview_script true
1313- set automatically_count_files true
1414-1515-# Open all images in this directory when running certain image viewers
1616-# like feh or sxiv? You can still open selected files by marking them.
1717- set open_all_images true
1818-1919-# Be aware of version control systems and display information.
2020- set vcs_aware false
2121-2222-# State of the four backends git, hg, bzr, svn. The possible states are
2323-# disabled, local (only show local info), enabled (show local and remote
2424-# information).
2525- set vcs_backend_git enabled
2626- set vcs_backend_hg disabled
2727- set vcs_backend_bzr disabled
2828- set vcs_backend_svn disabled
2929-3030-# Truncate the long commit messages to this length when shown in the statusbar.
3131- set vcs_msg_length 50
3232-3333-# Use one of the supported image preview protocols
3434- set preview_images true
3535-3636- set preview_images_method kitty
3737-3838-# Delay in seconds before displaying an image with the w3m method.
3939-# Increase it in case of experiencing display corruption.
4040- set w3m_delay 0.02
4141-4242-# Manually adjust the w3mimg offset when using a terminal which needs this
4343- set w3m_offset 0
4444-4545-# Default iTerm2 font size (see: preview_images_method: iterm2)
4646- set iterm2_font_width 8
4747- set iterm2_font_height 11
4848-4949-# Use a unicode "..." character to mark cut-off filenames?
5050- set unicode_ellipsis false
5151-5252-# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
5353-# Requires the python-bidi pip package
5454- set bidi_support false
5555-5656-# Show dotfiles in the bookmark preview box?
5757- set show_hidden_bookmarks true
5858-5959-# Which colorscheme to use? These colorschemes are available by default:
6060-# default, jungle, snow, solarized
6161- set colorscheme default
6262-6363-# Preview files on the rightmost column?
6464-# And collapse (shrink) the last column if there is nothing to preview?
6565- set preview_files true
6666- set preview_directories true
6767- set collapse_preview true
6868-6969-# Wrap long lines in plain text previews?
7070- set wrap_plaintext_previews true
7171-7272-# Save the console history on exit?
7373- set save_console_history true
7474-7575-# Draw the status bar on top of the browser window (default: bottom)
7676- set status_bar_on_top false
7777-7878-# Draw a progress bar in the status bar which displays the average state of all
7979-# currently running tasks which support progress bars?
8080- set draw_progress_bar_in_status_bar true
8181-8282-# Draw borders around columns? (separators, outline, both, or none)
8383-# Separators are vertical lines between columns.
8484-# Outline draws a box around all the columns.
8585-# Both combines the two.
8686- set draw_borders none
8787-8888-# Display the directory name in tabs?
8989- set dirname_in_tabs false
9090-9191-# Enable the mouse support?
9292- set mouse_enabled true
9393-9494-# Display the file size in the main column or status bar?
9595- set display_size_in_main_column true
9696- set display_size_in_status_bar true
9797-9898-# Display the free disk space in the status bar?
9999- set display_free_space_in_status_bar true
100100-101101-# Display files tags in all columns or only in main column?
102102- set display_tags_in_all_columns true
103103-104104-# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
105105- set update_title true
106106-107107-# Set the tmux/screen window-name to "ranger"?
108108- set update_tmux_title true
109109-110110-# Shorten the title if it gets long? The number defines how many
111111-# directories are displayed at once, 0 turns off this feature.
112112- set shorten_title 3
113113-114114-# Show hostname in titlebar?
115115- set hostname_in_titlebar true
116116-117117-# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
118118- set tilde_in_titlebar false
119119-120120-# How many directory-changes or console-commands should be kept in history?
121121- set max_history_size 20
122122- set max_console_history_size 50
123123-124124-# Try to keep so much space between the top/bottom border when scrolling:
125125- set scroll_offset 8
126126-127127-# Flush the input after each key hit? (Noticeable when ranger lags)
128128- set flushinput true
129129-130130-# Padding on the right when there's no preview?
131131-# This allows you to click into the space to run the file.
132132- set padding_right true
133133-134134-# Save bookmarks (used with mX and `X) instantly?
135135-# This helps to synchronize bookmarks between multiple ranger
136136-# instances but leads to *slight* performance loss.
137137-# When false, bookmarks are saved when ranger is exited.
138138- set autosave_bookmarks true
139139-140140-# Save the "`" bookmark to disk. This can be used to switch to the last
141141-# directory by typing "``".
142142- set save_backtick_bookmark true
143143-144144-# You can display the "real" cumulative size of directories by using the
145145-# command :get_cumulative_size or typing "dc". The size is expensive to
146146-# calculate and will not be updated automatically. You can choose
147147-# to update it automatically though by turning on this option:
148148- set autoupdate_cumulative_size false
149149-150150-# Turning this on makes sense for screen readers:
151151- set show_cursor false
152152-153153-# One of: size, natural, basename, atime, ctime, mtime, type, random
154154- set sort type
155155-156156-# Additional sorting options
157157- set sort_reverse false
158158- set sort_case_insensitive true
159159- set sort_directories_first true
160160- set sort_unicode false
161161-162162-# Enable this if key combinations with the Alt Key don't work for you.
163163-# (Especially on xterm)
164164- set xterm_alt_key false
165165-166166-# Whether to include bookmarks in cd command
167167- set cd_bookmarks true
168168-169169-# Changes case sensitivity for the cd command tab completion
170170- set cd_tab_case sensitive
171171-172172-# Use fuzzy tab completion with the "cd" command. For example,
173173-# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
174174- set cd_tab_fuzzy false
175175-176176-# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
177177-# disable this feature.
178178- set preview_max_size 0
179179-180180-# The key hint lists up to this size have their sublists expanded.
181181-# Otherwise the submaps are replaced with "...".
182182- set hint_collapse_threshold 10
183183-184184-# Add the highlighted file to the path in the titlebar
185185- set show_selection_in_titlebar true
186186-187187-# The delay that ranger idly waits for user input, in milliseconds, with a
188188-# resolution of 100ms. Lower delay reduces lag between directory updates but
189189-# increases CPU load.
190190- set idle_delay 2000
191191-192192-# When the metadata manager module looks for metadata, should it only look for
193193-# a ".metadata.json" file in the current directory, or do a deep search and
194194-# check all directories above the current one as well?
195195- set metadata_deep_search false
196196-197197-# Clear all existing filters when leaving a directory
198198- set clear_filters_on_dir_change false
199199-200200-# Disable displaying line numbers in main column.
201201-# Possible values: false, absolute, relative.
202202- set line_numbers false
203203-204204-# When line_numbers=relative show the absolute line number in the
205205-# current line.
206206- set relative_current_zero false
207207-208208-# Start line numbers from 1 instead of 0
209209- set one_indexed false
210210-211211-# Save tabs on exit
212212- set save_tabs_on_exit false
213213-214214-# Enable scroll wrapping - moving down while on the last item will wrap around to
215215-# the top and vice versa.
216216- set wrap_scroll false
217217-218218-# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
219219-# directories, files and symlinks respectively.
220220- set global_inode_type_filter
221221-222222-# This setting allows to freeze the list of files to save I/O bandwidth. It
223223-# should be 'false' during start-up, but you can toggle it by pressing F.
224224- set freeze_files false
225225-226226-# Print file sizes in bytes instead of the default human-readable format.
227227- set size_in_bytes false
228228-229229-# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
230230-# give a warning when you nest ranger in a subshell started by ranger.
231231-# Special value "error" makes the warning more visible.
232232- set nested_ranger_warning true
233233-234234-# ===================================================================
235235-# == Local Options
236236-# ===================================================================
237237-# You can set local options that only affect a single directory.
238238-239239-# Examples:
240240-# setlocal path=~/downloads sort mtime
241241-242242-# ===================================================================
243243-# == Command Aliases in the Console
244244-# ===================================================================
245245-246246- alias e edit
247247- alias q quit
248248- alias q! quit!
249249- alias qa quitall
250250- alias qa! quitall!
251251- alias qall quitall
252252- alias qall! quitall!
253253- alias setl setlocal
254254-255255- alias filter scout -prts
256256- alias find scout -aets
257257- alias mark scout -mr
258258- alias unmark scout -Mr
259259- alias search scout -rs
260260- alias search_inc scout -rts
261261- alias travel scout -aefklst
262262-263263-# ===================================================================
264264-# == Define keys for the browser
265265-# ===================================================================
266266-267267-# Basic
268268- map Q quitall
269269- map q quit
270270- copymap q ZZ ZQ
271271-272272- map R reload_cwd
273273- map F set freeze_files!
274274- map <C-r> reset
275275- map <C-l> redraw_window
276276- map <C-c> abort
277277- map <esc> change_mode normal
278278- map ~ set viewmode!
279279-280280- map i display_file
281281- map <A-j> scroll_preview 1
282282- map <A-k> scroll_preview -1
283283- map ? help
284284- map W display_log
285285- map w taskview_open
286286- map S shell fish
287287-288288- map : console
289289- map ; console
290290- map ! console shell%space
291291- map @ console -p6 shell %%s
292292- map # console shell -p%space
293293- map s console shell%space
294294- map r chain draw_possible_programs; console open_with%space
295295- map f console find%space
296296- map cd console cd%space
297297-298298- map <C-p> chain console; eval fm.ui.console.history_move(-1)
299299-300300-# Change the line mode
301301- map Mf linemode filename
302302- map Mi linemode fileinfo
303303- map Mm linemode mtime
304304- map Mh linemode humanreadablemtime
305305- map Mp linemode permissions
306306- map Ms linemode sizemtime
307307- map MH linemode sizehumanreadablemtime
308308- map Mt linemode metatitle
309309-310310-# Tagging / Marking
311311- map t tag_toggle
312312- map ut tag_remove
313313- map <any> tag_toggle tag=%any
314314- map <Space> mark_files toggle=True
315315- map v mark_files all=True toggle=True
316316- map uv mark_files all=True val=False
317317- map V toggle_visual_mode
318318- map uV toggle_visual_mode reverse=True
319319-320320-# For the nostalgics: Midnight Commander bindings
321321- map <F1> console touch%space
322322- map <F2> rename_append
323323- map <F3> display_file
324324- map <F4> edit
325325- map <F5> copy
326326- map <F6> cut
327327- map <F7> console mkdir%space
328328- map <F8> console delete
329329-#map <F8> console trash
330330- map <F10> exit
331331-332332-# In case you work on a keyboard with dvorak layout
333333- map <UP> move up=1
334334- map <DOWN> move down=1
335335- map <LEFT> move left=1
336336- map <RIGHT> move right=1
337337- map <HOME> move to=0
338338- map <END> move to=-1
339339- map <PAGEDOWN> move down=1 pages=True
340340- map <PAGEUP> move up=1 pages=True
341341- map <CR> move right=1
342342-#map <DELETE> console delete
343343- map <INSERT> console touch%space
344344-345345-# VIM-like
346346- copymap <UP> k
347347- copymap <DOWN> j
348348- copymap <LEFT> h
349349- copymap <RIGHT> l
350350- copymap <HOME> gg
351351- copymap <END> G
352352- copymap <PAGEDOWN> <C-F>
353353- copymap <PAGEUP> <C-B>
354354-355355- map J move down=0.5 pages=True
356356- map K move up=0.5 pages=True
357357- copymap J <C-D>
358358- copymap K <C-U>
359359-360360-# Jumping around
361361- map H history_go -1
362362- map L history_go 1
363363- map ] move_parent 1
364364- map [ move_parent -1
365365- map } traverse
366366- map { traverse_backwards
367367- map ) jump_non
368368-369369- map gh cd ~
370370- map ge cd /etc
371371- map gu cd /usr
372372- map gd cd /dev
373373- map gl cd -r .
374374- map gL cd -r %f
375375- map go cd /opt
376376- map gv cd /var
377377- map gm cd /run/media
378378- map gi eval fm.cd('/run/media/' + os.getenv('USER'))
379379- map gM cd /mnt
380380- map gs cd /srv
381381- map gp cd /tmp
382382- map gr cd /
383383- map gR eval fm.cd(ranger.RANGERDIR)
384384- map g/ cd /
385385- map g? cd /usr/share/doc/ranger
386386-387387-# External Programs
388388- map E edit
389389- map du shell -p du --max-depth=1 -h --apparent-size
390390- map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
391391- map yp yank path
392392- map yd yank dir
393393- map yn yank name
394394- map y. yank name_without_extension
395395-396396-# Filesystem Operations
397397- map = chmod
398398-399399- map cw console rename%space
400400- map a rename_append
401401- map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
402402- map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
403403-404404- map pp paste
405405- map po paste overwrite=True
406406- map pP paste append=True
407407- map pO paste overwrite=True append=True
408408- map pl paste_symlink relative=False
409409- map pL paste_symlink relative=True
410410- map phl paste_hardlink
411411- map pht paste_hardlinked_subtree
412412- map pd console paste dest=
413413- map p`<any> paste dest=%any_path
414414- map p'<any> paste dest=%any_path
415415-416416- map dD console delete
417417- map dT console trash
418418-419419- map dd cut
420420- map ud uncut
421421- map da cut mode=add
422422- map dr cut mode=remove
423423- map dt cut mode=toggle
424424-425425- map yy copy
426426- map uy uncut
427427- map ya copy mode=add
428428- map yr copy mode=remove
429429- map yt copy mode=toggle
430430-431431-# Temporary workarounds
432432- map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
433433- map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
434434- map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
435435- map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
436436- map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
437437- map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
438438- map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
439439- map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
440440-441441-# Searching
442442- map / console search%space
443443- map n search_next
444444- map N search_next forward=False
445445- map ct search_next order=tag
446446- map cs search_next order=size
447447- map ci search_next order=mimetype
448448- map cc search_next order=ctime
449449- map cm search_next order=mtime
450450- map ca search_next order=atime
451451-452452-# Tabs
453453- map <C-n> tab_new
454454- map <C-w> tab_close
455455- map <TAB> tab_move 1
456456- map <S-TAB> tab_move -1
457457- map <A-Right> tab_move 1
458458- map <A-Left> tab_move -1
459459- map gt tab_move 1
460460- map gT tab_move -1
461461- map gn tab_new
462462- map gc tab_close
463463- map uq tab_restore
464464- map <a-1> tab_open 1
465465- map <a-2> tab_open 2
466466- map <a-3> tab_open 3
467467- map <a-4> tab_open 4
468468- map <a-5> tab_open 5
469469- map <a-6> tab_open 6
470470- map <a-7> tab_open 7
471471- map <a-8> tab_open 8
472472- map <a-9> tab_open 9
473473- map <a-r> tab_shift 1
474474- map <a-l> tab_shift -1
475475-476476-# Sorting
477477- map or set sort_reverse!
478478- map oz set sort=random
479479- map os chain set sort=size; set sort_reverse=False
480480- map ob chain set sort=basename; set sort_reverse=False
481481- map on chain set sort=natural; set sort_reverse=False
482482- map om chain set sort=mtime; set sort_reverse=False
483483- map oc chain set sort=ctime; set sort_reverse=False
484484- map oa chain set sort=atime; set sort_reverse=False
485485- map ot chain set sort=type; set sort_reverse=False
486486- map oe chain set sort=extension; set sort_reverse=False
487487-488488- map oS chain set sort=size; set sort_reverse=True
489489- map oB chain set sort=basename; set sort_reverse=True
490490- map oN chain set sort=natural; set sort_reverse=True
491491- map oM chain set sort=mtime; set sort_reverse=True
492492- map oC chain set sort=ctime; set sort_reverse=True
493493- map oA chain set sort=atime; set sort_reverse=True
494494- map oT chain set sort=type; set sort_reverse=True
495495- map oE chain set sort=extension; set sort_reverse=True
496496-497497- map dc get_cumulative_size
498498-499499-# Settings
500500- map zc set collapse_preview!
501501- map zd set sort_directories_first!
502502- map zh set show_hidden!
503503- map <C-h> set show_hidden!
504504- copymap <C-h> <backspace>
505505- copymap <backspace> <backspace2>
506506- map zI set flushinput!
507507- map zi set preview_images!
508508- map zm set mouse_enabled!
509509- map zp set preview_files!
510510- map zP set preview_directories!
511511- map zs set sort_case_insensitive!
512512- map zu set autoupdate_cumulative_size!
513513- map zv set use_preview_script!
514514- map zf console filter%space
515515- copymap zf zz
516516-517517-# Filter stack
518518- map .d filter_stack add type d
519519- map .f filter_stack add type f
520520- map .l filter_stack add type l
521521- map .m console filter_stack add mime%space
522522- map .n console filter_stack add name%space
523523- map .# console filter_stack add hash%space
524524- map ." filter_stack add duplicate
525525- map .' filter_stack add unique
526526- map .| filter_stack add or
527527- map .& filter_stack add and
528528- map .! filter_stack add not
529529- map .r filter_stack rotate
530530- map .c filter_stack clear
531531- map .* filter_stack decompose
532532- map .p filter_stack pop
533533- map .. filter_stack show
534534-535535-# Bookmarks
536536- map `<any> enter_bookmark %any
537537- map '<any> enter_bookmark %any
538538- map m<any> set_bookmark %any
539539- map um<any> unset_bookmark %any
540540-541541- map m<bg> draw_bookmarks
542542- copymap m<bg> um<bg> `<bg> '<bg>
543543-544544-# Generate all the chmod bindings with some python help:
545545- eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
546546- eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
547547- eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
548548- eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
549549- eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
550550-551551- eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
552552- eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
553553- eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
554554- eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
555555- eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
556556-557557-# ===================================================================
558558-# == Define keys for the console
559559-# ===================================================================
560560-# Note: Unmapped keys are passed directly to the console.
561561-562562-# Basic
563563- cmap <tab> eval fm.ui.console.tab()
564564- cmap <s-tab> eval fm.ui.console.tab(-1)
565565- cmap <ESC> eval fm.ui.console.close()
566566- cmap <CR> eval fm.ui.console.execute()
567567- cmap <C-l> redraw_window
568568-569569- copycmap <ESC> <C-c>
570570- copycmap <CR> <C-j>
571571-572572-# Move around
573573- cmap <up> eval fm.ui.console.history_move(-1)
574574- cmap <down> eval fm.ui.console.history_move(1)
575575- cmap <left> eval fm.ui.console.move(left=1)
576576- cmap <right> eval fm.ui.console.move(right=1)
577577- cmap <home> eval fm.ui.console.move(right=0, absolute=True)
578578- cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
579579- cmap <a-b> eval fm.ui.console.move_word(left=1)
580580- cmap <a-f> eval fm.ui.console.move_word(right=1)
581581-582582- copycmap <a-b> <a-left>
583583- copycmap <a-f> <a-right>
584584-585585-# Line Editing
586586- cmap <backspace> eval fm.ui.console.delete(-1)
587587- cmap <delete> eval fm.ui.console.delete(0)
588588- cmap <C-w> eval fm.ui.console.delete_word()
589589- cmap <A-d> eval fm.ui.console.delete_word(backward=False)
590590- cmap <C-k> eval fm.ui.console.delete_rest(1)
591591- cmap <C-u> eval fm.ui.console.delete_rest(-1)
592592- cmap <C-y> eval fm.ui.console.paste()
593593-594594-# And of course the emacs way
595595- copycmap <ESC> <C-g>
596596- copycmap <up> <C-p>
597597- copycmap <down> <C-n>
598598- copycmap <left> <C-b>
599599- copycmap <right> <C-f>
600600- copycmap <home> <C-a>
601601- copycmap <end> <C-e>
602602- copycmap <delete> <C-d>
603603- copycmap <backspace> <C-h>
604604-605605-# Note: There are multiple ways to express backspaces. <backspace> (code 263)
606606-# and <backspace2> (code 127). To be sure, use both.
607607- copycmap <backspace> <backspace2>
608608-609609-# This special expression allows typing in numerals:
610610- cmap <allow_quantifiers> false
611611-612612-# ===================================================================
613613-# == Pager Keybindings
614614-# ===================================================================
615615-616616-# Movement
617617- pmap <down> pager_move down=1
618618- pmap <up> pager_move up=1
619619- pmap <left> pager_move left=4
620620- pmap <right> pager_move right=4
621621- pmap <home> pager_move to=0
622622- pmap <end> pager_move to=-1
623623- pmap <pagedown> pager_move down=1.0 pages=True
624624- pmap <pageup> pager_move up=1.0 pages=True
625625- pmap <C-d> pager_move down=0.5 pages=True
626626- pmap <C-u> pager_move up=0.5 pages=True
627627-628628- copypmap <UP> k <C-p>
629629- copypmap <DOWN> j <C-n> <CR>
630630- copypmap <LEFT> h
631631- copypmap <RIGHT> l
632632- copypmap <HOME> g
633633- copypmap <END> G
634634- copypmap <C-d> d
635635- copypmap <C-u> u
636636- copypmap <PAGEDOWN> n f <C-F> <Space>
637637- copypmap <PAGEUP> p b <C-B>
638638-639639-# Basic
640640- pmap <C-l> redraw_window
641641- pmap <ESC> pager_close
642642- copypmap <ESC> q Q i <F3>
643643- pmap E edit_file
644644-645645-# ===================================================================
646646-# == Taskview Keybindings
647647-# ===================================================================
648648-649649-# Movement
650650- tmap <up> taskview_move up=1
651651- tmap <down> taskview_move down=1
652652- tmap <home> taskview_move to=0
653653- tmap <end> taskview_move to=-1
654654- tmap <pagedown> taskview_move down=1.0 pages=True
655655- tmap <pageup> taskview_move up=1.0 pages=True
656656- tmap <C-d> taskview_move down=0.5 pages=True
657657- tmap <C-u> taskview_move up=0.5 pages=True
658658-659659- copytmap <UP> k <C-p>
660660- copytmap <DOWN> j <C-n> <CR>
661661- copytmap <HOME> g
662662- copytmap <END> G
663663- copytmap <C-u> u
664664- copytmap <PAGEDOWN> n f <C-F> <Space>
665665- copytmap <PAGEUP> p b <C-B>
666666-667667-# Changing priority and deleting tasks
668668- tmap J eval -q fm.ui.taskview.task_move(-1)
669669- tmap K eval -q fm.ui.taskview.task_move(0)
670670- tmap dd eval -q fm.ui.taskview.task_remove()
671671- tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
672672- tmap <pageup> eval -q fm.ui.taskview.task_move(0)
673673- tmap <delete> eval -q fm.ui.taskview.task_remove()
674674-675675-# Basic
676676- tmap <C-l> redraw_window
677677- tmap <ESC> taskview_close
678678- copytmap <ESC> q Q w <C-c>
679679- '';
680680- };
681681-}
-19
Home-Manager/tools/vim/default.nix
···11-{ config, pkgs, inputs, ... }:
22-33-{
44- programs.vim = {
55- enable = true;
66- settings = {
77- relativenumber = true;
88- #Indent
99- tabstop = 2; # 2 spaces for tabs (prettier default)
1010- shiftwidth = 2; # 2 spaces for indent width
1111- expandtab = true; # expand tab to spaces
1212- #Search
1313- ignorecase = true; # ignore case when searching
1414- smartcase = true; # if you include mixed case in your search, assumes you want case-sensitive
1515- #Colors
1616- background = "dark"; # colorschemes that can be light or dark will be made dark
1717- };
1818- };
1919-}