From 12ad637a7e8b72752cd9100dddc09db5202e1f8c Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:02:26 -0300 Subject: [PATCH 1/8] feat: add new ranger keybinds --- .config/ranger/rc.conf | 86 +++++++++++++++++++++++++++++++++++++++++ docs/ranger-keybinds.md | 29 ++++++++++++++ setup.sh | 8 ++-- 3 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 .config/ranger/rc.conf create mode 100644 docs/ranger-keybinds.md mode change 100644 => 100755 setup.sh diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf new file mode 100644 index 0000000..5f53644 --- /dev/null +++ b/.config/ranger/rc.conf @@ -0,0 +1,86 @@ + + +############################################################################### +# Basic config +############################################################################### + + +set viewmode miller +set column_ratios 1,3,4 +set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ +set show_hidden false +set confirm_on_delete never +set preview_script ~/.config/ranger/scope.sh +set use_preview_script true +set automatically_count_files true +set open_all_images true +set vcs_aware false +set vcs_backend_git enabled +set vcs_backend_hg disabled +set vcs_backend_bzr disabled +set preview_images true +set preview_images_method ueberzug +set unicode_ellipsis false +set show_hidden_bookmarks true +set colorscheme default +set preview_files true +set preview_directories true +set collapse_preview true +set save_console_history true +set status_bar_on_top false +set draw_progress_bar_in_status_bar true +set draw_borders true +set dirname_in_tabs false +set mouse_enabled true +set display_size_in_main_column true +set display_size_in_status_bar true +set display_tags_in_all_columns true +set update_title false +set update_tmux_title false +set shorten_title 3 +set tilde_in_titlebar false +set max_history_size 20 +set max_console_history_size 50 +set scroll_offset 8 +set flushinput true +set padding_right true +set autosave_bookmarks true +set autoupdate_cumulative_size false +set show_cursor false +set sort natural +set sort_reverse false +set sort_case_insensitive true +set sort_directories_first true +set sort_unicode false +set xterm_alt_key false +set cd_bookmarks true +set preview_max_size 0 +set show_selection_in_titlebar true +set idle_delay 2000 +set metadata_deep_search false +set clear_filters_on_dir_change false +set line_numbers false + + +############################################################################### +# Keybinds +############################################################################### + + +# Movement +map l move up=1 +map k move down=1 +map j move left=1 +map ; move right=1 +map h set show_hidden! +map s move to=0 +map d move to=-1 +map [ move up=1 pages=True +map ' move down=1 pages=True + +# Insert +map o console delete +map u console touch%space + +# Quit +map p quit diff --git a/docs/ranger-keybinds.md b/docs/ranger-keybinds.md new file mode 100644 index 0000000..ea1932f --- /dev/null +++ b/docs/ranger-keybinds.md @@ -0,0 +1,29 @@ +# Index + +1) [Cursor](#cursor) +1) [Insert](#insert) +1) [Quit](#quit) + +## Cursor +```yaml +move up=1 l +move down=1 k +move left=1 j +move right=1 ; +set show_hidden! h +move to=0 s +move to=-1 d +move up=1 pages=True [ +move down=1 pages=True ' +``` + +## Insert +```yaml +console delete o +console touch%space u +``` + +## Quit +```yaml +quit q +``` diff --git a/setup.sh b/setup.sh old mode 100644 new mode 100755 index e4185e9..d728231 --- a/setup.sh +++ b/setup.sh @@ -9,20 +9,22 @@ # Ask for password and save it to don't ask for it again in the future CORRECT_PASSWORD=false -until [ $CORRECT_PASSWORD ]; do +until [ $CORRECT_PASSWORD == true ]; do echo -n "Password: " IFS= read -rs PASSWORD sudo -k if echo "$PASSWORD" | sudo -Sl &> /dev/null; then CORRECT_PASSWORD=true + else + echo -e "\nWrong password" fi done # Config yay -yay --save --answerclean None --answerdiff None --answeredit None --noremovemake --cleanafter --noprovides +yay --save --answerclean None --answerdiff None --answeredit None --noremovemake --cleanafter --noprovides --sudoloop # Update and Upgrade -yes | yay -Syu --sudoloop +yes | yay -Syu # Update timezone echo "$PASSWORD" | sudo -S timedatectl set-ntp true From 25fddfd1e776cf055dad18b41809236ee33d1638 Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:03:02 -0300 Subject: [PATCH 2/8] feat: update wiki --- README.md | 2 +- docs/Home.md | 3 ++- docs/_Sidebar.md | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a59f349..b2253cc 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,6 @@ Considering the words above, there are a couple of things to know to approach th Using this ship is difficult because the rudder has been very tunned. -I leave at hand a wiki that helps to know the customized keyboard shortcuts used for VSCode, tmux, and i3, and that also lists all the useful functions that are available for the shell. +I leave at hand a wiki that helps to know the customized keyboard shortcuts used for VSCode, ranger, tmux, and i3, and that also lists all the useful functions that are available for the shell. [Command center](https://github.com/lucasvazq/dotfiles/wiki) diff --git a/docs/Home.md b/docs/Home.md index 0b7a697..6f573ad 100644 --- a/docs/Home.md +++ b/docs/Home.md @@ -1,5 +1,5 @@ Using this ship is difficult because the rudder has been very tunned. -I leave at hand this wiki that helps to know the customized keyboard shortcuts used for VSCode, tmux, and i3, and that also lists all the useful functions that are available for the shell. +I leave at hand this wiki that helps to know the customized keyboard shortcuts used for VSCode, ranger, tmux, and i3, and that also lists all the useful functions that are available for the shell. ## Keybinds @@ -16,6 +16,7 @@ I leave at hand this wiki that helps to know the customized keyboard shortcuts u - [VSCode keybinds](https://github.com/lucasvazq/dotfiles/wiki/VSCode-keybinds) +- [ranger keybinds](https://github.com/lucasvazq/dotfiles/wiki/ranger-keybinds) - [tmux keybinds](https://github.com/lucasvazq/dotfiles/wiki/tmux-keybinds) - [i3wm keybinds](https://github.com/lucasvazq/dotfiles/wiki/i3-keybinds) diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index d5b5189..eac8c9f 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -5,6 +5,7 @@ [Keyboard layout](https://github.com/lucasvazq/dotfiles/blob/master/docs/keyboard_layout.png) - [VSCode keybinds](https://github.com/lucasvazq/dotfiles/wiki/VSCode-keybinds) +- [ranger keybinds](https://github.com/lucasvazq/dotfiles/wiki/ranger-keybinds) - [tmux keybinds](https://github.com/lucasvazq/dotfiles/wiki/tmux-keybinds) - [i3wm keybinds](https://github.com/lucasvazq/dotfiles/wiki/i3-keybinds) From bcd041489b6381f4c5440aa7cc0542cfe815075b Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:04:35 -0300 Subject: [PATCH 3/8] fix: remove empty lines at start of file --- .config/ranger/rc.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index 5f53644..59af8b4 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -1,5 +1,3 @@ - - ############################################################################### # Basic config ############################################################################### From 7f82b23f6261adcafea7f1e63a167e71823c4bda Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:05:18 -0300 Subject: [PATCH 4/8] fix: improve code --- .config/ranger/rc.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index 59af8b4..6fb22b4 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -73,8 +73,8 @@ map ; move right=1 map h set show_hidden! map s move to=0 map d move to=-1 -map [ move up=1 pages=True -map ' move down=1 pages=True +map [ move up=1 pages=True +map ' move down=1 pages=True # Insert map o console delete From f99c81c591273d1670b53c0ddaea4265dcfaa67d Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:05:53 -0300 Subject: [PATCH 5/8] docs: improve code comment --- .config/ranger/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index 6fb22b4..10dced0 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -65,7 +65,7 @@ set line_numbers false ############################################################################### -# Movement +# Cursor map l move up=1 map k move down=1 map j move left=1 From bc31172eca97f52e425e13270301d18c874bbf51 Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:14:11 -0300 Subject: [PATCH 6/8] feat: add ranger related env var to zshrc --- .zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index bc2a239..73d40a8 100644 --- a/.zshrc +++ b/.zshrc @@ -2,7 +2,7 @@ ############################################################################### -# General config +# Basic config ############################################################################### @@ -26,7 +26,10 @@ export ZSH_THEME=custom export plugins=(git virtualenv shrink-path) source $ZSH/oh-my-zsh.sh -# Custom ls config +# ranger config +export RANGER_LOAD_DEFAULT_RC=false + +# ls alias alias ls="ls -F -h --color=always -a" From 167c9796d827fe19fe37592aabb0ae71f16fa905 Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 13:50:53 -0300 Subject: [PATCH 7/8] feat: show titlebar for viewnior --- .i3/config | 1 + 1 file changed, 1 insertion(+) diff --git a/.i3/config b/.i3/config index f7ac69a..47ed970 100644 --- a/.i3/config +++ b/.i3/config @@ -98,6 +98,7 @@ set $ws9 9 # Specify open type for_window [class="^.*"] border pixel 2 +for_window [class="^Viewnior$"] border normal for_window [class="^Pulseeffects$"] floating enable border pixel 2 for_window [class="^Pavucontrol$"] floating enable border pixel 2 for_window [class="^Nm-connection-editor$"] floating enable border pixel 2 From 963a95ed692555c5c7dc941df4199dae881f514c Mon Sep 17 00:00:00 2001 From: lucasvazq Date: Mon, 17 Aug 2020 14:00:29 -0300 Subject: [PATCH 8/8] fix: fix wiki index --- docs/ranger-keybinds.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ranger-keybinds.md b/docs/ranger-keybinds.md index ea1932f..afae980 100644 --- a/docs/ranger-keybinds.md +++ b/docs/ranger-keybinds.md @@ -1,8 +1,8 @@ # Index 1) [Cursor](#cursor) -1) [Insert](#insert) -1) [Quit](#quit) +2) [Insert](#insert) +3) [Quit](#quit) ## Cursor ```yaml