all repos

dotfiles @ 734af357dd5f5f421f45ea8e7b330a2a19a1b11a

i use rach linux btw
33 files changed, 1430 insertions(+), 955 deletions(-)
:zap: Add scripts & configs
Author: Smirnov Olexandr ss2316544@gmail.com
Committed at: 2020-10-16 22:55:26 +0300
Parent: f8ffdbd
A config/dunst/dunstrc
···
                
                1
                +[global]

              
                
                2
                +    font = Hack 10

              
                
                3
                +    padding = 1

              
                
                4
                +    frame_color = "#073642"

              
                
                5
                +    frame_width = 2

              
                
                6
                +    allow_markup = yes

              
                
                7
                +    format = "<b>%a:</b> %s\n%b"

              
                
                8
                +    sort = yes

              
                
                9
                +    indicate_hidden = yes

              
                
                10
                +    alignment = left

              
                
                11
                +    bounce_freq = 0

              
                
                12
                +    show_age_threshold = 60

              
                
                13
                +    word_wrap = yes

              
                
                14
                +    ignore_newline = no

              
                
                15
                +    geometry = "300x5-30+40"

              
                
                16
                +    transparency = 0

              
                
                17
                +    idle_threshold = 120

              
                
                18
                +    monitor = 0

              
                
                19
                +    follow = keyboard

              
                
                20
                +    sticky_history = yes

              
                
                21
                +    line_height = 0

              
                
                22
                +    separator_height = 2

              
                
                23
                +    padding = 8

              
                
                24
                +    horizontal_padding = 8

              
                
                25
                +    separator_color = frame

              
                
                26
                +    startup_notification = true

              
                
                27
                +    browser = /usr/bin/firefox -new-tab

              
                
                28
                +

              
                
                29
                +[frame]

              
                
                30
                +    width = 0

              
                
                31
                +    color = "#000000"

              
                
                32
                +

              
                
                33
                +[shortcuts]

              
                
                34
                +    close = mod4+m

              
                
                35
                +    close_all = mod4+shift+m

              
                
                36
                +    history = mod4+n

              
                
                37
                +    context = mod4+shift+i

              
                
                38
                +

              
                
                39
                +[urgency_low]

              
                
                40
                +    background = "#002B36"

              
                
                41
                +    foreground = "#dfdfdf"

              
                
                42
                +    timeout = 10

              
                
                43
                +

              
                
                44
                +[urgency_normal]

              
                
                45
                +    background = "#002B36"

              
                
                46
                +    foreground = "#ffffff"

              
                
                47
                +    timeout = 10

              
                
                48
                +

              
                
                49
                +[urgency_critical]

              
                
                50
                +    background = "#900000"

              
                
                51
                +    foreground = "#ffffff"

              
                
                52
                +    timeout = 0
              
M config/i3/config
···
                3
                3
                 set $mod Mod4

              
                4
                4
                 # Font

              
                5
                5
                 font monospace 10

              
                6
                
                -font pango:hack 10

              
                
                6
                +font pango:JetBrains Mono 10

              
                7
                7
                 # Disable window title

              
                8
                8
                 default_border pixel

              
                
                9
                +new_float pixel

              
                
                10
                +# Borders

              
                
                11
                +hide_edge_borders smart

              
                9
                12
                 

              
                10
                13
                 ############ Autostart ############

              
                11
                14
                 exec --no-startup-id exec picom -b

              
                12
                
                -exec --no-startup-id exec feh --bg-scale ~/Imager/wallpaper.png

              
                
                15
                +exec --no-startup-id exec nmcli radio wifi on; nmcli device wifi connect <wifi-name> password <wifi-password> name net

              
                
                16
                +exec --no-startup-id exec redshift-gtk 

              
                13
                17
                 exec --no-startup-id exec setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle"

              
                14
                18
                 exec --no-startup-id exec org.telegram.desktop

              
                15
                19
                 exec --no-startup-id exec discord

              
                
                20
                +exec --no-startup-id exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

              
                
                21
                +exec --no-startup-id ecec clipmenud

              
                16
                22
                 

              
                17
                23
                 ############ Key bindings #########

              
                18
                24
                 # Terminal

              
                19
                25
                 bindsym $mod+Return exec kitty

              
                20
                
                -#bindsym $mod+Return exec konsole

              
                
                26
                +bindsym ctrl+Mod1+t exec kitty 

              
                21
                27
                 

              
                22
                28
                 # Kill focus window

              
                23
                29
                 bindsym $mod+q kill

              
                24
                30
                 bindsym Mod1+F4 kill

              
                25
                31
                 

              
                26
                32
                 # Program/Exit louncher

              
                27
                
                -bindsym $mod+space exec "rofi -show drun -show-icons -font 'hack 12' -show cobi -disable-history"

              
                28
                
                -bindsym $mod+Escape exec "rofi -show power-menu -show-icons -font 'hack 12' -width 30 -lines 6 -disable-history -modi power-menu:~/.config/rofi/rofi-power-menu"

              
                
                33
                +bindsym $mod+space exec "rofi -show drun -show cobi -show-icons"

              
                
                34
                +bindsym $mod+Escape exec "rofi -show power-menu -show-icons -width 30 -lines 6 -modi power-menu:~/.config/rofi/rofi-power-menu"

              
                29
                35
                 # Restart i3wm

              
                30
                36
                 bindsym $mod+Shift+r restart

              
                31
                37
                 

              
                
                38
                +# Sceenshot

              
                
                39
                +bindsym --release Print exec "scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png"

              
                
                40
                +bindsym --release Shift+Print exec "scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png"

              
                
                41
                +

              
                
                42
                +# Clipboard menu

              
                
                43
                +bindsym $mod+c exec "CM_LAUNCHER=rofi clipmenu"

              
                
                44
                +

              
                32
                45
                 # Load program

              
                33
                
                -bindsym $mod+F1 exec dolphin

              
                
                46
                +bindsym $mod+F1 exec kitty -T=Ranger_FM ranger

              
                34
                47
                 bindsym $mod+F2 exec chromium

              
                35
                
                -bindsym $mod+b exec firefox

              
                36
                
                -bindsym $mod+F3 exec spotify

              
                37
                
                -bindsym $mod+F4 exec subl

              
                38
                
                -bindsym $mod+F5 exec notable

              
                
                48
                +bindsym $mod+F3 exec subl

              
                
                49
                +bindsym $mod+F4 exec notable

              
                39
                50
                 

              
                40
                51
                 # Floating window

              
                41
                52
                 floating_modifier $mod

              ···
                60
                71
                 

              
                61
                72
                 # Scratchpad

              
                62
                73
                 bindsym $mod+Shift+grave move scratchpad

              
                63
                
                -bindsym $mod+grave scratchpad show

              
                
                74
                +bindsym $mod+grave scratchpad show, floating disable

              
                
                75
                +

              
                
                76
                +# Move workspace on open window

              
                
                77
                +for_window [urgent=["lastet"]] focus

              
                
                78
                +focus_on_window_activation focus

              
                64
                79
                 

              
                65
                80
                 ######### Window preferens ########

              
                66
                
                -assign [class="(?i)konsole|kitty"] $ws1

              
                
                81
                +assign [class="(?i)kitty"] $ws1

              
                67
                82
                 assign [class="(?i)chromium|firefox"] $ws2

              
                68
                
                -assign [class="(?i)subl|code|atom|typora|prepros"] $ws3

              
                69
                
                -assign [class="(?i)dolphin"] $ws4

              
                
                83
                +assign [class="(?i)subl|code|typora"] $ws3

              
                
                84
                +assign [class="(?i)thunar"] $ws4

              
                
                85
                +assign [title="Notable|Simplenote"] $ws5

              
                70
                86
                 assign [class="(?i)telegram|discord"] $ws6

              
                71
                
                -assign [title="Notable|Simplenote"] $ws7

              
                72
                
                -assign [title="KeePassXC"] $ws8

              
                
                87
                +assign [title="KeePassXC"] $ws7

              
                
                88
                +for_window [title="Ranger_FM"] move to workspace $ws4

              
                73
                89
                 for_window [class="Spotify"] move to workspace $ws10

              
                74
                90
                 

              
                75
                91
                 ##### Change containet focus ######

              ···
                140
                156
                     bindsym k resize grow height 10 px or 10 ppt

              
                141
                157
                     bindsym l resize shrink height 10 px or 10 ppt

              
                142
                158
                     bindsym semicolon resize grow width 10 px or 10 ppt

              
                143
                
                -    

              
                
                159
                +

              
                144
                160
                     # same bindings, but for the arrow keys

              
                145
                161
                     bindsym Left resize shrink width 10 px or 10 ppt

              
                146
                162
                     bindsym Down resize grow height 10 px or 10 ppt

              
                147
                163
                     bindsym Up resize shrink height 10 px or 10 ppt

              
                148
                164
                     bindsym Right resize grow width 10 px or 10 ppt

              
                149
                
                -    

              
                
                165
                +

              
                150
                166
                     # back to normal: Enter or Escape or $mod+r

              
                151
                167
                     bindsym Return mode "default"

              
                152
                168
                     bindsym Escape mode "default"

              ···
                156
                172
                 

              
                157
                173
                 ############### Bar ###############

              
                158
                174
                 exec_always --no-startup-id $HOME/.config/polybar/launch.sh

              
                159
                
                -#bar {

              
                160
                
                -#   status_command i3status

              
                161
                
                -#   position top 

              
                162
                
                -#}

              
                163
                175
                 

              
                164
                176
                 ############## Colors #############

              
                165
                
                -# class                 border  backgr. text    indicator child_border

              
                166
                
                -client.focused          #268bd2 #268bd2 #ffffff #268bd2   #268bd2

              
                167
                
                -client.focused_inactive #000000 #000000 #ffffff #000000   #000000

              
                168
                
                -client.unfocused        #000000 #000000 #888888 #000000   #000000

              
                169
                
                -client.urgent           #000000 #000000 #ffffff #000000   #000000

              
                170
                
                -client.placeholder      #000000 #000000 #ffffff #000000   #000000

              
                
                177
                +# class                 border   backgr   text     indicator child_border

              
                
                178
                +client.focused          #268bd2  #268bd2  #ffffff  #268bd2   #268bd2

              
                
                179
                +client.focused_inactive #000000  #000000  #ffffff  #000000   #000000

              
                
                180
                +client.unfocused        #000000  #000000  #888888  #000000   #000000

              
                
                181
                +client.urgent           #000000  #000000  #ffffff  #000000   #000000

              
                
                182
                +client.placeholder      #000000  #000000  #ffffff  #000000   #000000

              
                171
                183
                 client.background       #ffffff

              
M config/kitty/kitty.conf
···
                1
                1
                 #: MOD

              
                2
                
                -kitty_mod ctrl+shift

              
                
                2
                +#kitty_mod ctrl+shift

              
                3
                3
                 clear_all_shortcuts no

              
                4
                4
                 

              
                5
                5
                 

              ···
                115
                115
                 tab_bar_min_tabs 2

              
                116
                116
                 tab_switch_strategy previous

              
                117
                117
                 tab_fade 0.25 0.5 0.75 1

              
                118
                
                -tab_separator " ┇"

              
                
                118
                +tab_separator "┇"

              
                119
                119
                 tab_title_template "{title}"

              
                120
                120
                 active_tab_title_template none

              
                121
                121
                 

              ···
                132
                132
                 

              
                133
                133
                 #: Theming

              
                134
                134
                 foreground #dfdfdf

              
                135
                
                -background_opacity 0.87

              
                
                135
                +background_opacity 0.85

              
                136
                136
                 background_image none

              
                137
                137
                 background_image_layout tiled

              
                138
                138
                 background_image_linear no

              ···
                152
                152
                 map kitty_mod+o  pass_selection_to_program

              
                153
                153
                 

              
                154
                154
                 #: #: Scroll

              
                155
                
                -map kitty_mod+up        scroll_line_up

              
                156
                
                -map kitty_mod+k         scroll_line_up

              
                157
                
                -map kitty_mod+down      scroll_line_down

              
                158
                
                -map kitty_mod+j         scroll_line_down

              
                159
                
                -map kitty_mod+page_up   scroll_page_up

              
                160
                
                -map kitty_mod+page_down scroll_page_down

              
                161
                
                -map kitty_mod+home      scroll_home

              
                162
                
                -map kitty_mod+end       scroll_end

              
                163
                
                -map kitty_mod+h         show_scrollback

              
                
                155
                +map shift+up            scroll_line_up

              
                
                156
                +map shift+down          scroll_line_down

              
                
                157
                +map shift+page_up       scroll_page_up

              
                
                158
                +map shift+page_down     scroll_page_down

              
                
                159
                +map shift+home          scroll_home

              
                
                160
                +map shift+end           scroll_end

              
                
                161
                +map ctrl+shift+h        show_scrollback

              
                164
                162
                 

              
                165
                163
                 #: #: Window

              
                166
                
                -map kitty_mod+F9 new_os_window

              
                167
                
                -map kitty_mod+enter new_window

              
                168
                
                -map kitty_mod+x close_window

              
                169
                
                -map kitty_mod+] next_window

              
                170
                
                -map kitty_mod+[ previous_window

              
                171
                
                -map kitty_mod+f move_window_forward

              
                172
                
                -map kitty_mod+b move_window_backward

              
                173
                
                -map kitty_mod+` move_window_to_top

              
                174
                
                -map kitty_mod+r start_resizing_window

              
                
                164
                +map ctrl+F9     new_os_window

              
                
                165
                +map alt+]       next_window

              
                
                166
                +map alt+[       previous_window

              
                
                167
                +map alt+f       move_window_forward

              
                
                168
                +map alt+b       move_window_backward

              
                
                169
                +map alt+`       move_window_to_top

              
                
                170
                +map alt+r       start_resizing_window

              
                175
                171
                 

              
                176
                172
                 #: #: Tab

              
                177
                
                -map kitty_mod+l next_tab

              
                178
                
                -map kitty_mod+h previous_tab

              
                179
                
                -map kitty_mod+t new_tab

              
                180
                
                -map kitty_mod+q close_tab

              
                181
                
                -map kitty_mod+. set_tab_title

              
                182
                
                -map kitty_mod+1 first_window

              
                183
                
                -map kitty_mod+2 second_window

              
                184
                
                -map kitty_mod+3 third_window

              
                185
                
                -map kitty_mod+4 fourth_window

              
                186
                
                -map kitty_mod+5 fifth_window

              
                187
                
                -map kitty_mod+6 sixth_window

              
                188
                
                -map kitty_mod+7 seventh_window

              
                189
                
                -map kitty_mod+8 eighth_window

              
                190
                
                -map kitty_mod+9 ninth_window

              
                191
                
                -map kitty_mod+0 tenth_window

              
                192
                
                -

              
                193
                
                -#: #: Layouts

              
                194
                
                -map kitty_mod+l next_layout

              
                
                173
                +map ctrl+shift+l next_tab

              
                
                174
                +map ctrl+shift+h previous_tab

              
                
                175
                +map ctrl+shift+t new_tab

              
                
                176
                +map alt+q close_tab

              
                
                177
                +map ctrl+alt+. set_tab_title

              
                
                178
                +map alt+1 first_window

              
                
                179
                +map alt+2 second_window

              
                
                180
                +map alt+3 third_window

              
                
                181
                +map alt+4 fourth_window

              
                
                182
                +map alt+5 fifth_window

              
                
                183
                +map alt+6 sixth_window

              
                
                184
                +map alt+7 seventh_window

              
                
                185
                +map alt+8 eighth_window

              
                
                186
                +map alt+9 ninth_window

              
                
                187
                +map alt+0 tenth_window

              
                195
                188
                 

              
                196
                189
                 #: #: Font Size

              
                197
                
                -map kitty_mod+equal     change_font_size all +2.0

              
                198
                
                -map kitty_mod+minus     change_font_size all -2.0

              
                199
                
                -map kitty_mod+backspace change_font_size all 0

              
                
                190
                +map alt+equal           change_font_size all +2.0

              
                
                191
                +map alt+minus           change_font_size all -2.0

              
                
                192
                +map alt+ctrl+backspace  change_font_size all 0

              
                200
                193
                 

              
                201
                194
                 #:#: Other

              
                202
                195
                 map f11              toggle_fullscreen

              
                203
                
                -map kitty_mod+f10    toggle_maximized

              
                204
                
                -map kitty_mod+u      kitten unicode_input

              
                205
                
                -map kitty_mod+f2     edit_config_file

              
                206
                
                -map kitty_mod+escape kitty_shell window

              
                
                196
                +map ctrl+shift+f10   toggle_maximized

              
                
                197
                +map ctrl+shift+u     kitten unicode_input

              
                
                198
                +map ctrl+shift+f2    edit_config_file

              
                
                199
                +#map kitty_mod+escape kitty_shell window

              
                207
                200
                 

              
                208
                201
                 map kitty_mod+delete clear_terminal reset active

              
                209
                202
                 

              
                210
                203
                 selection_background #073642

              
                211
                204
                 selection_foreground #edebd7

              
                212
                205
                 foreground   #d2dae2

              
                213
                
                -background   #1e272e

              
                
                206
                +#background   #1e272e

              
                
                207
                +background   #002B36

              
                
                208
                +

              
                214
                209
                 cursorColor  #d2dae2

              
                215
                210
                 

              
                216
                211
                 color0       #1e272e

              ···
                235
                230
                 color14      #4bcffa

              
                236
                231
                 

              
                237
                232
                 color7       #808e9b

              
                238
                
                -color15      #d2dae2
              
                
                233
                +color15      #d2dae2

              
M config/neofetch/config.conf
···
                1
                
                -# See this wiki page for more info:

              
                2
                
                -# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info

              
                3
                1
                 print_info() {

              
                4
                2
                     info title

              
                5
                3
                     info underline

              
                6
                4
                 

              
                7
                5
                     info "OS" distro

              
                8
                
                -    #info "Host" model

              
                9
                6
                     info "Kernel" kernel

              
                10
                7
                     info "Uptime" uptime

              
                11
                8
                     info "Packages" packages

              ···
                21
                18
                     info "CPU" cpu

              
                22
                19
                     info "GPU" gpu

              
                23
                20
                     info "Memory" memory

              
                24
                
                -

              
                25
                
                -    # info "GPU Driver" gpu_driver  # Linux/macOS only

              
                26
                
                -    # info "CPU Usage" cpu_usage

              
                27
                21
                     info "Disk" disk

              
                28
                
                -    # info "Battery" battery

              
                29
                22
                     # info "Font" font

              
                30
                
                -    # info "Song" song

              
                31
                
                -    # [[ "$player" ]] && prin "Music Player" "$player"

              
                32
                23
                     info "Local IP" local_ip

              
                33
                24
                     info "Public IP" public_ip

              
                34
                25
                     info "Users" users

              
                35
                
                -    # info "Locale" locale  # This only works on glibc systems.

              
                36
                
                -

              
                37
                
                -    #info cols

              
                38
                26
                 }

              
                39
                
                -

              
                40
                
                -# Title

              
                41
                
                -

              
                42
                27
                 

              
                43
                28
                 # Hide/Show Fully qualified domain name.

              
                44
                
                -#

              
                45
                
                -# Default:  'off'

              
                46
                29
                 # Values:   'on', 'off'

              
                47
                
                -# Flag:     --title_fqdn

              
                48
                30
                 title_fqdn="off"

              
                49
                31
                 

              
                50
                32
                 

              
                51
                
                -# Kernel

              
                52
                
                -

              
                53
                
                -

              
                54
                33
                 # Shorten the output of the kernel function.

              
                55
                
                -#

              
                56
                
                -# Default:  'on'

              
                57
                34
                 # Values:   'on', 'off'

              
                58
                
                -# Flag:     --kernel_shorthand

              
                59
                
                -# Supports: Everything except *BSDs (except PacBSD and PC-BSD)

              
                60
                
                -#

              
                61
                
                -# Example:

              
                62
                
                -# on:  '4.8.9-1-ARCH'

              
                63
                
                -# off: 'Linux 4.8.9-1-ARCH'

              
                64
                35
                 kernel_shorthand="on"

              
                65
                
                -

              
                66
                
                -

              
                67
                
                -# Distro

              
                68
                
                -

              
                69
                36
                 

              
                70
                37
                 # Shorten the output of the distro function

              
                71
                
                -#

              
                72
                
                -# Default:  'off'

              
                73
                38
                 # Values:   'on', 'tiny', 'off'

              
                74
                
                -# Flag:     --distro_shorthand

              
                75
                
                -# Supports: Everything except Windows and Haiku

              
                76
                39
                 distro_shorthand="off"

              
                77
                40
                 

              
                78
                41
                 # Show/Hide OS Architecture.

              
                79
                
                -# Show 'x86_64', 'x86' and etc in 'Distro:' output.

              
                80
                
                -#

              
                81
                
                -# Default: 'on'

              
                82
                42
                 # Values:  'on', 'off'

              
                83
                
                -# Flag:    --os_arch

              
                84
                
                -#

              
                85
                
                -# Example:

              
                86
                
                -# on:  'Arch Linux x86_64'

              
                87
                
                -# off: 'Arch Linux'

              
                88
                43
                 os_arch="on"

              
                89
                
                -

              
                90
                44
                 

              
                91
                45
                 # Uptime

              
                92
                
                -

              
                93
                
                -

              
                94
                
                -# Shorten the output of the uptime function

              
                95
                
                -#

              
                96
                
                -# Default: 'on'

              
                97
                46
                 # Values:  'on', 'tiny', 'off'

              
                98
                
                -# Flag:    --uptime_shorthand

              
                99
                
                -#

              
                100
                
                -# Example:

              
                101
                
                -# on:   '2 days, 10 hours, 3 mins'

              
                102
                
                -# tiny: '2d 10h 3m'

              
                103
                
                -# off:  '2 days, 10 hours, 3 minutes'

              
                104
                47
                 uptime_shorthand="on"

              
                105
                
                -

              
                106
                48
                 

              
                107
                49
                 # Memory

              
                108
                
                -

              
                109
                
                -

              
                110
                
                -# Show memory pecentage in output.

              
                111
                
                -#

              
                112
                
                -# Default: 'off'

              
                113
                50
                 # Values:  'on', 'off'

              
                114
                
                -# Flag:    --memory_percent

              
                115
                
                -#

              
                116
                
                -# Example:

              
                117
                
                -# on:   '1801MiB / 7881MiB (22%)'

              
                118
                
                -# off:  '1801MiB / 7881MiB'

              
                119
                51
                 memory_percent="off"

              
                120
                52
                 

              
                121
                53
                 # Change memory output unit.

              
                122
                
                -#

              
                123
                
                -# Default: 'mib'

              
                124
                54
                 # Values:  'kib', 'mib', 'gib'

              
                125
                
                -# Flag:    --memory_unit

              
                126
                
                -#

              
                127
                
                -# Example:

              
                128
                
                -# kib  '1020928KiB / 7117824KiB'

              
                129
                
                -# mib  '1042MiB / 6951MiB'

              
                130
                
                -# gib: ' 0.98GiB / 6.79GiB'

              
                131
                55
                 memory_unit="mib"

              
                132
                56
                 

              
                133
                
                -

              
                134
                57
                 # Packages

              
                135
                
                -

              
                136
                
                -

              
                137
                
                -# Show/Hide Package Manager names.

              
                138
                
                -#

              
                139
                
                -# Default: 'tiny'

              
                140
                58
                 # Values:  'on', 'tiny' 'off'

              
                141
                
                -# Flag:    --package_managers

              
                142
                
                -#

              
                143
                
                -# Example:

              
                144
                
                -# on:   '998 (pacman), 8 (flatpak), 4 (snap)'

              
                145
                
                -# tiny: '908 (pacman, flatpak, snap)'

              
                146
                
                -# off:  '908'

              
                147
                59
                 package_managers="on"

              
                148
                
                -

              
                149
                60
                 

              
                150
                61
                 # Shell

              
                151
                
                -

              
                152
                
                -

              
                153
                
                -# Show the path to $SHELL

              
                154
                
                -#

              
                155
                
                -# Default: 'off'

              
                156
                62
                 # Values:  'on', 'off'

              
                157
                
                -# Flag:    --shell_path

              
                158
                
                -#

              
                159
                
                -# Example:

              
                160
                
                -# on:  '/bin/bash'

              
                161
                
                -# off: 'bash'

              
                162
                63
                 shell_path="off"

              
                163
                64
                 

              
                164
                65
                 # Show $SHELL version

              
                165
                
                -#

              
                166
                
                -# Default: 'on'

              
                167
                
                -# Values:  'on', 'off'

              
                168
                
                -# Flag:    --shell_version

              
                169
                
                -#

              
                170
                
                -# Example:

              
                171
                
                -# on:  'bash 4.4.5'

              
                172
                
                -# off: 'bash'

              
                173
                66
                 shell_version="on"

              
                174
                67
                 

              
                175
                
                -

              
                176
                68
                 # CPU

              
                177
                
                -

              
                178
                
                -

              
                179
                
                -# CPU speed type

              
                180
                
                -#

              
                181
                
                -# Default: 'bios_limit'

              
                182
                69
                 # Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.

              
                183
                
                -# Flag:    --speed_type

              
                184
                
                -# Supports: Linux with 'cpufreq'

              
                185
                
                -# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.

              
                186
                70
                 speed_type="bios_limit"

              
                187
                71
                 

              
                188
                72
                 # CPU speed shorthand

              
                189
                
                -#

              
                190
                
                -# Default: 'off'

              
                191
                73
                 # Values: 'on', 'off'.

              
                192
                
                -# Flag:    --speed_shorthand

              
                193
                
                -# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz

              
                194
                
                -#

              
                195
                
                -# Example:

              
                196
                
                -# on:    'i7-6500U (4) @ 3.1GHz'

              
                197
                
                -# off:   'i7-6500U (4) @ 3.100GHz'

              
                198
                74
                 speed_shorthand="off"

              
                199
                75
                 

              
                200
                76
                 # Enable/Disable CPU brand in output.

              
                201
                
                -#

              
                202
                
                -# Default: 'on'

              
                203
                77
                 # Values:  'on', 'off'

              
                204
                
                -# Flag:    --cpu_brand

              
                205
                
                -#

              
                206
                
                -# Example:

              
                207
                
                -# on:   'Intel i7-6500U'

              
                208
                
                -# off:  'i7-6500U (4)'

              
                209
                78
                 cpu_brand="on"

              
                210
                79
                 

              
                211
                80
                 # CPU Speed

              
                212
                
                -# Hide/Show CPU speed.

              
                213
                
                -#

              
                214
                
                -# Default: 'on'

              
                215
                81
                 # Values:  'on', 'off'

              
                216
                
                -# Flag:    --cpu_speed

              
                217
                
                -#

              
                218
                
                -# Example:

              
                219
                
                -# on:  'Intel i7-6500U (4) @ 3.1GHz'

              
                220
                
                -# off: 'Intel i7-6500U (4)'

              
                221
                82
                 cpu_speed="on"

              
                222
                83
                 

              
                223
                84
                 # CPU Cores

              
                224
                
                -# Display CPU cores in output

              
                225
                
                -#

              
                226
                
                -# Default: 'logical'

              
                227
                85
                 # Values:  'logical', 'physical', 'off'

              
                228
                
                -# Flag:    --cpu_cores

              
                229
                
                -# Support: 'physical' doesn't work on BSD.

              
                230
                
                -#

              
                231
                
                -# Example:

              
                232
                
                -# logical:  'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)

              
                233
                
                -# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)

              
                234
                
                -# off:      'Intel i7-6500U @ 3.1GHz'

              
                235
                86
                 cpu_cores="logical"

              
                236
                87
                 

              
                237
                88
                 # CPU Temperature

              
                238
                
                -# Hide/Show CPU temperature.

              
                239
                
                -# Note the temperature is added to the regular CPU function.

              
                240
                
                -#

              
                241
                
                -# Default: 'off'

              
                242
                89
                 # Values:  'C', 'F', 'off'

              
                243
                
                -# Flag:    --cpu_temp

              
                244
                
                -# Supports: Linux, BSD

              
                245
                
                -# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable

              
                246
                
                -#       coretemp kernel module. This only supports newer Intel processors.

              
                247
                
                -#

              
                248
                
                -# Example:

              
                249
                
                -# C:   'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'

              
                250
                
                -# F:   'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'

              
                251
                
                -# off: 'Intel i7-6500U (4) @ 3.1GHz'

              
                252
                
                -cpu_temp="off"

              
                253
                
                -

              
                
                90
                +cpu_temp="C"

              
                254
                91
                 

              
                255
                92
                 # GPU

              
                256
                
                -

              
                257
                
                -

              
                258
                
                -# Enable/Disable GPU Brand

              
                259
                
                -#

              
                260
                
                -# Default: 'on'

              
                261
                93
                 # Values:  'on', 'off'

              
                262
                
                -# Flag:    --gpu_brand

              
                263
                
                -#

              
                264
                
                -# Example:

              
                265
                
                -# on:  'AMD HD 7950'

              
                266
                
                -# off: 'HD 7950'

              
                267
                94
                 gpu_brand="on"

              
                268
                95
                 

              
                269
                96
                 # Which GPU to display

              
                270
                
                -#

              
                271
                
                -# Default: 'all'

              
                272
                97
                 # Values:  'all', 'dedicated', 'integrated'

              
                273
                
                -# Flag:    --gpu_type

              
                274
                
                -# Supports: Linux

              
                275
                
                -#

              
                276
                
                -# Example:

              
                277
                
                -# all:

              
                278
                
                -#   GPU1: AMD HD 7950

              
                279
                
                -#   GPU2: Intel Integrated Graphics

              
                280
                
                -#

              
                281
                
                -# dedicated:

              
                282
                
                -#   GPU1: AMD HD 7950

              
                283
                
                -#

              
                284
                
                -# integrated:

              
                285
                
                -#   GPU1: Intel Integrated Graphics

              
                286
                98
                 gpu_type="all"

              
                287
                99
                 

              
                288
                
                -

              
                289
                100
                 # Resolution

              
                290
                
                -

              
                291
                
                -

              
                292
                
                -# Display refresh rate next to each monitor

              
                293
                
                -# Default: 'off'

              
                294
                101
                 # Values:  'on', 'off'

              
                295
                
                -# Flag:    --refresh_rate

              
                296
                
                -# Supports: Doesn't work on Windows.

              
                297
                
                -#

              
                298
                
                -# Example:

              
                299
                
                -# on:  '1920x1080 @ 60Hz'

              
                300
                
                -# off: '1920x1080'

              
                301
                102
                 refresh_rate="off"

              
                302
                
                -

              
                303
                103
                 

              
                304
                104
                 # Gtk Theme / Icons / Font

              
                305
                
                -

              
                306
                
                -

              
                307
                
                -# Shorten output of GTK Theme / Icons / Font

              
                308
                
                -#

              
                309
                
                -# Default: 'off'

              
                310
                105
                 # Values:  'on', 'off'

              
                311
                
                -# Flag:    --gtk_shorthand

              
                312
                
                -#

              
                313
                
                -# Example:

              
                314
                
                -# on:  'Numix, Adwaita'

              
                315
                
                -# off: 'Numix [GTK2], Adwaita [GTK3]'

              
                316
                106
                 gtk_shorthand="off"

              
                317
                
                -

              
                318
                107
                 

              
                319
                108
                 # Enable/Disable gtk2 Theme / Icons / Font

              
                320
                
                -#

              
                321
                
                -# Default: 'on'

              
                322
                109
                 # Values:  'on', 'off'

              
                323
                
                -# Flag:    --gtk2

              
                324
                
                -#

              
                325
                
                -# Example:

              
                326
                
                -# on:  'Numix [GTK2], Adwaita [GTK3]'

              
                327
                
                -# off: 'Adwaita [GTK3]'

              
                328
                110
                 gtk2="on"

              
                329
                111
                 

              
                330
                112
                 # Enable/Disable gtk3 Theme / Icons / Font

              
                331
                
                -#

              
                332
                
                -# Default: 'on'

              
                333
                113
                 # Values:  'on', 'off'

              
                334
                
                -# Flag:    --gtk3

              
                335
                
                -#

              
                336
                
                -# Example:

              
                337
                
                -# on:  'Numix [GTK2], Adwaita [GTK3]'

              
                338
                
                -# off: 'Numix [GTK2]'

              
                339
                114
                 gtk3="on"

              
                340
                
                -

              
                341
                115
                 

              
                342
                116
                 # IP Address

              
                343
                
                -

              
                344
                
                -

              
                345
                
                -# Website to ping for the public IP

              
                346
                
                -#

              
                347
                
                -# Default: 'http://ident.me'

              
                348
                117
                 # Values:  'url'

              
                349
                
                -# Flag:    --ip_host

              
                350
                118
                 public_ip_host="http://ident.me"

              
                351
                119
                 

              
                352
                120
                 # Public IP timeout.

              
                353
                
                -#

              
                354
                
                -# Default: '2'

              
                355
                121
                 # Values:  'int'

              
                356
                
                -# Flag:    --ip_timeout

              
                357
                122
                 public_ip_timeout=2

              
                358
                
                -

              
                359
                123
                 

              
                360
                124
                 # Desktop Environment

              
                361
                
                -

              
                362
                
                -

              
                363
                
                -# Show Desktop Environment version

              
                364
                
                -#

              
                365
                
                -# Default: 'on'

              
                366
                125
                 # Values:  'on', 'off'

              
                367
                
                -# Flag:    --de_version

              
                368
                126
                 de_version="on"

              
                369
                127
                 

              
                370
                
                -

              
                371
                128
                 # Disk

              
                372
                
                -

              
                373
                
                -

              
                374
                
                -# Which disks to display.

              
                375
                
                -# The values can be any /dev/sdXX, mount point or directory.

              
                376
                
                -# NOTE: By default we only show the disk info for '/'.

              
                377
                
                -#

              
                378
                
                -# Default: '/'

              
                379
                129
                 # Values:  '/', '/dev/sdXX', '/path/to/drive'.

              
                380
                
                -# Flag:    --disk_show

              
                381
                
                -#

              
                382
                
                -# Example:

              
                383
                
                -# disk_show=('/' '/dev/sdb1'):

              
                384
                
                -#      'Disk (/): 74G / 118G (66%)'

              
                385
                
                -#      'Disk (/mnt/Videos): 823G / 893G (93%)'

              
                386
                
                -#

              
                387
                
                -# disk_show=('/'):

              
                388
                
                -#      'Disk (/): 74G / 118G (66%)'

              
                389
                
                -#

              
                390
                130
                 disk_show=('/')

              
                391
                131
                 

              
                392
                132
                 # Disk subtitle.

              
                393
                
                -# What to append to the Disk subtitle.

              
                394
                
                -#

              
                395
                
                -# Default: 'mount'

              
                396
                133
                 # Values:  'mount', 'name', 'dir', 'none'

              
                397
                
                -# Flag:    --disk_subtitle

              
                398
                
                -#

              
                399
                
                -# Example:

              
                400
                
                -# name:   'Disk (/dev/sda1): 74G / 118G (66%)'

              
                401
                
                -#         'Disk (/dev/sdb2): 74G / 118G (66%)'

              
                402
                
                -#

              
                403
                
                -# mount:  'Disk (/): 74G / 118G (66%)'

              
                404
                
                -#         'Disk (/mnt/Local Disk): 74G / 118G (66%)'

              
                405
                
                -#         'Disk (/mnt/Videos): 74G / 118G (66%)'

              
                406
                
                -#

              
                407
                
                -# dir:    'Disk (/): 74G / 118G (66%)'

              
                408
                
                -#         'Disk (Local Disk): 74G / 118G (66%)'

              
                409
                
                -#         'Disk (Videos): 74G / 118G (66%)'

              
                410
                
                -#

              
                411
                
                -# none:   'Disk: 74G / 118G (66%)'

              
                412
                
                -#         'Disk: 74G / 118G (66%)'

              
                413
                
                -#         'Disk: 74G / 118G (66%)'

              
                414
                134
                 disk_subtitle="mount"

              
                415
                135
                 

              
                416
                136
                 # Disk percent.

              
                417
                
                -# Show/Hide disk percent.

              
                418
                
                -#

              
                419
                
                -# Default: 'on'

              
                420
                137
                 # Values:  'on', 'off'

              
                421
                
                -# Flag:    --disk_percent

              
                422
                
                -#

              
                423
                
                -# Example:

              
                424
                
                -# on:  'Disk (/): 74G / 118G (66%)'

              
                425
                
                -# off: 'Disk (/): 74G / 118G'

              
                426
                138
                 disk_percent="on"

              
                427
                
                -

              
                428
                139
                 

              
                429
                140
                 # Song

              
                430
                
                -

              
                431
                
                -

              
                432
                
                -# Manually specify a music player.

              
                433
                
                -#

              
                434
                
                -# Default: 'auto'

              
                435
                141
                 # Values:  'auto', 'player-name'

              
                436
                
                -# Flag:    --music_player

              
                437
                
                -#

              
                438
                
                -# Available values for 'player-name':

              
                439
                
                -#

              
                440
                
                -# amarok

              
                441
                
                -# audacious

              
                442
                
                -# banshee

              
                443
                
                -# bluemindo

              
                444
                
                -# clementine

              
                445
                
                -# cmus

              
                446
                
                -# deadbeef

              
                447
                
                -# deepin-music

              
                448
                
                -# dragon

              
                449
                
                -# elisa

              
                450
                
                -# exaile

              
                451
                
                -# gnome-music

              
                452
                
                -# gmusicbrowser

              
                453
                
                -# gogglesmm

              
                454
                
                -# guayadeque

              
                455
                
                -# io.elementary.music

              
                456
                
                -# iTunes

              
                457
                
                -# juk

              
                458
                
                -# lollypop

              
                459
                
                -# mocp

              
                460
                
                -# mopidy

              
                461
                
                -# mpd

              
                462
                
                -# muine

              
                463
                
                -# netease-cloud-music

              
                464
                
                -# olivia

              
                465
                
                -# playerctl

              
                466
                
                -# pogo

              
                467
                
                -# pragha

              
                468
                
                -# qmmp

              
                469
                
                -# quodlibet

              
                470
                
                -# rhythmbox

              
                471
                
                -# sayonara

              
                472
                
                -# smplayer

              
                473
                
                -# spotify

              
                474
                
                -# strawberry

              
                475
                
                -# tauonmb

              
                476
                
                -# tomahawk

              
                477
                
                -# vlc

              
                478
                
                -# xmms2d

              
                479
                
                -# xnoise

              
                480
                
                -# yarock

              
                481
                142
                 music_player="auto"

              
                482
                143
                 

              
                483
                144
                 # Format to display song information.

              
                484
                
                -#

              
                485
                
                -# Default: '%artist% - %album% - %title%'

              
                486
                145
                 # Values:  '%artist%', '%album%', '%title%'

              
                487
                
                -# Flag:    --song_format

              
                488
                
                -#

              
                489
                
                -# Example:

              
                490
                
                -# default: 'Song: Jet - Get Born - Sgt Major'

              
                491
                146
                 song_format="%artist% - %album% - %title%"

              
                492
                147
                 

              
                493
                148
                 # Print the Artist, Album and Title on separate lines

              
                494
                
                -#

              
                495
                
                -# Default: 'off'

              
                496
                149
                 # Values:  'on', 'off'

              
                497
                
                -# Flag:    --song_shorthand

              
                498
                
                -#

              
                499
                
                -# Example:

              
                500
                
                -# on:  'Artist: The Fratellis'

              
                501
                
                -#      'Album: Costello Music'

              
                502
                
                -#      'Song: Chelsea Dagger'

              
                503
                
                -#

              
                504
                
                -# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'

              
                505
                150
                 song_shorthand="off"

              
                506
                151
                 

              
                507
                152
                 # 'mpc' arguments (specify a host, password etc).

              
                508
                
                -#

              
                509
                
                -# Default:  ''

              
                510
                
                -# Example: mpc_args=(-h HOST -P PASSWORD)

              
                511
                153
                 mpc_args=()

              
                512
                154
                 

              
                513
                
                -

              
                514
                155
                 # Text Colors

              
                515
                
                -

              
                516
                
                -

              
                517
                
                -# Text Colors

              
                518
                
                -#

              
                519
                
                -# Default:  'distro'

              
                520
                156
                 # Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'

              
                521
                
                -# Flag:     --colors

              
                522
                
                -#

              
                523
                
                -# Each number represents a different part of the text in

              
                524
                
                -# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'

              
                525
                
                -#

              
                526
                
                -# Example:

              
                527
                
                -# colors=(distro)      - Text is colored based on Distro colors.

              
                528
                
                -# colors=(4 6 1 8 8 6) - Text is colored in the order above.

              
                529
                157
                 colors=(distro)

              
                530
                158
                 

              
                531
                
                -

              
                532
                
                -# Text Options

              
                533
                
                -

              
                534
                
                -

              
                535
                159
                 # Toggle bold text

              
                536
                
                -#

              
                537
                
                -# Default:  'on'

              
                538
                160
                 # Values:   'on', 'off'

              
                539
                
                -# Flag:     --bold

              
                540
                161
                 bold="on"

              
                541
                162
                 

              
                542
                163
                 # Enable/Disable Underline

              
                543
                
                -#

              
                544
                
                -# Default:  'on'

              
                545
                164
                 # Values:   'on', 'off'

              
                546
                
                -# Flag:     --underline

              
                547
                165
                 underline_enabled="on"

              
                548
                166
                 

              
                549
                167
                 # Underline character

              
                550
                
                -#

              
                551
                
                -# Default:  '-'

              
                552
                168
                 # Values:   'string'

              
                553
                
                -# Flag:     --underline_char

              
                554
                169
                 underline_char="-"

              
                555
                170
                 

              
                556
                
                -

              
                557
                171
                 # Info Separator

              
                558
                172
                 # Replace the default separator with the specified string.

              
                559
                
                -#

              
                560
                
                -# Default:  ':'

              
                561
                
                -# Flag:     --separator

              
                562
                
                -#

              
                563
                
                -# Example:

              
                564
                
                -# separator="->":   'Shell-> bash'

              
                565
                
                -# separator=" =":   'WM = dwm'

              
                566
                173
                 separator=":"

              
                567
                174
                 

              
                568
                
                -

              
                569
                
                -# Color Blocks

              
                570
                
                -

              
                571
                
                -

              
                572
                175
                 # Color block range

              
                573
                176
                 # The range of colors to print.

              
                574
                
                -#

              
                575
                
                -# Default:  '0', '15'

              
                576
                177
                 # Values:   'num'

              
                577
                
                -# Flag:     --block_range

              
                578
                
                -#

              
                579
                
                -# Example:

              
                580
                
                -#

              
                581
                
                -# Display colors 0-7 in the blocks.  (8 colors)

              
                582
                
                -# neofetch --block_range 0 7

              
                583
                
                -#

              
                584
                
                -# Display colors 0-15 in the blocks. (16 colors)

              
                585
                
                -# neofetch --block_range 0 15

              
                586
                178
                 block_range=(0 15)

              
                587
                179
                 

              
                588
                180
                 # Toggle color blocks

              
                589
                
                -#

              
                590
                
                -# Default:  'on'

              
                591
                181
                 # Values:   'on', 'off'

              
                592
                
                -# Flag:     --color_blocks

              
                593
                182
                 color_blocks="on"

              
                594
                183
                 

              
                595
                184
                 # Color block width in spaces

              
                596
                
                -#

              
                597
                
                -# Default:  '3'

              
                598
                185
                 # Values:   'num'

              
                599
                
                -# Flag:     --block_width

              
                600
                186
                 block_width=3

              
                601
                187
                 

              
                602
                188
                 # Color block height in lines

              
                603
                
                -#

              
                604
                
                -# Default:  '1'

              
                605
                189
                 # Values:   'num'

              
                606
                
                -# Flag:     --block_height

              
                607
                190
                 block_height=1

              
                608
                191
                 

              
                609
                192
                 # Color Alignment

              
                610
                
                -#

              
                611
                
                -# Default: 'auto'

              
                612
                193
                 # Values: 'auto', 'num'

              
                613
                
                -# Flag: --col_offset

              
                614
                
                -#

              
                615
                
                -# Number specifies how far from the left side of the terminal (in spaces) to

              
                616
                
                -# begin printing the columns, in case you want to e.g. center them under your

              
                617
                
                -# text.

              
                618
                
                -# Example:

              
                619
                
                -# col_offset="auto" - Default behavior of neofetch

              
                620
                
                -# col_offset=7      - Leave 7 spaces then print the colors

              
                621
                194
                 col_offset="auto"

              
                622
                195
                 

              
                623
                
                -# Progress Bars

              
                624
                
                -

              
                625
                
                -

              
                626
                196
                 # Bar characters

              
                627
                
                -#

              
                628
                
                -# Default:  '-', '='

              
                629
                197
                 # Values:   'string', 'string'

              
                630
                
                -# Flag:     --bar_char

              
                631
                
                -#

              
                632
                
                -# Example:

              
                633
                
                -# neofetch --bar_char 'elapsed' 'total'

              
                634
                
                -# neofetch --bar_char '-' '='

              
                635
                198
                 bar_char_elapsed="-"

              
                636
                199
                 bar_char_total="="

              
                637
                200
                 

              
                638
                201
                 # Toggle Bar border

              
                639
                
                -#

              
                640
                
                -# Default:  'on'

              
                641
                202
                 # Values:   'on', 'off'

              
                642
                
                -# Flag:     --bar_border

              
                643
                203
                 bar_border="on"

              
                644
                204
                 

              
                645
                205
                 # Progress bar length in spaces

              
                646
                206
                 # Number of chars long to make the progress bars.

              
                647
                
                -#

              
                648
                
                -# Default:  '15'

              
                649
                207
                 # Values:   'num'

              
                650
                
                -# Flag:     --bar_length

              
                651
                208
                 bar_length=15

              
                652
                209
                 

              
                653
                210
                 # Progress bar colors

              
                654
                211
                 # When set to distro, uses your distro's logo colors.

              
                655
                
                -#

              
                656
                
                -# Default:  'distro', 'distro'

              
                657
                212
                 # Values:   'distro', 'num'

              
                658
                
                -# Flag:     --bar_colors

              
                659
                
                -#

              
                660
                
                -# Example:

              
                661
                
                -# neofetch --bar_colors 3 4

              
                662
                
                -# neofetch --bar_colors distro 5

              
                663
                213
                 bar_color_elapsed="distro"

              
                664
                214
                 bar_color_total="distro"

              
                665
                215
                 

              
                666
                
                -

              
                667
                216
                 # Info display

              
                668
                217
                 # Display a bar with the info.

              
                669
                
                -#

              
                670
                
                -# Default: 'off'

              
                671
                
                -# Values:  'bar', 'infobar', 'barinfo', 'off'

              
                672
                
                -# Flags:   --cpu_display

              
                673
                
                -#          --memory_display

              
                674
                
                -#          --battery_display

              
                675
                
                -#          --disk_display

              
                676
                
                -#

              
                677
                
                -# Example:

              
                678
                
                -# bar:     '[---=======]'

              
                679
                
                -# infobar: 'info [---=======]'

              
                680
                
                -# barinfo: '[---=======] info'

              
                681
                
                -# off:     'info'

              
                682
                218
                 cpu_display="off"

              
                683
                219
                 memory_display="off"

              
                684
                220
                 battery_display="off"

              
                685
                221
                 disk_display="off"

              
                686
                
                -

              
                687
                
                -

              
                688
                
                -# Backend Settings

              
                689
                
                -

              
                690
                222
                 

              
                691
                223
                 # Image backend.

              
                692
                
                -#

              
                693
                
                -# Default:  'ascii'

              
                694
                224
                 # Values:   'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',

              
                695
                225
                 #           'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'

              
                696
                
                -# Flag:     --backend

              
                697
                226
                 image_backend="ascii"

              
                698
                227
                 

              
                699
                
                -# Image Source

              
                700
                
                -#

              
                701
                228
                 # Which image or ascii file to display.

              
                702
                
                -#

              
                703
                
                -# Default:  'auto'

              
                704
                229
                 # Values:   'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'

              
                705
                230
                 #           'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'

              
                706
                
                -# Flag:     --source

              
                707
                
                -#

              
                708
                
                -# NOTE: 'auto' will pick the best image source for whatever image backend is used.

              
                709
                
                -#       In ascii mode, distro ascii art will be used and in an image mode, your

              
                710
                
                -#       wallpaper will be used.

              
                711
                231
                 image_source="auto"

              
                712
                232
                 

              
                713
                
                -

              
                714
                
                -# Ascii Options

              
                715
                
                -

              
                716
                
                -

              
                717
                233
                 # Ascii distro

              
                718
                
                -# Which distro's ascii art to display.

              
                719
                
                -#

              
                720
                
                -# Default: 'auto'

              
                721
                
                -# Values:  'auto', 'distro_name'

              
                722
                
                -# Flag:    --ascii_distro

              
                723
                
                -# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",

              
                724
                
                -#       "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,

              
                725
                
                -#       ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,

              
                726
                
                -#       Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,

              
                727
                
                -#       BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,

              
                728
                
                -#       Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,

              
                729
                
                -#       Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,

              
                730
                
                -#       DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,

              
                731
                
                -#       EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,

              
                732
                
                -#       FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,

              
                733
                
                -#       gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,

              
                734
                
                -#       Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,

              
                735
                
                -#       Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,

              
                736
                
                -#       LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,

              
                737
                
                -#       Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,

              
                738
                
                -#       Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,

              
                739
                
                -#       NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,

              
                740
                
                -#       OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,

              
                741
                
                -#       Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,

              
                742
                
                -#       popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,

              
                743
                
                -#       Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,

              
                744
                
                -#       Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,

              
                745
                
                -#       Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,

              
                746
                
                -#       SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,

              
                747
                
                -#       openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,

              
                748
                
                -#       Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,

              
                749
                
                -#       Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,

              
                750
                
                -#       and IRIX have ascii logos

              
                751
                
                -# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.

              
                752
                
                -#       Use '{distro name}_old' to use the old logos.

              
                753
                
                -# NOTE: Ubuntu has flavor variants.

              
                754
                
                -#       Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,

              
                755
                
                -#       Ubuntu-Studio, Ubuntu-Mate  or Ubuntu-Budgie to use the flavors.

              
                756
                
                -# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,

              
                757
                
                -#       CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,

              
                758
                
                -#       Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,

              
                759
                
                -#       Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,

              
                760
                
                -#       Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,

              
                761
                
                -#       postmarketOS, and Void have a smaller logo variant.

              
                762
                
                -#       Use '{distro name}_small' to use the small variants.

              
                763
                234
                 ascii_distro="auto"

              
                764
                235
                 

              
                765
                236
                 # Ascii Colors

              
                766
                
                -#

              
                767
                
                -# Default:  'distro'

              
                768
                237
                 # Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'

              
                769
                
                -# Flag:     --ascii_colors

              
                770
                
                -#

              
                771
                
                -# Example:

              
                772
                
                -# ascii_colors=(distro)      - Ascii is colored based on Distro colors.

              
                773
                
                -# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.

              
                774
                238
                 ascii_colors=(distro)

              
                775
                239
                 

              
                776
                240
                 # Bold ascii logo

              
                777
                241
                 # Whether or not to bold the ascii logo.

              
                778
                
                -#

              
                779
                
                -# Default: 'on'

              
                780
                242
                 # Values:  'on', 'off'

              
                781
                
                -# Flag:    --ascii_bold

              
                782
                243
                 ascii_bold="on"

              
                783
                244
                 

              
                784
                
                -

              
                785
                
                -# Image Options

              
                786
                
                -

              
                787
                
                -

              
                788
                245
                 # Image loop

              
                789
                246
                 # Setting this to on will make neofetch redraw the image constantly until

              
                790
                247
                 # Ctrl+C is pressed. This fixes display issues in some terminal emulators.

              
                791
                
                -#

              
                792
                
                -# Default:  'off'

              
                793
                248
                 # Values:   'on', 'off'

              
                794
                
                -# Flag:     --loop

              
                795
                249
                 image_loop="off"

              
                796
                250
                 

              
                797
                251
                 # Thumbnail directory

              
                798
                
                -#

              
                799
                
                -# Default: '~/.cache/thumbnails/neofetch'

              
                800
                252
                 # Values:  'dir'

              
                801
                253
                 thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"

              
                802
                254
                 

              
                803
                255
                 # Crop mode

              
                804
                
                -#

              
                805
                
                -# Default:  'normal'

              
                806
                256
                 # Values:   'normal', 'fit', 'fill'

              
                807
                
                -# Flag:     --crop_mode

              
                808
                
                -#

              
                809
                
                -# See this wiki page to learn about the fit and fill options.

              
                810
                
                -# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F

              
                811
                257
                 crop_mode="normal"

              
                812
                258
                 

              
                813
                259
                 # Crop offset

              
                814
                
                -# Note: Only affects 'normal' crop mode.

              
                815
                
                -#

              
                816
                
                -# Default:  'center'

              
                817
                260
                 # Values:   'northwest', 'north', 'northeast', 'west', 'center'

              
                818
                261
                 #           'east', 'southwest', 'south', 'southeast'

              
                819
                
                -# Flag:     --crop_offset

              
                820
                262
                 crop_offset="center"

              
                821
                263
                 

              
                822
                264
                 # Image size

              
                823
                265
                 # The image is half the terminal width by default.

              
                824
                
                -#

              
                825
                
                -# Default: 'auto'

              
                826
                266
                 # Values:  'auto', '00px', '00%', 'none'

              
                827
                
                -# Flags:   --image_size

              
                828
                
                -#          --size

              
                829
                267
                 image_size="auto"

              
                830
                268
                 

              
                831
                269
                 # Gap between image and text

              
                832
                
                -#

              
                833
                
                -# Default: '3'

              
                834
                270
                 # Values:  'num', '-num'

              
                835
                
                -# Flag:    --gap

              
                836
                271
                 gap=3

              
                837
                272
                 

              
                838
                273
                 # Image offsets

              
                839
                274
                 # Only works with the w3m backend.

              
                840
                
                -#

              
                841
                
                -# Default: '0'

              
                842
                275
                 # Values:  'px'

              
                843
                
                -# Flags:   --xoffset

              
                844
                
                -#          --yoffset

              
                845
                276
                 yoffset=0

              
                846
                277
                 xoffset=0

              
                847
                278
                 

              
                848
                279
                 # Image background color

              
                849
                280
                 # Only works with the w3m backend.

              
                850
                
                -#

              
                851
                
                -# Default: ''

              
                852
                281
                 # Values:  'color', 'blue'

              
                853
                
                -# Flag:    --bg_color

              
                854
                282
                 background_color=

              
                855
                283
                 

              
                856
                
                -

              
                857
                
                -# Misc Options

              
                858
                
                -

              
                859
                284
                 # Stdout mode

              
                860
                285
                 # Turn off all colors and disables image backend (ASCII/Image).

              
                861
                286
                 # Useful for piping into another command.

              
                862
                
                -# Default: 'off'

              
                863
                287
                 # Values: 'on', 'off'

              
                864
                288
                 stdout="off"

              
A config/picom.conf
···
                
                1
                +########### Shadows ###########

              
                
                2
                +dropdown_menu = { shadow = false; };

              
                
                3
                +popup_menu = { shadow = false; };

              
                
                4
                +utility = { shadow = false; };

              
                
                5
                +shadow = true;

              
                
                6
                +shadow-radius = 11;

              
                
                7
                +shadow-offset-x = -7;

              
                
                8
                +shadow-offset-y = -7;

              
                
                9
                +shadow-exclude = [

              
                
                10
                +  "name = 'Notification'"

              
                
                11
                +];

              
                
                12
                +

              
                
                13
                +

              
                
                14
                +############ Fading ###########

              
                
                15
                +fading = true;

              
                
                16
                +fade-in-step = 0.03;

              
                
                17
                +fade-out-step = 0.03;

              
                
                18
                +

              
                
                19
                +

              
                
                20
                +##### Transparency/Opacity ####

              
                
                21
                +inactive-opacity = 0.8;

              
                
                22
                +frame-opacity = 0.7;

              
                
                23
                +inactive-opacity-override = false;

              
                
                24
                +focus-exclude = []; 

              
                
                25
                +

              
                
                26
                +

              
                
                27
                +##### Background-Blurring #####

              
                
                28
                +blur-kern = "3x3box";

              
                
                29
                +blur-background-exclude = [ "window_type = 'desktop'" ];

              
                
                30
                +

              
                
                31
                +

              
                
                32
                +####### General Settings ######

              
                
                33
                +backend = "glx";

              
                
                34
                +vsync = true;

              
                
                35
                +mark-wmwin-focused = true;

              
                
                36
                +mark-ovredir-focused = true;

              
                
                37
                +glx-no-stencil = true

              
                
                38
                +detect-rounded-corners = true;

              
                
                39
                +detect-client-opacity = true;

              
                
                40
                +refresh-rate = 0;

              
                
                41
                +detect-transient = true;

              
                
                42
                +detect-client-leader = true;

              
                
                43
                +glx-no-rebind-pixmap = true;

              
                
                44
                +use-damage = true;

              
                
                45
                +log-level = "warn";

              
                
                46
                +wintypes:

              
                
                47
                +{

              
                
                48
                +  tooltip       = { fade = true; shadow = false; opacity = 1; focus = true; full-shadow = false; };

              
                
                49
                +  menu          = { fade = true; shadow = false; };

              
                
                50
                +  popup_menu    = { fade = true; shadow = false; };

              
                
                51
                +  dropdown_menu = { fade = true; shadow = false; };

              
                
                52
                +  utility       = { fade = true; shadow = false; };

              
                
                53
                +  dialog        = { fade = true; shadow = false; };

              
                
                54
                +  notify        = { fade = true; shadow = true; };

              
                
                55
                +  unknown       = { fade = true; shadow = false; };

              
                
                56
                +};

              
M config/polybar/config
···
                3
                3
                 

              
                4
                4
                 [colors]

              
                5
                5
                 background = #002B36

              
                6
                
                -background-alt = #073642

              
                
                6
                +background-alt = #002236

              
                7
                7
                 foreground = #dfdfdf

              
                8
                
                -foreground-alt = #fdf6e3

              
                
                8
                +foreground-alt = #f0f0f0

              
                9
                9
                 primary = #268bd2

              
                10
                10
                 secondary = #218DC8

              
                11
                11
                 alert = #268bd2

              
                12
                
                -;alert = #dc322f

              
                13
                12
                 

              
                14
                
                -############################################################################################################

              
                15
                
                -[bar/example]

              
                16
                
                -#monitor = ${env:MONITOR:HDMI-1}

              
                
                13
                +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              
                
                14
                +[bar/bar]

              
                
                15
                +;monitor = ${env:MONITOR:HDMI-1}

              
                17
                16
                 width = 100%

              
                18
                
                -height = 26

              
                
                17
                +height = 25

              
                19
                18
                 fixed-center = true 

              
                20
                19
                 locale = en_US.UTF-8 

              
                21
                20
                 

              
                22
                21
                 background = ${colors.background}

              
                23
                22
                 foreground = ${colors.foreground}

              
                24
                23
                 

              
                25
                
                -line-size = 1

              
                
                24
                +line-size = 2

              
                26
                25
                 line-color = #f00

              
                27
                26
                 

              
                28
                27
                 padding-left = 0

              ···
                30
                29
                 module-margin-left = 1

              
                31
                30
                 module-margin-right = 1

              
                32
                31
                 

              
                33
                
                -; Fonts

              
                34
                32
                 font-0 = Iosevka Nerd Font:style=Medium:size=8;3

              
                35
                33
                 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5

              
                36
                34
                 font-2 = Weather Icons:size=7;2

              
                37
                
                -font-3 = FontAwesome5Brands:style=Solid:size=7.5;2.5

              
                38
                35
                 

              
                39
                
                -############################################################################################################

              
                40
                
                -; Modules position

              
                41
                
                -modules-left = i3 sp2 openweathermap-simple updates-pacman

              
                42
                
                -;modules-center = title

              
                43
                
                -modules-center = spotify

              
                44
                
                -modules-right = pulseaudio xkeyboard powermenu sp2 calendar

              
                
                36
                +;; Modules positii3on ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              
                
                37
                +modules-left =  i3 sp2 weather updates-pacman

              
                
                38
                +modules-center =

              
                
                39
                +modules-right = pulseaudio microphone backlight keyboard clipmenu wlan date time sp2

              
                45
                40
                 tray-position = right

              
                46
                41
                 tray-padding = 2

              
                47
                42
                 tray-detached = false

              
                48
                
                -

              
                49
                
                -############################################################################################################

              
                50
                
                -# INCLUDE MODULES

              
                51
                
                -############################################################################################################

              
                52
                
                -[module/filesystem]

              
                53
                
                -type = internal/fs

              
                54
                
                -interval = 25

              
                55
                
                -mount-0 = /

              
                56
                
                -mount-1 = /home

              
                57
                
                -

              
                58
                
                -label-mounted = %{F#c38611} %mountpoint%: %percentage_used%%

              
                59
                
                -label-unmounted = %mountpoint% not mounted

              
                60
                
                -label-unmounted-foreground = ${colors.foreground-alt}

              
                61
                
                -

              
                62
                
                -############################################################################################################

              
                
                43
                +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              
                63
                44
                 [settings]

              
                64
                45
                 screenchange-reload = true

              
                65
                46
                 

              
                66
                
                -############################################################################################################

              
                67
                
                -; Used for top and bottom aligned bars

              
                
                47
                +

              
                68
                48
                 [global/wm]

              
                69
                49
                 margin-top = 5

              
                70
                50
                 margin-bottom = 5

              ···
                72
                52
                 cursor-scroll = ns-resize

              
                73
                53
                 wm-restack = i3

              
                74
                54
                 

              
                75
                
                -############################################################################################################

              
                76
                
                -; i3wm workspace indicator

              
                
                55
                +

              
                77
                56
                 [module/i3]

              
                78
                57
                 type = internal/i3

              
                79
                58
                 format = <label-state><label-mode>

              ···
                82
                61
                 label-mode-padding = 1

              
                83
                62
                 label-mode-foreground = #000

              
                84
                63
                 label-mode-background = ${colors.primary}

              
                
                64
                +

              
                85
                65
                 label-focused = %icon%

              
                86
                
                -label-focused-background = 002873C0

              
                
                66
                +label-focused-background =  073642

              
                87
                67
                 label-focused-foreground = ${colors.foreground}

              
                88
                68
                 label-focused-padding = 1

              
                89
                
                -label-focused-underline = 018BFF

              
                90
                
                -#label-focused-overline = ${colors.primary}

              
                
                69
                +label-focused-underline = 268bd2

              
                91
                70
                 

              
                92
                71
                 label-unfocused = %icon%

              
                93
                
                -label-unfocused-background = 00255498

              
                94
                72
                 label-unfocused-foreground = ${colors.foreground}

              
                95
                73
                 label-unfocused-padding = 1

              
                96
                
                -#label-unfocused-underline = 255498

              
                97
                
                -#label-unfocused-overline = ${colors.background}

              
                98
                74
                 

              
                99
                75
                 label-urgent = %icon%

              
                100
                76
                 label-urgent-background = ${colors.alert}

              
                101
                77
                 label-urgent-foreground = ${colors.foreground}

              
                102
                78
                 label-urgent-padding = 1

              
                103
                79
                 label-urgent-underline = ${colors.alert}

              
                104
                
                -#label-urgent-overline = ${colors.background}

              
                105
                80
                 

              
                106
                81
                 label-visible = %icon%

              
                107
                82
                 label-visible-background = ${colors.background}

              
                108
                83
                 label-visible-foreground = ${colors.foreground}

              
                109
                84
                 label-visible-padding = 1

              
                110
                85
                 label-visible-underline = ${colors.background}

              
                111
                
                -#label-visible-overline = ${colors.background}

              
                112
                86
                 

              
                113
                87
                 ws-icon-0 = "1;1 "

              
                114
                88
                 ws-icon-1 = "2;2 "

              ···
                118
                92
                 ws-icon-5 = "6;6 "

              
                119
                93
                 ws-icon-6 = "7;7 "

              
                120
                94
                 ws-icon-7 = 8;8

              
                121
                
                -ws-icon-8 = "9;9 "

              
                
                95
                +ws-icon-8 = 9;9

              
                122
                96
                 ws-icon-9 = "10;10 "

              
                123
                97
                 ;label-separator = |

              
                124
                98
                 

              
                125
                
                -############################################################################################################

              
                126
                
                -# PulseAudio- https://github.com/polybar/polybar/wiki/Module:-pulseaudio

              
                
                99
                +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              
                
                100
                +;; INCLUDE MODULES

              
                
                101
                +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              
                
                102
                +[module/backlight]

              
                
                103
                +type = internal/xbacklight

              
                
                104
                +format = <ramp> <label>

              
                
                105
                +label = %percentage%%

              
                
                106
                +ramp-0 = 

              
                
                107
                +

              
                
                108
                +

              
                
                109
                +[module/wlan]

              
                
                110
                +type = internal/network

              
                
                111
                +interface = wlp3s0

              
                
                112
                +format-connected = <ramp-signal> <label-connected>

              
                
                113
                +label-connected = %essid%

              
                
                114
                +format-disconnected =  No sing

              
                
                115
                +ramp-signal-0 = 

              
                
                116
                +interval = 3.0

              
                
                117
                +

              
                
                118
                +

              
                
                119
                +[module/filesystem]

              
                
                120
                +type = internal/fs

              
                
                121
                +interval = 25

              
                
                122
                +mount-0 = /

              
                
                123
                +mount-1 = /home

              
                
                124
                +label-mounted = %{F#c38611} %mountpoint%: %percentage_used%%

              
                
                125
                +label-unmounted = %mountpoint% not mounted

              
                
                126
                +label-unmounted-foreground = ${colors.foreground-alt}

              
                
                127
                +

              
                
                128
                +

              
                127
                129
                 [module/pulseaudio]

              
                128
                130
                 type = internal/pulseaudio

              
                129
                
                -format-volume = %{F#61a8ff}<ramp-volume><label-volume> 

              
                130
                
                -label-volume = %{F#61a8ff} %percentage%%

              
                
                131
                +format-volume = <ramp-volume> <label-volume> 

              
                
                132
                +label-volume = %percentage%%

              
                131
                133
                 label-volume-foreground = ${root.foreground}

              
                132
                
                -label-muted = 

              
                133
                
                -label-muted-foreground = #e8793e

              
                
                134
                +label-muted = 

              
                134
                135
                 

              
                135
                136
                 ramp-volume-0 = 

              
                136
                137
                 ramp-volume-1 = 

              ···
                138
                139
                 ramp-volume-3 = 

              
                139
                140
                 ramp-volume-4 = 

              
                140
                141
                 

              
                141
                
                -############################################################################################################

              
                142
                
                -; CPU Loads - https://github.com/polybar/polybar/wiki/Module:-cpu

              
                
                142
                +

              
                143
                143
                 [module/cpu]

              
                144
                144
                 type = internal/cpu

              
                145
                145
                 interval = 2

              ···
                148
                148
                 label = %{F#1ecb0b} CPU %percentage%% 

              
                149
                149
                 

              
                150
                150
                 

              
                151
                
                -############################################################################################################

              
                152
                
                -# Memmory(RAM) - https://github.com/polybar/polybar/wiki/Module:-memory

              
                153
                151
                 [module/memory]

              
                154
                152
                 type = internal/memory

              
                155
                153
                 interval = 2

              
                156
                154
                 format-prefix = " "

              
                157
                
                -#format-prefix-foreground = ${colors.foreground-alt}

              
                158
                
                -#format-overline = #61C07C

              
                159
                
                -#format-underline = #61C07C

              
                160
                155
                 label = %{F#8d61ff}  MEM %percentage_used%%

              
                161
                156
                 

              
                162
                
                -############################################################################################################

              
                163
                
                -; Weather

              
                164
                
                -[module/openweathermap-simple]

              
                
                157
                +

              
                
                158
                +[module/weather]

              
                165
                159
                 type = custom/script

              
                166
                
                -exec = ~/.config/polybar/scripts/openweathermap-simple.sh

              
                
                160
                +exec = python3 ~/.config/polybar/scripts/weather.py

              
                167
                161
                 interval = 60

              
                168
                
                -label-font = 3

              
                
                162
                +label-font = 1

              
                169
                163
                 

              
                170
                
                -############################################################################################################

              
                171
                
                -; Sporify inkator - https://github.com/Jvanrhijn/polybar-spotify

              
                
                164
                +

              
                172
                165
                 [module/spotify]

              
                173
                166
                 type = custom/script

              
                174
                167
                 interval = 1

              
                175
                
                -format-prefix = " "

              
                176
                168
                 format = <label>

              
                177
                169
                 exec = python ~/.config/polybar/scripts/spotify_status.py -f '{artist} - {song}'

              
                178
                
                -line-size

              
                179
                170
                 format-underline = #1db954

              
                180
                171
                 

              
                181
                
                -############################################################################################################

              
                182
                
                -; Updates cheacker (pacman)

              
                
                172
                +

              
                183
                173
                 [module/updates-pacman]

              
                184
                174
                 type = custom/script

              
                185
                
                -exec = ~/.config/polybar/scripts/updates-pacman.sh

              
                186
                
                -interval = 600

              
                
                175
                +exec = ~/.config/polybar/scripts/updates-pacman-aur.sh

              
                
                176
                +interval = 60

              
                187
                177
                 

              
                188
                
                -############################################################################################################

              
                189
                
                -; Keyboard layout - https://github.com/polybar/polybar/wiki/Module:-xkeyboard

              
                190
                
                -[module/xkeyboard]

              
                
                178
                +

              
                
                179
                +[module/keyboard]

              
                191
                180
                 type = internal/xkeyboard

              
                192
                
                -blacklist-0 = num lock

              
                193
                181
                 label-NAME-maxlen = 10

              
                194
                182
                 format-prefix = ""

              
                195
                183
                 label-layout =  %layout%

              
                196
                184
                 

              
                197
                
                -label-indicator-padding = 2

              
                198
                
                -label-indicator-margin = 1

              
                199
                
                -label-indicator-background = 2B7DBC

              
                200
                
                -label-indicator-overline = 2B7DBC

              
                201
                
                -label-indicator-underline = 2B7DBC

              
                
                185
                +blacklist-0 = num lock

              
                
                186
                +blacklist-1 = scroll lock

              
                
                187
                +blacklist-2= caps lock

              
                202
                188
                 

              
                203
                
                -############################################################################################################

              
                204
                
                -; Battery - https://github.com/polybar/polybar/wiki/Module:-battery

              
                205
                
                -[module/battery-combined-tlp]

              
                
                189
                +

              
                
                190
                +[module/microphone]

              
                206
                191
                 type = custom/script

              
                207
                
                -exec = ~/.config/polybar/scripts/battery-combined-tlp.sh

              
                208
                
                -interval = 10

              
                
                192
                +label = %output:0:40:...%

              
                
                193
                +exec = ~/.config/polybar/scripts/microphone.sh  

              
                
                194
                +click-left = ~/.config/polybar/scripts/microphone.sh --click

              
                
                195
                +interval = 0

              
                209
                196
                 

              
                210
                
                -############################################################################################################

              
                211
                
                -; Separator

              
                
                197
                +

              
                212
                198
                 [module/sp2]

              
                213
                199
                 type = custom/text

              
                214
                200
                 content = "┇"

              
                215
                
                -; content-foreground = #93A1A1

              
                216
                201
                 

              
                217
                
                -############################################################################################################

              
                218
                
                -; Calendar

              
                219
                
                -[module/calendar]

              
                220
                
                -type = custom/script

              
                221
                
                -exec = ~/.config/polybar/scripts/popup-calendar.sh

              
                222
                
                -interval = 5

              
                223
                
                -click-left = ~/.config/polybar/scripts/popup-calendar.sh --popup &

              
                224
                202
                 

              
                225
                
                -############################################################################################################

              
                226
                
                -# Date & time - https://github.com/polybar/polybar/wiki/Module:-date

              
                227
                203
                 [module/date]

              
                228
                204
                 type = internal/date

              
                229
                
                -interval = 1

              
                230
                
                -dqate =

              
                231
                
                -time =%{F#E0D9FF} %H:%M:%S 

              
                232
                
                -date-alt =%{F#E0D9FF} %a %e %B %Y

              
                233
                
                -time-alt = %H:%M

              
                234
                
                -format-prefix = 

              
                235
                
                -label = %date% %time%

              
                
                205
                +interval = 600

              
                
                206
                +date = %b %e

              
                
                207
                +label =  %date%

              
                236
                208
                 

              
                237
                
                -############################################################################################################

              
                238
                
                -; Focus window name - https://github.com/polybar/polybar/wiki/Module:-xwindow

              
                
                209
                +

              
                
                210
                +[module/time]

              
                
                211
                +type = internal/date

              
                
                212
                +interval = 0

              
                
                213
                +time = %H:%M

              
                
                214
                +label =  %time%

              
                
                215
                +

              
                
                216
                +

              
                239
                217
                 [module/title]

              
                240
                218
                 type = internal/xwindow

              
                241
                219
                 label = %{F#f0f0f0}%title:0:50:...%

              
                242
                220
                 label-empty = Empty

              
                243
                221
                 label-empty-foreground = #707880

              
                244
                222
                 label-maxlen = 30

              
                245
                
                -label-padding = 0
              
                
                223
                +

              
                
                224
                +[module/clipmenu]

              
                
                225
                +type = custom/text

              
                
                226
                +content = ""

              
                
                227
                +click-left = "CM_LAUNCHER=rofi clipmenu"

              
                
                228
                +interval = 0
              
M config/polybar/launch.sh
···
                1
                1
                 #!/bin/bash

              
                
                2
                +

              
                
                3
                +# Terminate already running bar instances

              
                2
                4
                 killall -q polybar

              
                
                5
                +

              
                
                6
                +# Wait until the processes have been shut down

              
                3
                7
                 while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

              
                4
                
                -polybar example &

              
                
                8
                +

              
                
                9
                +# Launch Polybar, using default config location ~/.config/polybar/config

              
                
                10
                +polybar bar &

              
                
                11
                +echo "Polybar launched..."

              
D config/polybar/scripts/battery-combined-tlp.sh
···
                1
                
                -#!/bin/sh

              
                2
                
                -

              
                3
                
                -battery=$(sudo tlp-stat -b | tac | grep -m 1 "Charge" |  tr -d -c "[:digit:],.")

              
                4
                
                -

              
                5
                
                -echo " $battery %"
              
D config/polybar/scripts/btc
···
                1
                
                -#!/usr/bin/python

              
                2
                
                -# -*- coding: utf-8 -*-

              
                3
                
                -

              
                4
                
                -import json,sys,urllib.request,time

              
                5
                
                -

              
                6
                
                -if len(sys.argv) != 3:

              
                7
                
                -    print("Usage: btc usd,eur,btc nok")

              
                8
                
                -    sys.exit()

              
                9
                
                -

              
                10
                
                -currencies = sys.argv[1]

              
                11
                
                -basecurrency = sys.argv[2]

              
                12
                
                -

              
                13
                
                -currencyurl = "http://freecurrencyrates.com/api/action.php?do=cvals&iso=" + currencies.replace(',','') + "&f=" + basecurrency + "&v=1&s=cbr"

              
                14
                
                -f = urllib.request.urlopen(currencyurl)

              
                15
                
                -obj = json.loads(f.read())

              
                16
                
                -res="";

              
                17
                
                -for c in currencies.split(','):

              
                18
                
                -    res += c.upper() + ":{:,.2f}".format(1/obj[c.upper()]).replace(',',' ')

              
                19
                
                -

              
                20
                
                -# some unicode currency code replacement (optional)

              
                21
                
                -res = res.replace("USD", "   $")

              
                22
                
                -res = res.replace("EUR", "   €")

              
                23
                
                -res = res.replace("BTC", "   ")

              
                24
                
                -

              
                25
                
                -print(res);
              
A config/polybar/scripts/microphone.sh
···
                
                1
                +#!/bin/bash

              
                
                2
                +MICSYMBOL=$1

              
                
                3
                +MICMUTEDSYMBOL=$2

              
                
                4
                +

              
                
                5
                +case "$1" in

              
                
                6
                +    --click)

              
                
                7
                +	amixer -D pulse sset Capture toggle

              
                
                8
                +	;;

              
                
                9
                +    *)

              
                
                10
                +	;;

              
                
                11
                +esac

              
                
                12
                +

              
                
                13
                +STATUS=$(amixer -D pulse get Capture | grep -E "\[on\]|\[off\]" | cut -s -d ' ' -f 8 | uniq)

              
                
                14
                +

              
                
                15
                +if [[ $STATUS = "[on]" ]]; then

              
                
                16
                +    echo $MICSYMBOL

              
                
                17
                +elif [[ $STATUS = "[off]" ]]; then

              
                
                18
                +    echo $MICMUTEDSYMBOL

              
                
                19
                +else

              
                
                20
                +    echo "Not working, check script."

              
                
                21
                +fi

              
D config/polybar/scripts/openweathermap-simple.sh
···
                1
                
                -#!/bin/sh

              
                2
                
                -API="https://api.openweathermap.org/data/2.5"

              
                3
                
                -KEY="34e5d198afe8fb0303e3c3c37774d2ca"

              
                4
                
                -CITY="Horodnytsya, UA"

              
                5
                
                -UNITS="metric"

              
                6
                
                -SYMBOL="°С"

              
                7
                
                -

              
                8
                
                -get_icon() {

              
                9
                
                -    case $1 in

              
                10
                
                -        # Icons for weather-icons

              
                11
                
                -        01d) icon="";;

              
                12
                
                -        01n) icon="";;

              
                13
                
                -        02d) icon="";;

              
                14
                
                -        02n) icon="";;

              
                15
                
                -        03*) icon="";;

              
                16
                
                -        04*) icon="";;

              
                17
                
                -        09d) icon="";;

              
                18
                
                -        09n) icon="";;

              
                19
                
                -        10d) icon="";;

              
                20
                
                -        10n) icon="";;

              
                21
                
                -        11d) icon="";;

              
                22
                
                -        11n) icon="";;

              
                23
                
                -        13d) icon="";;

              
                24
                
                -        13n) icon="";;

              
                25
                
                -        50d) icon="";;

              
                26
                
                -        50n) icon="";;

              
                27
                
                -        *) icon="";

              
                28
                
                -    esac

              
                29
                
                -

              
                30
                
                -    echo $icon

              
                31
                
                -}

              
                32
                
                -

              
                33
                
                -if [ -n "$CITY" ]; then

              
                34
                
                -    if [ "$CITY" -eq "$CITY" ] 2>/dev/null; then

              
                35
                
                -        CITY_PARAM="id=$CITY"

              
                36
                
                -    else

              
                37
                
                -        CITY_PARAM="q=$CITY"

              
                38
                
                -    fi

              
                39
                
                -

              
                40
                
                -    weather=$(curl -sf "$API/weather?appid=$KEY&$CITY_PARAM&units=$UNITS")

              
                41
                
                -else

              
                42
                
                -    location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)

              
                43
                
                -

              
                44
                
                -    if [ -n "$location" ]; then

              
                45
                
                -        location_lat="$(echo "$location" | jq '.location.lat')"

              
                46
                
                -        location_lon="$(echo "$location" | jq '.location.lng')"

              
                47
                
                -

              
                48
                
                -        weather=$(curl -sf "$API/weather?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS")

              
                49
                
                -    fi

              
                50
                
                -fi

              
                51
                
                -

              
                52
                
                -if [ -n "$weather" ]; then

              
                53
                
                -    weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)

              
                54
                
                -    weather_icon=$(echo "$weather" | jq -r ".weather[0].icon")

              
                55
                
                -

              
                56
                
                -    echo "$(get_icon "$weather_icon")" "$weather_temp$SYMBOL"

              
                57
                
                -fi
              
D config/polybar/scripts/popup-calendar.sh
···
                1
                
                -#!/bin/sh

              
                2
                
                -

              
                3
                
                -BAR_HEIGHT=22  # polybar height

              
                4
                
                -BORDER_SIZE=1  # border size from your wm settings

              
                5
                
                -YAD_WIDTH=222  # 222 is minimum possible value

              
                6
                
                -YAD_HEIGHT=193 # 193 is minimum possible value

              
                7
                
                -DATE="$(date +"%a %d %H:%M")"

              
                8
                
                -

              
                9
                
                -case "$1" in

              
                10
                
                ---popup)

              
                11
                
                -    if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then

              
                12
                
                -        exit 0

              
                13
                
                -    fi

              
                14
                
                -

              
                15
                
                -    eval "$(xdotool getmouselocation --shell)"

              
                16
                
                -    eval "$(xdotool getdisplaygeometry --shell)"

              
                17
                
                -

              
                18
                
                -    # X

              
                19
                
                -    if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side

              
                20
                
                -        : $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE))

              
                21
                
                -    elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side

              
                22
                
                -        : $((pos_x = BORDER_SIZE))

              
                23
                
                -    else #Center

              
                24
                
                -        : $((pos_x = X - YAD_WIDTH / 2))

              
                25
                
                -    fi

              
                26
                
                -

              
                27
                
                -    # Y

              
                28
                
                -    if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom

              
                29
                
                -        : $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE))

              
                30
                
                -    else #Top

              
                31
                
                -        : $((pos_y = BAR_HEIGHT + BORDER_SIZE))

              
                32
                
                -    fi

              
                33
                
                -

              
                34
                
                -    yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \

              
                35
                
                -        --width="$YAD_WIDTH" --height="$YAD_HEIGHT" --posx="$pos_x" --posy="$pos_y" \

              
                36
                
                -        --title="yad-calendar" --borders=0 >/dev/null &

              
                37
                
                -    ;;

              
                38
                
                -*)

              
                39
                
                -    echo "$DATE"

              
                40
                
                -    ;;

              
                41
                
                -esac

              
D config/polybar/scripts/redshift.sh
···
                1
                
                -#!/bin/sh

              
                2
                
                -

              
                3
                
                -if [ "$(pgrep -x redshift)" ]; then

              
                4
                
                -    temp=$(redshift -p 2> /dev/null | grep temp | cut -d ":" -f 2 | tr -dc "[:digit:]")

              
                5
                
                -

              
                6
                
                -    if [ -z "$temp" ]; then

              
                7
                
                -        echo "%{F#65737E} #"

              
                8
                
                -    elif [ "$temp" -ge 5000 ]; then

              
                9
                
                -        echo "%{F#8FA1B3} #"

              
                10
                
                -    elif [ "$temp" -ge 4000 ]; then

              
                11
                
                -        echo "%{F#EBCB8B} #"

              
                12
                
                -    else

              
                13
                
                -        echo "%{F#D08770} #"

              
                14
                
                -    fi

              
                15
                
                -fi
              
M config/polybar/scripts/spotify_status.py
···
                1
                1
                 #!/usr/bin/env python

              
                2
                
                -import sys

              
                3
                
                -import dbus

              
                4
                
                -import argparse

              
                
                2
                +# -*- encoding: utf-8 -*-

              
                
                3
                +import sys, dbus, argparse

              
                5
                4
                 

              
                6
                5
                 parser = argparse.ArgumentParser()

              
                7
                6
                 parser.add_argument(

              
A config/polybar/scripts/updates-pacman-aur.sh
···
                
                1
                +#!/bin/sh

              
                
                2
                +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then

              
                
                3
                +    updates_arch=0

              
                
                4
                +fi

              
                
                5
                +

              
                
                6
                +if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then

              
                
                7
                +# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then

              
                
                8
                +# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then

              
                
                9
                +# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then

              
                
                10
                +# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then

              
                
                11
                +    updates_aur=0

              
                
                12
                +fi

              
                
                13
                +

              
                
                14
                +updates=$(("$updates_arch" + "$updates_aur"))

              
                
                15
                +

              
                
                16
                +if [ "$updates" -gt 0 ]; then

              
                
                17
                +    echo " $updates"

              
                
                18
                +else

              
                
                19
                +    echo ""

              
                
                20
                +fi

              
D config/polybar/scripts/updates-pacman.sh
···
                1
                
                -#!/bin/sh

              
                2
                
                -if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then

              
                3
                
                -    updates_arch=0

              
                4
                
                -fi

              
                5
                
                -

              
                6
                
                -if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then

              
                7
                
                -    updates_aur=0

              
                8
                
                -fi

              
                9
                
                -

              
                10
                
                -updates=$(("$updates_arch" + "$updates_aur"))

              
                11
                
                -

              
                12
                
                -if [ "$updates" -gt 0 ]; then

              
                13
                
                -    echo "# $updates"

              
                14
                
                -else

              
                15
                
                -    echo ""

              
                16
                
                -fi

              
A config/polybar/scripts/weather.py
···
                
                1
                +#!/usr/bin/env python3

              
                
                2
                +# -*- encoding: utf-8 -*-

              
                
                3
                +import requests, os

              
                
                4
                +

              
                
                5
                +API_KEY = os.getenv("OWM_POLYBAR")

              
                
                6
                +CITY = "Horodnytsya,UA"

              
                
                7
                +

              
                
                8
                +try:

              
                
                9
                +    JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json()

              
                
                10
                +except Exception as e:

              
                
                11
                +    print("No connection")

              
                
                12
                +

              
                
                13
                +try:

              
                
                14
                +    if JSON['weather'][0]['main'] == "Clear": print("", int(JSON["main"]["temp"]),"°С")

              
                
                15
                +    elif JSON['weather'][0]['main'] == "Thunderstorm": print("", int(JSON["main"]["temp"]),"°С")

              
                
                16
                +    elif JSON['weather'][0]['main'] == "Drizzle": print("", int(JSON["main"]["temp"]),"°С")

              
                
                17
                +    elif JSON['weather'][0]['main'] == "Rain": print("", int(JSON["main"]["temp"]),"°С")

              
                
                18
                +    elif JSON['weather'][0]['main'] == "Snow": print("", int(JSON["main"]["temp"]),"°С")

              
                
                19
                +    elif JSON['weather'][0]['main'] == "Mist": print("", int(JSON["main"]["temp"]),"°С")

              
                
                20
                +    elif JSON['weather'][0]['main'] == "Smoke": print("", int(JSON["main"]["temp"]),"°С")

              
                
                21
                +    elif JSON['weather'][0]['main'] == "Haze": print("", int(JSON["main"]["temp"]),"°С")

              
                
                22
                +    elif JSON['weather'][0]['main'] == "Dust": print("", int(JSON["main"]["temp"]),"°С")

              
                
                23
                +    elif JSON['weather'][0]['main'] == "Fog": print("", int(JSON["main"]["temp"]),"°С")

              
                
                24
                +    elif JSON['weather'][0]['main'] == "Sand": print("", int(JSON["main"]["temp"]),"°С")

              
                
                25
                +    elif JSON['weather'][0]['main'] == "Ash": print("", int(JSON["main"]["temp"]),"°С")

              
                
                26
                +    elif JSON['weather'][0]['main'] == "Squall": print("", int(JSON["main"]["temp"]),"°С")

              
                
                27
                +    elif JSON['weather'][0]['main'] == "Tornado": print("", int(JSON["main"]["temp"]),"°С")

              
                
                28
                +    elif JSON['weather'][0]['main'] == "Clouds": print("", int(JSON["main"]["temp"]),"°С")

              
                
                29
                +except Exception as e:

              
                
                30
                +    print(int(JSON["main"]["temp"]),"°С")

              
A config/ranger/plugins/archive.py
···
                
                1
                +from ranger.api.commands import *

              
                
                2
                +from ranger.core.loader import CommandLoader

              
                
                3
                +import os

              
                
                4
                +

              
                
                5
                +

              
                
                6
                +class compress(Command):

              
                
                7
                +    def execute(self):

              
                
                8
                +        cwd = self.fm.thisdir

              
                
                9
                +        marked_files = cwd.get_selection()

              
                
                10
                +

              
                
                11
                +        if not marked_files: return

              
                
                12
                +

              
                
                13
                +        def refresh(_):

              
                
                14
                +            cwd = self.fm.get_directory(original_path)

              
                
                15
                +            cwd.load_content()

              
                
                16
                +

              
                
                17
                +        original_path = cwd.path

              
                
                18
                +

              
                
                19
                +        parts = self.line.strip().split()

              
                
                20
                +        if len(parts) > 1: au_flags = [' '.join(parts[1:])]

              
                
                21
                +        else: au_flags = [os.path.basename(self.fm.thisdir.path) + '.zip']

              
                
                22
                +

              
                
                23
                +        files_num = len(marked_files)

              
                
                24
                +        files_num_str = str(files_num) + ' objects' if files_num > 1 else '1 object'

              
                
                25
                +        descr = "Compressing " + files_num_str + " -> " + os.path.basename(au_flags[0])

              
                
                26
                +

              
                
                27
                +        obj = CommandLoader(args=['apack'] + au_flags + [os.path.relpath(f.path, cwd.path) for f in marked_files], descr=descr, read=True)

              
                
                28
                +

              
                
                29
                +        obj.signal_bind('after', refresh)

              
                
                30
                +        self.fm.loader.add(obj)

              
                
                31
                +

              
                
                32
                +    def tab(self, tabnum):

              
                
                33
                +        extension = ['.zip', '.tar.gz', '.rar', '.7z']

              
                
                34
                +        return ['compress ' + os.path.basename(self.fm.thisdir.path) + ext for ext in extension]

              
                
                35
                +

              
                
                36
                +

              
                
                37
                +class extract(Command):

              
                
                38
                +    def execute(self):

              
                
                39
                +        cwd = self.fm.thisdir

              
                
                40
                +        copied_files = cwd.get_selection()

              
                
                41
                +

              
                
                42
                +        if not copied_files: return

              
                
                43
                +

              
                
                44
                +        def refresh(_):

              
                
                45
                +            cwd = self.fm.get_directory(original_path)

              
                
                46
                +            cwd.load_content()

              
                
                47
                +

              
                
                48
                +        one_file = copied_files[0]

              
                
                49
                +        cwd = self.fm.thisdir

              
                
                50
                +        original_path = cwd.path

              
                
                51
                +

              
                
                52
                +        line_args = self.line.split()[1:]

              
                
                53
                +        if line_args:

              
                
                54
                +            extraction_dir = os.path.join(cwd.path, "".join(line_args))

              
                
                55
                +            os.makedirs(extraction_dir, exist_ok=True)

              
                
                56
                +            flags = ['-X', extraction_dir]

              
                
                57
                +            flags += ['-e']

              
                
                58
                +        else:

              
                
                59
                +            flags = ['-X', cwd.path]

              
                
                60
                +            flags += ['-e']

              
                
                61
                +

              
                
                62
                +        self.fm.copy_buffer.clear()

              
                
                63
                +        self.fm.cut_buffer = False

              
                
                64
                +

              
                
                65
                +        if len(copied_files) == 1: descr = "Extracting: " + os.path.basename(one_file.path)

              
                
                66
                +        else: descr = "Extracting files from: " + os.path.basename(one_file.dirname)

              
                
                67
                +        obj = CommandLoader(args=['aunpack'] + flags + [f.path for f in copied_files], descr=descr, read=True)

              
                
                68
                +

              
                
                69
                +        obj.signal_bind('after', refresh)

              
                
                70
                +        self.fm.loader.add(obj)

              
                
                71
                +

              
                
                72
                +class extract_to_dirs(Command):

              
                
                73
                +    def execute(self):

              
                
                74
                +        cwd = self.fm.thisdir

              
                
                75
                +        original_path = cwd.path

              
                
                76
                +        copied_files = cwd.get_selection()

              
                
                77
                +

              
                
                78
                +        if not copied_files: return

              
                
                79
                +

              
                
                80
                +        def refresh(_):

              
                
                81
                +            cwd = self.fm.get_directory(original_path)

              
                
                82
                +            cwd.load_content()

              
                
                83
                +

              
                
                84
                +        def make_flags(fn):

              
                
                85
                +            flags = ['-D']

              
                
                86
                +            return flags

              
                
                87
                +

              
                
                88
                +        one_file = copied_files[0]

              
                
                89
                +        self.fm.copy_buffer.clear()

              
                
                90
                +        self.fm.cut_buffer = False

              
                
                91
                +

              
                
                92
                +        if len(copied_files) == 1: descr = "Extracting: " + os.path.basename(one_file.path)

              
                
                93
                +        else: descr = "Extracting files from: " + os.path.basename(one_file.dirname)

              
                
                94
                +

              
                
                95
                +        for f in copied_files:        

              
                
                96
                +            obj = CommandLoader(args=['aunpack'] + make_flags(f.path) + [f.path], descr=descr, read=True)

              
                
                97
                +            obj.signal_bind('after', refresh)

              
                
                98
                +            self.fm.loader.add(obj)

              
                
                99
                +

              
                
                100
                +

              
A config/ranger/plugins/git.py
···
                
                1
                +import subprocess

              
                
                2
                +from ranger.api.commands import Command

              
                
                3
                +

              
                
                4
                +

              
                
                5
                +class git(Command):

              
                
                6
                +

              
                
                7
                +    commands = 'init status clone add rm restore commit remote push'.split()

              
                
                8
                +

              
                
                9
                +

              
                
                10
                +    def execute(self):

              
                
                11
                +        # empty

              
                
                12
                +        if not self.arg(1):

              
                
                13
                +            return self.fm.notify("For commands check \"git help\"")

              
                
                14
                +

              
                
                15
                +        # help

              
                
                16
                +        if self.arg(1) == "help":

              
                
                17
                +            return self.fm.notify("Not done yet!", bad=True)

              
                
                18
                +

              
                
                19
                +        # init

              
                
                20
                +        if self.arg(1) == self.commands[0]:

              
                
                21
                +            subprocess.run(["git", "init", "--quiet"])

              
                
                22
                +            return self.fm.notify("Repository initialized successefully")

              
                
                23
                +

              
                
                24
                +        # status

              
                
                25
                +        if self.arg(1) == self.commands[1]:

              
                
                26
                +            output = subprocess.check_output(["git", "status"]).decode()

              
                
                27
                +

              
                
                28
                +            with open('/tmp/gitplug-status', 'w') as out:

              
                
                29
                +                out.write(output)

              
                
                30
                +

              
                
                31
                +            return self.fm.edit_file('/tmp/gitplug-status')

              
                
                32
                +

              
                
                33
                +        # clone

              
                
                34
                +        if self.arg(1) == self.commands[2]:

              
                
                35
                +            if not self.arg(2):

              
                
                36
                +                return self.fm.notify("Missing url!", bad=True)

              
                
                37
                +

              
                
                38
                +            if self.arg(2):

              
                
                39
                +                subprocess.run(["git", "clone", self.arg(2), "--quiet"])

              
                
                40
                +                return self.fm.notify("Repository successfully cloned!")

              
                
                41
                +

              
                
                42
                +        # add

              
                
                43
                +        if self.arg(1) == self.commands[3]:

              
                
                44
                +            if not self.arg(2):

              
                
                45
                +                return self.fm.notify("Missing arguments! Usage :git add <file>", bad=True)

              
                
                46
                +

              
                
                47
                +            if self.arg(2):

              
                
                48
                +                subprocess.run(["git", "add", self.arg(2)])

              
                
                49
                +                return self.fm.notify("Successfully added files to branch!")

              
                
                50
                +

              
                
                51
                +        #rm

              
                
                52
                +        if self.arg(1) == self.commands[4]:

              
                
                53
                +            if not self.arg(2):

              
                
                54
                +                return self.fm.notify("Missing arguments! Usage :git rm <file>", bad=True)

              
                
                55
                +

              
                
                56
                +            if self.arg(2):

              
                
                57
                +                subprocess.run(["git", "rm", self.arg(2)])

              
                
                58
                +                return self.fm.notify("Successfully removed files from branch!")

              
                
                59
                +

              
                
                60
                +        # restore

              
                
                61
                +        if self.arg(1) == self.commands[5]:

              
                
                62
                +            if not self.arg(2):

              
                
                63
                +                return self.fm.notify("Missing arguments! Usage :git restore <file>", bad=True)

              
                
                64
                +

              
                
                65
                +            if self.arg(2):

              
                
                66
                +                subprocess.run(["git", "restore", "--staged", self.arg(2), "--quiet"])

              
                
                67
                +                return self.fm.notify("Successfully restored files!")

              
                
                68
                +

              
                
                69
                +        # commit

              
                
                70
                +        if self.arg(1) == self.commands[6]:

              
                
                71
                +            if not self.rest(2):

              
                
                72
                +                return self.fm.notify("Missing commit text", bad=True)

              
                
                73
                +

              
                
                74
                +            if self.rest(2):

              
                
                75
                +                subprocess.run(["git", "commit", "-m", self.rest(2), "--quiet"])

              
                
                76
                +                return self.fm.notify("Successfully commited!")

              
                
                77
                +        

              
                
                78
                +        # remote

              
                
                79
                +        if self.arg(1) == self.commands[7]:

              
                
                80
                +            if not self.arg(2):

              
                
                81
                +                return self.fm.notify("Missing arguments! Use: git remote add/rm <name> <url>", bad=True)

              
                
                82
                +

              
                
                83
                +            if self.arg(2) == "add":

              
                
                84
                +                if not self.arg(3):

              
                
                85
                +                    return self.fm.notify("Missing name and url!", bad=True)

              
                
                86
                +

              
                
                87
                +                if self.arg(3):

              
                
                88
                +                    if not self.arg(4):

              
                
                89
                +                        return self.fm.notify("Missing url!", bad=True)

              
                
                90
                +

              
                
                91
                +                    if self.arg(4):

              
                
                92
                +                        subprocess.run(["git", "remote", "add", self.arg(3), self.arg(4)])

              
                
                93
                +                        return self.fm.notify("Remote successfully added!")

              
                
                94
                +

              
                
                95
                +            if self.arg(2) == "rm":

              
                
                96
                +                if not self.arg(3):

              
                
                97
                +                    return self.fm.notify("Missing name!", bad=True)

              
                
                98
                +

              
                
                99
                +                if self.arg(3):

              
                
                100
                +                    subprocess.run(["git", "remote", "rm", self.arg(3)])

              
                
                101
                +                    return self.fm.notify("Remote successfully removed")

              
                
                102
                +

              
                
                103
                +        # push

              
                
                104
                +        if self.arg(1) == self.commands[8]:

              
                
                105
                +            if self.arg(2) == "-u" and self.arg(3) and self.arg(4):

              
                
                106
                +                subprocess.run(["git", "push", "--quiet", "-u", self.arg(3), self.arg(4)])

              
                
                107
                +                return self.fm.notify("Repository successfully pushed")

              
                
                108
                +

              
                
                109
                +            if not self.arg(2):

              
                
                110
                +                subprocess.run(["git", "push", "--quiet"])

              
                
                111
                +                return self.fm.notify("Repository successfully pushed")

              
A config/ranger/rc.conf
···
                
                1
                +############

              
                
                2
                +### Options

              
                
                3
                +###########

              
                
                4
                +

              
                
                5
                +### Appearance

              
                
                6
                +set colorscheme solarized

              
                
                7
                +set viewmode miller

              
                
                8
                +set column_ratios 1,3,4

              
                
                9
                +set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$|.DS_Store$|.directory

              
                
                10
                +set show_hidden false

              
                
                11
                +set confirm_on_delete always 

              
                
                12
                +set use_preview_script true

              
                
                13
                +set automatically_count_files false

              
                
                14
                +set open_all_images true

              
                
                15
                +set status_bar_on_top false

              
                
                16
                +

              
                
                17
                +### Versin control system

              
                
                18
                +set vcs_aware true

              
                
                19
                +set vcs_backend_git enabled

              
                
                20
                +set vcs_backend_hg disabled

              
                
                21
                +set vcs_backend_bzr disabled

              
                
                22
                +set vcs_backend_svn disabled

              
                
                23
                +set vcs_msg_length 30

              
                
                24
                +

              
                
                25
                +### Preview

              
                
                26
                +set preview_images true

              
                
                27
                +#set preview_images_method w3m

              
                
                28
                +set preview_images_method kitty

              
                
                29
                +

              
                
                30
                +set w3m_delay 0.02

              
                
                31
                +set w3m_offset 0

              
                
                32
                +

              
                
                33
                +set iterm2_font_width 8

              
                
                34
                +set iterm2_font_height 11

              
                
                35
                +

              
                
                36
                +set unicode_ellipsis false

              
                
                37
                +set bidi_support false

              
                
                38
                +set show_hidden_bookmarks true

              
                
                39
                +

              
                
                40
                +set preview_files true

              
                
                41
                +set preview_directories true

              
                
                42
                +set collapse_preview true

              
                
                43
                +

              
                
                44
                +set wrap_plaintext_previews false

              
                
                45
                +set draw_progress_bar_in_status_bar true

              
                
                46
                +set draw_borders none

              
                
                47
                +

              
                
                48
                +set dirname_in_tabs false

              
                
                49
                +

              
                
                50
                +set mouse_enabled true

              
                
                51
                +

              
                
                52
                +set display_size_in_main_column true

              
                
                53
                +set display_size_in_status_bar true

              
                
                54
                +set display_free_space_in_status_bar false

              
                
                55
                +set display_tags_in_all_columns true

              
                
                56
                +

              
                
                57
                +set update_title false

              
                
                58
                +set update_tmux_title false 

              
                
                59
                +set shorten_title 3

              
                
                60
                +set hostname_in_titlebar false

              
                
                61
                +set tilde_in_titlebar trues

              
                
                62
                +

              
                
                63
                +### History

              
                
                64
                +set max_history_size 20

              
                
                65
                +set max_console_history_size 50

              
                
                66
                +set save_console_history false

              
                
                67
                +

              
                
                68
                +

              
                
                69
                +set scroll_offset 4

              
                
                70
                +set flushinput true

              
                
                71
                +set padding_right true

              
                
                72
                +

              
                
                73
                +set autosave_bookmarks true

              
                
                74
                +set save_backtick_bookmark true

              
                
                75
                +

              
                
                76
                +set autoupdate_cumulative_size false

              
                
                77
                +set show_cursor false

              
                
                78
                +

              
                
                79
                +# One of: size, natural, basename, atime, ctime, mtime, type, random

              
                
                80
                +set sort natural

              
                
                81
                +

              
                
                82
                +set sort_reverse false

              
                
                83
                +set sort_case_insensitive true

              
                
                84
                +set sort_directories_first true

              
                
                85
                +set sort_unicode false

              
                
                86
                +

              
                
                87
                +set xterm_alt_key false

              
                
                88
                +

              
                
                89
                +set cd_bookmarks true

              
                
                90
                +set cd_tab_case sensitive

              
                
                91
                +set cd_tab_fuzzy false

              
                
                92
                +

              
                
                93
                +set preview_max_size 0

              
                
                94
                +

              
                
                95
                +set hint_collapse_threshold 10

              
                
                96
                +

              
                
                97
                +set show_selection_in_titlebar true

              
                
                98
                +set idle_delay 2000

              
                
                99
                +

              
                
                100
                +set metadata_deep_search false

              
                
                101
                +set clear_filters_on_dir_change false

              
                
                102
                +

              
                
                103
                +# Possible values: false, absolute, relative.

              
                
                104
                +set line_numbers false

              
                
                105
                +set relative_current_zero false

              
                
                106
                +set one_indexed false

              
                
                107
                +

              
                
                108
                +set save_tabs_on_exit false

              
                
                109
                +set wrap_scroll false

              
                
                110
                +set global_inode_type_filter

              
                
                111
                +set freeze_files false

              
                
                112
                +set size_in_bytes false

              
                
                113
                +set nested_ranger_warning true

              
                
                114
                +

              
                
                115
                +#################################

              
                
                116
                +# Command Aliases in the Console

              
                
                117
                +#################################

              
                
                118
                +map ex extract

              
                
                119
                +map ed extract_to_dirs

              
                
                120
                +map ec compress

              
                
                121
                +

              
                
                122
                +alias e     edit

              
                
                123
                +alias q     quit

              
                
                124
                +alias q!    quit!

              
                
                125
                +alias qa    quitall

              
                
                126
                +alias qa!   quitall!

              
                
                127
                +alias qall  quitall

              
                
                128
                +alias qall! quitall!

              
                
                129
                +alias setl  setlocal

              
                
                130
                +

              
                
                131
                +alias filter     scout -prts

              
                
                132
                +alias find       scout -aets

              
                
                133
                +alias mark       scout -mr

              
                
                134
                +alias unmark     scout -Mr

              
                
                135
                +alias search     scout -rs

              
                
                136
                +alias search_inc scout -rts

              
                
                137
                +alias travel     scout -aefklst

              
                
                138
                +

              
                
                139
                +map     Q quitall

              
                
                140
                +map     q quit

              
                
                141
                +copymap q ZZ ZQ

              
                
                142
                +

              
                
                143
                +map R     reload_cwd

              
                
                144
                +map F     set freeze_files!

              
                
                145
                +map <C-r> reset

              
                
                146
                +map <C-l> redraw_window

              
                
                147
                +map <C-c> abort

              
                
                148
                +map <esc> change_mode normal

              
                
                149
                +map ~ set viewmode!

              
                
                150
                +

              
                
                151
                +map i display_file

              
                
                152
                +map <A-j> scroll_preview 1

              
                
                153
                +map <A-k> scroll_preview -1

              
                
                154
                +map ? help

              
                
                155
                +map W display_log

              
                
                156
                +map w taskview_open

              
                
                157
                +map S shell $SHELL

              
                
                158
                +

              
                
                159
                +map :  console

              
                
                160
                +map ;  console

              
                
                161
                +map !  console shell%space

              
                
                162
                +map @  console -p6 shell  %%s

              
                
                163
                +map #  console shell -p%space

              
                
                164
                +map s  console shell%space

              
                
                165
                +map r  chain draw_possible_programs; console open_with%space

              
                
                166
                +map f  console find%space

              
                
                167
                +map cd console cd%space

              
                
                168
                +

              
                
                169
                +map <C-p> chain console; eval fm.ui.console.history_move(-1)

              
                
                170
                +

              
                
                171
                +map Mf linemode filename

              
                
                172
                +map Mi linemode fileinfo

              
                
                173
                +map Mm linemode mtime

              
                
                174
                +map Mh linemode humanreadablemtime

              
                
                175
                +map Mp linemode permissions

              
                
                176
                +map Ms linemode sizemtime

              
                
                177
                +map MH linemode sizehumanreadablemtime

              
                
                178
                +map Mt linemode metatitle

              
                
                179
                +

              
                
                180
                +map t       tag_toggle

              
                
                181
                +map ut      tag_remove

              
                
                182
                +map "<any>  tag_toggle tag=%any

              
                
                183
                +map <Space> mark_files toggle=True

              
                
                184
                +map v       mark_files all=True toggle=True

              
                
                185
                +map uv      mark_files all=True val=False

              
                
                186
                +map V       toggle_visual_mode

              
                
                187
                +map uV      toggle_visual_mode reverse=True

              
                
                188
                +

              
                
                189
                +map <UP>       move up=1

              
                
                190
                +map <DOWN>     move down=1

              
                
                191
                +map <LEFT>     move left=1

              
                
                192
                +map <RIGHT>    move right=1

              
                
                193
                +map <HOME>     move to=0

              
                
                194
                +map <END>      move to=-1

              
                
                195
                +map <PAGEDOWN> move down=1   pages=True

              
                
                196
                +map <PAGEUP>   move up=1     pages=True

              
                
                197
                +map <CR>       move right=1

              
                
                198
                +map <DELETE>   console delete

              
                
                199
                +map <INSERT>   console touch%space

              
                
                200
                +

              
                
                201
                +copymap <UP>       k

              
                
                202
                +copymap <DOWN>     j

              
                
                203
                +copymap <LEFT>     h

              
                
                204
                +copymap <RIGHT>    l

              
                
                205
                +copymap <HOME>     gg

              
                
                206
                +copymap <END>      G

              
                
                207
                +copymap <PAGEDOWN> <C-F>

              
                
                208
                +copymap <PAGEUP>   <C-B>

              
                
                209
                +

              
                
                210
                +map J  move down=0.5  pages=True

              
                
                211
                +map K  move up=0.5    pages=True

              
                
                212
                +copymap J <C-D>

              
                
                213
                +copymap K <C-U>

              
                
                214
                +

              
                
                215
                +map H     history_go -1

              
                
                216
                +map L     history_go 1

              
                
                217
                +map ]     move_parent 1

              
                
                218
                +map [     move_parent -1

              
                
                219
                +map }     traverse

              
                
                220
                +map {     traverse_backwards

              
                
                221
                +map )     jump_non

              
                
                222
                +

              
                
                223
                +map gh cd ~

              
                
                224
                +map gr cd /

              
                
                225
                +map gd cd ~/code

              
                
                226
                +

              
                
                227
                +map E  edit

              
                
                228
                +

              
                
                229
                +map cw console rename%space

              
                
                230
                +map a  rename_append

              
                
                231
                +map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))

              
                
                232
                +map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)

              
                
                233
                +

              
                
                234
                +map pp paste

              
                
                235
                +map po paste overwrite=True

              
                
                236
                +map pP paste append=True

              
                
                237
                +map pO paste overwrite=True append=True

              
                
                238
                +map pl paste_symlink relative=False

              
                
                239
                +map pL paste_symlink relative=True

              
                
                240
                +map phl paste_hardlink

              
                
                241
                +map pht paste_hardlinked_subtree

              
                
                242
                +map pd console paste dest=

              
                
                243
                +map p`<any> paste dest=%any_path

              
                
                244
                +map p'<any> paste dest=%any_path

              
                
                245
                +

              
                
                246
                +#map dD console delete

              
                
                247
                +map dD shell mv %s /home/${USER}/.local/share/Trash/files/

              
                
                248
                +map dT console trash

              
                
                249
                +

              
                
                250
                +map dd cut

              
                
                251
                +map ud uncut

              
                
                252
                +map da cut mode=add

              
                
                253
                +map dr cut mode=remove

              
                
                254
                +map dt cut mode=toggle

              
                
                255
                +

              
                
                256
                +map yy copy

              
                
                257
                +map uy uncut

              
                
                258
                +map ya copy mode=add

              
                
                259
                +map yr copy mode=remove

              
                
                260
                +map yt copy mode=toggle

              
                
                261
                +

              
                
                262
                +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)

              
                
                263
                +map dG  eval fm.cut(dirarg=dict(to=-1), narg=quantifier)

              
                
                264
                +map dj  eval fm.cut(dirarg=dict(down=1), narg=quantifier)

              
                
                265
                +map dk  eval fm.cut(dirarg=dict(up=1), narg=quantifier)

              
                
                266
                +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)

              
                
                267
                +map yG  eval fm.copy(dirarg=dict(to=-1), narg=quantifier)

              
                
                268
                +map yj  eval fm.copy(dirarg=dict(down=1), narg=quantifier)

              
                
                269
                +map yk  eval fm.copy(dirarg=dict(up=1), narg=quantifier)

              
                
                270
                +

              
                
                271
                +map /  console search%space

              
                
                272
                +map n  search_next

              
                
                273
                +map N  search_next forward=False

              
                
                274
                +map ct search_next order=tag

              
                
                275
                +map cs search_next order=size

              
                
                276
                +map ci search_next order=mimetype

              
                
                277
                +map cc search_next order=ctime

              
                
                278
                +map cm search_next order=mtime

              
                
                279
                +map ca search_next order=atime

              
                
                280
                +

              
                
                281
                +map <C-n>     tab_new

              
                
                282
                +map <C-w>     tab_close

              
                
                283
                +map <TAB>     tab_move 1

              
                
                284
                +map <S-TAB>   tab_move -1

              
                
                285
                +map <A-Right> tab_move 1

              
                
                286
                +map <A-Left>  tab_move -1

              
                
                287
                +map gt        tab_move 1

              
                
                288
                +map gT        tab_move -1

              
                
                289
                +map gn        tab_new

              
                
                290
                +map gc        tab_close

              
                
                291
                +map uq        tab_restore

              
                
                292
                +map <a-1>     tab_open 1

              
                
                293
                +map <a-2>     tab_open 2

              
                
                294
                +map <a-3>     tab_open 3

              
                
                295
                +map <a-4>     tab_open 4

              
                
                296
                +map <a-5>     tab_open 5

              
                
                297
                +map <a-6>     tab_open 6

              
                
                298
                +map <a-7>     tab_open 7

              
                
                299
                +map <a-8>     tab_open 8

              
                
                300
                +map <a-9>     tab_open 9

              
                
                301
                +map <a-r>     tab_shift 1

              
                
                302
                +map <a-l>     tab_shift -1

              
                
                303
                +

              
                
                304
                +map or set sort_reverse!

              
                
                305
                +map oz set sort=random

              
                
                306
                +map os chain set sort=size;      set sort_reverse=False

              
                
                307
                +map ob chain set sort=basename;  set sort_reverse=False

              
                
                308
                +map on chain set sort=natural;   set sort_reverse=False

              
                
                309
                +map om chain set sort=mtime;     set sort_reverse=False

              
                
                310
                +map oc chain set sort=ctime;     set sort_reverse=False

              
                
                311
                +map oa chain set sort=atime;     set sort_reverse=False

              
                
                312
                +map ot chain set sort=type;      set sort_reverse=False

              
                
                313
                +map oe chain set sort=extension; set sort_reverse=False

              
                
                314
                +

              
                
                315
                +map oS chain set sort=size;      set sort_reverse=True

              
                
                316
                +map oB chain set sort=basename;  set sort_reverse=True

              
                
                317
                +map oN chain set sort=natural;   set sort_reverse=True

              
                
                318
                +map oM chain set sort=mtime;     set sort_reverse=True

              
                
                319
                +map oC chain set sort=ctime;     set sort_reverse=True

              
                
                320
                +map oA chain set sort=atime;     set sort_reverse=True

              
                
                321
                +map oT chain set sort=type;      set sort_reverse=True

              
                
                322
                +map oE chain set sort=extension; set sort_reverse=True

              
                
                323
                +

              
                
                324
                +map dc get_cumulative_size

              
                
                325
                +

              
                
                326
                +map zc    set collapse_preview!

              
                
                327
                +map zd    set sort_directories_first!

              
                
                328
                +map zh    set show_hidden!

              
                
                329
                +map <C-h> set show_hidden!

              
                
                330
                +copymap <C-h> <backspace>

              
                
                331
                +copymap <backspace> <backspace2>

              
                
                332
                +map zI    set flushinput!

              
                
                333
                +map zi    set preview_images!

              
                
                334
                +map zm    set mouse_enabled!

              
                
                335
                +map zp    set preview_files!

              
                
                336
                +map zP    set preview_directories!

              
                
                337
                +map zs    set sort_case_insensitive!

              
                
                338
                +map zu    set autoupdate_cumulative_size!

              
                
                339
                +map zv    set use_preview_script!

              
                
                340
                +map zf    console filter%space

              
                
                341
                +copymap zf zz

              
                
                342
                +

              
                
                343
                +map .d filter_stack add type d

              
                
                344
                +map .f filter_stack add type f

              
                
                345
                +map .l filter_stack add type l

              
                
                346
                +map .m console filter_stack add mime%space

              
                
                347
                +map .n console filter_stack add name%space

              
                
                348
                +map .# console filter_stack add hash%space

              
                
                349
                +map ." filter_stack add duplicate

              
                
                350
                +map .' filter_stack add unique

              
                
                351
                +map .| filter_stack add or

              
                
                352
                +map .& filter_stack add and

              
                
                353
                +map .! filter_stack add not

              
                
                354
                +map .r filter_stack rotate

              
                
                355
                +map .c filter_stack clear

              
                
                356
                +map .* filter_stack decompose

              
                
                357
                +map .p filter_stack pop

              
                
                358
                +map .. filter_stack show

              
                
                359
                +

              
                
                360
                +map `<any>  enter_bookmark %any

              
                
                361
                +map '<any>  enter_bookmark %any

              
                
                362
                +map m<any>  set_bookmark %any

              
                
                363
                +map um<any> unset_bookmark %any

              
                
                364
                +

              
                
                365
                +map m<bg>   draw_bookmarks

              
                
                366
                +copymap m<bg>  um<bg> `<bg> '<bg>

              
                
                367
                +

              
                
                368
                +eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))

              
                
                369
                +eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))

              
                
                370
                +eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))

              
                
                371
                +eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))

              
                
                372
                +eval for arg in "rwxXst": cmd("map +{0}  shell -f chmod u+{0} %s".format(arg))

              
                
                373
                +

              
                
                374
                +eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))

              
                
                375
                +eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))

              
                
                376
                +eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))

              
                
                377
                +eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))

              
                
                378
                +eval for arg in "rwxXst": cmd("map -{0}  shell -f chmod u-{0} %s".format(arg))

              
                
                379
                +

              
                
                380
                +################################

              
                
                381
                +### Define keys for the console

              
                
                382
                +################################

              
                
                383
                +cmap <tab>   eval fm.ui.console.tab()

              
                
                384
                +cmap <s-tab> eval fm.ui.console.tab(-1)

              
                
                385
                +cmap <ESC>   eval fm.ui.console.close()

              
                
                386
                +cmap <CR>    eval fm.ui.console.execute()

              
                
                387
                +cmap <C-l>   redraw_window

              
                
                388
                +

              
                
                389
                +copycmap <ESC> <C-c>

              
                
                390
                +copycmap <CR>  <C-j>

              
                
                391
                +

              
                
                392
                +cmap <up>    eval fm.ui.console.history_move(-1)

              
                
                393
                +cmap <down>  eval fm.ui.console.history_move(1)

              
                
                394
                +cmap <left>  eval fm.ui.console.move(left=1)

              
                
                395
                +cmap <right> eval fm.ui.console.move(right=1)

              
                
                396
                +cmap <home>  eval fm.ui.console.move(right=0, absolute=True)

              
                
                397
                +cmap <end>   eval fm.ui.console.move(right=-1, absolute=True)

              
                
                398
                +cmap <a-b> eval fm.ui.console.move_word(left=1)

              
                
                399
                +cmap <a-f> eval fm.ui.console.move_word(right=1)

              
                
                400
                +

              
                
                401
                +copycmap <a-b> <a-left>

              
                
                402
                +copycmap <a-f> <a-right>

              
                
                403
                +

              
                
                404
                +cmap <backspace>  eval fm.ui.console.delete(-1)

              
                
                405
                +cmap <delete>     eval fm.ui.console.delete(0)

              
                
                406
                +cmap <C-w>        eval fm.ui.console.delete_word()

              
                
                407
                +cmap <A-d>        eval fm.ui.console.delete_word(backward=False)

              
                
                408
                +cmap <C-k>        eval fm.ui.console.delete_rest(1)

              
                
                409
                +cmap <C-u>        eval fm.ui.console.delete_rest(-1)

              
                
                410
                +cmap <C-y>        eval fm.ui.console.paste()

              
                
                411
                +

              
                
                412
                +copycmap <ESC>       <C-g>

              
                
                413
                +copycmap <up>        <C-p>

              
                
                414
                +copycmap <down>      <C-n>

              
                
                415
                +copycmap <left>      <C-b>

              
                
                416
                +copycmap <right>     <C-f>

              
                
                417
                +copycmap <home>      <C-a>

              
                
                418
                +copycmap <end>       <C-e>

              
                
                419
                +copycmap <delete>    <C-d>

              
                
                420
                +copycmap <backspace> <C-h>

              
                
                421
                +

              
                
                422
                +copycmap <backspace> <backspace2>

              
                
                423
                +

              
                
                424
                +cmap <allow_quantifiers> false

              
                
                425
                +

              
                
                426
                +######################

              
                
                427
                +### Pager Keybindings

              
                
                428
                +######################

              
                
                429
                +pmap  <down>      pager_move  down=1

              
                
                430
                +pmap  <up>        pager_move  up=1

              
                
                431
                +pmap  <left>      pager_move  left=4

              
                
                432
                +pmap  <right>     pager_move  right=4

              
                
                433
                +pmap  <home>      pager_move  to=0

              
                
                434
                +pmap  <end>       pager_move  to=-1

              
                
                435
                +pmap  <pagedown>  pager_move  down=1.0  pages=True

              
                
                436
                +pmap  <pageup>    pager_move  up=1.0    pages=True

              
                
                437
                +pmap  <C-d>       pager_move  down=0.5  pages=True

              
                
                438
                +pmap  <C-u>       pager_move  up=0.5    pages=True

              
                
                439
                +

              
                
                440
                +copypmap <UP>       k  <C-p>

              
                
                441
                +copypmap <DOWN>     j  <C-n> <CR>

              
                
                442
                +copypmap <LEFT>     h

              
                
                443
                +copypmap <RIGHT>    l

              
                
                444
                +copypmap <HOME>     g

              
                
                445
                +copypmap <END>      G

              
                
                446
                +copypmap <C-d>      d

              
                
                447
                +copypmap <C-u>      u

              
                
                448
                +copypmap <PAGEDOWN> n  f  <C-F>  <Space>

              
                
                449
                +copypmap <PAGEUP>   p  b  <C-B>

              
                
                450
                +

              
                
                451
                +pmap     <C-l> redraw_window

              
                
                452
                +pmap     <ESC> pager_close

              
                
                453
                +copypmap <ESC> q Q i <F3>

              
                
                454
                +pmap E      edit_file

              
                
                455
                +

              
                
                456
                +#########################

              
                
                457
                +### Taskview Keybindings

              
                
                458
                +#########################

              
                
                459
                +tmap <up>        taskview_move up=1

              
                
                460
                +tmap <down>      taskview_move down=1

              
                
                461
                +tmap <home>      taskview_move to=0

              
                
                462
                +tmap <end>       taskview_move to=-1

              
                
                463
                +tmap <pagedown>  taskview_move down=1.0  pages=True

              
                
                464
                +tmap <pageup>    taskview_move up=1.0    pages=True

              
                
                465
                +tmap <C-d>       taskview_move down=0.5  pages=True

              
                
                466
                +tmap <C-u>       taskview_move up=0.5    pages=True

              
                
                467
                +

              
                
                468
                +copytmap <UP>       k  <C-p>

              
                
                469
                +copytmap <DOWN>     j  <C-n> <CR>

              
                
                470
                +copytmap <HOME>     g

              
                
                471
                +copytmap <END>      G

              
                
                472
                +copytmap <C-u>      u

              
                
                473
                +copytmap <PAGEDOWN> n  f  <C-F>  <Space>

              
                
                474
                +copytmap <PAGEUP>   p  b  <C-B>

              
                
                475
                +

              
                
                476
                +tmap J          eval -q fm.ui.taskview.task_move(-1)

              
                
                477
                +tmap K          eval -q fm.ui.taskview.task_move(0)

              
                
                478
                +tmap dd         eval -q fm.ui.taskview.task_remove()

              
                
                479
                +tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)

              
                
                480
                +tmap <pageup>   eval -q fm.ui.taskview.task_move(0)

              
                
                481
                +tmap <delete>   eval -q fm.ui.taskview.task_remove()

              
                
                482
                +

              
                
                483
                +tmap <C-l> redraw_window

              
                
                484
                +tmap <ESC> taskview_close

              
                
                485
                +copytmap <ESC> q Q w <C-c>

              
A config/ranger/rifle.conf
···
                
                1
                +#############

              
                
                2
                +### Websites

              
                
                3
                +#############

              
                
                4
                +ext x?html?, has firefox,          X, flag f = firefox -- "$@"

              
                
                5
                +ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"

              
                
                6
                +ext x?html?, has chromium,         X, flag f = chromium -- "$@"

              
                
                7
                +ext x?html?, has google-chrome,    X, flag f = google-chrome -- "$@"

              
                
                8
                +ext x?html?, has surf,             X, flag f = surf -- file://"$1"

              
                
                9
                +ext x?html?, has vimprobable,      X, flag f = vimprobable -- "$@"

              
                
                10
                +ext x?html?, has vimprobable2,     X, flag f = vimprobable2 -- "$@"

              
                
                11
                +ext x?html?, has qutebrowser,      X, flag f = qutebrowser -- "$@"

              
                
                12
                +ext x?html?, has dwb,              X, flag f = dwb -- "$@"

              
                
                13
                +ext x?html?, has jumanji,          X, flag f = jumanji -- "$@"

              
                
                14
                +ext x?html?, has luakit,           X, flag f = luakit -- "$@"

              
                
                15
                +ext x?html?, has uzbl,             X, flag f = uzbl -- "$@"

              
                
                16
                +ext x?html?, has uzbl-tabbed,      X, flag f = uzbl-tabbed -- "$@"

              
                
                17
                +ext x?html?, has uzbl-browser,     X, flag f = uzbl-browser -- "$@"

              
                
                18
                +ext x?html?, has uzbl-core,        X, flag f = uzbl-core -- "$@"

              
                
                19
                +ext x?html?, has midori,           X, flag f = midori -- "$@"

              
                
                20
                +ext x?html?, has opera,            X, flag f = opera -- "$@"

              
                
                21
                +ext x?html?, has seamonkey,        X, flag f = seamonkey -- "$@"

              
                
                22
                +ext x?html?, has iceweasel,        X, flag f = iceweasel -- "$@"

              
                
                23
                +ext x?html?, has epiphany,         X, flag f = epiphany -- "$@"

              
                
                24
                +ext x?html?, has konqueror,        X, flag f = konqueror -- "$@"

              
                
                25
                +ext x?html?, has elinks,            terminal = elinks "$@"

              
                
                26
                +ext x?html?, has links2,            terminal = links2 "$@"

              
                
                27
                +ext x?html?, has links,             terminal = links "$@"

              
                
                28
                +ext x?html?, has lynx,              terminal = lynx -- "$@"

              
                
                29
                +ext x?html?, has w3m,               terminal = w3m "$@"

              
                
                30
                +

              
                
                31
                +#########

              
                
                32
                +### Misc

              
                
                33
                +#########

              
                
                34
                +mime ^text,  label editor = ${VISUAL:-$EDITOR} -- "$@"

              
                
                35
                +mime ^text,  label pager  = "$PAGER" -- "$@"

              
                
                36
                +!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"

              
                
                37
                +!mime ^text, label pager,  ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"

              
                
                38
                +

              
                
                39
                +ext 1                         = man "$1"

              
                
                40
                +ext s[wmf]c, has zsnes, X     = zsnes "$1"

              
                
                41
                +ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"

              
                
                42
                +ext nes, has fceux, X         = fceux "$1"

              
                
                43
                +ext exe                       = wine "$1"

              
                
                44
                +name ^[mM]akefile$            = make

              
                
                45
                +

              
                
                46
                +############

              
                
                47
                +### Scripts

              
                
                48
                +############

              
                
                49
                +ext py  = python -- "$1"

              
                
                50
                +ext pl  = perl -- "$1"

              
                
                51
                +ext rb  = ruby -- "$1"

              
                
                52
                +ext js  = node -- "$1"

              
                
                53
                +ext sh  = sh -- "$1"

              
                
                54
                +ext php = php -- "$1"

              
                
                55
                +

              
                
                56
                +####################

              
                
                57
                +### Audio without X

              
                
                58
                +####################

              
                
                59
                +mime ^audio|ogg$, terminal, has mpv      = mpv -- "$@"

              
                
                60
                +mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"

              
                
                61
                +mime ^audio|ogg$, terminal, has mplayer  = mplayer -- "$@"

              
                
                62
                +ext midi?,        terminal, has wildmidi = wildmidi -- "$@"

              
                
                63
                +

              
                
                64
                +###########################

              
                
                65
                +### Video/Audio with a GUI

              
                
                66
                +###########################

              
                
                67
                +mime ^video,       has mpv,      X, flag f = mpv -- "$@"

              
                
                68
                +mime ^video,       has mpv,      X, flag f = mpv --fs -- "$@"

              
                
                69
                +mime ^video|audio, has vlc,      X, flag f = vlc -- "$@"

              
                
                70
                +mime ^video|audio, has smplayer, X, flag f = smplayer "$@"

              
                
                71
                +mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"

              
                
                72
                +mime ^video,       has mplayer2, X, flag f = mplayer2 -- "$@"

              
                
                73
                +mime ^video,       has mplayer2, X, flag f = mplayer2 -fs -- "$@"

              
                
                74
                +mime ^video,       has mplayer,  X, flag f = mplayer -- "$@"

              
                
                75
                +mime ^video,       has mplayer,  X, flag f = mplayer -fs -- "$@"

              
                
                76
                +mime ^video|audio, has totem,    X, flag f = totem -- "$@"

              
                
                77
                +mime ^video|audio, has totem,    X, flag f = totem --fullscreen -- "$@"

              
                
                78
                +

              
                
                79
                +####################

              
                
                80
                +### Video without X

              
                
                81
                +####################

              
                
                82
                +mime ^video, terminal, !X, has mpv       = mpv -- "$@"

              
                
                83
                +mime ^video, terminal, !X, has mplayer2  = mplayer2 -- "$@"

              
                
                84
                +mime ^video, terminal, !X, has mplayer   = mplayer -- "$@"

              
                
                85
                +

              
                
                86
                +##############

              
                
                87
                +### Documents

              
                
                88
                +##############

              
                
                89
                +ext pdf, has zathura,  X, flag f = zathura -- "$@"

              
                
                90
                +ext pdf, has llpp,     X, flag f = llpp "$@"

              
                
                91
                +ext pdf, has mupdf,    X, flag f = mupdf "$@"

              
                
                92
                +ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"

              
                
                93
                +ext pdf, has apvlv,    X, flag f = apvlv -- "$@"

              
                
                94
                +ext pdf, has xpdf,     X, flag f = xpdf -- "$@"

              
                
                95
                +ext pdf, has evince,   X, flag f = evince -- "$@"

              
                
                96
                +ext pdf, has atril,    X, flag f = atril -- "$@"

              
                
                97
                +ext pdf, has okular,   X, flag f = okular -- "$@"

              
                
                98
                +ext pdf, has epdfview, X, flag f = epdfview -- "$@"

              
                
                99
                +ext pdf, has qpdfview, X, flag f = qpdfview "$@"

              
                
                100
                +ext pdf, has open,     X, flag f = open "$@"

              
                
                101
                +

              
                
                102
                +ext docx?, has catdoc,       terminal = catdoc -- "$@" | "$PAGER"

              
                
                103
                +

              
                
                104
                +ext                        sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric,    X, flag f = gnumeric -- "$@"

              
                
                105
                +ext                        sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread,     X, flag f = kspread -- "$@"

              
                
                106
                +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"

              
                
                107
                +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice,     X, flag f = soffice "$@"

              
                
                108
                +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice,     X, flag f = ooffice "$@"

              
                
                109
                +

              
                
                110
                +ext djvu, has zathura,X, flag f = zathura -- "$@"

              
                
                111
                +ext djvu, has evince, X, flag f = evince -- "$@"

              
                
                112
                +ext djvu, has atril,  X, flag f = atril -- "$@"

              
                
                113
                +ext djvu, has djview, X, flag f = djview -- "$@"

              
                
                114
                +

              
                
                115
                +ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"

              
                
                116
                +ext epub, has zathura,      X, flag f = zathura -- "$@"

              
                
                117
                +ext epub, has mupdf,        X, flag f = mupdf -- "$@"

              
                
                118
                +ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"

              
                
                119
                +

              
                
                120
                +ext cbr,  has zathura,      X, flag f = zathura -- "$@"

              
                
                121
                +ext cbz,  has zathura,      X, flag f = zathura -- "$@"

              
                
                122
                +

              
                
                123
                +###########

              
                
                124
                +### Images

              
                
                125
                +###########

              
                
                126
                +mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"

              
                
                127
                +mime ^image/svg, has display,  X, flag f = display -- "$@"

              
                
                128
                +

              
                
                129
                +mime ^image, has pix        X, flag f = pix "$@"

              
                
                130
                +mime ^image, has ristretto, X, flag f = ristretto "$@"

              
                
                131
                +mime ^image, has gpicview,  X, flag f = gpicview -- "$@"

              
                
                132
                +mime ^image, has gwenview,  X, flag f = gwenview -- "$@"

              
                
                133
                +mime ^image, has pqiv,      X, flag f = pqiv -- "$@"

              
                
                134
                +mime ^image, has imv,       X, flag f = imv -- "$@"

              
                
                135
                +mime ^image, has sxiv,      X, flag f = sxiv -- "$@"

              
                
                136
                +mime ^image, has feh,       X, flag f = feh -- "$@"

              
                
                137
                +mime ^image, has mirage,    X, flag f = mirage -- "$@"

              
                
                138
                +mime ^image, has eog,       X, flag f = eog -- "$@"

              
                
                139
                +mime ^image, has eom,       X, flag f = eom -- "$@"

              
                
                140
                +mime ^image, has nomacs,    X, flag f = nomacs -- "$@"

              
                
                141
                +mime ^image, has geeqie,    X, flag f = geeqie -- "$@"

              
                
                142
                +mime ^image, has gimp,      X, flag f = gimp -- "$@"

              
                
                143
                +ext xcf,                    X, flag f = gimp -- "$@"

              
                
                144
                +

              
                
                145
                +#############

              
                
                146
                +### Archives

              
                
                147
                +#############

              
                
                148
                +ext 7z, has 7z = 7z -p l "$@" | "$PAGER"

              
                
                149
                +ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,     has atool = atool --list --each -- "$@" | "$PAGER"

              
                
                150
                +ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"

              
                
                151
                +ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has atool = atool --extract --each -- "$@"

              
                
                152
                +ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"

              
                
                153
                +

              
                
                154
                +ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"

              
                
                155
                +ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done

              
                
                156
                +ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done

              
                
                157
                +ext zip, has unzip = unzip -l "$1" | less

              
                
                158
                +ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done

              
                
                159
                +ext ace, has unace = unace l "$1" | less

              
                
                160
                +ext ace, has unace = for file in "$@"; do unace e "$file"; done

              
                
                161
                +ext rar, has unrar = unrar l "$1" | less

              
                
                162
                +ext rar, has unrar = for file in "$@"; do unrar x "$file"; done

              
                
                163
                +

              
                
                164
                +##########

              
                
                165
                +### Fonts

              
                
                166
                +##########

              
                
                167
                +mime ^font, has fontforge, X, flag f = fontforge "$@"

              
                
                168
                +

              
                
                169
                +##############################

              
                
                170
                +### Flag t fallback terminals

              
                
                171
                +##############################

              
                
                172
                +mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"

              
                
                173
                +mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"

              
                
                174
                +mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"

              
                
                175
                +mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"

              
                
                176
                +mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"

              
                
                177
                +mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"

              
                
                178
                +mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"

              
                
                179
                +mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"

              
                
                180
                +mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"

              
                
                181
                +mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"

              
                
                182
                +mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'

              
                
                183
                +mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"

              
                
                184
                +mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"

              
                
                185
                +mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"

              
                
                186
                +mime ^ranger/x-terminal-emulator, has st = st -e "$@"

              
                
                187
                +mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"

              
                
                188
                +mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"

              
                
                189
                +mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"

              
                
                190
                +mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"

              
                
                191
                +

              
                
                192
                +#########

              
                
                193
                +### Misc

              
                
                194
                +#########

              
                
                195
                +label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"

              
                
                196
                +label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"

              
                
                197
                +label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"

              
                
                198
                +label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"

              
                
                199
                +

              
                
                200
                +#########################

              
                
                201
                +### Generic file openers

              
                
                202
                +#########################

              
                
                203
                +label open, has xdg-open = xdg-open -- "$@"

              
                
                204
                +label open, has open     = open -- "$@"

              
                
                205
                +

              
                
                206
                +              !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = ask

              
                
                207
                +label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = ${VISUAL:-$EDITOR} -- "$@"

              
                
                208
                +label pager,  !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = "$PAGER" -- "$@"

              
                
                209
                +

              
                
                210
                +mime application/x-executable = "$1"

              
                
                211
                +

              
                
                212
                +label trash, has trash-put = trash-put -- "$@"

              
                
                213
                +label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash

              
M config/rofi/config
···
                1
                
                -rofi.theme: solarized

              
                
                1
                +rofi.theme: flat-solarized # solarized

              
                
                2
                +rofi.font: hack 12

              
                
                3
                +rofi.auto-select: false

              
                
                4
                +rofi.hide-scrollbar: true

              
A config/rofi/flat-dark.rasi
···
                
                1
                +* {

              
                
                2
                +    background-color: #202020;

              
                
                3
                +    border-color: #606060;

              
                
                4
                +    text-color: #c8c8c8;

              
                
                5
                +    width: 768px;

              
                
                6
                +    height: 512px;

              
                
                7
                +}

              
                
                8
                +

              
                
                9
                +window {

              
                
                10
                +    padding: 8px;

              
                
                11
                +}

              
                
                12
                +

              
                
                13
                +inputbar {

              
                
                14
                +    padding: 8px;

              
                
                15
                +    children: [/*prompt,*/ entry];

              
                
                16
                +}

              
                
                17
                +

              
                
                18
                +prompt {

              
                
                19
                +    border: 0 1px 0 0;

              
                
                20
                +    padding: 4px 20px 8px 12px;

              
                
                21
                +}

              
                
                22
                +

              
                
                23
                +entry {

              
                
                24
                +    padding: 4px 12px 8px 20px;

              
                
                25
                +}

              
                
                26
                +

              
                
                27
                +listview {

              
                
                28
                +    cycle: false;

              
                
                29
                +}

              
                
                30
                +

              
                
                31
                +element {

              
                
                32
                +    padding: 6px 24px;

              
                
                33
                +}

              
                
                34
                +

              
                
                35
                +element selected {

              
                
                36
                +    background-color: #303030;

              
                
                37
                +    text-color: #e0e0e0;

              
                
                38
                +}

              
                
                39
                +

              
                
                40
                +element-icon {

              
                
                41
                +    size: 20px;

              
                
                42
                +}

              
A config/rofi/flat-solarized.rasi
···
                
                1
                +* {

              
                
                2
                +    background-color: #002b36;

              
                
                3
                +    border-color: #606060;

              
                
                4
                +    text-color: #c8c8c8;

              
                
                5
                +    width: 768px;

              
                
                6
                +    height: 512px;

              
                
                7
                +}

              
                
                8
                +

              
                
                9
                +window {

              
                
                10
                +    padding: 8px;

              
                
                11
                +}

              
                
                12
                +

              
                
                13
                +inputbar {

              
                
                14
                +    padding: 8px;

              
                
                15
                +    children: [/* prompt, */ entry];

              
                
                16
                +}

              
                
                17
                +

              
                
                18
                +prompt {

              
                
                19
                +    border: 0 1px 0 0;

              
                
                20
                +    padding: 4px 20px 8px 12px;

              
                
                21
                +}

              
                
                22
                +

              
                
                23
                +entry {

              
                
                24
                +    padding: 4px 12px 8px 20px;

              
                
                25
                +}

              
                
                26
                +

              
                
                27
                +listview {

              
                
                28
                +    cycle: false;

              
                
                29
                +}

              
                
                30
                +

              
                
                31
                +element {

              
                
                32
                +    padding: 6px 24px;

              
                
                33
                +}

              
                
                34
                +

              
                
                35
                +element selected {

              
                
                36
                +    background-color: #073642;

              
                
                37
                +    text-color: #e0e0e0;

              
                
                38
                +}

              
                
                39
                +

              
                
                40
                +element-icon {

              
                
                41
                +    size: 20px;

              
                
                42
                +}
              
M config/rofi/rofi-power-menu
···
                1
                1
                 #!/usr/bin/env bash

              
                2
                
                -

              
                3
                
                -# This script defines just a mode for rofi instead of being a self-contained

              
                4
                
                -# executable that launches rofi by itself. This makes it more flexible than

              
                5
                
                -# running rofi inside this script as now the user can call rofi as one pleases.

              
                6
                
                -# For instance:

              
                7
                
                -#

              
                8
                
                -#   rofi -show powermenu -modi powermenu:./rofi-power-menu

              
                9
                
                -#

              
                10
                
                -# See README.md for more information.

              
                11
                
                -

              
                12
                2
                 set -e

              
                13
                3
                 set -u

              
                14
                4
                 

              
                15
                
                -# All supported choices

              
                16
                5
                 all=(shutdown reboot suspend hibernate logout lockscreen)

              
                
                6
                +show=("${all[@]}")

              
                17
                7
                 

              
                18
                
                -# By default, show all (i.e., just copy the array)

              
                19
                
                -show=("${all[@]}")

              
                20
                8
                 

              
                21
                9
                 declare -A texts

              
                22
                10
                 texts[lockscreen]="lock screen"

              ···
                39
                27
                 

              
                40
                28
                 declare -A actions

              
                41
                29
                 actions[lockscreen]="loginctl lock-session $XDG_SESSION_ID"

              
                42
                
                -#actions[switchuser]="???"

              
                43
                30
                 actions[logout]="loginctl terminate-session $XDG_SESSION_ID"

              
                44
                31
                 actions[suspend]="systemctl suspend"

              
                45
                32
                 actions[hibernate]="systemctl hibernate"

              
                46
                33
                 actions[reboot]="systemctl reboot"

              
                47
                34
                 actions[shutdown]="systemctl poweroff"

              
                48
                35
                 

              
                49
                
                -# By default, ask for confirmation for actions that are irreversible

              
                50
                36
                 confirmations=(reboot shutdown logout)

              
                51
                37
                 

              
                52
                
                -# By default, no dry run

              
                53
                38
                 dryrun=false

              
                54
                39
                 showsymbols=true

              
                55
                40
                 

              ···
                66
                51
                     done

              
                67
                52
                 }

              
                68
                53
                 

              
                69
                
                -# Parse command-line options

              
                70
                54
                 parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols --name "$0" -- "$@")

              
                71
                55
                 if [ $? -ne 0 ]; then

              
                72
                56
                     echo 'Terminating...' >&2

              ···
                124
                108
                             shift 2

              
                125
                109
                             ;;

              
                126
                110
                         "--choose")

              
                127
                
                -            # Check that the choice is valid

              
                128
                111
                             check_valid "$1" "$2"

              
                129
                112
                             selectionID="$2"

              
                130
                113
                             shift 2

              ···
                148
                131
                     esac

              
                149
                132
                 done

              
                150
                133
                 

              
                151
                
                -# Define the messages after parsing the CLI options so that it is possible to

              
                152
                
                -# configure them in the future.

              
                153
                
                -

              
                154
                134
                 function write_message {

              
                155
                135
                     icon="<span font_size=\"medium\">$1</span>"

              
                156
                136
                     text="<span font_size=\"medium\">$2</span>"

              ···
                180
                160
                 

              
                181
                161
                 if [ $# -gt 0 ]

              
                182
                162
                 then

              
                183
                
                -    # If arguments given, use those as the selection

              
                184
                163
                     selection="${@}"

              
                185
                164
                 else

              
                186
                
                -    # Otherwise, use the CLI passed choice if given

              
                187
                165
                     if [ -n "${selectionID+x}" ]

              
                188
                166
                     then

              
                189
                167
                         selection="${messages[$selectionID]}"

              
                190
                168
                     fi

              
                191
                169
                 fi

              
                192
                170
                 

              
                193
                
                -# Don't allow custom entries

              
                194
                171
                 echo -e "\0no-custom\x1ftrue"

              
                195
                
                -# Use markup

              
                196
                172
                 echo -e "\0markup-rows\x1ftrue"

              
                197
                173
                 

              
                198
                174
                 if [ -z "${selection+x}" ]

              ···
                207
                183
                     do

              
                208
                184
                         if [ "$selection" = "$(print_selection "${messages[$entry]}")" ]

              
                209
                185
                         then

              
                210
                
                -            # Check if the selected entry is listed in confirmation requirements

              
                211
                186
                             for confirmation in "${confirmations[@]}"

              
                212
                187
                             do

              
                213
                188
                                 if [ "$entry" = "$confirmation" ]

              
                214
                189
                                 then

              
                215
                
                -                    # Ask for confirmation

              
                216
                190
                                     echo -e "\0prompt\x1fAre you sure"

              
                217
                191
                                     echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}"

              
                218
                192
                                     echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}"

              
                219
                193
                                     exit 0

              
                220
                194
                                 fi

              
                221
                195
                             done

              
                222
                
                -            # If not, then no confirmation is required, so mark confirmed

              
                223
                196
                             selection=$(print_selection "${confirmationMessages[$entry]}")

              
                224
                197
                         fi

              
                225
                198
                         if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ]

              
                226
                199
                         then

              
                227
                200
                             if [ $dryrun = true ]

              
                228
                201
                             then

              
                229
                
                -                # Tell what would have been done

              
                230
                202
                                 echo "Selected: $entry" >&2

              
                231
                203
                             else

              
                232
                
                -                # Perform the action

              
                233
                204
                                 ${actions[$entry]}

              
                234
                205
                             fi

              
                235
                206
                             exit 0

              
                236
                207
                         fi

              
                237
                208
                         if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ]

              
                238
                209
                         then

              
                239
                
                -            # Do nothing

              
                240
                210
                             exit 0

              
                241
                211
                         fi

              
                242
                212
                     done

              
                243
                
                -    # The selection didn't match anything, so raise an error

              
                244
                213
                     echo "Invalid selection: $selection" >&2

              
                245
                214
                     exit 1

              
                246
                215
                 fi

              
A scripts/confert-mp4-to-mp3.sh
···
                
                1
                +#/bin/sh

              
                
                2
                +ffmpeg -i $1 -b:a 192K -vn ~/$directory/$2.mp3

              
A scripts/gitpush.sh
···
                
                1
                +#!/bin/sh

              
                
                2
                +git add ./

              
                
                3
                +read -p "Commit message: " msg

              
                
                4
                +git commit -am "$msg"

              
                
                5
                +git push origin master

              
A scripts/manjaro-fetch.sh
···
                
                1
                +host="$(hostname)"

              
                
                2
                +os='Manjaro'

              
                
                3
                +kernel="$(uname -r)"

              
                
                4
                +uptime="$(uptime -p | sed 's/up //')"

              
                
                5
                +packages="$(pacman -Q | wc -l)"

              
                
                6
                +shell="$(basename "$SHELL")"

              
                
                7
                +ui="$(basename ${XDG_CURRENT_DESKTOP})"

              
                
                8
                +

              
                
                9
                +if [ -x "$(command -v tput)" ]; then

              
                
                10
                +	bold="$(tput bold)"

              
                
                11
                +	black="$(tput setaf 0)"

              
                
                12
                +	red="$(tput setaf 1)"

              
                
                13
                +	green="$(tput setaf 2)"

              
                
                14
                +	yellow="$(tput setaf 3)"

              
                
                15
                +	blue="$(tput setaf 4)"

              
                
                16
                +	magenta="$(tput setaf 5)"

              
                
                17
                +	cyan="$(tput setaf 6)"

              
                
                18
                +	white="$(tput setaf 7)"

              
                
                19
                +	reset="$(tput sgr0)"

              
                
                20
                +fi

              
                
                21
                +

              
                
                22
                +lc="${reset}${bold}${green}"

              
                
                23
                +nc="${reset}${bold}${green}"

              
                
                24
                +ic="${reset}"

              
                
                25
                +c0="${reset}${green}"

              
                
                26
                +

              
                
                27
                +cat <<EOF

              
                
                28
                +${c0} ||||||||| |||| ${nc}${USER}${ic}@${nc}${host}${reset}

              
                
                29
                +${c0} ||||||||| |||| ${lc}OS:        ${ic}${os}${reset}

              
                
                30
                +${c0} ||||      |||| ${lc}KERNEL:    ${ic}${kernel}${reset}

              
                
                31
                +${c0} |||| |||| |||| ${lc}PACKAGES:  ${ic}${packages}${reset}

              
                
                32
                +${c0} |||| |||| |||| ${lc}SHELL:     ${ic}${shell}${reset}

              
                
                33
                +${c0} |||| |||| |||| ${lc}UPTIME:    ${ic}${uptime}${reset}

              
                
                34
                +${c0} |||| |||| |||| ${lc}DE/WM:     ${ic}${ui}${reset}

              
                
                35
                +EOF

              
A scripts/sceenshot.sh
···
                
                1
                +#!/bin/sh

              
                
                2
                +fileDate=`date +%Y-%m-%d-%H-%M-%S`

              
                
                3
                +machineName=`hostname`

              
                
                4
                +fileName=".png"

              
                
                5
                +FILENAME=$fileDate"-"$machineName$fileName

              
                
                6
                +SHORT=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 7 | head -n 1)

              
                
                7
                +FILENAMESHORT=$fileDate$fileName

              
                
                8
                +

              
                
                9
                +import $FILENAMESHORT

              
A scripts/snap-remove-old-pkg.sh
···
                
                1
                +#!/bin/sh

              
                
                2
                +LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |

              
                
                3
                +while read snapname revision

              
                
                4
                +do; sudo snap remove "$snapname" --revision="$revision"; done

              
A scripts/targz-current_folder.sh
···
                
                1
                +#!/bin/sh

              
                
                2
                +tar -czf "../${PWD##*/}.tar.gz" .

              
                
                3
                +echo -e "\033[32mThe archive was created successfully"

              
A scripts/targz-folder.sh
···
                
                1
                +#!/bin/sh

              
                
                2
                +tar -czf "$1.tar.gz" $1

              
                
                3
                +echo -e "\033[32mThe archive was created successfully"

              
A scripts/walpapper-changer.sh
···
                
                1
                +#!/bin/bash

              
                
                2
                +WALLPAPERS=/home/sasha/Изображения/Walpapper

              
                
                3
                +SLEEP_TIME=60

              
                
                4
                +

              
                
                5
                +while true; do

              
                
                6
                +    feh --randomize --bg-scale $WALLPAPERS/*

              
                
                7
                +    sleep $SLEEP_TIME;

              
                
                8
                +done

              
                
                9
                +