init repo
This commit is contained in:
commit
fd6e1d2ce3
58
.config/.old/fish/bobthefish.config
Normal file
58
.config/.old/fish/bobthefish.config
Normal file
@ -0,0 +1,58 @@
|
||||
# _____ _
|
||||
# _____ ___ |___ |__| |__ Swy7ch's fish shell config file
|
||||
# / __\ \ /\ / / | | | / / __| '_ \
|
||||
# \__ \\ V V /| |_| |/ / (__| | | |
|
||||
# |___/ \_/\_/ \__, /_/ \___|_| |_|
|
||||
# |___/
|
||||
|
||||
# Start X at login
|
||||
if status is-login
|
||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||
exec startx -- -keeptty
|
||||
end
|
||||
end
|
||||
|
||||
# True gruvbox colors in vim
|
||||
#bash $HOME/.vim/plugins/gruvbox/gruvbox_256palette.sh
|
||||
|
||||
# User configuration
|
||||
function fish_greeting
|
||||
set_color $fish_color_autosuggestion
|
||||
uname -msr
|
||||
|
||||
command -s uptime >/dev/null
|
||||
and uptime
|
||||
|
||||
set_color normal
|
||||
end
|
||||
|
||||
# Set less colors (-> manpages)
|
||||
set -xU LESS_TERMCAP_md (printf "\e[01;36m")
|
||||
set -xU LESS_TERMCAP_me (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_se (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_so (printf "\e[01;44;33em")
|
||||
set -xU LESS_TERMCAP_ue (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
|
||||
|
||||
#################################################
|
||||
############### PROMPT CONFIG ################
|
||||
#################################################
|
||||
|
||||
# change colorscheme
|
||||
set -g theme_color_scheme gruvbox
|
||||
|
||||
# show the name of the process in polybar
|
||||
set -g theme_title_display_process yes
|
||||
|
||||
# set the right date formate
|
||||
set -g theme_date_format "+%X"
|
||||
|
||||
# to use nerd fonts
|
||||
# set -g theme_nerd_fonts yes
|
||||
|
||||
# do not alert untracked files in git
|
||||
# set -g theme_display_git_untracked no
|
||||
|
||||
# changes to git glyphs
|
||||
set -g git_plus_glyph \uF4A7 '' # PLUS
|
||||
set -g git_minus_glyph \uF48B '' # MINUS
|
1
.config/.old/fish/completions/fisher.fish
Normal file
1
.config/.old/fish/completions/fisher.fish
Normal file
@ -0,0 +1 @@
|
||||
fisher complete
|
30
.config/.old/fish/config.fish
Normal file
30
.config/.old/fish/config.fish
Normal file
@ -0,0 +1,30 @@
|
||||
# Swy7ch' config file for the FiSHell
|
||||
|
||||
# Start X at login
|
||||
if status is-login
|
||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||
exec startx -- -keeptty
|
||||
end
|
||||
end
|
||||
|
||||
# True gruvbox colors in vim
|
||||
#bash $HOME/.vim/plugins/gruvbox/gruvbox_256palette.sh
|
||||
|
||||
# User configuration
|
||||
function fish_greeting
|
||||
set_color $fish_color_autosuggestion
|
||||
uname -msr
|
||||
|
||||
command -s uptime >/dev/null
|
||||
and uptime
|
||||
|
||||
set_color normal
|
||||
end
|
||||
|
||||
# Set less colors (-> manpages)
|
||||
set -xU LESS_TERMCAP_md (printf "\e[01;36m")
|
||||
set -xU LESS_TERMCAP_me (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_se (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_so (printf "\e[01;44;33em")
|
||||
set -xU LESS_TERMCAP_ue (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
|
50
.config/.old/fish/fish_variables
Normal file
50
.config/.old/fish/fish_variables
Normal file
@ -0,0 +1,50 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR --export LESS_TERMCAP_md:\x1b\x5b01\x3b36m
|
||||
SETUVAR --export LESS_TERMCAP_me:\x1b\x5b0m
|
||||
SETUVAR --export LESS_TERMCAP_se:\x1b\x5b0m
|
||||
SETUVAR --export LESS_TERMCAP_so:\x1b\x5b01\x3b44\x3b33em
|
||||
SETUVAR --export LESS_TERMCAP_ue:\x1b\x5b0m
|
||||
SETUVAR --export LESS_TERMCAP_us:\x1b\x5b01\x3b32m
|
||||
SETUVAR __fish_init_2_39_8:\x1d
|
||||
SETUVAR __fish_init_2_3_0:\x1d
|
||||
SETUVAR __fish_init_3_x:\x1d
|
||||
SETUVAR _fish_abbr_backup:sudo\x20/usr/local/bin/snapbackup\x2esh
|
||||
SETUVAR _fish_abbr_gu:git\x20fetch\x20upstream\x20\x26\x26\x20git\x20merge\x20upstream/master
|
||||
SETUVAR _fish_abbr_hs:htop\x20\x2du\x20swytch
|
||||
SETUVAR _fish_abbr_nf:neofetch
|
||||
SETUVAR _fish_abbr_pc:sudo\x20pacman\x20\x2dRsn\x20\x28pacman\x20\x2dQdtq\x29
|
||||
SETUVAR _fish_abbr_pd:expac\x20\x2d\x2dtimefmt\x3d\x27\x25Y\x2d\x25m\x2d\x25d\x20\x25T\x27\x20\x27\x25l\x5ct\x25n\x27\x20\x7c\x20sort\x20\x7c\x20tail\x20\x2dn\x2020
|
||||
SETUVAR _fish_abbr_rbup:sudo\x20rsync\x20\x2daAXv\x20\x2d\x2dexclude\x3d\x7b\x22/dev/\x2a\x22\x2c\x22/proc/\x2a\x22\x2c\x22/sys/\x2a\x22\x2c\x22/tmp/\x2a\x22\x2c\x22/run/\x2a\x22\x2c\x22/mnt/\x2a\x22\x2c\x22/media/\x2a\x22\x2c\x22/lost\x2bfound\x22\x2c\x22home\x22\x7d\x20/\x20/mnt/backup/root/
|
||||
SETUVAR _fish_abbr_sdn:shutdown\x20now
|
||||
SETUVAR _fish_abbr_um:unimatrix\x20\x2da\x20\x2df\x20\x2dc\x3dcyan\x20\x2ds\x3d95
|
||||
SETUVAR _fish_abbr_untar:tar\x20zxvf
|
||||
SETUVAR _fish_abbr_yayu:yay\x20\x2dSyu
|
||||
SETUVAR fish_color_autosuggestion:969896
|
||||
SETUVAR fish_color_cancel:normal
|
||||
SETUVAR fish_color_command:afd75f
|
||||
SETUVAR fish_color_comment:f0c674
|
||||
SETUVAR fish_color_cwd:008000
|
||||
SETUVAR fish_color_cwd_root:800000
|
||||
SETUVAR fish_color_end:b294bb
|
||||
SETUVAR fish_color_error:cc6666
|
||||
SETUVAR fish_color_escape:00a6b2
|
||||
SETUVAR fish_color_history_current:normal
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_match:normal
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:00a6b2
|
||||
SETUVAR fish_color_param:f0c674
|
||||
SETUVAR fish_color_quote:b294bb
|
||||
SETUVAR fish_color_redirection:8abeb7
|
||||
SETUVAR fish_color_search_match:ffff00
|
||||
SETUVAR fish_color_selection:c0c0c0
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:00ff00
|
||||
SETUVAR fish_color_valid_path:normal
|
||||
SETUVAR fish_greeting:\x1d
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
||||
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
1
.config/.old/fish/fishfile
Normal file
1
.config/.old/fish/fishfile
Normal file
@ -0,0 +1 @@
|
||||
|
45
.config/.old/fish/functions/fish_prompt.fish
Normal file
45
.config/.old/fish/functions/fish_prompt.fish
Normal file
@ -0,0 +1,45 @@
|
||||
# Options
|
||||
#set __fish_git_prompt_showupstream "informative"
|
||||
#set __fish_git_prompt_showdirtystate 1
|
||||
#set __fish_git_prompt_showstashstate 1
|
||||
#set __fish_git_prompt_showuntrackedfiles 1
|
||||
set __fish_git_prompt_showcolorhints
|
||||
set __fish_git_prompt_show_informative_status
|
||||
|
||||
# Colors
|
||||
set green (set_color green)
|
||||
set magenta (set_color magenta)
|
||||
set normal (set_color normal)
|
||||
set red (set_color red)
|
||||
set yellow (set_color yellow)
|
||||
|
||||
set __fish_git_prompt_color_branch magenta --bold
|
||||
set __fish_git_prompt_color_dirtystate white --bold
|
||||
set __fish_git_prompt_color_stashstate magenta
|
||||
set __fish_git_prompt_color_invalidstate red
|
||||
set __fish_git_prompt_color_merging yellow
|
||||
set __fish_git_prompt_color_stagedstate yellow
|
||||
set __fish_git_prompt_color_upstream yellow --bold
|
||||
|
||||
# Icons
|
||||
set __fish_git_prompt_char_cleanstate ' '
|
||||
set __fish_git_prompt_char_invalidstate ' '
|
||||
set __fish_git_prompt_char_dirtystate ' !'
|
||||
set __fish_git_prompt_char_stagedstate ' '
|
||||
set __fish_git_prompt_char_stashstate ' $'
|
||||
set __fish_git_prompt_char_stateseparator ' |'
|
||||
set __fish_git_prompt_char_untrackedfiles ' ?'
|
||||
set __fish_git_prompt_char_upstream_ahead ' '
|
||||
set __fish_git_prompt_char_upstream_behind ' '
|
||||
set __fish_git_prompt_char_upstream_diverged ' 祈'
|
||||
|
||||
function fish_prompt
|
||||
set last_status $status
|
||||
|
||||
set_color cyan --bold
|
||||
printf '%s' (prompt_pwd)
|
||||
set_color normal
|
||||
|
||||
printf '%s ' (__fish_git_prompt)
|
||||
set_color normal
|
||||
end
|
86
.config/.old/fish/spacefish.config
Normal file
86
.config/.old/fish/spacefish.config
Normal file
@ -0,0 +1,86 @@
|
||||
# David JULIEN - GitLab@Swy7ch
|
||||
# _____ _
|
||||
# _____ ___ |___ |__| |__
|
||||
# / __\ \ /\ / / | | | / / __| '_ \
|
||||
# \__ \\ V V /| |_| |/ / (__| | | |
|
||||
# |___/ \_/\_/ \__, /_/ \___|_| |_|
|
||||
# |___/
|
||||
|
||||
# Start X at login
|
||||
if status is-login
|
||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||
exec startx -- -keeptty
|
||||
end
|
||||
end
|
||||
|
||||
# True gruvbox colors in vim
|
||||
#bash $HOME/.vim/plugins/gruvbox/gruvbox_256palette.sh
|
||||
|
||||
# User configuration
|
||||
function fish_greeting
|
||||
set_color $fish_color_autosuggestion
|
||||
uname -msr
|
||||
|
||||
command -s uptime >/dev/null
|
||||
and uptime
|
||||
|
||||
set_color normal
|
||||
end
|
||||
|
||||
# Set less colors (-> manpages)
|
||||
set -xU LESS_TERMCAP_md (printf "\e[01;36m")
|
||||
set -xU LESS_TERMCAP_me (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_se (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_so (printf "\e[01;44;33em")
|
||||
set -xU LESS_TERMCAP_ue (printf "\e[0m")
|
||||
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
|
||||
|
||||
# Set environment variables (user-wide)
|
||||
export TERMINAL=st
|
||||
|
||||
#################################################
|
||||
############### PROMPT CONFIG ################
|
||||
#################################################
|
||||
|
||||
# CHAR
|
||||
|
||||
set SPACEFISH_CHAR_SYMBOL ""
|
||||
|
||||
# TIME
|
||||
|
||||
set SPACEFISH_TIME_SHOW false
|
||||
#set SPACEFISH_TIME_COLOR white
|
||||
set SPACEFISH_TIME_SUFFIX " > "
|
||||
|
||||
# USER
|
||||
|
||||
set SPACEFISH_USER_SHOW never
|
||||
set SPACEFISH_USER_PREFIX"" # remove `with` before username
|
||||
set SPACEFISH_USER_COLOR yellow
|
||||
|
||||
# DIR
|
||||
|
||||
set SPACEFISH_DIR_TRUNC 0
|
||||
set SPACEFISH_DIR_PREFIX ""
|
||||
|
||||
# HOST
|
||||
|
||||
# Result will look like this:
|
||||
# username@:(hostname)
|
||||
set SPACEFISH_HOST_PREFIX "@["
|
||||
set SPACEFISH_HOST_SUFFIX "]"
|
||||
set SPACEFISH_HOST_SHOW never
|
||||
|
||||
# GIT
|
||||
|
||||
# Get spaces from `[...]`
|
||||
set SPACEFISH_GIT_SYMBOL " "
|
||||
set SPACEFISH_GIT_STATUS_DELETED ""
|
||||
set SPACEFISH_GIT_STATUS_AHEAD ""
|
||||
set SPACEFISH_GIT_STATUS_BEHIND ""
|
||||
set SPACEFISH_GIT_TRUNC 3
|
||||
|
||||
# JOBS
|
||||
|
||||
set SPACEFISH_JOBS_SYMBOL ""
|
||||
|
205
.config/.old/i3/config
Normal file
205
.config/.old/i3/config
Normal file
@ -0,0 +1,205 @@
|
||||
# Swy7ch' config file for i3
|
||||
|
||||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $super Mod4
|
||||
set $alt Mod1
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango: FuraCode Nerd Font Mono 10
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# Use Mouse+$super to drag floating windows to their wanted position
|
||||
floating_modifier $super
|
||||
|
||||
# Execute at launch
|
||||
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
|
||||
exec_always --no-startup-id feh --bg-fill $HOME/.wallpaper.png
|
||||
exec --no-startup-id compton --config $HOME/.config/compton/compton.conf
|
||||
exec --no-startup-id xss-lock -- i3lock -n -i $HOME/.lockscreen.png
|
||||
exec --no-startup-id redshift
|
||||
exec --no-startup-id pamixer --set-volume 40
|
||||
exec --no-startup-id setxkbmap 'fr(oss)'
|
||||
# Trackpad settings
|
||||
exec --no-startup-id xinput set-prop 13 'libinput Tapping Enabled' 1
|
||||
exec --no-startup-id xinput set-prop 13 'libinput Natural Scrolling En abled' 1
|
||||
# exec_always xinput --no-startup-id set-prop 13 'libinput Disable While Typing Enabled' 1
|
||||
# Mouse acceleration
|
||||
exec --no-startup-id xinput set-prop 13 'libinput Accel Speed' 0.4
|
||||
|
||||
# Common app launchers
|
||||
bindsym $super+Return exec st;focus
|
||||
bindsym $super+Shift+Return workspace 1;exec st;focus
|
||||
bindsym $super+Shift+i workspace 1;exec st -e gotop;focus
|
||||
bindsym $super+Shift+f workspace 1;exec st -e ranger;focus
|
||||
bindsym $super+Shift+w exec qutebrowser;workspace 2; focus
|
||||
bindsym $super+$alt+w exec firefox-beta;workspace 2;focus
|
||||
bindsym $super+Shift+m workspace 2;exec st -e neomutt;focus
|
||||
bindsym $super+Shift+n exec firefox-beta -private-window;workspace 2;focus
|
||||
bindsym $super+Shift+c exec whatsie;workspace 4;focus
|
||||
bindsym $super+Shift+p exec pavucontrol;workspace 5;focus
|
||||
bindsym $super+Shift+s exec spotify;workspace 5; focus
|
||||
|
||||
# Control the audio
|
||||
bindsym F3 exec pamixer --increase 7
|
||||
bindsym F2 exec pamixer --decrease 7
|
||||
bindsym F1 exec pamixer --toggle-mute
|
||||
|
||||
# Control display backlight
|
||||
bindsym F6 exec xbacklight -inc 5
|
||||
bindsym F5 exec xbacklight -dec 5
|
||||
|
||||
# kill focused window
|
||||
bindsym $super+w kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-supere -columns 3 -font 'FuraCode Nerd Font Mono 12' -theme purple
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
# bindsym $super+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $super+h focus left
|
||||
bindsym $super+j focus down
|
||||
bindsym $super+k focus up
|
||||
bindsym $super+l focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $super+Shift+h move left
|
||||
bindsym $super+Shift+j move down
|
||||
bindsym $super+Shift+k move up
|
||||
bindsym $super+Shift+l move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $super+c split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $super+v split v
|
||||
|
||||
# enter fullscreen supere for the focused container
|
||||
bindsym $super+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $super+s layout stacking
|
||||
bindsym $super+z layout tabbed
|
||||
bindsym $super+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $super+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $super+space focus mode_toggle
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $super+1 workspace $ws1
|
||||
bindsym $super+2 workspace $ws2
|
||||
bindsym $super+3 workspace $ws3
|
||||
bindsym $super+4 workspace $ws4
|
||||
bindsym $super+5 workspace $ws5
|
||||
bindsym $super+6 workspace $ws6
|
||||
bindsym $super+7 workspace $ws7
|
||||
bindsym $super+8 workspace $ws8
|
||||
bindsym $super+9 workspace $ws9
|
||||
bindsym $super+0 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $super+Shift+1 move container to workspace $ws1
|
||||
bindsym $super+Shift+2 move container to workspace $ws2
|
||||
bindsym $super+Shift+3 move container to workspace $ws3
|
||||
bindsym $super+Shift+4 move container to workspace $ws4
|
||||
bindsym $super+Shift+5 move container to workspace $ws5
|
||||
bindsym $super+Shift+6 move container to workspace $ws6
|
||||
bindsym $super+Shift+7 move container to workspace $ws7
|
||||
bindsym $super+Shift+8 move container to workspace $ws8
|
||||
bindsym $super+Shift+9 move container to workspace $ws9
|
||||
bindsym $super+Shift+0 move container to workspace $ws10
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $super+Control+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $super+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $super+q exec "i3-nagbar -t warning -m 'Do you want to exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
# lock the screen
|
||||
bindsym $super+Control+l exec i3lock -n -i $HOME/Images/red_rocks.png
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize supere
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym m resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $super+r
|
||||
bindsym Return supere "default"
|
||||
bindsym Escape supere "default"
|
||||
bindsym $super+r supere "default"
|
||||
}
|
||||
|
||||
bindsym $super+r mode "resize"
|
||||
|
||||
# window rules, you can find the window class using xprop
|
||||
for_window [class=".*"] border pixel 3
|
||||
assign [class="Firefox Beta|Qutebrowser"] 2
|
||||
assign [class="Inkscape"] 3
|
||||
assign [class="Transmission"] 4
|
||||
assign [class="Pavucontrol|Spotify|mpv"] 5
|
||||
|
||||
|
||||
# colour of border, background, text, indicator, and child_border
|
||||
client.focused #bf616a #2f343f #d8dee8 #b16286 #83a598
|
||||
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
||||
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #427b58
|
||||
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
||||
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
||||
client.background #2f343f
|
||||
|
||||
# Gaps
|
||||
gaps inner 5
|
||||
gaps outer 5
|
293
.config/.old/polybar/config
Normal file
293
.config/.old/polybar/config
Normal file
@ -0,0 +1,293 @@
|
||||
; Swy7ch' config file for polybar
|
||||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/jaagr/polybar
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[colors]
|
||||
background = #171717
|
||||
background-alt = #383838
|
||||
foreground = #ebdbb2
|
||||
foreground-alt = #d3869b
|
||||
primary = #427b58
|
||||
secondary = #d3869b
|
||||
alert = #751715
|
||||
|
||||
;background = ${xrdb:color0:#222}
|
||||
;background-alt = ${xrdb:color0:#222}
|
||||
;foreground = ${xrdb:color7:#222}
|
||||
;foreground-alt = ${xrdb:color7:#222}
|
||||
;primary = ${xrdb:color1:#222}
|
||||
;secondary = ${xrdb:color2:#222}
|
||||
;alert = ${xrdb:color3:#222}
|
||||
|
||||
[bar/top]
|
||||
dpi = 210
|
||||
width = 100%
|
||||
height = 35
|
||||
radius = 0.0
|
||||
fixed-center = true
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 5
|
||||
line-color = #f00
|
||||
|
||||
border-size = 0
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 0
|
||||
padding-right = 3
|
||||
|
||||
module-margin-left = 2
|
||||
module-margin-right = 1
|
||||
|
||||
font-0 = "Fira Code:style=Regular:size=8:antialias=true;4"
|
||||
font-1 = "FuraCode Nerd Font Mono:style=Regular:size=9:antialias=true;4"
|
||||
|
||||
modules-left = i3 xwindow
|
||||
modules-right = xkeyboard alsa xbacklight network battery date
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 0
|
||||
|
||||
wm-restack = i3
|
||||
|
||||
;override-redirect = true
|
||||
|
||||
;scroll-up = i3wm-wsprev
|
||||
;scroll-down = i3wm-wsnext
|
||||
|
||||
|
||||
################################################################################
|
||||
################################################################################
|
||||
################################ MODULES ####################################
|
||||
################################################################################
|
||||
################################################################################
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:56:...%
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
label-layout =
|
||||
label-layout-underline = ${colors.primary}
|
||||
|
||||
label-indicator-padding = 1
|
||||
label-indicator-margin = 0
|
||||
label-indicator-foreground = ${colors.foreground}
|
||||
label-indicator-background = ${colors.primary}
|
||||
label-indicator-underline = ${colors.primary}
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode> //
|
||||
index-sort = true
|
||||
wrapping-scroll = true
|
||||
strip-wsnumbers = true
|
||||
|
||||
ws-icon-0 = 1;
|
||||
ws-icon-1 = 2;
|
||||
ws-icon-2 = 3;
|
||||
ws-icon-3 = 4;
|
||||
ws-icon-4 = 5;
|
||||
ws-icon-5 = 6;調
|
||||
ws-icon-default =
|
||||
;
|
||||
|
||||
label-focused = %index% %icon%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline = ${colors.primary}
|
||||
label-focused-padding = 1
|
||||
|
||||
label-unfocused = %index% %icon%
|
||||
label-unfocused-padding = 1
|
||||
|
||||
label-visible = V %icon%
|
||||
label-visible-background = ${self.label-focused-background}
|
||||
label-visible-underline = ${self.label-focused-background}
|
||||
label-visible-padding = ${self.label-focused-padding}
|
||||
|
||||
label-urgent = %index% %icon%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = " "
|
||||
;alt : 勞
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #00000000
|
||||
label = %percentage:2%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = "兩 "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #00000000
|
||||
label = %percentage_used%%
|
||||
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface = wlp4s0
|
||||
interval = 2.0
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
format-connected-underline = #00000000
|
||||
label-connected = "%essid%"
|
||||
|
||||
format-disconnected = <label-disconnected>
|
||||
format-disconnected-underline = ${colors.alert}
|
||||
label-disconnected = xx.xx.xx.xx
|
||||
label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date = "%a. %d/%m"
|
||||
date-alt = "%Y-%m-%d"
|
||||
|
||||
time = " %I:%M %p"
|
||||
time-alt = " %H:%M:%S"
|
||||
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #00000000
|
||||
|
||||
label = %time% | %date%
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
thermal-zone = 0
|
||||
warn-temperature = 70
|
||||
|
||||
format = <ramp> <label>
|
||||
format-underline = #00000000
|
||||
format-warn = <ramp> <label-warn>
|
||||
format-warn-underline = ${self.format-underline}
|
||||
|
||||
label = %temperature-c%
|
||||
label-warn = %temperature-c%
|
||||
label-warn-foreground = ${colors.foreground}
|
||||
label-warn-background = ${colors.alert}
|
||||
label-warn-padding = 2
|
||||
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
ramp-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label>
|
||||
label = "%percentage%%"
|
||||
label-foreground = ${colors.foreground}
|
||||
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
|
||||
|
||||
[module/alsa]
|
||||
type = internal/alsa
|
||||
|
||||
format-volume = <bar-volume>
|
||||
label-volume = "%percentage%%"
|
||||
label-volume-foreground = ${colors.foreground}
|
||||
format-volume-prefix = "蓼 "
|
||||
format-volume-prefix-foreground = ${colors.foreground-alt}
|
||||
|
||||
format-muted-prefix =
|
||||
format-muted-foreground = ${colors.foreground}
|
||||
format-muted-background = ${colors.foreground-alt}
|
||||
label-muted = 婢 sound muted
|
||||
label-muted-padding = 1
|
||||
label-muted-margin = 1
|
||||
|
||||
|
||||
|
||||
bar-volume-width = 15
|
||||
bar-volume-foreground-0 = #f9b1a4
|
||||
bar-volume-foreground-1 = #f9b1a4
|
||||
bar-volume-foreground-2 = #f9b1a4
|
||||
bar-volume-foreground-3 = #f9b1a4
|
||||
bar-volume-foreground-4 = #f9b1a4
|
||||
bar-volume-foreground-5 = #f9b1a4
|
||||
bar-volume-foreground-6 = #f9b1a4
|
||||
bar-volume-foreground-7 = #f9b1a4
|
||||
bar-volume-foreground-8 = #f9b1a4
|
||||
bar-volume-foreground-9 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 1
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 3
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 3
|
||||
bar-volume-empty-foreground = ${colors.foreground}
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = AC
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = ${colors.foreground-alt}
|
||||
animation-charging-framerate = 1500
|
||||
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-foreground = ${colors.foreground-alt}
|
||||
animation-discharging-framerate = 2000
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
;compositing-background = xor
|
||||
;compositing-background = screen
|
||||
;compositing-foreground = source
|
||||
;compositing-border = over
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
12
.config/.old/polybar/launch.sh
Executable file
12
.config/.old/polybar/launch.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
polybar top &
|
||||
|
||||
echo "Polybar launched..."
|
62
.config/.old/ranger/commands.py
Normal file
62
.config/.old/ranger/commands.py
Normal file
@ -0,0 +1,62 @@
|
||||
# This is a sample commands.py. You can add your own commands here.
|
||||
#
|
||||
# Please refer to commands_full.py for all the default commands and a complete
|
||||
# documentation. Do NOT add them all here, or you may end up with defunct
|
||||
# commands when upgrading ranger.
|
||||
|
||||
# A simple command for demonstration purposes follows.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
# You can import any python module as needed.
|
||||
import os
|
||||
|
||||
# You always need to import ranger.api.commands here to get the Command class:
|
||||
from ranger.api.commands import Command
|
||||
|
||||
|
||||
# Any class that is a subclass of "Command" will be integrated into ranger as a
|
||||
# command. Try typing ":my_edit<ENTER>" in ranger!
|
||||
class my_edit(Command):
|
||||
# The so-called doc-string of the class will be visible in the built-in
|
||||
# help that is accessible by typing "?c" inside ranger.
|
||||
""":my_edit <filename>
|
||||
|
||||
A sample command for demonstration purposes that opens a file in an editor.
|
||||
"""
|
||||
|
||||
# The execute method is called when you run this command in ranger.
|
||||
def execute(self):
|
||||
# self.arg(1) is the first (space-separated) argument to the function.
|
||||
# This way you can write ":my_edit somefilename<ENTER>".
|
||||
if self.arg(1):
|
||||
# self.rest(1) contains self.arg(1) and everything that follows
|
||||
target_filename = self.rest(1)
|
||||
else:
|
||||
# self.fm is a ranger.core.filemanager.FileManager object and gives
|
||||
# you access to internals of ranger.
|
||||
# self.fm.thisfile is a ranger.container.file.File object and is a
|
||||
# reference to the currently selected file.
|
||||
target_filename = self.fm.thisfile.path
|
||||
|
||||
# This is a generic function to print text in ranger.
|
||||
self.fm.notify("Let's edit the file " + target_filename + "!")
|
||||
|
||||
# Using bad=True in fm.notify allows you to print error messages:
|
||||
if not os.path.exists(target_filename):
|
||||
self.fm.notify("The given file does not exist!", bad=True)
|
||||
return
|
||||
|
||||
# This executes a function from ranger.core.acitons, a module with a
|
||||
# variety of subroutines that can help you construct commands.
|
||||
# Check out the source, or run "pydoc ranger.core.actions" for a list.
|
||||
self.fm.edit_file(target_filename)
|
||||
|
||||
# The tab method is called when you press tab, and should return a list of
|
||||
# suggestions that the user will tab through.
|
||||
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
|
||||
def tab(self, tabnum):
|
||||
# This is a generic tab-completion function that iterates through the
|
||||
# content of the current directory.
|
||||
return self._tab_directory_content()
|
1836
.config/.old/ranger/commands_full.py
Normal file
1836
.config/.old/ranger/commands_full.py
Normal file
File diff suppressed because it is too large
Load Diff
725
.config/.old/ranger/rc.conf
Normal file
725
.config/.old/ranger/rc.conf
Normal file
@ -0,0 +1,725 @@
|
||||
# ===================================================================
|
||||
# This file contains the default startup commands for ranger.
|
||||
# To change them, it is recommended to create either /etc/ranger/rc.conf
|
||||
# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
|
||||
# commands there.
|
||||
#
|
||||
# If you copy this whole file there, you may want to set the environment
|
||||
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
|
||||
#
|
||||
# The purpose of this file is mainly to define keybindings and settings.
|
||||
# For running more complex python code, please create a plugin in "plugins/" or
|
||||
# a command in "commands.py".
|
||||
#
|
||||
# Each line is a command that will be run before the user interface
|
||||
# is initialized. As a result, you can not use commands which rely
|
||||
# on the UI such as :delete or :mark.
|
||||
# ===================================================================
|
||||
|
||||
# ===================================================================
|
||||
# == Options
|
||||
# ===================================================================
|
||||
|
||||
# Which viewmode should be used? Possible values are:
|
||||
# miller: Use miller columns which show multiple levels of the hierarchy
|
||||
# multipane: Midnight-commander like multipane view showing all tabs next
|
||||
# to each other
|
||||
set viewmode miller
|
||||
#set viewmode multipane
|
||||
|
||||
# How many columns are there, and what are their relative widths?
|
||||
set column_ratios 1,3,4
|
||||
|
||||
# Which files should be hidden? (regular expression)
|
||||
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
|
||||
|
||||
# Show hidden files? You can toggle this by typing 'zh'
|
||||
set show_hidden true
|
||||
|
||||
# Ask for a confirmation when running the "delete" command?
|
||||
# Valid values are "always", "never", "multiple" (default)
|
||||
# With "multiple", ranger will ask only if you delete multiple files at once.
|
||||
set confirm_on_delete multiple
|
||||
|
||||
# Use non-default path for file preview script?
|
||||
# ranger ships with scope.sh, a script that calls external programs (see
|
||||
# README.md for dependencies) to preview images, archives, etc.
|
||||
#set preview_script ~/.config/ranger/scope.sh
|
||||
|
||||
# Use the external preview script or display simple plain text or image previews?
|
||||
set use_preview_script true
|
||||
|
||||
# Automatically count files in the directory, even before entering them?
|
||||
set automatically_count_files true
|
||||
|
||||
# Open all images in this directory when running certain image viewers
|
||||
# like feh or sxiv? You can still open selected files by marking them.
|
||||
set open_all_images true
|
||||
|
||||
# Be aware of version control systems and display information.
|
||||
set vcs_aware false
|
||||
|
||||
# State of the four backends git, hg, bzr, svn. The possible states are
|
||||
# disabled, local (only show local info), enabled (show local and remote
|
||||
# information).
|
||||
set vcs_backend_git enabled
|
||||
set vcs_backend_hg disabled
|
||||
set vcs_backend_bzr disabled
|
||||
set vcs_backend_svn disabled
|
||||
|
||||
# Use one of the supported image preview protocols
|
||||
set preview_images true
|
||||
|
||||
# Set the preview image method. Supported methods:
|
||||
#
|
||||
# * w3m (default):
|
||||
# Preview images in full color with the external command "w3mimgpreview"?
|
||||
# This requires the console web browser "w3m" and a supported terminal.
|
||||
# It has been successfully tested with "xterm" and "urxvt" without tmux.
|
||||
#
|
||||
# * iterm2:
|
||||
# Preview images in full color using iTerm2 image previews
|
||||
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
|
||||
# with image preview support.
|
||||
#
|
||||
# This feature relies on the dimensions of the terminal's font. By default, a
|
||||
# width of 8 and height of 11 are used. To use other values, set the options
|
||||
# iterm2_font_width and iterm2_font_height to the desired values.
|
||||
#
|
||||
# * terminology:
|
||||
# Previews images in full color in the terminology terminal emulator.
|
||||
# Supports a wide variety of formats, even vector graphics like svg.
|
||||
#
|
||||
# * urxvt:
|
||||
# Preview images in full color using urxvt image backgrounds. This
|
||||
# requires using urxvt compiled with pixbuf support.
|
||||
#
|
||||
# * urxvt-full:
|
||||
# The same as urxvt but utilizing not only the preview pane but the
|
||||
# whole terminal window.
|
||||
#
|
||||
# * kitty:
|
||||
# Preview images in full color using kitty image protocol.
|
||||
# Requires python PIL or pillow library.
|
||||
# If ranger does not share the local filesystem with kitty
|
||||
# the transfer method is changed to encode the whole image;
|
||||
# while slower, this allows remote previews,
|
||||
# for example during an ssh session.
|
||||
# Tmux is unsupported.
|
||||
set preview_images_method w3m
|
||||
|
||||
# Delay in seconds before displaying an image with the w3m method.
|
||||
# Increase it in case of experiencing display corruption.
|
||||
set w3m_delay 0.02
|
||||
|
||||
# Default iTerm2 font size (see: preview_images_method: iterm2)
|
||||
set iterm2_font_width 8
|
||||
set iterm2_font_height 11
|
||||
|
||||
# Use a unicode "..." character to mark cut-off filenames?
|
||||
set unicode_ellipsis false
|
||||
|
||||
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
|
||||
# Requires the python-bidi pip package
|
||||
set bidi_support false
|
||||
|
||||
# Show dotfiles in the bookmark preview box?
|
||||
set show_hidden_bookmarks true
|
||||
|
||||
# Which colorscheme to use? These colorschemes are available by default:
|
||||
# default, jungle, snow, solarized
|
||||
set colorscheme default
|
||||
|
||||
# Preview files on the rightmost column?
|
||||
# And collapse (shrink) the last column if there is nothing to preview?
|
||||
set preview_files true
|
||||
set preview_directories true
|
||||
set collapse_preview true
|
||||
|
||||
# Save the console history on exit?
|
||||
set save_console_history true
|
||||
|
||||
# Draw the status bar on top of the browser window (default: bottom)
|
||||
set status_bar_on_top false
|
||||
|
||||
# Draw a progress bar in the status bar which displays the average state of all
|
||||
# currently running tasks which support progress bars?
|
||||
set draw_progress_bar_in_status_bar true
|
||||
|
||||
# Draw borders around columns? (separators, outline, both, or none)
|
||||
# Separators are vertical lines between columns.
|
||||
# Outline draws a box around all the columns.
|
||||
# Both combines the two.
|
||||
set draw_borders both
|
||||
|
||||
# Display the directory name in tabs?
|
||||
set dirname_in_tabs false
|
||||
|
||||
# Enable the mouse support?
|
||||
set mouse_enabled false
|
||||
|
||||
# Display the file size in the main column or status bar?
|
||||
set display_size_in_main_column true
|
||||
set display_size_in_status_bar true
|
||||
|
||||
# Display the free disk space in the status bar?
|
||||
set display_free_space_in_status_bar true
|
||||
|
||||
# Display files tags in all columns or only in main column?
|
||||
set display_tags_in_all_columns true
|
||||
|
||||
# Set a title for the window?
|
||||
set update_title false
|
||||
|
||||
# Set the title to "ranger" in the tmux program?
|
||||
set update_tmux_title true
|
||||
|
||||
# Shorten the title if it gets long? The number defines how many
|
||||
# directories are displayed at once, 0 turns off this feature.
|
||||
set shorten_title 3
|
||||
|
||||
# Show hostname in titlebar?
|
||||
set hostname_in_titlebar true
|
||||
|
||||
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
|
||||
set tilde_in_titlebar false
|
||||
|
||||
# How many directory-changes or console-commands should be kept in history?
|
||||
set max_history_size 20
|
||||
set max_console_history_size 50
|
||||
|
||||
# Try to keep so much space between the top/bottom border when scrolling:
|
||||
set scroll_offset 8
|
||||
|
||||
# Flush the input after each key hit? (Noticeable when ranger lags)
|
||||
set flushinput true
|
||||
|
||||
# Padding on the right when there's no preview?
|
||||
# This allows you to click into the space to run the file.
|
||||
set padding_right true
|
||||
|
||||
# Save bookmarks (used with mX and `X) instantly?
|
||||
# This helps to synchronize bookmarks between multiple ranger
|
||||
# instances but leads to *slight* performance loss.
|
||||
# When false, bookmarks are saved when ranger is exited.
|
||||
set autosave_bookmarks true
|
||||
|
||||
# Save the "`" bookmark to disk. This can be used to switch to the last
|
||||
# directory by typing "``".
|
||||
set save_backtick_bookmark true
|
||||
|
||||
# You can display the "real" cumulative size of directories by using the
|
||||
# command :get_cumulative_size or typing "dc". The size is expensive to
|
||||
# calculate and will not be updated automatically. You can choose
|
||||
# to update it automatically though by turning on this option:
|
||||
set autoupdate_cumulative_size false
|
||||
|
||||
# Turning this on makes sense for screen readers:
|
||||
set show_cursor false
|
||||
|
||||
# One of: size, natural, basename, atime, ctime, mtime, type, random
|
||||
set sort natural
|
||||
|
||||
# Additional sorting options
|
||||
set sort_reverse false
|
||||
set sort_case_insensitive true
|
||||
set sort_directories_first true
|
||||
set sort_unicode false
|
||||
|
||||
# Enable this if key combinations with the Alt Key don't work for you.
|
||||
# (Especially on xterm)
|
||||
set xterm_alt_key false
|
||||
|
||||
# Whether to include bookmarks in cd command
|
||||
set cd_bookmarks true
|
||||
|
||||
# Changes case sensitivity for the cd command tab completion
|
||||
set cd_tab_case sensitive
|
||||
|
||||
# Use fuzzy tab completion with the "cd" command. For example,
|
||||
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
|
||||
set cd_tab_fuzzy false
|
||||
|
||||
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
||||
# disable this feature.
|
||||
set preview_max_size 0
|
||||
|
||||
# The key hint lists up to this size have their sublists expanded.
|
||||
# Otherwise the submaps are replaced with "...".
|
||||
set hint_collapse_threshold 10
|
||||
|
||||
# Add the highlighted file to the path in the titlebar
|
||||
set show_selection_in_titlebar true
|
||||
|
||||
# The delay that ranger idly waits for user input, in milliseconds, with a
|
||||
# resolution of 100ms. Lower delay reduces lag between directory updates but
|
||||
# increases CPU load.
|
||||
set idle_delay 2000
|
||||
|
||||
# When the metadata manager module looks for metadata, should it only look for
|
||||
# a ".metadata.json" file in the current directory, or do a deep search and
|
||||
# check all directories above the current one as well?
|
||||
set metadata_deep_search false
|
||||
|
||||
# Clear all existing filters when leaving a directory
|
||||
set clear_filters_on_dir_change false
|
||||
|
||||
# Disable displaying line numbers in main column.
|
||||
# Possible values: false, absolute, relative.
|
||||
set line_numbers false
|
||||
|
||||
# When line_numbers=relative show the absolute line number in the
|
||||
# current line.
|
||||
set relative_current_zero false
|
||||
|
||||
# Start line numbers from 1 instead of 0
|
||||
set one_indexed false
|
||||
|
||||
# Save tabs on exit
|
||||
set save_tabs_on_exit false
|
||||
|
||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
||||
# the top and vice versa.
|
||||
set wrap_scroll false
|
||||
|
||||
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
||||
# directories, files and symlinks respectively.
|
||||
set global_inode_type_filter
|
||||
|
||||
# This setting allows to freeze the list of files to save I/O bandwidth. It
|
||||
# should be 'false' during start-up, but you can toggle it by pressing F.
|
||||
set freeze_files false
|
||||
|
||||
# ===================================================================
|
||||
# == Local Options
|
||||
# ===================================================================
|
||||
# You can set local options that only affect a single directory.
|
||||
|
||||
# Examples:
|
||||
# setlocal path=~/downloads sort mtime
|
||||
|
||||
# ===================================================================
|
||||
# == Command Aliases in the Console
|
||||
# ===================================================================
|
||||
|
||||
alias e edit
|
||||
alias q quit
|
||||
alias q! quit!
|
||||
alias qa quitall
|
||||
alias qa! quitall!
|
||||
alias qall quitall
|
||||
alias qall! quitall!
|
||||
alias setl setlocal
|
||||
|
||||
alias filter scout -prts
|
||||
alias find scout -aets
|
||||
alias mark scout -mr
|
||||
alias unmark scout -Mr
|
||||
alias search scout -rs
|
||||
alias search_inc scout -rts
|
||||
alias travel scout -aefklst
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the browser
|
||||
# ===================================================================
|
||||
|
||||
# Basic
|
||||
map Q quitall
|
||||
map q quit
|
||||
copymap q ZZ ZQ
|
||||
|
||||
map R reload_cwd
|
||||
map F set freeze_files!
|
||||
map <C-r> reset
|
||||
map <C-l> redraw_window
|
||||
map <C-c> abort
|
||||
map <esc> change_mode normal
|
||||
map ~ set viewmode!
|
||||
|
||||
map i display_file
|
||||
map ? help
|
||||
map W display_log
|
||||
map w taskview_open
|
||||
map S shell $SHELL
|
||||
|
||||
map : console
|
||||
map ; console
|
||||
map ! console shell%space
|
||||
map @ console -p6 shell %%s
|
||||
map # console shell -p%space
|
||||
map s console shell%space
|
||||
map r chain draw_possible_programs; console open_with%%space
|
||||
map f console find%space
|
||||
map cd console cd%space
|
||||
|
||||
map <C-p> chain console; eval fm.ui.console.history_move(-1)
|
||||
|
||||
# Change the line mode
|
||||
map Mf linemode filename
|
||||
map Mi linemode fileinfo
|
||||
map Mm linemode mtime
|
||||
map Mp linemode permissions
|
||||
map Ms linemode sizemtime
|
||||
map Mt linemode metatitle
|
||||
|
||||
# Tagging / Marking
|
||||
map t tag_toggle
|
||||
map ut tag_remove
|
||||
map "<any> tag_toggle tag=%any
|
||||
map <Space> mark_files toggle=True
|
||||
map v mark_files all=True toggle=True
|
||||
map uv mark_files all=True val=False
|
||||
map V toggle_visual_mode
|
||||
map uV toggle_visual_mode reverse=True
|
||||
|
||||
# For the nostalgics: Midnight Commander bindings
|
||||
map <F1> help
|
||||
map <F2> rename_append
|
||||
map <F3> display_file
|
||||
map <F4> edit
|
||||
map <F5> copy
|
||||
map <F6> cut
|
||||
map <F7> console mkdir%space
|
||||
map <F8> console delete
|
||||
map <F10> exit
|
||||
|
||||
# In case you work on a keyboard with dvorak layout
|
||||
map <UP> move up=1
|
||||
map <DOWN> move down=1
|
||||
map <LEFT> move left=1
|
||||
map <RIGHT> move right=1
|
||||
map <HOME> move to=0
|
||||
map <END> move to=-1
|
||||
map <PAGEDOWN> move down=1 pages=True
|
||||
map <PAGEUP> move up=1 pages=True
|
||||
map <CR> move right=1
|
||||
#map <DELETE> console delete
|
||||
map <INSERT> console touch%space
|
||||
|
||||
# VIM-like
|
||||
copymap <UP> k
|
||||
copymap <DOWN> j
|
||||
copymap <LEFT> h
|
||||
copymap <RIGHT> l
|
||||
copymap <HOME> gg
|
||||
copymap <END> G
|
||||
copymap <PAGEDOWN> <C-F>
|
||||
copymap <PAGEUP> <C-B>
|
||||
|
||||
map J move down=0.5 pages=True
|
||||
map K move up=0.5 pages=True
|
||||
copymap J <C-D>
|
||||
copymap K <C-U>
|
||||
|
||||
# Jumping around
|
||||
map H history_go -1
|
||||
map L history_go 1
|
||||
map ] move_parent 1
|
||||
map [ move_parent -1
|
||||
map } traverse
|
||||
map { traverse_backwards
|
||||
map ) jump_non
|
||||
|
||||
map gh cd ~
|
||||
map ge cd /etc
|
||||
map gu cd /usr
|
||||
map gd cd /dev
|
||||
map gl cd -r .
|
||||
map gL cd -r %f
|
||||
map go cd /opt
|
||||
map gv cd /var
|
||||
map gm cd /media
|
||||
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
|
||||
map gM cd /mnt
|
||||
map gs cd /srv
|
||||
map gp cd /tmp
|
||||
map gr cd /
|
||||
map gR eval fm.cd(ranger.RANGERDIR)
|
||||
map g/ cd /
|
||||
map g? cd /usr/share/doc/ranger
|
||||
|
||||
# External Programs
|
||||
map E edit
|
||||
map du shell -p du --max-depth=1 -h --apparent-size
|
||||
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
|
||||
map yp yank path
|
||||
map yd yank dir
|
||||
map yn yank name
|
||||
map y. yank name_without_extension
|
||||
|
||||
# Filesystem Operations
|
||||
map = chmod
|
||||
|
||||
map cw console rename%space
|
||||
map a rename_append
|
||||
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
|
||||
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
|
||||
|
||||
map pp paste
|
||||
map po paste overwrite=True
|
||||
map pP paste append=True
|
||||
map pO paste overwrite=True append=True
|
||||
map pl paste_symlink relative=False
|
||||
map pL paste_symlink relative=True
|
||||
map phl paste_hardlink
|
||||
map pht paste_hardlinked_subtree
|
||||
|
||||
map dD console delete
|
||||
|
||||
map dd cut
|
||||
map ud uncut
|
||||
map da cut mode=add
|
||||
map dr cut mode=remove
|
||||
map dt cut mode=toggle
|
||||
|
||||
map yy copy
|
||||
map uy uncut
|
||||
map ya copy mode=add
|
||||
map yr copy mode=remove
|
||||
map yt copy mode=toggle
|
||||
|
||||
# Temporary workarounds
|
||||
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
|
||||
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
|
||||
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
|
||||
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
|
||||
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
|
||||
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
|
||||
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
|
||||
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
|
||||
|
||||
# Searching
|
||||
map / console search%space
|
||||
map n search_next
|
||||
map N search_next forward=False
|
||||
map ct search_next order=tag
|
||||
map cs search_next order=size
|
||||
map ci search_next order=mimetype
|
||||
map cc search_next order=ctime
|
||||
map cm search_next order=mtime
|
||||
map ca search_next order=atime
|
||||
|
||||
# Tabs
|
||||
map <C-n> tab_new
|
||||
map <C-w> tab_close
|
||||
map <TAB> tab_move 1
|
||||
map <S-TAB> tab_move -1
|
||||
map <A-Right> tab_move 1
|
||||
map <A-Left> tab_move -1
|
||||
map gt tab_move 1
|
||||
map gT tab_move -1
|
||||
map gn tab_new
|
||||
map gc tab_close
|
||||
map uq tab_restore
|
||||
map <a-1> tab_open 1
|
||||
map <a-2> tab_open 2
|
||||
map <a-3> tab_open 3
|
||||
map <a-4> tab_open 4
|
||||
map <a-5> tab_open 5
|
||||
map <a-6> tab_open 6
|
||||
map <a-7> tab_open 7
|
||||
map <a-8> tab_open 8
|
||||
map <a-9> tab_open 9
|
||||
map <a-r> tab_shift 1
|
||||
map <a-l> tab_shift -1
|
||||
|
||||
# Sorting
|
||||
map or set sort_reverse!
|
||||
map oz set sort=random
|
||||
map os chain set sort=size; set sort_reverse=False
|
||||
map ob chain set sort=basename; set sort_reverse=False
|
||||
map on chain set sort=natural; set sort_reverse=False
|
||||
map om chain set sort=mtime; set sort_reverse=False
|
||||
map oc chain set sort=ctime; set sort_reverse=False
|
||||
map oa chain set sort=atime; set sort_reverse=False
|
||||
map ot chain set sort=type; set sort_reverse=False
|
||||
map oe chain set sort=extension; set sort_reverse=False
|
||||
|
||||
map oS chain set sort=size; set sort_reverse=True
|
||||
map oB chain set sort=basename; set sort_reverse=True
|
||||
map oN chain set sort=natural; set sort_reverse=True
|
||||
map oM chain set sort=mtime; set sort_reverse=True
|
||||
map oC chain set sort=ctime; set sort_reverse=True
|
||||
map oA chain set sort=atime; set sort_reverse=True
|
||||
map oT chain set sort=type; set sort_reverse=True
|
||||
map oE chain set sort=extension; set sort_reverse=True
|
||||
|
||||
map dc get_cumulative_size
|
||||
|
||||
# Settings
|
||||
map zc set collapse_preview!
|
||||
map zd set sort_directories_first!
|
||||
map zh set show_hidden!
|
||||
map <C-h> set show_hidden!
|
||||
copymap <C-h> <backspace>
|
||||
copymap <backspace> <backspace2>
|
||||
map zI set flushinput!
|
||||
map zi set preview_images!
|
||||
map zm set mouse_enabled!
|
||||
map zp set preview_files!
|
||||
map zP set preview_directories!
|
||||
map zs set sort_case_insensitive!
|
||||
map zu set autoupdate_cumulative_size!
|
||||
map zv set use_preview_script!
|
||||
map zf console filter%space
|
||||
copymap zf zz
|
||||
|
||||
# Filter stack
|
||||
map .n console filter_stack add name%space
|
||||
map .m console filter_stack add mime%space
|
||||
map .d filter_stack add type d
|
||||
map .f filter_stack add type f
|
||||
map .l filter_stack add type l
|
||||
map .| filter_stack add or
|
||||
map .& filter_stack add and
|
||||
map .! filter_stack add not
|
||||
map .r console filter_stack rotate
|
||||
map .c filter_stack clear
|
||||
map .* filter_stack decompose
|
||||
map .p filter_stack pop
|
||||
map .. filter_stack show
|
||||
|
||||
# Bookmarks
|
||||
map `<any> enter_bookmark %any
|
||||
map '<any> enter_bookmark %any
|
||||
map m<any> set_bookmark %any
|
||||
map um<any> unset_bookmark %any
|
||||
|
||||
map m<bg> draw_bookmarks
|
||||
copymap m<bg> um<bg> `<bg> '<bg>
|
||||
|
||||
# Generate all the chmod bindings with some python help:
|
||||
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
|
||||
|
||||
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the console
|
||||
# ===================================================================
|
||||
# Note: Unmapped keys are passed directly to the console.
|
||||
|
||||
# Basic
|
||||
cmap <tab> eval fm.ui.console.tab()
|
||||
cmap <s-tab> eval fm.ui.console.tab(-1)
|
||||
cmap <ESC> eval fm.ui.console.close()
|
||||
cmap <CR> eval fm.ui.console.execute()
|
||||
cmap <C-l> redraw_window
|
||||
|
||||
copycmap <ESC> <C-c>
|
||||
copycmap <CR> <C-j>
|
||||
|
||||
# Move around
|
||||
cmap <up> eval fm.ui.console.history_move(-1)
|
||||
cmap <down> eval fm.ui.console.history_move(1)
|
||||
cmap <left> eval fm.ui.console.move(left=1)
|
||||
cmap <right> eval fm.ui.console.move(right=1)
|
||||
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
|
||||
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
|
||||
cmap <a-b> eval fm.ui.console.move_word(left=1)
|
||||
cmap <a-f> eval fm.ui.console.move_word(right=1)
|
||||
|
||||
copycmap <a-b> <a-left>
|
||||
copycmap <a-f> <a-right>
|
||||
|
||||
# Line Editing
|
||||
cmap <backspace> eval fm.ui.console.delete(-1)
|
||||
cmap <delete> eval fm.ui.console.delete(0)
|
||||
cmap <C-w> eval fm.ui.console.delete_word()
|
||||
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
|
||||
cmap <C-k> eval fm.ui.console.delete_rest(1)
|
||||
cmap <C-u> eval fm.ui.console.delete_rest(-1)
|
||||
cmap <C-y> eval fm.ui.console.paste()
|
||||
|
||||
# And of course the emacs way
|
||||
copycmap <ESC> <C-g>
|
||||
copycmap <up> <C-p>
|
||||
copycmap <down> <C-n>
|
||||
copycmap <left> <C-b>
|
||||
copycmap <right> <C-f>
|
||||
copycmap <home> <C-a>
|
||||
copycmap <end> <C-e>
|
||||
copycmap <delete> <C-d>
|
||||
copycmap <backspace> <C-h>
|
||||
|
||||
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
|
||||
# and <backspace2> (code 127). To be sure, use both.
|
||||
copycmap <backspace> <backspace2>
|
||||
|
||||
# This special expression allows typing in numerals:
|
||||
cmap <allow_quantifiers> false
|
||||
|
||||
# ===================================================================
|
||||
# == Pager Keybindings
|
||||
# ===================================================================
|
||||
|
||||
# Movement
|
||||
pmap <down> pager_move down=1
|
||||
pmap <up> pager_move up=1
|
||||
pmap <left> pager_move left=4
|
||||
pmap <right> pager_move right=4
|
||||
pmap <home> pager_move to=0
|
||||
pmap <end> pager_move to=-1
|
||||
pmap <pagedown> pager_move down=1.0 pages=True
|
||||
pmap <pageup> pager_move up=1.0 pages=True
|
||||
pmap <C-d> pager_move down=0.5 pages=True
|
||||
pmap <C-u> pager_move up=0.5 pages=True
|
||||
|
||||
copypmap <UP> k <C-p>
|
||||
copypmap <DOWN> j <C-n> <CR>
|
||||
copypmap <LEFT> h
|
||||
copypmap <RIGHT> l
|
||||
copypmap <HOME> g
|
||||
copypmap <END> G
|
||||
copypmap <C-d> d
|
||||
copypmap <C-u> u
|
||||
copypmap <PAGEDOWN> n f <C-F> <Space>
|
||||
copypmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Basic
|
||||
pmap <C-l> redraw_window
|
||||
pmap <ESC> pager_close
|
||||
copypmap <ESC> q Q i <F3>
|
||||
pmap E edit_file
|
||||
|
||||
# ===================================================================
|
||||
# == Taskview Keybindings
|
||||
# ===================================================================
|
||||
|
||||
# Movement
|
||||
tmap <up> taskview_move up=1
|
||||
tmap <down> taskview_move down=1
|
||||
tmap <home> taskview_move to=0
|
||||
tmap <end> taskview_move to=-1
|
||||
tmap <pagedown> taskview_move down=1.0 pages=True
|
||||
tmap <pageup> taskview_move up=1.0 pages=True
|
||||
tmap <C-d> taskview_move down=0.5 pages=True
|
||||
tmap <C-u> taskview_move up=0.5 pages=True
|
||||
|
||||
copytmap <UP> k <C-p>
|
||||
copytmap <DOWN> j <C-n> <CR>
|
||||
copytmap <HOME> g
|
||||
copytmap <END> G
|
||||
copytmap <C-u> u
|
||||
copytmap <PAGEDOWN> n f <C-F> <Space>
|
||||
copytmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Changing priority and deleting tasks
|
||||
tmap J eval -q fm.ui.taskview.task_move(-1)
|
||||
tmap K eval -q fm.ui.taskview.task_move(0)
|
||||
tmap dd eval -q fm.ui.taskview.task_remove()
|
||||
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
|
||||
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
|
||||
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
||||
|
||||
# Basic
|
||||
tmap <C-l> redraw_window
|
||||
tmap <ESC> taskview_close
|
||||
copytmap <ESC> q Q w <C-c>
|
256
.config/.old/ranger/rifle.conf
Normal file
256
.config/.old/ranger/rifle.conf
Normal file
@ -0,0 +1,256 @@
|
||||
# vim: ft=cfg
|
||||
#
|
||||
# This is the configuration file of "rifle", ranger's file executor/opener.
|
||||
# Each line consists of conditions and a command. For each line the conditions
|
||||
# are checked and if they are met, the respective command is run.
|
||||
#
|
||||
# Syntax:
|
||||
# <condition1> , <condition2> , ... = command
|
||||
#
|
||||
# The command can contain these environment variables:
|
||||
# $1-$9 | The n-th selected file
|
||||
# $@ | All selected files
|
||||
#
|
||||
# If you use the special command "ask", rifle will ask you what program to run.
|
||||
#
|
||||
# Prefixing a condition with "!" will negate its result.
|
||||
# These conditions are currently supported:
|
||||
# match <regexp> | The regexp matches $1
|
||||
# ext <regexp> | The regexp matches the extension of $1
|
||||
# mime <regexp> | The regexp matches the mime type of $1
|
||||
# name <regexp> | The regexp matches the basename of $1
|
||||
# path <regexp> | The regexp matches the absolute path of $1
|
||||
# has <program> | The program is installed (i.e. located in $PATH)
|
||||
# env <variable> | The environment variable "variable" is non-empty
|
||||
# file | $1 is a file
|
||||
# directory | $1 is a directory
|
||||
# number <n> | change the number of this command to n
|
||||
# terminal | stdin, stderr and stdout are connected to a terminal
|
||||
# X | $DISPLAY is not empty (i.e. Xorg runs)
|
||||
#
|
||||
# There are also pseudo-conditions which have a "side effect":
|
||||
# flag <flags> | Change how the program is run. See below.
|
||||
# label <label> | Assign a label or name to the command so it can
|
||||
# | be started with :open_with <label> in ranger
|
||||
# | or `rifle -p <label>` in the standalone executable.
|
||||
# else | Always true.
|
||||
#
|
||||
# Flags are single characters which slightly transform the command:
|
||||
# f | Fork the program, make it run in the background.
|
||||
# | New command = setsid $command >& /dev/null &
|
||||
# r | Execute the command with root permissions
|
||||
# | New command = sudo $command
|
||||
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
||||
# | rifle will attempt to extract it from $TERM.
|
||||
# | New command = $TERMCMD -e $command
|
||||
# Note: The "New command" serves only as an illustration, the exact
|
||||
# implementation may differ.
|
||||
# Note: When using rifle in ranger, there is an additional flag "c" for
|
||||
# only running the current file even if you have marked multiple files.
|
||||
|
||||
#-------------------------------------------
|
||||
# Websites
|
||||
#-------------------------------------------
|
||||
# Rarely installed browsers get higher priority; It is assumed that if you
|
||||
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
|
||||
# other hand are often only installed as fallback browsers.
|
||||
ext x?html?, has surf, X, flag f = surf -- file://"$1"
|
||||
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
|
||||
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
|
||||
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
||||
ext x?html?, has dwb, X, flag f = dwb -- "$@"
|
||||
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
|
||||
ext x?html?, has luakit, X, flag f = luakit -- "$@"
|
||||
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
|
||||
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
||||
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
||||
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
||||
ext x?html?, has midori, X, flag f = midori -- "$@"
|
||||
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||
ext x?html?, has opera, X, flag f = opera -- "$@"
|
||||
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
||||
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
||||
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
||||
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
||||
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
||||
ext x?html?, has elinks, terminal = elinks "$@"
|
||||
ext x?html?, has links2, terminal = links2 "$@"
|
||||
ext x?html?, has links, terminal = links "$@"
|
||||
ext x?html?, has lynx, terminal = lynx -- "$@"
|
||||
ext x?html?, has w3m, terminal = w3m "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
# Define the "editor" for text files as first action
|
||||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
||||
mime ^text, label pager = "$PAGER" -- "$@"
|
||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
ext 1 = man "$1"
|
||||
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
||||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
|
||||
ext nes, has fceux, X = fceux "$1"
|
||||
ext exe = wine "$1"
|
||||
name ^[mM]akefile$ = make
|
||||
|
||||
#--------------------------------------------
|
||||
# Code
|
||||
#-------------------------------------------
|
||||
ext py = python -- "$1"
|
||||
ext pl = perl -- "$1"
|
||||
ext rb = ruby -- "$1"
|
||||
ext js = node -- "$1"
|
||||
ext sh = sh -- "$1"
|
||||
ext php = php -- "$1"
|
||||
|
||||
#--------------------------------------------
|
||||
# Audio without X
|
||||
#-------------------------------------------
|
||||
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
|
||||
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video/Audio with a GUI
|
||||
#-------------------------------------------
|
||||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
||||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
||||
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video without X:
|
||||
#-------------------------------------------
|
||||
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Documents
|
||||
#-------------------------------------------
|
||||
ext pdf, has llpp, X, flag f = llpp "$@"
|
||||
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
||||
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
||||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
||||
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
|
||||
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
|
||||
ext pdf, has evince, X, flag f = evince -- "$@"
|
||||
ext pdf, has atril, X, flag f = atril -- "$@"
|
||||
ext pdf, has okular, X, flag f = okular -- "$@"
|
||||
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
|
||||
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
|
||||
ext pdf, has open, X, flag f = open "$@"
|
||||
|
||||
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
|
||||
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
|
||||
|
||||
ext djvu, has zathura,X, flag f = zathura -- "$@"
|
||||
ext djvu, has evince, X, flag f = evince -- "$@"
|
||||
ext djvu, has atril, X, flag f = atril -- "$@"
|
||||
ext djvu, has djview, X, flag f = djview -- "$@"
|
||||
|
||||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Image Viewing:
|
||||
#-------------------------------------------
|
||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||
|
||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
||||
mime ^image, has eog, X, flag f = eog -- "$@"
|
||||
mime ^image, has eom, X, flag f = eom -- "$@"
|
||||
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
||||
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
||||
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
|
||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||
ext xcf, X, flag f = gimp -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Archives
|
||||
#-------------------------------------------
|
||||
|
||||
# avoid password prompt by providing empty password
|
||||
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
|
||||
# This requires atool
|
||||
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
||||
|
||||
# Listing and extracting archives without atool:
|
||||
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
|
||||
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
||||
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
||||
ext zip, has unzip = unzip -l "$1" | less
|
||||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
||||
ext ace, has unace = unace l "$1" | less
|
||||
ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
||||
ext rar, has unrar = unrar l "$1" | less
|
||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
||||
|
||||
#-------------------------------------------
|
||||
# Flag t fallback terminals
|
||||
#-------------------------------------------
|
||||
# Rarely installed terminal emulators get higher priority; It is assumed that
|
||||
# if you install a rare terminal emulator, you probably use it.
|
||||
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
|
||||
# a desktop environment or as fallback terminal emulators.
|
||||
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
|
||||
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
|
||||
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
|
||||
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
|
||||
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
|
||||
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
|
||||
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
||||
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
||||
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
||||
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||
|
||||
# Define the editor for non-text files + pager as last action
|
||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
# The very last action, so that it's never triggered accidentally, is to execute a program:
|
||||
mime application/x-executable = "$1"
|
216
.config/.old/ranger/scope.sh
Executable file
216
.config/.old/ranger/scope.sh
Executable file
@ -0,0 +1,216 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o noclobber -o noglob -o nounset -o pipefail
|
||||
IFS=$'\n'
|
||||
|
||||
# If the option `use_preview_script` is set to `true`,
|
||||
# then this script will be called and its output will be displayed in ranger.
|
||||
# ANSI color codes are supported.
|
||||
# STDIN is disabled, so interactive scripts won't work properly
|
||||
|
||||
# This script is considered a configuration file and must be updated manually.
|
||||
# It will be left untouched if you upgrade ranger.
|
||||
|
||||
# Meanings of exit codes:
|
||||
# code | meaning | action of ranger
|
||||
# -----+------------+-------------------------------------------
|
||||
# 0 | success | Display stdout as preview
|
||||
# 1 | no preview | Display no preview at all
|
||||
# 2 | plain text | Display the plain content of the file
|
||||
# 3 | fix width | Don't reload when width changes
|
||||
# 4 | fix height | Don't reload when height changes
|
||||
# 5 | fix both | Don't ever reload
|
||||
# 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
||||
# 7 | image | Display the file directly as an image
|
||||
|
||||
# Script arguments
|
||||
FILE_PATH="${1}" # Full path of the highlighted file
|
||||
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
|
||||
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
|
||||
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
|
||||
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
|
||||
|
||||
FILE_EXTENSION="${FILE_PATH##*.}"
|
||||
FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=8
|
||||
HIGHLIGHT_STYLE='pablo'
|
||||
PYGMENTIZE_STYLE='autumn'
|
||||
|
||||
|
||||
handle_extension() {
|
||||
case "${FILE_EXTENSION_LOWER}" in
|
||||
# Archive
|
||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||
atool --list -- "${FILE_PATH}" && exit 5
|
||||
bsdtar --list --file "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
rar)
|
||||
# Avoid password prompt by providing empty password
|
||||
unrar lt -p- -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
7z)
|
||||
# Avoid password prompt by providing empty password
|
||||
7z l -p -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# PDF
|
||||
pdf)
|
||||
# Preview as text conversion
|
||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5
|
||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# BitTorrent
|
||||
torrent)
|
||||
transmission-show -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# OpenDocument
|
||||
odt|ods|odp|sxw)
|
||||
# Preview as text conversion
|
||||
odt2txt "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# HTML
|
||||
htm|html|xhtml)
|
||||
# Preview as text conversion
|
||||
w3m -dump "${FILE_PATH}" && exit 5
|
||||
lynx -dump -- "${FILE_PATH}" && exit 5
|
||||
elinks -dump "${FILE_PATH}" && exit 5
|
||||
;; # Continue with next handler on failure
|
||||
esac
|
||||
}
|
||||
|
||||
handle_image() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
# SVG
|
||||
# image/svg+xml)
|
||||
# convert "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# exit 1;;
|
||||
|
||||
# Image
|
||||
image/*)
|
||||
local orientation
|
||||
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
|
||||
# If orientation data is present and the image actually
|
||||
# needs rotating ("1" means no rotation)...
|
||||
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
|
||||
# ...auto-rotate the image according to the EXIF data.
|
||||
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
|
||||
fi
|
||||
|
||||
# `w3mimgdisplay` will be called for all images (unless overriden as above),
|
||||
# but might fail for unsupported types.
|
||||
exit 7;;
|
||||
|
||||
# Video
|
||||
# video/*)
|
||||
# # Thumbnail
|
||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# exit 1;;
|
||||
# PDF
|
||||
# application/pdf)
|
||||
# pdftoppm -f 1 -l 1 \
|
||||
# -scale-to-x 1920 \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
# Preview archives using the first image inside.
|
||||
# (Very useful for comic book collections for example.)
|
||||
# application/zip|application/x-rar|application/x-7z-compressed|\
|
||||
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
|
||||
# local fn=""; local fe=""
|
||||
# local zip=""; local rar=""; local tar=""; local bsd=""
|
||||
# case "${mimetype}" in
|
||||
# application/zip) zip=1 ;;
|
||||
# application/x-rar) rar=1 ;;
|
||||
# application/x-7z-compressed) ;;
|
||||
# *) tar=1 ;;
|
||||
# esac
|
||||
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
|
||||
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
|
||||
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
|
||||
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
|
||||
#
|
||||
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
|
||||
# [ print(l, end='') for l in sys.stdin if \
|
||||
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
|
||||
# sort -V | head -n 1)
|
||||
# [ "$fn" = "" ] && return
|
||||
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
|
||||
#
|
||||
# [ "$tar" ] && tar --extract --to-stdout \
|
||||
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
|
||||
# [ "$bsd" ] && bsdtar --extract --to-stdout \
|
||||
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# ;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_mime() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
# Text
|
||||
text/* | */xml)
|
||||
# Syntax highlight
|
||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
if [[ "$( tput colors )" -ge 256 ]]; then
|
||||
local pygmentize_format='terminal256'
|
||||
local highlight_format='xterm256'
|
||||
else
|
||||
local pygmentize_format='terminal'
|
||||
local highlight_format='ansi'
|
||||
fi
|
||||
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
|
||||
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
|
||||
# pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
|
||||
exit 2;;
|
||||
|
||||
# Image
|
||||
image/*)
|
||||
# Preview as text conversion
|
||||
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# Video and audio
|
||||
video/* | audio/*)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_fallback() {
|
||||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
||||
handle_image "${MIMETYPE}"
|
||||
fi
|
||||
handle_extension
|
||||
handle_mime "${MIMETYPE}"
|
||||
handle_fallback
|
||||
|
||||
exit 1
|
102
.config/.old/termite/config
Normal file
102
.config/.old/termite/config
Normal file
@ -0,0 +1,102 @@
|
||||
# Swy7ch' config file for termite
|
||||
|
||||
|
||||
[options]
|
||||
#allow_bold = true
|
||||
#audible_bell = false
|
||||
#bold_is_bright = true
|
||||
#clickable_url = true
|
||||
#dynamic_title = true
|
||||
font = FuraCode Nerd Font Mono 16
|
||||
#fullscreen = true
|
||||
#icon_name = terminal
|
||||
#mouse_autohide = false
|
||||
#scroll_on_output = false
|
||||
#scroll_on_keystroke = true
|
||||
# Length of the scrollback buffer, 0 disabled the scrollback buffer
|
||||
# and setting it to a negative value means "infinite scrollback"
|
||||
scrollback_lines = 10000
|
||||
#search_wrap = true
|
||||
#urgent_on_bell = true
|
||||
#hyperlinks = false
|
||||
|
||||
# $BROWSER is used by default if set, with xdg-open as a fallback
|
||||
#browser = xdg-open
|
||||
|
||||
# "system", "on" or "off"
|
||||
#cursor_blink = system
|
||||
|
||||
# "block", "underline" or "ibeam"
|
||||
cursor_shape = block
|
||||
|
||||
# Hide links that are no longer valid in url select overlay mode
|
||||
#filter_unmatched_urls = true
|
||||
|
||||
# Emit escape sequences for extra modified keys
|
||||
#modify_other_keys = false
|
||||
|
||||
# set size hints for the window
|
||||
#size_hints = false
|
||||
|
||||
# "off", "left" or "right"
|
||||
#scrollbar = off
|
||||
|
||||
[colors]
|
||||
|
||||
# If unset, will reverse foreground and background
|
||||
highlight = #2f2f2f
|
||||
|
||||
# Colors from color0 to color254 can be set
|
||||
|
||||
# special
|
||||
foreground = #d3d0c8
|
||||
foreground_bold = #d3d0c8
|
||||
cursor = #d3d0c8
|
||||
cursor_foreground = #2d2d2d
|
||||
background = rgba(0, 0, 0, 0.8)
|
||||
|
||||
# dark0 + gray
|
||||
color0 = #282828
|
||||
color8 = #928374
|
||||
|
||||
# neutral_red + bright_red
|
||||
color1 = #cc241d
|
||||
color9 = #fb4934
|
||||
|
||||
# neutral_green + bright_green
|
||||
color2 = #98971a
|
||||
color10 = #b8bb26
|
||||
|
||||
# neutral_yellow + bright_yellow
|
||||
color3 = #d79921
|
||||
color11 = #fabd2f
|
||||
|
||||
# neutral_blue + bright_blue
|
||||
color4 = #83a598
|
||||
color12 = #458588
|
||||
|
||||
# neutral_purple + bright_purple
|
||||
color5 = #b16286
|
||||
color13 = #d3869b
|
||||
|
||||
# neutral_aqua + faded_aqua
|
||||
color6 = #689d6a
|
||||
color14 = #8ec07c
|
||||
|
||||
# light4 + light1
|
||||
color7 = #a89984
|
||||
color15 = #ebdbb2
|
||||
|
||||
|
||||
[hints]
|
||||
#font = Monospace 12
|
||||
#foreground = #dcdccc
|
||||
#background = #3f3f3f
|
||||
#active_foreground = #e68080
|
||||
#active_background = #3f3f3f
|
||||
#padding = 2
|
||||
#border = #3f3f3f
|
||||
#border_width = 0.5
|
||||
#roundness = 2.0
|
||||
|
||||
# vim: ft=dosini cms=#%s
|
201
.config/.old/vimrc
Normal file
201
.config/.old/vimrc
Normal file
@ -0,0 +1,201 @@
|
||||
" Swy7ch' config file for vim
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Vim-Plug Stuff
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
"Automatic installation
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
" Necessary to do cool stuff
|
||||
set nocompatible
|
||||
|
||||
"Pluggins will be downloaded under the specified directory
|
||||
call plug#begin('~/.vim/plugins')
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" List of plugins :
|
||||
|
||||
|
||||
" Custom status bar
|
||||
Plug 'itchyny/lightline.vim'
|
||||
|
||||
" Language hilighting packages
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" Shows indent guides
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
|
||||
" Gruvbox colorscheme
|
||||
Plug 'morhetz/gruvbox'
|
||||
|
||||
" All Plugins must be added before the following line
|
||||
call plug#end()
|
||||
|
||||
" Brief help
|
||||
" :PlugInstall - installs plugins; append `!` to update or just :PluginUpdate
|
||||
" :PlugUpdate - updates plugins
|
||||
" :PlugUpgrade - upgrades vim-plug
|
||||
" :PlugClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
||||
"
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" "
|
||||
" Non-plugin stuff : "
|
||||
" "
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"-> General
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Sets how many lines VIM has to remember
|
||||
set history=500
|
||||
|
||||
" Set vim update time (milliseconds)
|
||||
set updatetime=250
|
||||
|
||||
" Detect plugins filetypes
|
||||
filetype plugin on
|
||||
|
||||
" To recognize groff filetype
|
||||
au BufNewFile,BufRead *.mom set filetype=groff
|
||||
|
||||
" Defining the <leader>
|
||||
let mapleader = " "
|
||||
|
||||
" Remove the pause when leaving insert mode
|
||||
set ttimeoutlen=10
|
||||
|
||||
" Autocomplete settings
|
||||
set wildmode=longest,list,full
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" -> VIM User Interface
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Sets the font
|
||||
set guifont=FuraCode\ Nerd\ Font\ Mono\ 12
|
||||
|
||||
" Shows the current position
|
||||
set ruler
|
||||
|
||||
" Shows line numbers
|
||||
set number
|
||||
|
||||
" Shows line numbers relative to the cursor
|
||||
set relativenumber
|
||||
|
||||
" A buffer becomes hidden when abandonned
|
||||
set hid
|
||||
|
||||
" Highlights search results
|
||||
set hlsearch
|
||||
|
||||
" Searches before hitting ENTER
|
||||
set incsearch
|
||||
|
||||
" Shows matching brackets when cursor is over them
|
||||
set showmatch
|
||||
|
||||
" Shows the command that's being typed
|
||||
set showcmd
|
||||
|
||||
" Splits to the right
|
||||
set splitright
|
||||
|
||||
" Shows the current line
|
||||
set cursorline
|
||||
|
||||
" Prevents nvim from being customized by text files commands
|
||||
set nomodeline
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" -> Colors and font
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" GUI colors
|
||||
syntax enable
|
||||
|
||||
" Set utf8 as standard encoding
|
||||
set encoding=utf-8
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" -> Text, tab and indent related stuff
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Do not use spaces instead of tabs
|
||||
set noexpandtab
|
||||
|
||||
" But be smart with tabs
|
||||
set smarttab
|
||||
|
||||
" 1 tab = 4 spaces
|
||||
set tabstop=4
|
||||
set shiftwidth=4 "for indent operations
|
||||
|
||||
" Indent and wrap rules
|
||||
set si "smart indent
|
||||
set wrap "wrap lines
|
||||
|
||||
" Stops the auto-commenting new line
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
" Enable autocompletion
|
||||
set wildmode=longest,list,full
|
||||
|
||||
" Automatically removes all trailing whitespaces on save
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" -> Status line
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" -> Plugins stuff
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" Correct colors with dark background
|
||||
set background=dark
|
||||
|
||||
" Gruvbox setup
|
||||
let g:gruvbox_contrast_dark='hard'
|
||||
|
||||
" Colorscheme
|
||||
colorscheme gruvbox
|
||||
|
||||
" Airline already shows the mode -> get rid of vim's default
|
||||
set noshowmode
|
||||
|
||||
" Lightline customization
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'gruvbox',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ },
|
||||
\ }
|
||||
|
||||
" Indent Guides
|
||||
let g:indent_guides_enable_on_vim_startup=1
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" -> Macros
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Source files
|
||||
noremap <leader>s :source ~/.vimrc <CR>
|
||||
noremap <leader>r :source %<CR>
|
||||
|
||||
" Reset the search buffer
|
||||
noremap <leader>h :let @/ = ""<CR>
|
||||
|
||||
" Plugin management
|
||||
noremap <leader>i :PlugInstall
|
||||
noremap <leader>c :PlugClean
|
||||
noremap <leader>u :PlugUpdate \| PlugUpgrade
|
||||
|
||||
" Make use of xclipboard
|
||||
inoremap <C-v> <Esc>"+pA
|
||||
vnoremap <C-c> "+y
|
16
.config/aliasrc
Normal file
16
.config/aliasrc
Normal file
@ -0,0 +1,16 @@
|
||||
# a file containing all my aliases
|
||||
# sourced at launch
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias ll='ls -lh'
|
||||
alias la='ls -lah'
|
||||
alias bulkrename='\ls | $EDITOR - -c ":%s/.*/mv -i & &/g"'
|
||||
alias backup='rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /'
|
||||
alias printenv='printenv | sort'
|
||||
alias gu='git fetch upstream && git merge upstream/master'
|
||||
alias merge='dotfiles checkout master && dotfiles merge dev && dotfiles checkout x1c3 && dotfiles merge dev && dotfiles checkout dev'
|
||||
alias unimatrix='unimatrix -a -f -c=cyan -s=95'
|
||||
alias untar='tar -zxvf'
|
||||
alias @root='ssh root@217.69.7.192'
|
||||
alias @swytch='ssh swytch@davidjulien.xyz'
|
||||
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
257
.config/dunst/dunstrc
Normal file
257
.config/dunst/dunstrc
Normal file
@ -0,0 +1,257 @@
|
||||
[global]
|
||||
font = FuraCode Nerd Font Mono 14
|
||||
|
||||
# Allow a small subset of html markup:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||
# If markup is not allowed, those tags will be stripped out of the
|
||||
# message.
|
||||
markup = yes
|
||||
plain_text = no
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = no
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = center
|
||||
|
||||
# The frequency with wich text that is longer than the notification
|
||||
# window allows bounces back and forth.
|
||||
# This option conflicts with "word_wrap".
|
||||
# Set to 0 to disable.
|
||||
bounce_freq = 0
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = -1
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Hide duplicate's count and stack them
|
||||
stack_duplicates = yes
|
||||
hide_duplicates_count = yes
|
||||
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectevly.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
#geometry = "250x50-40+40"
|
||||
geometry = "450x50-15+75"
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing windowmanager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 5
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
idle_threshold = 0
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a windowmanager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern windowmanagers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = none
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = yes
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 15
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = no
|
||||
|
||||
# The height of a single line. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
# This adds empty space above and under the text.
|
||||
line_height = 3
|
||||
|
||||
# Draw a line of "separatpr_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 6
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 6
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = frame
|
||||
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/qutebrowser
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = off
|
||||
max_icon_size = 80
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/Paper/16x16/mimetypes/:/usr/share/icons/Paper/48x48/status/:/usr/share/icons/Paper/16x16/devices/:/usr/share/icons/Paper/48x48/notifications/:/usr/share/icons/Paper/48x48/emblems/
|
||||
|
||||
frame_width = 3
|
||||
frame_color = "#8EC07C"
|
||||
|
||||
[shortcuts]
|
||||
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
# Xev might be helpful to find names for keys.
|
||||
|
||||
# Close notification.
|
||||
close = ctrl+space
|
||||
|
||||
# Close all notifications.
|
||||
close_all = ctrl+shift+space
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1".
|
||||
history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
context = ctrl+shift+period
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
frame_color = "#5B8234"
|
||||
foreground = "#5B8234"
|
||||
background = "#191311"
|
||||
#background = "#2B313C"
|
||||
timeout = 4
|
||||
|
||||
[urgency_normal]
|
||||
frame_color = "#D79921"
|
||||
foreground = "#D79921"
|
||||
background = "#191311"
|
||||
#background = "#2B313C"
|
||||
timeout = 6
|
||||
|
||||
[urgency_critical]
|
||||
frame_color = "#CC241D"
|
||||
foreground = "#CC241D"
|
||||
background = "#191311"
|
||||
#background = "#2B313C"
|
||||
timeout = 8
|
||||
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
# Messages can be matched by "appname", "summary", "body", "icon", "category",
|
||||
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
|
||||
# "background", "new_icon" and "format".
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: if you don't want a notification to be displayed, set the format
|
||||
# to "".
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# format = ""
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
# vim: ft=cfg
|
26
.config/htop/htoprc
Normal file
26
.config/htop/htoprc
Normal file
@ -0,0 +1,26 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
fields=0 48 38 39 46 47 49 1
|
||||
sort_key=47
|
||||
sort_direction=1
|
||||
hide_threads=0
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
shadow_other_users=1
|
||||
show_thread_names=1
|
||||
show_program_path=0
|
||||
highlight_base_name=1
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=1
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=6
|
||||
delay=15
|
||||
left_meters=AllCPUs Memory Swap
|
||||
left_meter_modes=1 1 1
|
||||
right_meters=Tasks LoadAverage Uptime Battery Blank Hostname
|
||||
right_meter_modes=2 2 2 2 2 2
|
765
.config/neofetch/config.conf
Normal file
765
.config/neofetch/config.conf
Normal file
@ -0,0 +1,765 @@
|
||||
# Swy7ch' config file for neofetch
|
||||
|
||||
# See this wiki page for more info:
|
||||
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
print_info() {
|
||||
prin
|
||||
|
||||
info title
|
||||
info underline
|
||||
|
||||
info "OS" distro
|
||||
#info "Host" model
|
||||
info "Kernel" kernel
|
||||
info "Uptime" uptime
|
||||
info "Packages" packages
|
||||
info "Shell" shell
|
||||
#info "Resolution" resolution
|
||||
#info "DE" de
|
||||
info "WM" wm
|
||||
info "WM Theme" wm_theme
|
||||
# info "Theme" theme
|
||||
# info "Icons" icons
|
||||
info "Terminal" term
|
||||
info "Terminal Font" term_font
|
||||
#info "CPU" cpu
|
||||
#info "GPU" gpu
|
||||
info "Memory" memory
|
||||
|
||||
# info "GPU Driver" gpu_driver # Linux/macOS only
|
||||
# info "CPU Usage" cpu_usage
|
||||
# info "Disk" disk
|
||||
# info "Battery" battery
|
||||
# info "Font" font
|
||||
# info "Song" song
|
||||
# [[ $player ]] && prin "Music Player" "$player"
|
||||
# info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
info cols
|
||||
}
|
||||
|
||||
|
||||
# Kernel
|
||||
|
||||
|
||||
# Shorten the output of the kernel function.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --kernel_shorthand
|
||||
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
|
||||
#
|
||||
# Example:
|
||||
# on: '4.8.9-1-ARCH'
|
||||
# off: 'Linux 4.8.9-1-ARCH'
|
||||
kernel_shorthand="off"
|
||||
|
||||
|
||||
# Distro
|
||||
|
||||
|
||||
# Shorten the output of the distro function
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off', 'tiny'
|
||||
# Flag: --distro_shorthand
|
||||
# Supports: Everything except Windows and Haiku
|
||||
distro_shorthand="off"
|
||||
|
||||
# Show/Hide OS Architecture.
|
||||
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --os_arch
|
||||
#
|
||||
# Example:
|
||||
# on: 'Arch Linux x86_64'
|
||||
# off: 'Arch Linux'
|
||||
os_arch="on"
|
||||
|
||||
|
||||
# Uptime
|
||||
|
||||
|
||||
# Shorten the output of the uptime function
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off', 'tiny'
|
||||
# Flag: --uptime_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: '2 days, 10 hours, 3 mins'
|
||||
# off: '2 days, 10 hours, 3 minutes'
|
||||
# tiny: '2d 10h 3m'
|
||||
uptime_shorthand="on"
|
||||
|
||||
|
||||
# Memory
|
||||
|
||||
|
||||
# Show memory pecentage in output.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --memory_percent
|
||||
#
|
||||
# Example:
|
||||
# on: '1801MiB / 7881MiB (22%)'
|
||||
# off: '1801MiB / 7881MiB'
|
||||
memory_percent="off"
|
||||
|
||||
|
||||
# Packages
|
||||
|
||||
|
||||
# Show/Hide Package Manager names.
|
||||
#
|
||||
# Default: 'tiny'
|
||||
# Values: 'on', 'tiny' 'off'
|
||||
# Flag: --package_managers
|
||||
#
|
||||
# Example:
|
||||
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
|
||||
# tiny: '908 (pacman, flatpak, snap)'
|
||||
# off: '908'
|
||||
package_managers="on"
|
||||
|
||||
|
||||
# Shell
|
||||
|
||||
|
||||
# Show the path to $SHELL
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --shell_path
|
||||
#
|
||||
# Example:
|
||||
# on: '/bin/bash'
|
||||
# off: 'bash'
|
||||
shell_path="on"
|
||||
|
||||
# Show $SHELL version
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --shell_version
|
||||
#
|
||||
# Example:
|
||||
# on: 'bash 4.4.5'
|
||||
# off: 'bash'
|
||||
shell_version="on"
|
||||
|
||||
|
||||
# CPU
|
||||
|
||||
|
||||
# CPU speed type
|
||||
#
|
||||
# Default: 'bios_limit'
|
||||
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
|
||||
# Flag: --speed_type
|
||||
# Supports: Linux with 'cpufreq'
|
||||
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
|
||||
speed_type="bios_limit"
|
||||
|
||||
# CPU speed shorthand
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'.
|
||||
# Flag: --speed_shorthand
|
||||
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
|
||||
#
|
||||
# Example:
|
||||
# on: 'i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'i7-6500U (4) @ 3.100GHz'
|
||||
speed_shorthand="off"
|
||||
|
||||
# Enable/Disable CPU brand in output.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_brand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U'
|
||||
# off: 'i7-6500U (4)'
|
||||
cpu_brand="on"
|
||||
|
||||
# CPU Speed
|
||||
# Hide/Show CPU speed.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_speed
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'Intel i7-6500U (4)'
|
||||
cpu_speed="on"
|
||||
|
||||
# CPU Cores
|
||||
# Display CPU cores in output
|
||||
#
|
||||
# Default: 'logical'
|
||||
# Values: 'logical', 'physical', 'off'
|
||||
# Flag: --cpu_cores
|
||||
# Support: 'physical' doesn't work on BSD.
|
||||
#
|
||||
# Example:
|
||||
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
|
||||
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
|
||||
# off: 'Intel i7-6500U @ 3.1GHz'
|
||||
cpu_cores="logical"
|
||||
|
||||
# CPU Temperature
|
||||
# Hide/Show CPU temperature.
|
||||
# Note the temperature is added to the regular CPU function.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'C', 'F', 'off'
|
||||
# Flag: --cpu_temp
|
||||
# Supports: Linux, BSD
|
||||
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
|
||||
# coretemp kernel module. This only supports newer Intel processors.
|
||||
#
|
||||
# Example:
|
||||
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
|
||||
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
|
||||
# off: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
cpu_temp="off"
|
||||
|
||||
|
||||
# GPU
|
||||
|
||||
|
||||
# Enable/Disable GPU Brand
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gpu_brand
|
||||
#
|
||||
# Example:
|
||||
# on: 'AMD HD 7950'
|
||||
# off: 'HD 7950'
|
||||
gpu_brand="on"
|
||||
|
||||
# Which GPU to display
|
||||
#
|
||||
# Default: 'all'
|
||||
# Values: 'all', 'dedicated', 'integrated'
|
||||
# Flag: --gpu_type
|
||||
# Supports: Linux
|
||||
#
|
||||
# Example:
|
||||
# all:
|
||||
# GPU1: AMD HD 7950
|
||||
# GPU2: Intel Integrated Graphics
|
||||
#
|
||||
# dedicated:
|
||||
# GPU1: AMD HD 7950
|
||||
#
|
||||
# integrated:
|
||||
# GPU1: Intel Integrated Graphics
|
||||
gpu_type="all"
|
||||
|
||||
|
||||
# Resolution
|
||||
|
||||
|
||||
# Display refresh rate next to each monitor
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --refresh_rate
|
||||
# Supports: Doesn't work on Windows.
|
||||
#
|
||||
# Example:
|
||||
# on: '1920x1080 @ 60Hz'
|
||||
# off: '1920x1080'
|
||||
refresh_rate="on"
|
||||
|
||||
|
||||
# Gtk Theme / Icons / Font
|
||||
|
||||
|
||||
# Shorten output of GTK Theme / Icons / Font
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix, Adwaita'
|
||||
# off: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
gtk_shorthand="off"
|
||||
|
||||
|
||||
# Enable/Disable gtk2 Theme / Icons / Font
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk2
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
# off: 'Adwaita [GTK3]'
|
||||
gtk2="on"
|
||||
|
||||
# Enable/Disable gtk3 Theme / Icons / Font
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk3
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
# off: 'Numix [GTK2]'
|
||||
gtk3="on"
|
||||
|
||||
|
||||
# IP Address
|
||||
|
||||
|
||||
# Website to ping for the public IP
|
||||
#
|
||||
# Default: 'http://ident.me'
|
||||
# Values: 'url'
|
||||
# Flag: --ip_host
|
||||
public_ip_host="http://ident.me"
|
||||
|
||||
# Public IP timeout.
|
||||
#
|
||||
# Default: '2'
|
||||
# Values: 'int'
|
||||
# Flag: --ip_timeout
|
||||
public_ip_timeout=2
|
||||
|
||||
|
||||
# Disk
|
||||
|
||||
|
||||
# Which disks to display.
|
||||
# The values can be any /dev/sdXX, mount point or directory.
|
||||
# NOTE: By default we only show the disk info for '/'.
|
||||
#
|
||||
# Default: '/'
|
||||
# Values: '/', '/dev/sdXX', '/path/to/drive'.
|
||||
# Flag: --disk_show
|
||||
#
|
||||
# Example:
|
||||
# disk_show=('/' '/dev/sdb1'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
|
||||
#
|
||||
# disk_show=('/'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
#
|
||||
disk_show=('/')
|
||||
|
||||
# Disk subtitle.
|
||||
# What to append to the Disk subtitle.
|
||||
#
|
||||
# Default: 'mount'
|
||||
# Values: 'mount', 'name', 'dir'
|
||||
# Flag: --disk_subtitle
|
||||
#
|
||||
# Example:
|
||||
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
|
||||
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
|
||||
#
|
||||
# mount: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
|
||||
#
|
||||
# dir: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (Videos): 74G / 118G (66%)'
|
||||
disk_subtitle="mount"
|
||||
|
||||
|
||||
# Song
|
||||
|
||||
|
||||
# Manually specify a music player.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'player-name'
|
||||
# Flag: --music_player
|
||||
#
|
||||
# Available values for 'player-name':
|
||||
#
|
||||
# amarok
|
||||
# audacious
|
||||
# banshee
|
||||
# bluemindo
|
||||
# clementine
|
||||
# cmus
|
||||
# deadbeef
|
||||
# deepin-music
|
||||
# dragon
|
||||
# elisa
|
||||
# exaile
|
||||
# gnome-music
|
||||
# gmusicbrowser
|
||||
# guayadeque
|
||||
# iTunes
|
||||
# juk
|
||||
# lollypop
|
||||
# mocp
|
||||
# mopidy
|
||||
# mpd
|
||||
# netease-cloud-music
|
||||
# pogo
|
||||
# pragha
|
||||
# qmmp
|
||||
# quodlibet
|
||||
# rhythmbox
|
||||
# sayonara
|
||||
# smplayer
|
||||
# spotify
|
||||
# tomahawk
|
||||
# vlc
|
||||
# xmms2d
|
||||
# yarock
|
||||
music_player="auto"
|
||||
|
||||
# Format to display song information.
|
||||
#
|
||||
# Default: '%artist% - %album% - %title%'
|
||||
# Values: '%artist%', '%album%', '%title%'
|
||||
# Flag: --song_format
|
||||
#
|
||||
# Example:
|
||||
# default: 'Song: Jet - Get Born - Sgt Major'
|
||||
song_format="%artist% - %album% - %title%"
|
||||
|
||||
# Print the Artist, Album and Title on separate lines
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --song_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Artist: The Fratellis'
|
||||
# 'Album: Costello Music'
|
||||
# 'Song: Chelsea Dagger'
|
||||
#
|
||||
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
|
||||
song_shorthand="off"
|
||||
|
||||
# 'mpc' arguments (specify a host, password etc).
|
||||
#
|
||||
# Default: ''
|
||||
# Example: mpc_args=(-h HOST -P PASSWORD)
|
||||
mpc_args=()
|
||||
|
||||
|
||||
# Text Colors
|
||||
|
||||
|
||||
# Text Colors
|
||||
#
|
||||
# Default: 'distro'
|
||||
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
|
||||
# Flag: --colors
|
||||
#
|
||||
# Each number represents a different part of the text in
|
||||
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
|
||||
#
|
||||
# Example:
|
||||
# colors=(distro) - Text is colored based on Distro colors.
|
||||
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
|
||||
colors=(9 15 15 15 15 15)
|
||||
|
||||
|
||||
# Text Options
|
||||
|
||||
|
||||
# Toggle bold text
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --bold
|
||||
bold="on"
|
||||
|
||||
# Enable/Disable Underline
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --underline
|
||||
underline_enabled="on"
|
||||
|
||||
# Underline character
|
||||
#
|
||||
# Default: '-'
|
||||
# Values: 'string'
|
||||
# Flag: --underline_char
|
||||
underline_char="-"
|
||||
|
||||
|
||||
# Info Separator
|
||||
# Replace the default separator with the specified string.
|
||||
#
|
||||
# Default: ':'
|
||||
# Flag: --separator
|
||||
#
|
||||
# Example:
|
||||
# separator="->": 'Shell-> bash'
|
||||
# separator=" =": 'WM = dwm'
|
||||
separator=":"
|
||||
|
||||
|
||||
# Color Blocks
|
||||
|
||||
|
||||
# Color block range
|
||||
# The range of colors to print.
|
||||
#
|
||||
# Default: '0', '7'
|
||||
# Values: 'num'
|
||||
# Flag: --block_range
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# Display colors 0-7 in the blocks. (8 colors)
|
||||
# neofetch --block_range 0 7
|
||||
#
|
||||
# Display colors 0-15 in the blocks. (16 colors)
|
||||
# neofetch --block_range 0 15
|
||||
block_range=(0 15)
|
||||
|
||||
# Toggle color blocks
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --color_blocks
|
||||
color_blocks="on"
|
||||
|
||||
# Color block width in spaces
|
||||
#
|
||||
# Default: '3'
|
||||
# Values: 'num'
|
||||
# Flag: --block_width
|
||||
block_width=4
|
||||
|
||||
# Color block height in lines
|
||||
#
|
||||
# Default: '1'
|
||||
# Values: 'num'
|
||||
# Flag: --block_height
|
||||
block_height=1
|
||||
|
||||
|
||||
# Progress Bars
|
||||
|
||||
|
||||
# Bar characters
|
||||
#
|
||||
# Default: '-', '='
|
||||
# Values: 'string', 'string'
|
||||
# Flag: --bar_char
|
||||
#
|
||||
# Example:
|
||||
# neofetch --bar_char 'elapsed' 'total'
|
||||
# neofetch --bar_char '-' '='
|
||||
bar_char_elapsed="-"
|
||||
bar_char_total="="
|
||||
|
||||
# Toggle Bar border
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --bar_border
|
||||
bar_border="on"
|
||||
|
||||
# Progress bar length in spaces
|
||||
# Number of chars long to make the progress bars.
|
||||
#
|
||||
# Default: '15'
|
||||
# Values: 'num'
|
||||
# Flag: --bar_length
|
||||
bar_length=15
|
||||
|
||||
# Progress bar colors
|
||||
# When set to distro, uses your distro's logo colors.
|
||||
#
|
||||
# Default: 'distro', 'distro'
|
||||
# Values: 'distro', 'num'
|
||||
# Flag: --bar_colors
|
||||
#
|
||||
# Example:
|
||||
# neofetch --bar_colors 3 4
|
||||
# neofetch --bar_colors distro 5
|
||||
bar_color_elapsed="distro"
|
||||
bar_color_total="distro"
|
||||
|
||||
|
||||
# Info display
|
||||
# Display a bar with the info.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'bar', 'infobar', 'barinfo', 'off'
|
||||
# Flags: --cpu_display
|
||||
# --memory_display
|
||||
# --battery_display
|
||||
# --disk_display
|
||||
#
|
||||
# Example:
|
||||
# bar: '[---=======]'
|
||||
# infobar: 'info [---=======]'
|
||||
# barinfo: '[---=======] info'
|
||||
# off: 'info'
|
||||
cpu_display="off"
|
||||
memory_display="off"
|
||||
battery_display="off"
|
||||
disk_display="off"
|
||||
|
||||
|
||||
# Backend Settings
|
||||
|
||||
|
||||
# Image backend.
|
||||
#
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
|
||||
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Flag: --backend
|
||||
image_backend="ascii"
|
||||
|
||||
# Image Source
|
||||
#
|
||||
# Which image or ascii file to display.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
|
||||
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
|
||||
# Flag: --source
|
||||
#
|
||||
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
|
||||
# In ascii mode, distro ascii art will be used and in an image mode, your
|
||||
# wallpaper will be used.
|
||||
image_source="auto"
|
||||
|
||||
|
||||
# Ascii Options
|
||||
|
||||
|
||||
# Ascii distro
|
||||
# Which distro's ascii art to display.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'distro_name'
|
||||
# Flag: --ascii_distro
|
||||
#
|
||||
# NOTE: Arch and Ubuntu have 'old' logo variants.
|
||||
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
|
||||
# NOTE: Ubuntu has flavor variants.
|
||||
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
|
||||
# NOTE: Arch, Crux and Gentoo have a smaller logo variant.
|
||||
# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.
|
||||
ascii_distro="arch_old"
|
||||
|
||||
# Ascii Colors
|
||||
#
|
||||
# Default: 'distro'
|
||||
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
|
||||
# Flag: --ascii_colors
|
||||
#
|
||||
# Example:
|
||||
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
|
||||
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
|
||||
ascii_colors=(2 2)
|
||||
|
||||
# Bold ascii logo
|
||||
# Whether or not to bold the ascii logo.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --ascii_bold
|
||||
ascii_bold="on"
|
||||
|
||||
|
||||
# Image Options
|
||||
|
||||
|
||||
# Image loop
|
||||
# Setting this to on will make neofetch redraw the image constantly until
|
||||
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --loop
|
||||
image_loop="off"
|
||||
|
||||
# Thumbnail directory
|
||||
#
|
||||
# Default: '~/.cache/thumbnails/neofetch'
|
||||
# Values: 'dir'
|
||||
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
|
||||
|
||||
# Crop mode
|
||||
#
|
||||
# Default: 'normal'
|
||||
# Values: 'normal', 'fit', 'fill'
|
||||
# Flag: --crop_mode
|
||||
#
|
||||
# See this wiki page to learn about the fit and fill options.
|
||||
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
|
||||
crop_mode="normal"
|
||||
|
||||
# Crop offset
|
||||
# Note: Only affects 'normal' crop mode.
|
||||
#
|
||||
# Default: 'center'
|
||||
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
|
||||
# 'east', 'southwest', 'south', 'southeast'
|
||||
# Flag: --crop_offset
|
||||
crop_offset="center"
|
||||
|
||||
# Image size
|
||||
# The image is half the terminal width by default.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', '00px', '00%', 'none'
|
||||
# Flags: --image_size
|
||||
# --size
|
||||
image_size="auto"
|
||||
|
||||
# Gap between image and text
|
||||
#
|
||||
# Default: '3'
|
||||
# Values: 'num', '-num'
|
||||
# Flag: --gap
|
||||
gap=3
|
||||
|
||||
# Image offsets
|
||||
# Only works with the w3m backend.
|
||||
#
|
||||
# Default: '0'
|
||||
# Values: 'px'
|
||||
# Flags: --xoffset
|
||||
# --yoffset
|
||||
yoffset=0
|
||||
xoffset=0
|
||||
|
||||
# Image background color
|
||||
# Only works with the w3m backend.
|
||||
#
|
||||
# Default: ''
|
||||
# Values: 'color', 'blue'
|
||||
# Flag: --bg_color
|
||||
background_color=
|
||||
|
||||
|
||||
# Misc Options
|
||||
|
||||
# Stdout mode
|
||||
# Turn off all colors and disables image backend (ASCII/Image).
|
||||
# Useful for piping into another command.
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
stdout="off"
|
39
.config/nvim/after/ftplugin/groff.vim
Normal file
39
.config/nvim/after/ftplugin/groff.vim
Normal file
@ -0,0 +1,39 @@
|
||||
" groff filetype config
|
||||
" Licence LGPL v3.0
|
||||
|
||||
inoremap <buffer> à \[`a]
|
||||
inoremap <buffer> 'A \[`A]
|
||||
inoremap <buffer> â \[^a]
|
||||
inoremap <buffer> Â \[^A]
|
||||
inoremap <buffer> ç \[,c]
|
||||
inoremap <buffer> CC \[,C]
|
||||
inoremap <buffer> é \['e]
|
||||
inoremap <buffer> 'E \['E]
|
||||
inoremap <buffer> è \[`e]
|
||||
inoremap <buffer> ê \[^e]
|
||||
inoremap <buffer> Ê \[^E]
|
||||
inoremap <buffer> ï \[¨i]
|
||||
inoremap <buffer> î \[^i]
|
||||
inoremap <buffer> Î \[^I]
|
||||
inoremap <buffer> oe \[oe]
|
||||
inoremap <buffer> ô \[^o]
|
||||
inoremap <buffer> Ô \[^O]
|
||||
inoremap <buffer> û \[^u]
|
||||
inoremap <buffer> ù \[`u]
|
||||
" Espace insécable devant etc
|
||||
inoremap <buffer> <Space>etc \~etc.
|
||||
" Espace insécable devant ':'
|
||||
inoremap <buffer> <Space>: \~:
|
||||
" Centered point
|
||||
inoremap <buffer> .. \[u00B7]
|
||||
" Italics
|
||||
inoremap <buffer> II \*[IT]\*[PREV]<Esc>F\i
|
||||
" Bold
|
||||
inoremap <buffer> BB \*[BD]\*[PREV]<Esc>F\i
|
||||
" Bold + Italics
|
||||
inoremap <buffer> BI \*[BDI]\*[PREV]<Esc>F\i
|
||||
" Real dashes
|
||||
" - short one
|
||||
inoremap <buffer> -- \[en]
|
||||
" -- long one
|
||||
inoremap <buffer> __ \[em]
|
9
.config/nvim/after/ftplugin/python.vim
Normal file
9
.config/nvim/after/ftplugin/python.vim
Normal file
@ -0,0 +1,9 @@
|
||||
" python filetype config
|
||||
" LGPL v3.0 Licence
|
||||
|
||||
" proper PEP 8 indentation
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set textwidth=79
|
||||
set expandtab
|
27
.config/nvim/after/ftplugin/tex.vim
Normal file
27
.config/nvim/after/ftplugin/tex.vim
Normal file
@ -0,0 +1,27 @@
|
||||
" tex filetype config
|
||||
" Licence LGPL v3.0
|
||||
|
||||
" spellcheck enabled
|
||||
setlocal spell spelllang=fr
|
||||
|
||||
" Unbreakable space before 'etc'
|
||||
inoremap <buffer> <Space>etc \,etc.
|
||||
" Unbreakable space before ':'
|
||||
inoremap <buffer> <Space>: \,:
|
||||
" Centered point
|
||||
inoremap <buffer> .. \textperiodcentered
|
||||
" But don't overreact
|
||||
inoremap <buffer> ... ...
|
||||
" Italics
|
||||
inoremap <buffer> II \textit{}<Esc>i
|
||||
" Bold
|
||||
inoremap <buffer> BB \textbf{}<Esc>i
|
||||
" Bold + Italics
|
||||
inoremap <buffer> BI \textit{\textbf{}}<Esc>hi
|
||||
" Smallcaps
|
||||
inoremap <buffer> SC \fsc{}<Esc>i
|
||||
|
||||
" Caps
|
||||
inoremap <buffer> AA À
|
||||
inoremap <buffer> CC Ç
|
||||
inoremap <buffer> EE É
|
4
.config/nvim/after/ftplugin/text.vim
Normal file
4
.config/nvim/after/ftplugin/text.vim
Normal file
@ -0,0 +1,4 @@
|
||||
" vim filetype config
|
||||
" Licence LGPL v3.0
|
||||
|
||||
setlocal spell spelllang=fr,en_us
|
4
.config/nvim/after/ftplugin/verilog.vim
Normal file
4
.config/nvim/after/ftplugin/verilog.vim
Normal file
@ -0,0 +1,4 @@
|
||||
" verilog indent removal
|
||||
" Licence LGPL v3.0
|
||||
|
||||
noremap <leader><Enter> :w! \| :CoqRunToCursor<CR>
|
4
.config/nvim/after/ftplugin/vim.vim
Normal file
4
.config/nvim/after/ftplugin/vim.vim
Normal file
@ -0,0 +1,4 @@
|
||||
" vim filetype config
|
||||
" Licence LGPL v3.0
|
||||
|
||||
let b:coc_pairs_disabled = ['"']
|
269
.config/nvim/colors/polyjuice.vim
Normal file
269
.config/nvim/colors/polyjuice.vim
Normal file
@ -0,0 +1,269 @@
|
||||
" Name: Polyjuice
|
||||
" Description: A simple yet customizable pastel colorscheme
|
||||
" Author: David JULIEN <swy7ch@protonmail.com>
|
||||
" Maintainer: David JULIEN <swy7ch@protonmail.com>
|
||||
" Website: https://github.com/vim/vim/blob/master/src/syntax.c
|
||||
" License: Vim License (see `:help license`)
|
||||
" Last Updated: Wed 06 May 2020 02:37:59 AM CEST
|
||||
|
||||
" Generated by Colortemplate v2.0.0
|
||||
|
||||
set background=dark
|
||||
|
||||
hi clear
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = 'polyjuice'
|
||||
|
||||
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2
|
||||
|
||||
hi! link EndOfBuffer NonText
|
||||
hi! link QuickFixLine Search
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Conditional Statement
|
||||
hi! link Define PreProc
|
||||
hi! link Debug Special
|
||||
hi! link Delimiter Special
|
||||
hi! link Exception Statement
|
||||
hi! link Float Number
|
||||
hi! link Function Identifier
|
||||
hi! link Include PreProc
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Macro PreProc
|
||||
hi! link Number Constant
|
||||
hi! link Operator Statement
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Repeat Statement
|
||||
hi! link SpecialChar Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link StorageClass Type
|
||||
hi! link String Constant
|
||||
hi! link Structure Type
|
||||
hi! link Tag Special
|
||||
hi! link Typedef Type
|
||||
|
||||
if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
let g:terminal_ansi_colors = ['#1d2021', '#b73935', '#5a8471', '#f7a583',
|
||||
\ '#458588', '#b16286', '#7cafa3', '#a89984', '#7c6f64', '#ea6962',
|
||||
\ '#89b594', '#ffeca3', '#7daea3', '#d3869b', '#ace5d7', '#ebdbb2']
|
||||
hi Normal guifg=#ebdbb2 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Terminal guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Pmenu guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSel guifg=#1d2021 guibg=#89b594 guisp=NONE gui=bold cterm=bold
|
||||
hi SpellBad guifg=#ea6962 guibg=NONE guisp=NONE gui=underline cterm=underline
|
||||
hi SpellCap guifg=#7daea3 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi SpellLocal guifg=#ace5d7 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi SpellRare guifg=#f7a583 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi StatusLineTerm guifg=#1d2021 guibg=#89b594 guisp=NONE gui=bold cterm=bold
|
||||
hi StatusLineNC guifg=#1d2021 guibg=#89b594 guisp=NONE gui=NONE cterm=NONE
|
||||
hi TabLine guifg=#ebdbb2 guibg=#a89984 guisp=NONE gui=underline cterm=underline
|
||||
hi Todo guifg=#1d2021 guibg=#f7a583 guisp=NONE gui=bold cterm=bold
|
||||
hi ColorColumn guifg=NONE guibg=#b73935 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Conceal guifg=#7c6f64 guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Cursor guifg=#1d2021 guibg=#ebdbb2 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLine guifg=NONE guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLineNr guifg=#f7a583 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi DiffAdd guifg=NONE guibg=#5a8471 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffChange guifg=NONE guibg=#f7a583 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffDelete guifg=NONE guibg=#b73935 guisp=NONE gui=bold cterm=bold
|
||||
hi DiffText guifg=NONE guibg=#ea6962 guisp=NONE gui=bold cterm=bold
|
||||
hi Directory guifg=#d3869b guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi ErrorMsg guifg=#ffeca3 guibg=#b73935 guisp=NONE gui=bold cterm=bold
|
||||
hi FoldColumn guifg=#f7a583 guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Folded guifg=#f7a583 guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi IncSearch guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi LineNr guifg=#a89984 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi MatchParen guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ModeMsg guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi MoreMsg guifg=#89b594 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi NonText guifg=#7daea3 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi PmenuSbar guifg=NONE guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuThumb guifg=NONE guibg=#ebdbb2 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Question guifg=#89b594 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Search guifg=#1d2021 guibg=#f7a583 guisp=NONE gui=NONE cterm=NONE
|
||||
hi SignColumn guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey guifg=#ace5d7 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi StatusLine guifg=#ebdbb2 guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi StatusLineNC guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=reverse cterm=reverse
|
||||
hi TabLineFill guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi TabLineSel guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi Title guifg=#f7a583 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi VertSplit guifg=#ebdbb2 guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Visual guifg=#ffeca3 guibg=#b16286 guisp=NONE gui=NONE cterm=NONE
|
||||
hi VisualNOS guifg=NONE guibg=NONE guisp=NONE gui=bold,underline ctermfg=NONE ctermbg=NONE cterm=bold,underline
|
||||
hi WarningMsg guifg=#ea6962 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi WildMenu guifg=#1d2021 guibg=#89b594 guisp=NONE gui=bold cterm=bold
|
||||
hi Comment guifg=#7c6f64 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Constant guifg=#d3869b guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Error guifg=#ebdbb2 guibg=#ea6962 guisp=NONE gui=bold cterm=bold
|
||||
hi Identifier guifg=#7daea3 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Ignore guifg=#1d2021 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi PreProc guifg=#89b594 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Special guifg=#f7a583 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Statement guifg=#f7a583 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Type guifg=#ffeca3 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Underlined guifg=#458588 guibg=NONE guisp=NONE gui=underline cterm=underline
|
||||
hi! link lCursor Cursor
|
||||
hi ToolbarLine guifg=NONE guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi ToolbarButton guifg=#1d2021 guibg=#7c6f64 guisp=NONE gui=bold cterm=bold
|
||||
unlet s:t_Co
|
||||
finish
|
||||
endif
|
||||
|
||||
if s:t_Co >= 256
|
||||
hi Normal ctermfg=229 ctermbg=NONE cterm=NONE
|
||||
hi Terminal ctermfg=229 cterm=NONE
|
||||
hi Pmenu ctermfg=229 cterm=NONE
|
||||
hi PmenuSel ctermbg=71 cterm=bold
|
||||
hi SpellBad ctermfg=203 ctermbg=NONE cterm=underline
|
||||
hi SpellCap ctermfg=24 ctermbg=NONE cterm=NONE
|
||||
hi SpellLocal ctermfg=81 ctermbg=NONE cterm=NONE
|
||||
hi SpellRare ctermfg=216 ctermbg=NONE cterm=NONE
|
||||
hi StatusLineTerm ctermbg=71 cterm=bold
|
||||
hi StatusLineNC ctermbg=71 cterm=NONE
|
||||
hi TabLine ctermfg=229 ctermbg=239 cterm=underline
|
||||
hi Todo ctermbg=216 cterm=bold
|
||||
hi ColorColumn ctermfg=NONE ctermbg=160 cterm=NONE
|
||||
hi Conceal ctermfg=243 ctermbg=239 cterm=NONE
|
||||
hi Cursor ctermbg=229 cterm=NONE
|
||||
hi CursorLine ctermfg=NONE ctermbg=239 cterm=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=239 cterm=NONE
|
||||
hi CursorLineNr ctermfg=216 ctermbg=NONE cterm=NONE
|
||||
hi DiffAdd ctermfg=NONE ctermbg=2 cterm=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=216 cterm=NONE
|
||||
hi DiffDelete ctermfg=NONE ctermbg=160 cterm=NONE
|
||||
hi DiffText ctermfg=NONE ctermbg=203 cterm=bold
|
||||
hi Directory ctermfg=181 ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg ctermfg=230 ctermbg=160 cterm=bold
|
||||
hi FoldColumn ctermfg=216 ctermbg=239 cterm=NONE
|
||||
hi Folded ctermfg=216 ctermbg=239 cterm=NONE
|
||||
hi IncSearch ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi LineNr ctermfg=239 ctermbg=NONE cterm=NONE
|
||||
hi MatchParen ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi MoreMsg ctermfg=71 ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=24 ctermbg=NONE cterm=NONE
|
||||
hi PmenuSbar ctermfg=NONE ctermbg=243 cterm=NONE
|
||||
hi PmenuThumb ctermfg=NONE ctermbg=229 cterm=NONE
|
||||
hi Question ctermfg=71 ctermbg=NONE cterm=NONE
|
||||
hi Search ctermbg=216 cterm=NONE
|
||||
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey ctermfg=81 ctermbg=NONE cterm=NONE
|
||||
hi StatusLine ctermfg=229 ctermbg=239 cterm=NONE
|
||||
hi StatusLineNC ctermfg=229 cterm=reverse
|
||||
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi Title ctermfg=216 ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=229 ctermbg=239 cterm=NONE
|
||||
hi Visual ctermfg=230 ctermbg=138 cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
|
||||
hi WarningMsg ctermfg=203 ctermbg=NONE cterm=NONE
|
||||
hi WildMenu ctermbg=71 cterm=bold
|
||||
hi Comment ctermfg=243 ctermbg=NONE cterm=NONE
|
||||
hi Constant ctermfg=181 ctermbg=NONE cterm=NONE
|
||||
hi Error ctermfg=229 ctermbg=203 cterm=bold
|
||||
hi Identifier ctermfg=24 ctermbg=NONE cterm=bold
|
||||
hi Ignore ctermbg=NONE cterm=NONE
|
||||
hi PreProc ctermfg=71 ctermbg=NONE cterm=NONE
|
||||
hi Special ctermfg=216 ctermbg=NONE cterm=NONE
|
||||
hi Statement ctermfg=216 ctermbg=NONE cterm=NONE
|
||||
hi Type ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
hi Underlined ctermfg=24 ctermbg=NONE cterm=underline
|
||||
hi! link lCursor Cursor
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=243 cterm=NONE
|
||||
hi ToolbarButton ctermbg=243 cterm=bold
|
||||
unlet s:t_Co
|
||||
finish
|
||||
endif
|
||||
|
||||
if s:t_Co >= 8
|
||||
hi Normal ctermfg=LightYellow ctermbg=NONE cterm=NONE
|
||||
hi Terminal ctermfg=LightYellow ctermbg=Black cterm=NONE
|
||||
hi Pmenu ctermfg=LightYellow ctermbg=Black cterm=NONE
|
||||
hi PmenuSel ctermfg=Black ctermbg=Green cterm=bold
|
||||
hi SpellBad ctermfg=Red ctermbg=NONE cterm=underline
|
||||
hi SpellCap ctermfg=DarkCyan ctermbg=NONE cterm=NONE
|
||||
hi SpellLocal ctermfg=LightBlue ctermbg=NONE cterm=NONE
|
||||
hi SpellRare ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi StatusLineTerm ctermfg=Black ctermbg=Green cterm=bold
|
||||
hi StatusLineNC ctermfg=Black ctermbg=Green cterm=NONE
|
||||
hi TabLine ctermfg=LightYellow ctermbg=DarkGrey cterm=underline
|
||||
hi Todo ctermfg=Black ctermbg=LightRed cterm=bold
|
||||
hi ColorColumn ctermfg=NONE ctermbg=DarkRed cterm=NONE
|
||||
hi Conceal ctermfg=Grey ctermbg=DarkGrey cterm=NONE
|
||||
hi Cursor ctermfg=Black ctermbg=LightYellow cterm=NONE
|
||||
hi CursorLine ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi CursorLineNr ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi DiffAdd ctermfg=NONE ctermbg=DarkGreen cterm=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=LightRed cterm=NONE
|
||||
hi DiffDelete ctermfg=NONE ctermbg=DarkRed cterm=NONE
|
||||
hi DiffText ctermfg=NONE ctermbg=Red cterm=bold
|
||||
hi Directory ctermfg=Magenta ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg ctermfg=White ctermbg=DarkRed cterm=bold
|
||||
hi FoldColumn ctermfg=LightRed ctermbg=DarkGrey cterm=NONE
|
||||
hi Folded ctermfg=LightRed ctermbg=DarkGrey cterm=NONE
|
||||
hi IncSearch ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi LineNr ctermfg=DarkGrey ctermbg=NONE cterm=NONE
|
||||
hi MatchParen ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi MoreMsg ctermfg=Green ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=DarkCyan ctermbg=NONE cterm=NONE
|
||||
hi PmenuSbar ctermfg=NONE ctermbg=Grey cterm=NONE
|
||||
hi PmenuThumb ctermfg=NONE ctermbg=LightYellow cterm=NONE
|
||||
hi Question ctermfg=Green ctermbg=NONE cterm=NONE
|
||||
hi Search ctermfg=Black ctermbg=LightRed cterm=NONE
|
||||
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey ctermfg=LightBlue ctermbg=NONE cterm=NONE
|
||||
hi StatusLine ctermfg=LightYellow ctermbg=DarkGrey cterm=NONE
|
||||
hi StatusLineNC ctermfg=LightYellow ctermbg=Black cterm=reverse
|
||||
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi Title ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=LightYellow ctermbg=DarkGrey cterm=NONE
|
||||
hi Visual ctermfg=White ctermbg=DarkMagenta cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
|
||||
hi WarningMsg ctermfg=Red ctermbg=NONE cterm=NONE
|
||||
hi WildMenu ctermfg=Black ctermbg=Green cterm=bold
|
||||
hi Comment ctermfg=Grey ctermbg=NONE cterm=NONE
|
||||
hi Constant ctermfg=Magenta ctermbg=NONE cterm=NONE
|
||||
hi Error ctermfg=LightYellow ctermbg=Red cterm=bold
|
||||
hi Identifier ctermfg=DarkCyan ctermbg=NONE cterm=bold
|
||||
hi Ignore ctermfg=Black ctermbg=NONE cterm=NONE
|
||||
hi PreProc ctermfg=Green ctermbg=NONE cterm=NONE
|
||||
hi Special ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi Statement ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi Type ctermfg=White ctermbg=NONE cterm=NONE
|
||||
hi Underlined ctermfg=DarkBlue ctermbg=NONE cterm=underline
|
||||
hi! link lCursor Cursor
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=Grey cterm=NONE
|
||||
hi ToolbarButton ctermfg=Black ctermbg=Grey cterm=bold
|
||||
unlet s:t_Co
|
||||
finish
|
||||
endif
|
||||
|
||||
" Color: black #1d2021 0 Black
|
||||
" Color: darkred #b73935 160 DarkRed
|
||||
" Color: darkgreen #5a8471 2 DarkGreen
|
||||
" Color: orange #f7a583 216 LightRed
|
||||
" Color: darkblue #458588 24 DarkBlue
|
||||
" Color: darkmagenta #b16286 138 DarkMagenta
|
||||
" Color: darkcyan #7cafa3 30 DarkCyan
|
||||
" Color: darkgrey #a89984 239 DarkGrey
|
||||
" Color: grey #7c6f64 243 Grey
|
||||
" Color: red #ea6962 203 Red
|
||||
" Color: green #89b594 71 Green
|
||||
" Color: yellow #ffeca3 230 White
|
||||
" Color: blue #7daea3 24 DarkCyan
|
||||
" Color: magenta #d3869b 181 Magenta
|
||||
" Color: cyan #ace5d7 81 LightBlue
|
||||
" Color: white #ebdbb2 229 LightYellow
|
||||
" Term Colors: black darkred darkgreen orange darkblue darkmagenta darkcyan darkgrey
|
||||
" Term Colors: grey red green yellow blue magenta cyan white
|
||||
" Background: dark
|
||||
" vim: et ts=2 sw=2
|
206
.config/nvim/init.vim
Normal file
206
.config/nvim/init.vim
Normal file
@ -0,0 +1,206 @@
|
||||
"" Plugin stuff
|
||||
|
||||
" Vim-Plug
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Autoinstall Plug
|
||||
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
echo "Downloading junegunn/vim-plug"
|
||||
silent !curl -fLo '~/.local/share/nvim/site/autoload/plug.vim' --create-dir \
|
||||
'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
" Plugins will be downloaded under the specified directory
|
||||
call plug#begin('$HOME/.config/nvim/plugged')
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" Custom status bar
|
||||
Plug 'itchyny/lightline.vim'
|
||||
|
||||
" Language highlighting packages
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" Indentation guides
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
|
||||
" Colorscheme management
|
||||
Plug 'lifepillar/vim-colortemplate'
|
||||
|
||||
" Neovim colorizer
|
||||
Plug 'norcalli/nvim-colorizer.lua'
|
||||
|
||||
" All Plugins must be added before the following line
|
||||
call plug#end()
|
||||
|
||||
" Brief help
|
||||
" :PlugInstall - installs plugins; append `!` to update or just :PluginUpdate
|
||||
" :PlugUpdate - updates plugins
|
||||
" :PlugUpgrade - upgrades vim-plug
|
||||
" :PlugClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
||||
|
||||
" Lightline already shows the mode -> get rid of vim's default
|
||||
set noshowmode
|
||||
|
||||
" Lightline customization
|
||||
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'Tomorrow_Night_Eighties',
|
||||
\ 'active' : {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'gitbranch' ],
|
||||
\ [ 'filename', 'modified' ] ],
|
||||
\ 'right': [ [ 'readonly' ],
|
||||
\ [ 'column'],
|
||||
\ [ 'filetype' ] ],
|
||||
\ },
|
||||
\ 'subseparator': { 'left': '-'},
|
||||
\ 'component_function': {
|
||||
\ 'gitbranch': 'fugitive#head',
|
||||
\ 'modified': 'LightlineModified',
|
||||
\ 'filetype': 'LightlineFiletype'
|
||||
\ }
|
||||
\ }
|
||||
|
||||
function! LightlineModified()
|
||||
return &modifiable && &modified ? '[MO]' : ''
|
||||
endfunction
|
||||
|
||||
function! LightlineFiletype()
|
||||
return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
|
||||
endfunction
|
||||
|
||||
" Indent Guides
|
||||
let g:indent_guides_enable_on_vim_startup=1
|
||||
|
||||
"" General
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Set how many lines VIM has to remember
|
||||
set history=500
|
||||
|
||||
" Set vim update time (milliseconds)
|
||||
set updatetime=250
|
||||
|
||||
" Detect filetypes plugins and indent rules
|
||||
filetype plugin indent on
|
||||
|
||||
" To recognize groff filetype
|
||||
au BufNewFile,BufRead *.mom set filetype=groff
|
||||
|
||||
" Defining the <leader>
|
||||
let mapleader = " "
|
||||
|
||||
" Remove the pause when leaving insert mode
|
||||
set ttimeoutlen=10
|
||||
|
||||
" Set utf8 as standard encoding
|
||||
set encoding=utf-8
|
||||
|
||||
" No netrw history
|
||||
let g:netrw_dirhistmax=0
|
||||
|
||||
"" User Interface
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Sets the font
|
||||
set guifont=FuraCode\ Nerd\ Font\ Mono\ 12
|
||||
|
||||
" Shows the current position
|
||||
set number
|
||||
|
||||
" Shows line numbers relative to the cursor
|
||||
set relativenumber
|
||||
|
||||
" A buffer becomes hidden when abandonned
|
||||
set hid
|
||||
|
||||
" Highlights search results
|
||||
set hlsearch
|
||||
|
||||
" Searches before hitting ENTER
|
||||
set incsearch
|
||||
|
||||
" Shows matching brackets when cursor is over them
|
||||
set showmatch
|
||||
|
||||
" Shows the command that's being typed
|
||||
set showcmd
|
||||
|
||||
" Splits to the right
|
||||
set splitright
|
||||
|
||||
" Prevents nvim from being customized by text files commands
|
||||
set nomodeline
|
||||
|
||||
" GUI colors
|
||||
set termguicolors
|
||||
|
||||
" Colorscheme
|
||||
colorscheme polyjuice
|
||||
|
||||
"" Text, tab and indent
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Do not use spaces instead of tabs
|
||||
set noexpandtab
|
||||
|
||||
" But be smart with tabs
|
||||
set smarttab
|
||||
|
||||
" 1 tab = 4 spaces
|
||||
set tabstop=4
|
||||
set shiftwidth=4 "for indent operations
|
||||
|
||||
" Indent and wrap rules
|
||||
set autoindent
|
||||
set wrap "wrap lines
|
||||
|
||||
" Stop auto-commenting new line
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
" Change cursor behaviour when entering insert mode
|
||||
let &t_SI.="\e[6 q" "SI = INSERT mode // steady bar
|
||||
let &t_SR.="\e[4 q" "SR = REPLACE mode // underline
|
||||
|
||||
" Enable autocompletion
|
||||
set wildmode=longest,full
|
||||
|
||||
" Automatically remove all trailing whitespaces on save
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
|
||||
"" Status line
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
"" Macros
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Source files
|
||||
noremap <leader>s :source ~/.config/nvim/init.vim <CR>
|
||||
|
||||
" Circle through buffers
|
||||
noremap <leader>n :bn
|
||||
noremap <leader>p :bp
|
||||
|
||||
" Clear the search highlight
|
||||
noremap <leader>q :nohl<CR>
|
||||
|
||||
" Make use of xclipboard
|
||||
nnoremap <leader>v "+p
|
||||
vnoremap <leader>c "+y
|
||||
|
||||
" Compile document
|
||||
noremap <leader><Enter> :w! \| !compiler %<CR>
|
||||
|
||||
" Compile mom folder into pdf
|
||||
noremap <leader>m :w! \| !mommerge<CR>
|
||||
|
||||
" Plugin management
|
||||
noremap <leader>pi :PlugInstall<CR>
|
||||
noremap <leader>pc :PlugClean<CR>
|
||||
noremap <leader>pu :PlugUpdate \| PlugUpgrade<CR>
|
||||
|
||||
" Fugitive
|
||||
noremap <leader>gd :Gdiffsplit<CR>
|
||||
noremap <leader>gb :Gblame<CR>
|
||||
|
||||
" Colorize
|
||||
noremap <leader>cc :ColorizerToggle<CR>
|
141
.config/nvim/polyjuice.colortemplate
Normal file
141
.config/nvim/polyjuice.colortemplate
Normal file
@ -0,0 +1,141 @@
|
||||
# vim: ft=colortemplate fdm=marker cc=22,42,60 et ts=2 sw=2
|
||||
|
||||
# Information {{{
|
||||
Full name: Polyjuice
|
||||
Short name: polyjuice
|
||||
Author: David JULIEN <swy7ch@protonmail.com>
|
||||
Maintainer: David JULIEN <swy7ch@protonmail.com>
|
||||
Website: https://github.com/vim/vim/blob/master/src/syntax.c
|
||||
Description: A simple yet customizable pastel colorscheme
|
||||
# }}}
|
||||
|
||||
# Color palette {{{
|
||||
# Color name GUI Base256 Base16
|
||||
Color: black #1d2021 0 Black
|
||||
Color: darkred #b73935 160 DarkRed
|
||||
Color: darkgreen #5a8471 2 DarkGreen
|
||||
Color: orange #f7a583 216 LightRed
|
||||
Color: darkblue #458588 24 DarkBlue
|
||||
Color: darkmagenta #b16286 138 DarkMagenta
|
||||
Color: darkcyan #7cafa3 30 DarkCyan
|
||||
Color: darkgrey #a89984 239 DarkGrey
|
||||
Color: grey #7c6f64 243 Grey
|
||||
Color: red #ea6962 203 Red
|
||||
Color: green #89b594 71 Green
|
||||
Color: yellow #ffeca3 230 White
|
||||
Color: blue #7daea3 24 DarkCyan
|
||||
Color: magenta #d3869b 181 Magenta
|
||||
Color: cyan #ace5d7 81 LightBlue
|
||||
Color: white #ebdbb2 229 LightYellow
|
||||
# }}}
|
||||
|
||||
# Terminal colors {{{
|
||||
# Vim by default does not define g:terminal_ansi_colors
|
||||
Term Colors: black darkred darkgreen orange darkblue darkmagenta darkcyan darkgrey
|
||||
Term Colors: grey red green yellow blue magenta cyan white
|
||||
# }}}
|
||||
|
||||
# Common linked groups {{{
|
||||
EndOfBuffer -> NonText
|
||||
QuickFixLine -> Search
|
||||
Boolean -> Constant
|
||||
Character -> Constant
|
||||
Conditional -> Statement
|
||||
Define -> PreProc
|
||||
Debug -> Special
|
||||
Delimiter -> Special
|
||||
Exception -> Statement
|
||||
Float -> Number
|
||||
Function -> Identifier
|
||||
Include -> PreProc
|
||||
Keyword -> Statement
|
||||
Label -> Statement
|
||||
Macro -> PreProc
|
||||
Number -> Constant
|
||||
Operator -> Statement
|
||||
PreCondit -> PreProc
|
||||
Repeat -> Statement
|
||||
SpecialChar -> Special
|
||||
SpecialComment -> Special
|
||||
StorageClass -> Type
|
||||
String -> Constant
|
||||
Structure -> Type
|
||||
Tag -> Special
|
||||
Typedef -> Type
|
||||
# }}}
|
||||
|
||||
Background: dark
|
||||
|
||||
# Default highlight groups for dark variant {{{
|
||||
|
||||
# NOTE: Vim's default does not define Normal
|
||||
|
||||
Variant: gui 256 8
|
||||
|
||||
# Group Foreground Background Attributes
|
||||
Normal white none
|
||||
Terminal white black
|
||||
Pmenu white black
|
||||
PmenuSel black green bold
|
||||
SpellBad red none underline
|
||||
SpellCap blue none
|
||||
SpellLocal cyan none
|
||||
SpellRare orange none
|
||||
StatusLineTerm black green bold
|
||||
StatusLineNC black green
|
||||
TabLine white darkgrey underline
|
||||
Todo black orange bold
|
||||
ColorColumn none darkred
|
||||
Conceal grey darkgrey
|
||||
# NOTE: Vim's default does not define Cursor/lCursor in the terminal
|
||||
Cursor black white
|
||||
CursorLine none darkgrey
|
||||
CursorColumn none darkgrey
|
||||
CursorLineNr orange none g=bold
|
||||
DiffAdd none darkgreen
|
||||
DiffChange none orange
|
||||
DiffDelete none darkred g=bold
|
||||
DiffText none red bold
|
||||
Directory magenta none
|
||||
ErrorMsg yellow darkred bold
|
||||
FoldColumn orange darkgrey
|
||||
Folded orange darkgrey
|
||||
IncSearch none none reverse
|
||||
LineNr darkgrey none
|
||||
MatchParen none none reverse
|
||||
ModeMsg none none bold
|
||||
MoreMsg green none g=bold
|
||||
NonText blue none g=bold
|
||||
PmenuSbar none grey
|
||||
PmenuThumb none white
|
||||
Question green none g=bold
|
||||
Search black orange
|
||||
SignColumn none none
|
||||
SpecialKey cyan none
|
||||
StatusLine white darkgrey
|
||||
StatusLineNC white black reverse
|
||||
TabLineFill none none
|
||||
TabLineSel none none bold
|
||||
Title orange none g=bold
|
||||
VertSplit white darkgrey
|
||||
Visual yellow darkmagenta
|
||||
VisualNOS none none underline,bold
|
||||
WarningMsg red none
|
||||
WildMenu black green bold
|
||||
# Other conventional group names (see `:help group-name`)
|
||||
Comment grey none
|
||||
Constant magenta none
|
||||
Error white red bold
|
||||
Identifier blue none bold
|
||||
Ignore black none
|
||||
PreProc green none
|
||||
Special orange none
|
||||
Statement orange none g=bold
|
||||
Type yellow none g=bold
|
||||
Underlined darkblue none underline
|
||||
# See `:help lCursor`
|
||||
lCursor -> Cursor
|
||||
# See `:help window-toolbar`
|
||||
ToolbarLine none grey
|
||||
ToolbarButton black grey bold
|
||||
# }}}
|
10
.config/nvim/spell/fr.utf-8.add
Normal file
10
.config/nvim/spell/fr.utf-8.add
Normal file
@ -0,0 +1,10 @@
|
||||
metadata
|
||||
autrice
|
||||
l'autrice
|
||||
rice
|
||||
Gaudé
|
||||
Laurent
|
||||
Kerangal
|
||||
Maylis
|
||||
d'Informatique
|
||||
Andréas
|
11
.config/pacman/hooks/cache_cleanup.hook
Normal file
11
.config/pacman/hooks/cache_cleanup.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Operation = Remove
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = *
|
||||
|
||||
[Action]
|
||||
Description = Keep the last cache and the currently installed.
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/paccache -rvk2
|
11
.config/pacman/hooks/dashbinsh.hook
Normal file
11
.config/pacman/hooks/dashbinsh.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Package
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = bash
|
||||
|
||||
[Action]
|
||||
Description = Re-pointing /bin/sh symlink to dash...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/ln -sfT dash /usr/bin/sh
|
||||
Depends = dash
|
9
.config/redshift/redshift.conf
Normal file
9
.config/redshift/redshift.conf
Normal file
@ -0,0 +1,9 @@
|
||||
[redshift]
|
||||
temp-day=6500
|
||||
temp-night=4200
|
||||
adjustment-method=randr
|
||||
location-provider=manual
|
||||
|
||||
[manual]
|
||||
lat=45.18
|
||||
lon=5.72
|
101
.config/root/etc_pacman.conf
Normal file
101
.config/root/etc_pacman.conf
Normal file
@ -0,0 +1,101 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
HookDir = /config/pacman/hooks
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
#UseDelta = 0.7
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
TotalDownload
|
||||
CheckSpace
|
||||
VerbosePkgLists
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Arch Linux
|
||||
# packagers with `pacman-key --populate archlinux`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[community-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[community]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[multilib]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
|
2
.config/root/etc_udev_rules.d_backlight.rules
Normal file
2
.config/root/etc_udev_rules.d_backlight.rules
Normal file
@ -0,0 +1,2 @@
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
46
.config/sxhkd/sxhkdrc
Normal file
46
.config/sxhkd/sxhkdrc
Normal file
@ -0,0 +1,46 @@
|
||||
# Swy7ch' sxhkd bindings binding
|
||||
|
||||
# System stuff
|
||||
|
||||
{F1, F2, F3}
|
||||
pamixer {--toggle-mute, --decrease 5, --increase 5}; refbar; audio_notify
|
||||
|
||||
{F5, F6}
|
||||
sbacklight {dec,inc}
|
||||
|
||||
super + u
|
||||
dmenumount
|
||||
|
||||
super + shift + u
|
||||
dmenuumount
|
||||
|
||||
super + shift + s
|
||||
dmenuprompt "shutdown?" "shutdown -h now"
|
||||
|
||||
super + shift + r
|
||||
dmenuprompt "reboot?" "reboot"
|
||||
|
||||
super + shift + d
|
||||
displayselect
|
||||
|
||||
super + shift + space
|
||||
kbacklight
|
||||
|
||||
super + shift + o
|
||||
dmenuopen
|
||||
|
||||
# Others
|
||||
super + Return
|
||||
$TERMINAL
|
||||
|
||||
super + d
|
||||
dmenu_run -p "run:"
|
||||
|
||||
super + shift + {w,z}
|
||||
$BROWSER
|
||||
|
||||
super + shift + p
|
||||
$BROWSER --incognito
|
||||
|
||||
super + shift + b
|
||||
script="$(printf "bibinput\nbibshow" | dmenu -i -p "which script?")" && $script
|
86
.config/zsh/.zshrc
Normal file
86
.config/zsh/.zshrc
Normal file
@ -0,0 +1,86 @@
|
||||
# Swy7ch' config for the Zoomer Shell
|
||||
# based on Luke Smith' work (lukesmith.xyz)
|
||||
|
||||
# Enable colors and change prompt:
|
||||
autoload -U colors && colors
|
||||
PS1="[ %B%{$fg[magenta]%}%(4~|%-1~/.../%2~|%~)%}%{$reset_color%} ] $%b "
|
||||
|
||||
# Home/End/Insert/Del keys
|
||||
bindkey '^[[P' delete-char # Delete
|
||||
bindkey '^[[H' beginning-of-line # Home
|
||||
bindkey '^[[4~' end-of-line # End
|
||||
bindkey '^[[5~' up-line-or-history # PageUp
|
||||
bindkey '^[[6~' down-line-or-history # PageDown
|
||||
|
||||
# Git infos on the right
|
||||
autoload -Uz vcs_info
|
||||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
RPROMPT=\$vcs_info_msg_0_
|
||||
zstyle ':vcs_info:git:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' stagedstr '*'
|
||||
zstyle ':vcs_info:git:*' unstagedstr '!'
|
||||
zstyle ':vcs_info:git:*' formats '%F{214}%r%f %F{208}(%b): %c/%u'
|
||||
zstyle ':vcs_info:*' enable git
|
||||
|
||||
# History in cache directory:
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=~/.cache/zsh/history
|
||||
|
||||
# Basic auto/tab complete:
|
||||
autoload -U compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zmodload zsh/complist
|
||||
compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
|
||||
# vi mode
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# Use vim keys in tab complete menu:
|
||||
bindkey -M menuselect 'h' vi-backward-char
|
||||
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||
bindkey -M menuselect 'l' vi-forward-char
|
||||
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||
bindkey -v '^?' backward-delete-char
|
||||
|
||||
# Use arrows to search through history
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
# Change cursor shape for different vi modes.
|
||||
function zle-keymap-select {
|
||||
if [[ ${KEYMAP} == vicmd ]] ||
|
||||
[[ $1 = 'block' ]]; then
|
||||
echo -ne '\e[1 q'
|
||||
elif [[ ${KEYMAP} == main ]] ||
|
||||
[[ ${KEYMAP} == viins ]] ||
|
||||
[[ ${KEYMAP} = '' ]] ||
|
||||
[[ $1 = 'beam' ]]; then
|
||||
echo -ne '\e[5 q'
|
||||
fi
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||
echo -ne "\e[5 q"
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
||||
|
||||
# Load aliases and shortcuts if existent.
|
||||
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
||||
|
||||
# Load zsh-history-search
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
|
||||
|
||||
# Load zsh-syntax-highlighting
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
||||
typeset -A ZSH_HIGHLIGHT_STYLES
|
||||
ZSH_HIGHLIGHT_STYLES[alias]='fg=green,bold'
|
||||
ZSH_HIGHLIGHT_STYLES[path]='fg=magenta,bold'
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]='bg=red,fg=white,bold'
|
30
.local/bin/AC_notify
Executable file
30
.local/bin/AC_notify
Executable file
@ -0,0 +1,30 @@
|
||||
#! /bin/sh
|
||||
# Sends a notification if AC is plugged in (or out)
|
||||
# Also refreshes statusbar
|
||||
|
||||
new_state="$(cat /sys/class/power_supply/AC/online)"
|
||||
prev_state="$new_state"
|
||||
|
||||
notify() { \
|
||||
# $1 is $new_state
|
||||
if [ "$1" = 1 ]; then
|
||||
notify-send -u "normal" "AC plugged in - CHARGING"
|
||||
else
|
||||
notify-send -u "critical" "AC unplugged ! - DISCHARGING"
|
||||
fi
|
||||
}
|
||||
|
||||
update(){ \
|
||||
new_state="$(cat /sys/class/power_supply/AC/online)"
|
||||
if [ "$prev_state" != "$new_state" ]; then
|
||||
notify "$new_state" && refbar
|
||||
fi
|
||||
prev_state="$new_state"
|
||||
}
|
||||
|
||||
while :; do
|
||||
update
|
||||
# Sleep for 5s seconds before checking again
|
||||
sleep 5 &
|
||||
wait
|
||||
done
|
46
.local/bin/README.md
Normal file
46
.local/bin/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Swy7ch' personnal scripts
|
||||
|
||||
**Hello, world!** This is my scripts directory. Feel free to use it at your convenience :)
|
||||
|
||||
**/!\\** Those scripts are POSIX-compliant (hence `#! /bin/sh`), they are supposed to be run with such shell (BaSH, zsh, dash...); FISH, for example, might cause problems (with `if` statements, for instance) if a script is run directly in a terminal; I recommend launching background scripts within `.xinit` to avoid those issues
|
||||
|
||||
## Scripts
|
||||
|
||||
- arch_setup : my personnal machine setup script
|
||||
- AC_notify : send a notification when the computer is plugged/unplugged
|
||||
- audio-notify : send a notification when audio level is changed
|
||||
- backlight : change backlight level
|
||||
- backlight_notify : send a notification when backlight level is changed
|
||||
- bat_notify : send a notification when battery runs low
|
||||
- bibinput : add a **.bib** entry through `dmenu`
|
||||
- bibshow : retrieve a **.bib** reference and copy to `xclip`
|
||||
- brightup : raise the keyboard brightness
|
||||
- colorblocks : show the system colors through colored squares
|
||||
- compiler : compile a file / runs a script if the filetype is supported
|
||||
- displayselect : handle a multimonitor setup
|
||||
- dmenupass : `dmenu` prompt for password, when needed
|
||||
- dmenuprompt : ask for a binary choice through `dmenu`
|
||||
- dmenumount : mount USB drives through a `dmenu` prompt
|
||||
- dmenuumount : unmount USB drives through a `dmenu` prompt
|
||||
- dmenuopen : fuzzy-find a file and open it with appropriate application
|
||||
- dot : git wrapper to manage dotfiles
|
||||
- dwmbar : set the statusbar and updates every minute
|
||||
- maker : create a basic makefile for **C/C++** project
|
||||
- mom : create a `groff/mom` file with generic metadata
|
||||
- mommerge : merge all **.mom** files of a directory and compiles it
|
||||
- refbar : refresh `dwm` statusbar
|
||||
- setbg : set the wallpaper using `xwallpaper`
|
||||
- texclear : remove `LaTeX` compilation files
|
||||
- texer : create a **.tex** file with generic metadata + input packages
|
||||
- webupdate : update the files on my website
|
||||
|
||||
## arch_setup
|
||||
|
||||
This is the shell script I run just after I installed Arch. It does few things:
|
||||
|
||||
### What it does:
|
||||
|
||||
* Install the apps I use
|
||||
* Download my personnal repos
|
||||
* Compile my WM (`dwm`), my binary launcher (`dmenu`) and my terminal emulator (`st`), which are part of the [suckless](https://suckless.org/) project.
|
||||
|
159
.local/bin/arch_setup
Executable file
159
.local/bin/arch_setup
Executable file
@ -0,0 +1,159 @@
|
||||
#! /bin/sh
|
||||
# This script has three goals:
|
||||
# 1. cloning personnal git repos
|
||||
# 2. building tools (suckless' utilities)
|
||||
# 3. enabling systemctl services
|
||||
|
||||
#Lists of apps sorted by type and criticity
|
||||
base_list="dash xorg-server xorg-xinit xorg-xinput xsetroot sxhkd i3lock xss-lock zsh neovim gtk2 brave"
|
||||
utilities_list="xf86-video-intel pulseaudio pulseaudio-alsa pamixer xprop zsh-syntax-highlighting zsh-history-substring-search dunst dunstify libnotify sxiv xwallpaper redshift htop ffmpeg imagemagick upower pacman-contrib"
|
||||
fonts_list="fira adobe-source-han-sans-jp-fonts adobe-source-han-sans-cn"
|
||||
media_list="mpv zathura"
|
||||
other_list="transmission-gtk texlive-core texlive-bin texlive-latexetra"
|
||||
|
||||
git_list="st dwm dmenu"
|
||||
|
||||
build_list="st dwm dmenu"
|
||||
|
||||
services_list="netctl-auto@wlp4s0 systemd-timescyncd"
|
||||
|
||||
|
||||
git_clone() {
|
||||
git clone https://gitlab.com/swy7ch/$1 ~/suckless/$1
|
||||
echo "$1 downloaded!"
|
||||
cd ~/$1
|
||||
git remote set-url origin git@gitlab.com:swy7ch/$1
|
||||
if [ "dotfiles" != $1 ]
|
||||
git remote add upstream git://git.suckless.org/$1
|
||||
echo "$1 setup complete!"
|
||||
fi
|
||||
cd
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ~/$1
|
||||
sudo make clean install
|
||||
echo "$1 compilation complete!"
|
||||
}
|
||||
|
||||
install() {
|
||||
read -p "Installing $APP? (y/N)" validation
|
||||
if [ $validation = "y" ]; then
|
||||
yay -S $APP
|
||||
else
|
||||
echo "Skipping $APP"
|
||||
fi
|
||||
}
|
||||
|
||||
enable_systemctl() {
|
||||
sudo systemctl enable $1.service
|
||||
}
|
||||
|
||||
##################################################
|
||||
############# Let's get things done ##############
|
||||
##################################################
|
||||
|
||||
|
||||
|
||||
echo "Configuring Arch..."
|
||||
|
||||
# Retrieving yay
|
||||
# We need git
|
||||
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
cd yay
|
||||
makepkg -si
|
||||
|
||||
echo "YAY is here !"
|
||||
|
||||
cd ~
|
||||
|
||||
echo "Let's get the other apps"
|
||||
|
||||
# Installing apps
|
||||
|
||||
echo "Installing base"
|
||||
|
||||
for app in $base_list; do
|
||||
install $app
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Installing utilitaries"
|
||||
|
||||
for app in $utilities_list; do
|
||||
install $app
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Installing fonts"
|
||||
|
||||
for app in $fonts_list; do
|
||||
install $app
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Installing media apps"
|
||||
|
||||
for app in $media_list; do
|
||||
install $app
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Installing other apps"
|
||||
|
||||
for app in $other_list; do
|
||||
install $app
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Installing vim-plug"
|
||||
|
||||
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Installation complete !"
|
||||
|
||||
# Symlinking the necessary stuff
|
||||
|
||||
echo "Downloading personnal git repos..."
|
||||
|
||||
for repo in $git_list; do
|
||||
git_clone $repo
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo "Compiling tools..."
|
||||
|
||||
for tool in $build_list; do
|
||||
build $tool
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "!!! Don't forget to link an SSH key to your account !!!"
|
||||
echo "!!! As of now, you can't pull nor push anything !!!"
|
||||
echo ""
|
||||
|
||||
echo "Enabling systemctl services"
|
||||
|
||||
for service in $services_list; do
|
||||
enable_systemctl $service
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "##################################################"
|
||||
echo ""
|
||||
|
||||
echo "Configuration complete !"
|
22
.local/bin/audio_notify
Executable file
22
.local/bin/audio_notify
Executable file
@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
# Is called when changing sound level
|
||||
# Sends a notification with the current sound level
|
||||
|
||||
level=$(pamixer --get-volume)
|
||||
muted=$(pamixer --get-mute)
|
||||
|
||||
if [ "$muted" = "true" ]; then
|
||||
dunstify -r 100002 "Sound muted" "$level%"
|
||||
else
|
||||
case "$level" in
|
||||
[0-9]) criticity="low" ;;
|
||||
1[0-9]|2[0-9]) criticity="low" ;;
|
||||
3[0-9]|4[0-9]) criticity="low" ;;
|
||||
5[0-9]|6[0-9]) criticity="normal" ;;
|
||||
7[0-9]) criticity="normal" ;;
|
||||
8[0-9]|9[0-9]) criticity="critical" ;;
|
||||
10[0-9]) criticity="critical" ;;
|
||||
esac
|
||||
|
||||
dunstify -r 100002 -u "$criticity" "Current pamixer value :" "$level%"
|
||||
fi
|
11
.local/bin/backlight_notify
Executable file
11
.local/bin/backlight_notify
Executable file
@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
# Is called when changing backlight value
|
||||
# Sens a notification with the current xbaclight value
|
||||
|
||||
current=$(cat /sys/class/backlight/intel_backlight/brightness)
|
||||
max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
|
||||
step=$(expr $max / 20)
|
||||
|
||||
level=$(expr $(expr $current / $step) \* 5)
|
||||
|
||||
dunstify -r 100001 -u "low" "Current xBacklight value :" "$level%"
|
28
.local/bin/bat_notify
Executable file
28
.local/bin/bat_notify
Executable file
@ -0,0 +1,28 @@
|
||||
#! /bin/sh
|
||||
# Checks the battery, sends a notification depending on the level
|
||||
|
||||
notify() { \
|
||||
for x in /sys/class/power_supply/BAT?/capacity;
|
||||
do
|
||||
case "$(cat "$x")" in
|
||||
1[0-9]) notify-send -u "normal" "Battery is running low ($(cat "$x")%)" "Please plug your computer to a power source" ;;
|
||||
[0-9]) notify-send -u "critical" "Battery is dangerously low ($(cat "$x")%)" "Please plug your computer to a power source - <b>NOW!</b>" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
update() { \
|
||||
# We want the notification to be sent every 2 mins
|
||||
# But only if the computer is unplugged
|
||||
if [ "$(cat /sys/class/power_supply/AC/online)" = 0 ]; then
|
||||
notify && refbar
|
||||
fi
|
||||
wait
|
||||
}
|
||||
|
||||
while :; do
|
||||
update
|
||||
# Sleep for two minutes before sending another notification
|
||||
sleep 120 &
|
||||
wait
|
||||
done
|
112
.local/bin/bibinput
Executable file
112
.local/bin/bibinput
Executable file
@ -0,0 +1,112 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Create an entry in $HOME/documents/bibliographies/selected_bibliography.bib
|
||||
# Interactive script, dialog via dmenu
|
||||
|
||||
parse(){
|
||||
if [ "$1" = "@" ]; then
|
||||
cat "$file" | grep "$1" | awk -F '{' '{print $2} ' | tr ',' '\n' | sort -r | sed '/^[[:space:]]*$/d'
|
||||
elif [ "$1" = "keywords" ]; then
|
||||
cat "$file" | grep "$1" | awk -F '"' '{print $2} ' | tr ' ' '\n' | sed 's/,//g' | sort -u | sed '/^[[:space:]]*$/d'
|
||||
else
|
||||
cat "$file" | grep "$1" | sed "s/,$//g" | awk -F '"' '{print $2} ' | sort | uniq
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
input() {
|
||||
if [ "$1" = "reference" ]; then
|
||||
refinput | dmenu -i -p 'reference?' -l 10
|
||||
elif [ "$1" = "doctype" ]; then
|
||||
printf "$doctypes" | sed "s| |\n|g" | dmenu -i -p 'doctype?'
|
||||
elif [ "$1" = "author" ]; then
|
||||
parse "author" | dmenu -i -p 'author name? (surname, first name)' -l 10
|
||||
elif [ "$1" = "keywords" ]; then
|
||||
parse "keywords" | dmenu -i -p "keywords? {$keywords}" -l 10
|
||||
else
|
||||
parse "$1" | dmenu -i -p "$1?" -l 10
|
||||
fi
|
||||
}
|
||||
|
||||
refinput(){
|
||||
echo "ref$(cat "$file" | grep '@' | wc -l | awk '{printf $1}')" && parse "@"
|
||||
}
|
||||
|
||||
doctypes="article book online techreport"
|
||||
base="$(basename "$(find $HOME/documents/bibliographies/ -type f -not -path '*/\.*' | dmenu -l 20 -p "[bibinput] which bibliography?")")" # the -not -path allows find to ignore hidden files
|
||||
|
||||
[ -z "$base" ] && exit 1
|
||||
|
||||
file="$HOME/documents/bibliographies/"$base
|
||||
|
||||
refs="$(cat "$file" | grep "@" | sed "s/,$//g" | awk -F '{' '{print $2}' | tr '\n' ' ')"
|
||||
|
||||
# if the file does not exist, creates it
|
||||
if [ ! -e "$file" ]; then
|
||||
mkfile="$(printf "No\\nYes" | dmenu -i -p "$file does not exist. Create it?")"
|
||||
[ "$mkfile" = "Yes" ] && (touch "$file")
|
||||
fi
|
||||
|
||||
doctype="$(input "doctype")"
|
||||
[ -z "$doctype" ] && exit 1
|
||||
reference="$(input "reference")"
|
||||
[ -z "$reference" ] && exit 1
|
||||
while [ "${refs#*"$reference"}" != "$refs" ]; do
|
||||
reference="$(refinput | dmenu -i -p 'ref already exist, please provide another' -l 10)"
|
||||
[ -z "$refname" ] && exit 1
|
||||
done
|
||||
author="$(input "author")"
|
||||
[ -z "$author" ] && exit 1
|
||||
title="$(input "title")"
|
||||
[ -z "$title" ] && exit 1
|
||||
year="$(input "year")"
|
||||
[ -z "$year" ] && exit 1
|
||||
if [ "article" == "$doctype" ]; then
|
||||
journal="$(input "journal")"
|
||||
[ -z "$journal" ] && exit 1
|
||||
volume="$(input "volume")"
|
||||
fi
|
||||
if [ "$doctype" = "book" ]; then
|
||||
publisher="$(input "publisher")"
|
||||
[ -z "$publisher" ] && exit 1
|
||||
fi
|
||||
if [ "$doctype" = "online" ]; then
|
||||
url="{URL}"
|
||||
fi
|
||||
if [ "$doctype" = "techreport" ]; then
|
||||
institution="$(input "institution")"
|
||||
[ -z "$institution" ] && exit 1
|
||||
fi
|
||||
keyword="$(input "keywords")"
|
||||
keywords=$keyword
|
||||
if [ -z "$keyword" ]; then
|
||||
keyword_test="no"
|
||||
else
|
||||
keyword_test="$(printf "yes\nno" |dmenu -p "another keyword?")"
|
||||
keyword_test=${keyword_test:-no}
|
||||
fi
|
||||
while [ "$keyword_test" = "yes" ]; do
|
||||
keyword="$(input "keywords")"
|
||||
if [ -z "$keyword" ];then
|
||||
keyword_test="no"
|
||||
elif [ "${keywords#*"$keyword"}" != "$keywords" ]; then
|
||||
keyword_test="$(printf "yes\nno" |dmenu -p "keyword already given. another keyword?")"
|
||||
keyword_test=${keyword_test:-no}
|
||||
else
|
||||
keywords="$keywords, $keyword"
|
||||
keyword_test="$(printf "yes\nno" |dmenu -p "another keyword?")"
|
||||
keyword_test=${keyword_test:-no}
|
||||
fi
|
||||
done
|
||||
|
||||
echo "@$doctype{"$reference"," >> "$file"
|
||||
echo -e "\tauthor = \"$author\"," >> "$file"
|
||||
echo -e "\ttitle = \"$title\"," >> "$file"
|
||||
echo -e "\tyear = \"$year\"," >> "$file"
|
||||
[ -n "$journal" ] && echo -e "\tjournal = \"$journal\"," >> "$file"
|
||||
[ -n "$volume" ] && echo -e "\tvolume = \"$volume\"," >> "$file"
|
||||
[ -n "$publisher" ] && echo -e "\tpublisher = \"$publisher\"," >> "$file"
|
||||
[ -n "$url" ] && echo -e "\turl = \"$url\"," >> "$file"
|
||||
[ -n "$institution" ] && echo -e "\tinstitution = \"$institution\"," >> "$file"
|
||||
echo -e "\tkeywords = \"$keywords\"" >> "$file"
|
||||
echo "}" >> "$file"
|
19
.local/bin/bibshow
Executable file
19
.local/bin/bibshow
Executable file
@ -0,0 +1,19 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Show the reference of a .bib entry
|
||||
|
||||
# User inputs informations, this will show the content of an entry through dmenu
|
||||
|
||||
|
||||
file="$(find $HOME/documents/bibliographies/ -type f -not -path '*/\.*' | dmenu -l 20 -p "[bibshow] which bibliography?")" # the -not -path allows find to ignore hidden files
|
||||
|
||||
refs_list="$(cat "$file" | sed 's/\t//g' | tr '\n' ' ' | sed 's/}\ /}\n/g')"
|
||||
[ -z $refs_list ] && exit 1;
|
||||
|
||||
ref="$(echo "$refs_list" | dmenu -i -p 'infos?' -l 10)"
|
||||
[ -z $ref ] && exit 1;
|
||||
|
||||
output="$(echo "$ref" | sed 's/author/\n author/g' | sed 's/",/",\n/g')"
|
||||
|
||||
echo "$output" | dmenu -i -p "infos" -l 20
|
||||
echo "$ref" | awk -F '{' '{print $2}' | awk -F ',' '{print $1}' | xclip -selection clipboard
|
22
.local/bin/colorblocks
Executable file
22
.local/bin/colorblocks
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# This script will show the terminal colourscheme as blocks
|
||||
# All credits to u/deepjyoti30 on GitHub
|
||||
|
||||
f=3 b=4
|
||||
for j in f b; do
|
||||
for i in {0..7}; do
|
||||
printf -v $j$i %b "\e[${!j}${i}m"
|
||||
done
|
||||
done
|
||||
d=$'\e[1m'
|
||||
t=$'\e[0m'
|
||||
v=$'\e[7m'
|
||||
|
||||
cat << EOF
|
||||
|
||||
$f1██████$d██$t $f2██████$d██$t $f3██████$d██$t $f4██████$d██$t $f5██████$d██$t $f6██████$d██$t
|
||||
$f1██████$d██$t $f2██████$d██$t $f3██████$d██$t $f4██████$d██$t $f5██████$d██$t $f6██████$d██$t
|
||||
$f1██████$d██$t $f2██████$d██$t $f3██████$d██$t $f4██████$d██$t $f5██████$d██$t $f6██████$d██$t
|
||||
$ft██████$d$f7██$t $ft██████$d$f7██$t $ft██████$d$f7██$t $ft██████$d$f7██$t $ft██████$d$f7██$t $ft██████$d$f7██$t
|
||||
|
||||
EOF
|
48
.local/bin/compiler
Executable file
48
.local/bin/compiler
Executable file
@ -0,0 +1,48 @@
|
||||
#! /bin/sh
|
||||
# This script will compile or run another finishing operation on a document
|
||||
# It is meant to be run via vim/neovim
|
||||
# Adapted form the work of Luke Smith (lukesmith.xyz)
|
||||
|
||||
# groff-mom files : Compiles via pdfmom to a pdf document
|
||||
# c files : Compiles via gcc
|
||||
# config.def.h (-> suckless) recompiles and install the program
|
||||
# tex files : Compiles via pdflatex (biblatex if needed)
|
||||
|
||||
file=$(readlink -f "$1")
|
||||
dir=$(dirname "$file")
|
||||
base="$(echo "${file%.*}" | awk -F '/' '{printf $NF}')"
|
||||
shebang=$(sed -n 1p "$file")
|
||||
|
||||
cd "$dir" || exit
|
||||
|
||||
shebangtest()
|
||||
{
|
||||
case "$shebang" in
|
||||
\#\!*) "$file" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
textype() { \
|
||||
bibliography="$(cat "$file" | grep '\bibliography')"
|
||||
if [ -n "$bibliography" ]; then
|
||||
pdflatex --output-directory="$dir" "$base" &&
|
||||
bibtex "$base" &&
|
||||
pdflatex --output-directory="$dir" "$base" &&
|
||||
pdflatex --output-directory="$dir" "$base"
|
||||
else
|
||||
pdflatex --output-directory="$dir" "$base" &&
|
||||
pdflatex --output-directory="$dir" "$base"
|
||||
fi
|
||||
texclear "$file"
|
||||
}
|
||||
|
||||
case "$file" in
|
||||
*config.def.h) sudo make clean install && rm -f config.h ;;
|
||||
*config.h) echo "" && echo "You should build from config.def.h !" ;;
|
||||
*\.c*) make && ./main ;;
|
||||
*\.h*) make && ./main ;;
|
||||
*\.mom) refer -PS -e "$file" | pdfmom > "$base.pdf" ;;
|
||||
*\.tex) textype "$base" ;;
|
||||
*\.py) python "$file" ;;
|
||||
*) shebangtest ;;
|
||||
esac
|
73
.local/bin/displayselect
Executable file
73
.local/bin/displayselect
Executable file
@ -0,0 +1,73 @@
|
||||
#! /bin/sh
|
||||
|
||||
# All credits to Luke Smith (lukesmith.xyz)
|
||||
|
||||
# A UI for detecting and selecting all displays. Probes xrandr for connected
|
||||
# displays and lets user select one to use. User may also select "manual
|
||||
# selection" which opens arandr.
|
||||
|
||||
twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||
|
||||
mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
|
||||
# Mirror displays using native resolution of external display and a scaled
|
||||
# version for the internal display
|
||||
if [ "$mirror" = "yes" ]; then
|
||||
external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
|
||||
internal=$(echo "$screens" | grep -v "$external")
|
||||
|
||||
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
|
||||
tail -n 1 | awk '{print $1}')
|
||||
res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
|
||||
tail -n 1 | awk '{print $1}')
|
||||
|
||||
res_ext_x=$(echo $res_external | sed 's/x.*//')
|
||||
res_ext_y=$(echo $res_external | sed 's/.*x//')
|
||||
res_int_x=$(echo $res_internal | sed 's/x.*//')
|
||||
res_int_y=$(echo $res_internal | sed 's/.*x//')
|
||||
|
||||
scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
|
||||
scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
|
||||
|
||||
xrandr --output "$external" --auto --scale 1.0x1.0 \
|
||||
--output "$internal" --auto --same-as "$external" \
|
||||
--scale "$scale_x"x"$scale_y"
|
||||
else
|
||||
|
||||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
|
||||
secondary=$(echo "$screens" | grep -v "$primary")
|
||||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
fi
|
||||
}
|
||||
|
||||
morescreen() { # If multi-monitor is selected and there are more than two screens.
|
||||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
|
||||
secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
|
||||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
|
||||
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
|
||||
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
|
||||
}
|
||||
|
||||
multimon() { # Multi-monitor handler.
|
||||
case "$(echo "$screens" | wc -l)" in
|
||||
1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
||||
2) twoscreen ;;
|
||||
*) morescreen ;;
|
||||
esac ;}
|
||||
|
||||
# Get all possible displays
|
||||
allposs=$(xrandr -q | grep "connected")
|
||||
|
||||
# Get all connected screens.
|
||||
screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
|
||||
|
||||
# Get user choice including multi-monitor and manual selection:
|
||||
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
|
||||
case "$chosen" in
|
||||
"manual selection") arandr ; exit ;;
|
||||
"multi-monitor") multimon ;;
|
||||
*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
||||
esac
|
||||
|
||||
setbg # Fix background if screen size/arangement has changed.
|
||||
pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen
|
39
.local/bin/dmenumount
Executable file
39
.local/bin/dmenumount
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Gives a dmenu prompt to mount unmounted drives. If they're in /etc/fstab
|
||||
# they'll be mounted automatically. Otherwise, you'll be prompted to give
|
||||
# a mountpoint from already existsing directories. If you input a novel
|
||||
# directory, it will prompt you to create that directory.
|
||||
|
||||
# Adapted form the work of Luke Smith (lukesmith.xyz)
|
||||
|
||||
getmount() { \
|
||||
[ -z "$chosen" ] && exit 1
|
||||
mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")"
|
||||
[ "$mp" = "" ] && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?")
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
||||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \\( -path *%s -prune \\) \\ \n",$3}')
|
||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
|
||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||
case "$partitiontype" in
|
||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
|
||||
esac
|
||||
notify-send "禍 USB mounting" "$chosen mounted to $mp."
|
||||
}
|
||||
|
||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
|
||||
|
||||
if [ -z "$usbdrives" ]; then
|
||||
notify-send -u "critical" -t 3000 "禍 USB ERROR" "No drive to mount."
|
||||
else
|
||||
notify-send "USB drive(s) detected."
|
||||
mountusb
|
||||
fi
|
23
.local/bin/dmenuopen
Executable file
23
.local/bin/dmenuopen
Executable file
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Fuzzy-find a file and open it with appropriate application
|
||||
|
||||
filetypes=".pdf .png .jpg .txt .mom .tex .mkv" # could be augmented
|
||||
filetype=\\$(printf "$filetypes" | sed "s| |\n|g" | dmenu -i -p "type of the file?")
|
||||
|
||||
if [ -z "$filetype" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
file=$(find $HOME/ -type f | grep "$filetype" | dmenu -i -l 20 -p "open")
|
||||
|
||||
if [ -z "$file" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$filetype" in
|
||||
*.pdf) zathura "$file" ;;
|
||||
*.png|.jpg) feh "$file" ;;
|
||||
*.txt|*.mom|*.tex) "$TERMINAL" -e nvim "$file" ;;
|
||||
*.mkv) mpv "$file";;
|
||||
esac
|
10
.local/bin/dmenupass
Executable file
10
.local/bin/dmenupass
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
|
||||
# password prompt if needed.
|
||||
|
||||
col_yellow="#ffeca3"
|
||||
col_black="#1d2021"
|
||||
col_orange="#f7a583"
|
||||
|
||||
dmenu -sb $col_orange -sf $col_black -nf "#000000" -nb "#000000" -p "$1" <&-
|
12
.local/bin/dmenuprompt
Executable file
12
.local/bin/dmenuprompt
Executable file
@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
# A dmenu binary prompt script.
|
||||
# Gives a dmenu prompt labeled with $1 to perform command $2.
|
||||
# For example:
|
||||
# `./prompt "Do you want to shutdown?" "shutdown -h now"`
|
||||
|
||||
col_darkred="#9d0006"
|
||||
col_red="#cc241d"
|
||||
col_white="#ebDBB2"
|
||||
col_gray="#d5c4a1"
|
||||
|
||||
[ "$(printf "yes\nno" | dmenu -i -p "$1" -nb "$col_darkred" -sb "$col_red" -sf "$col_white" -nf "$col_gray" )" = "yes" ] && $2
|
28
.local/bin/dmenuumount
Executable file
28
.local/bin/dmenuumount
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
# A dmenu prompt to unmount drives.
|
||||
# Provides you with mounted partitions, select one to unmount.
|
||||
# Drives mounted at /, /boot and /home will not be options to unmount.
|
||||
|
||||
# Adapted from the work of Luke Smith (lukesmith.xyz)
|
||||
|
||||
unmountusb() {
|
||||
chosen=$(echo "$usbdrives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
|
||||
if [ -z "$chosen" ]; then
|
||||
exit
|
||||
else
|
||||
if sudo -A umount "$chosen" ; then
|
||||
notify-send "禍 USB unmounting" "$chosen unmounted."
|
||||
else
|
||||
notify-send -u "critical" -t 3000 "禍 USB ERROR" "Unmounting failed."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
usbdrives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$2=="part"&&$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
|
||||
|
||||
if [ -z "$usbdrives" ]; then
|
||||
notify-send -u "critical" -t 3000 "禍 USB ERROR" "No drive to unmount."
|
||||
else
|
||||
unmountusb
|
||||
fi
|
45
.local/bin/dot
Executable file
45
.local/bin/dot
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Wrapper for my dotfiles
|
||||
|
||||
git="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
|
||||
cmd="$git status" ## by default, give the status
|
||||
|
||||
[ "$1" = "-g" ] && shift && cmd="$git $@" ## make the wrapper transparent
|
||||
|
||||
[ "$1" = "-l" ] && shift && cmd="$git log"
|
||||
[ "$1" = "-c" ] && shift && cmd="$git commit $@"
|
||||
[ "$1" = "-cas" ] && shift && cmd="$git commit -S --amend $1"
|
||||
[ "$1" = "-ch" ] && shift && cmd="$git checkout $1"
|
||||
[ "$1" = "-mv" ] && shift && cmd="$git mv $@"
|
||||
[ "$1" = "-ps" ] && shift && cmd="$git push $@"
|
||||
[ "$1" = "-pl" ] && shift && cmd="$git pull"
|
||||
[ "$1" = "-a" ] && shift && cmd="$git add $@"
|
||||
[ "$1" = "-rm" ] && shift && cmd="$git rm --cached $@"
|
||||
[ "$1" = "-rb" ] && shift && cmd="$git rebase -i $1"
|
||||
[ "$1" = "-rs" ] && shift && cmd="$git reset --soft $1"
|
||||
[ "$1" = "-d" ] && shift && cmd="$git diff $@"
|
||||
if [ "$1" = "-m" ] ; then
|
||||
shift
|
||||
[ "$1" = "" ] && echo "Please provide a branche to merge from" && exit 1
|
||||
if [ "$1" != "-a" ] ; then
|
||||
shift
|
||||
cmd=""
|
||||
while [ "$1" != "" ] ; do
|
||||
cmd="$cmd $git checkout $1 && $git merge dev"
|
||||
shift
|
||||
done
|
||||
cmd="$cmd && $git checkout dev"
|
||||
else
|
||||
branches="$(echo "$($git branch)" | sed -e 's/\*/ /;t')"
|
||||
cmd=""
|
||||
for arg in $branches ; do
|
||||
if [ "$arg" != "dev" ] ; then
|
||||
$git checkout $arg && $git merge dev
|
||||
fi
|
||||
done
|
||||
cmd="$git checkout dev"
|
||||
fi
|
||||
fi
|
||||
|
||||
$cmd
|
84
.local/bin/dwmbar
Executable file
84
.local/bin/dwmbar
Executable file
@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script sets the statusbar with the xsetroot command at the end. Have it
|
||||
# started by ~/.xinitrc or ~/.xprofile.
|
||||
|
||||
# Adapted form the work of Luke Smith (lukesmith.xyz)
|
||||
|
||||
# Handle SIGTRAP signals sent by refbar to update the status bar immediately.
|
||||
trap 'update' 5
|
||||
|
||||
# Set the deliminter character.
|
||||
delim="|"
|
||||
|
||||
status() { \
|
||||
|
||||
# Gets the volume of ALSA's master volume output.
|
||||
|
||||
volume="$(pamixer --get-volume)"
|
||||
muted="$(pamixer --get-mute)"
|
||||
|
||||
if [ "$muted" = "true" ]; then
|
||||
echo " muted"
|
||||
else
|
||||
echo " 墳 $volume%"
|
||||
fi
|
||||
|
||||
echo "$delim"
|
||||
|
||||
# Wifi quality percentage and icon if ethernet is connected.
|
||||
grep "^\s*w" /proc/net/wireless | awk '{ print "索", int($3 * 100 / 70) "%" }'
|
||||
eth="$(cat /sys/class/net/enp0s25/operstate)"
|
||||
if [ "up" = "$eth" ]; then
|
||||
echo "/ "
|
||||
fi
|
||||
|
||||
echo "$delim"
|
||||
|
||||
# Will show all batteries with approximate icon for remaining power.
|
||||
# Or show that the computer is plugged to a power source
|
||||
# In any case, show the remaining battery percentage
|
||||
|
||||
AC_ON="$(cat /sys/class/power_supply/AC/online)"
|
||||
for x in /sys/class/power_supply/BAT?/capacity;
|
||||
do
|
||||
if [ "$AC_ON" = 0 ]; then
|
||||
case "$(cat "$x")" in
|
||||
10[0-9]|101) echo "" ;;
|
||||
100|9[0-9]) echo " $(cat "$x")%" ;;
|
||||
8[0-9]|7[0-9]) echo " $(cat "$x")%" ;;
|
||||
6[0-9]|5[0-9]) echo " $(cat "$x")%" ;;
|
||||
4[0-9]|3[0-9]) echo " $(cat "$x")%" ;;
|
||||
*) echo " $(cat "$x")%" ;;
|
||||
esac
|
||||
else
|
||||
echo " $(cat "$x")%"
|
||||
fi
|
||||
done && echo "$delim"
|
||||
|
||||
# Date and time.
|
||||
|
||||
date '+%b. %d - %I:%M%p'
|
||||
}
|
||||
|
||||
update() { \
|
||||
# So all that big status function was just a command that quicking gets
|
||||
# what we want to be the statusbar. This xsetroot command is what sets
|
||||
# it. Note that the tr command replaces newlines with spaces. This is
|
||||
# to prevent some weird issues that cause significant slowing of
|
||||
# everything in dwm. Note entirely sure of the cause, but again, the tr
|
||||
# command easily avoids it.
|
||||
xsetroot -name "$(status | tr '\n' ' ')" &
|
||||
wait
|
||||
}
|
||||
|
||||
|
||||
while :; do
|
||||
update
|
||||
# Sleep for a minute after changing the status bar before updating it
|
||||
# again. We run sleep in the background and use wait until it finishes,
|
||||
# because traps can interrupt wait immediately, but they can't do that
|
||||
# with sleep.
|
||||
sleep 60 &
|
||||
wait
|
||||
done
|
20
.local/bin/kbacklight
Executable file
20
.local/bin/kbacklight
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Control keyboard brightness
|
||||
## level goes up at each call
|
||||
## goes back to 0 after meeting maximum brightness
|
||||
|
||||
## You need `upower` package to make it work
|
||||
|
||||
max=$(cat /sys/class/leds/tpacpi::kbd_backlight/max_brightness)
|
||||
current=$(cat /sys/class/leds/tpacpi::kbd_backlight/brightness)
|
||||
new=$(expr $current + 1)
|
||||
|
||||
setKeyboardLight () {
|
||||
dbus-send --system --type=method_call --dest="org.freedesktop.UPower" "/org/freedesktop/UPower/KbdBacklight" "org.freedesktop.UPower.KbdBacklight.SetBrightness" int32:$1
|
||||
}
|
||||
|
||||
[ $new -gt $max ] && new=0
|
||||
|
||||
setKeyboardLight $new
|
||||
|
72
.local/bin/maker
Executable file
72
.local/bin/maker
Executable file
@ -0,0 +1,72 @@
|
||||
#! /bin/sh
|
||||
# Detect if the directory is a c/c++ project
|
||||
# Create a makefile with existing c/c++ files in directory
|
||||
# Rules are basic (i.e. module.o : module.c)
|
||||
# variables are generic
|
||||
# Exit by opening makefile with neovim
|
||||
|
||||
headers_list="$(ls | grep '.h$')"
|
||||
sources_list="$(ls | grep '.cp*$')"
|
||||
modules_list="$(echo "$sources_list" | sed 's/\.cp*//g' | tr '\n' ' ')"
|
||||
targets_list="$(echo "$sources_list" | sed 's/\.cp*/\.o/g' | tr '\n' ' ')"
|
||||
bool=false
|
||||
comp=gcc
|
||||
|
||||
get_compiler(){
|
||||
for source_ in "$sources_list"; do
|
||||
case "$source_" in
|
||||
*.cpp) comp="g++" && return;;
|
||||
*.c) ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
is_c_project(){
|
||||
if [ -n "$sources_list" ]; then
|
||||
bool=true
|
||||
fi
|
||||
}
|
||||
|
||||
make_rule(){
|
||||
if [ "$comp" = "gcc" ]; then
|
||||
echo "$1.o : $1.c" >> makefile
|
||||
echo -e "\t\$(CC) -c $1.c \$(FLAGS)" >> makefile
|
||||
else
|
||||
echo "$1.o : $1.cpp" >> makefile
|
||||
echo -e "\t\$(CC) -c $1.cpp \$(FLAGS)" >> makefile
|
||||
fi
|
||||
echo "" >> makefile
|
||||
}
|
||||
|
||||
is_c_project
|
||||
|
||||
if [ "$bool" = false ]; then
|
||||
echo "No C/C++ project in directory. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
get_compiler
|
||||
|
||||
touch makefile
|
||||
|
||||
echo "BIN = main" > makefile
|
||||
echo "TARGETS = $targets_list" >> makefile
|
||||
echo "" >> makefile
|
||||
echo "CC = $comp" >> makefile
|
||||
echo "FLAGS = -Wall -g" >> makefile
|
||||
echo "" >> makefile
|
||||
echo "all : \$(BIN)" >> makefile
|
||||
echo "" >> makefile
|
||||
echo "\$(BIN) : \$(TARGETS)" >> makefile
|
||||
echo -e "\t\$(CC) \$(TARGETS) -o \$(BIN) \$(FLAGS)" >> makefile
|
||||
echo "" >> makefile
|
||||
|
||||
for module in $modules_list; do
|
||||
make_rule "$module"
|
||||
done
|
||||
|
||||
echo "clean :" >> makefile
|
||||
echo -e "\trm \$(BIN) *.o vgcore.*" >> makefile
|
||||
|
||||
sed -i 's/\s$//' makefile
|
||||
nvim makefile
|
31
.local/bin/mom
Executable file
31
.local/bin/mom
Executable file
@ -0,0 +1,31 @@
|
||||
#! /bin/sh
|
||||
# Creates a groff/mom document with generic metadata, opens it with neovim (or vim as a fallback)
|
||||
|
||||
if [ -z ""$1"" ]; then
|
||||
echo "Please provide a name for your file"
|
||||
elif [ -e "$1" ]; then
|
||||
echo "This filename is already taken, please provide a different name"
|
||||
else
|
||||
touch "$1" && \
|
||||
echo "\# metadata" >> "$1" && \
|
||||
echo '.AUTHOR "David JULIEN"' >> "$1" && \
|
||||
echo '.TITLE' >> "$1" && \
|
||||
echo '\# template' >> "$1" && \
|
||||
echo '.PRINTSTYLE TYPESET' >> "$1" && \
|
||||
echo '.QUOTE_STYLE QUAD' >> "$1" && \
|
||||
echo '.SMARTQUOTES FR' >> "$1" && \
|
||||
echo '.ATTRIBUTE_STRING "par"' >> "$1" && \
|
||||
echo '.LINEBREAK_CHAR ""' >> "$1" && \
|
||||
echo '\# cover' >> "$1" && \
|
||||
echo '.COVER AUTHOR TITLE BLANKPAGE' >> "$1" && \
|
||||
echo '.DOCHEADER OFF' >> "$1" && \
|
||||
echo '\#' >> "$1" && \
|
||||
echo '.START' >> "$1" && \
|
||||
|
||||
# checks if neovim is intalled
|
||||
if type "nvim" &> /dev/null; then
|
||||
nvim "$1"
|
||||
else
|
||||
vim "$1"
|
||||
fi
|
||||
fi
|
23
.local/bin/mommerge
Executable file
23
.local/bin/mommerge
Executable file
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
# Gather the mom files from current dir and compile them into ONE pdf file, using my compiler script
|
||||
# /!\ files must be names 0_file0, 1_file1... in order to be processed correctly
|
||||
|
||||
# if the file already exists, delete it
|
||||
if [ -e rendu.mom ]; then
|
||||
rm rendu.mom
|
||||
fi
|
||||
|
||||
pdf_list=$(ls *.mom)
|
||||
|
||||
touch rendu.mom
|
||||
|
||||
for doc in "$pdf_list"; do
|
||||
cat "$doc" >> rendu.mom
|
||||
echo ".COLLATE" >> rendu.mom
|
||||
done
|
||||
|
||||
# Remove the last ".COLLATE"
|
||||
sed -i '$ d' rendu.mom
|
||||
|
||||
# Compile it
|
||||
compiler rendu.mom
|
8
.local/bin/refbar
Executable file
8
.local/bin/refbar
Executable file
@ -0,0 +1,8 @@
|
||||
#! /bin/sh
|
||||
|
||||
#refresh dwmbar by killing the "sleep" command in the dwmbar process
|
||||
|
||||
# Adapted form the work of Luke Smith (lukesmith.xyz)
|
||||
|
||||
# Send SIGTRAP signal to dwmbar script, which will handle it with a trap.
|
||||
pkill -SIGTRAP dwmbar
|
18
.local/bin/sbacklight
Executable file
18
.local/bin/sbacklight
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Change the backlight value
|
||||
## You need write privileges on /sys/.../brightness
|
||||
## This can be achieved via a `udev` rule (see ~/.config/root)
|
||||
|
||||
current=$(cat /sys/class/backlight/intel_backlight/brightness)
|
||||
max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
|
||||
step=$(expr $max / 20)
|
||||
|
||||
[ "$1" = "dec" ] && new=$(expr $current - $step)
|
||||
[ "$1" = "inc" ] && new=$(expr $current + $step)
|
||||
[ "$1" = "set" ] && new=$(expr $2 \* $step)
|
||||
|
||||
[ $new -gt 850 ] && new=850
|
||||
[ $new -lt 0 ] && new=0
|
||||
|
||||
echo $new > /sys/class/backlight/intel_backlight/brightness
|
13
.local/bin/setbg
Executable file
13
.local/bin/setbg
Executable file
@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This script sets the wallpaper
|
||||
# If given an argument
|
||||
# if $1 is a png file, set it as a wallpaper
|
||||
# if $1 is a jpg/jpeg file, convert it to png and set it as a wallpaper
|
||||
# if $1 is a directory, choose a randomized image in it, set it as wallpaper
|
||||
|
||||
[ -f "$1" ] && cp $1 "$XDG_CONFIG_HOME/wall.png" && dunstify -u "low" "Wallpaper changed"
|
||||
|
||||
[ -d "$1" ] && cp "$(find "$1"/*.png -type f | shuf -n 1)" "$XDG_CONFIG_HOME/wall.png" && dunstify -u "low" "Random wallpaper chosen"
|
||||
|
||||
xwallpaper --zoom "$XDG_CONFIG_HOME/wall.png"
|
15
.local/bin/texclear
Executable file
15
.local/bin/texclear
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# All credits to Luke Smith (lukesmith.xyz)
|
||||
|
||||
# Clears the build files of a LaTeX/XeLaTeX build.
|
||||
# I have vim run this file whenever I exit a .tex file.
|
||||
|
||||
case "$1" in
|
||||
*.tex)
|
||||
file=$(readlink -f "$1")
|
||||
dir=$(dirname "$file")
|
||||
base="${file%.*}"
|
||||
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete ;;
|
||||
*) printf "Give .tex file as argument.\\n" ;;
|
||||
esac
|
76
.local/bin/texer
Executable file
76
.local/bin/texer
Executable file
@ -0,0 +1,76 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Create a LaTeX document with genereic metadata, then opens it with neovim (or vim as a fallback)
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Please provide a name for your file"
|
||||
elif [ -e $1 ]; then
|
||||
echo "This filename is already taken, please provide a different name"
|
||||
else
|
||||
touch "$1"
|
||||
echo '% metadata' >> "$1"
|
||||
read -p "Which type is your document? (def: article) " class
|
||||
if [ -z "$class" ]; then
|
||||
class='article'
|
||||
fi
|
||||
echo "\\documentclass[a4paper, 12pt]{$class}" >> "$1"
|
||||
echo '' >> "$1"
|
||||
read -p "Do you want colors?(y/N) " colors
|
||||
if [ "$colors" = "y" ]; then
|
||||
echo '\usepackage[dvipsname]{xcolor}' >> "$1"
|
||||
fi
|
||||
read -p "Do you want hyperlinks management?(y/N) " links
|
||||
if [ "$links" = "y" ]; then
|
||||
if [ "$colors" != "y" ]; then
|
||||
echo '\usepackage[dvipsname]{xcolor}' >> "$1"
|
||||
fi
|
||||
echo '\usepackage[colorlinks=true, urlcolor=BrickRed]{hyperref}' >> "$1"
|
||||
fi
|
||||
read -p "Do you want bibliography management?(y/N) " bibliography
|
||||
if [ "$bibliography" = "y" ]; then
|
||||
read -p "Do you want to use apacite?(y/N) " apacite
|
||||
if [ $apacite = "y" ]; then
|
||||
echo '\usepackage{apacite}' >> "$1"
|
||||
bibstyle="apacite"
|
||||
else
|
||||
bibstyle="unsrt"
|
||||
echo 'The default style is _unsrt_ (you may change it at the end of the document)'
|
||||
fi
|
||||
bibfile="$(basename "$(find $HOME/documents/bibliographies/ -type f -not -path '*/\.*' | dmenu -l 20 -p "which bibliography?")")" # the -not -path allows find to ignore hidden files
|
||||
if [ -z "$bibfile" ]; then
|
||||
echo ''
|
||||
echo '##################################################'
|
||||
echo "Don't forget to specify the .bib file (\\bibliography{.bib}) at the end of the file " | fold -w 46 | sed "s/$/\ \#/g" | sed "s/^/\#\ /g"
|
||||
echo '##################################################'
|
||||
echo ''
|
||||
fi
|
||||
fi
|
||||
read -p "Do you want to use another package? If so, please provide a package name; else, just press <Enter>: " package
|
||||
while [ -n "$package" ]; do
|
||||
echo "\usepackage{"$package"}" >> "$1"
|
||||
package=''
|
||||
read -p "Do you want to use another package? If so, please provide a package name: " package
|
||||
done
|
||||
echo '' >> "$1"
|
||||
echo '\author{David JULIEN}' >> "$1"
|
||||
read -p "What is the title of the document? " title
|
||||
echo "\\title{"$title"}" >> "$1"
|
||||
echo '' >> "$1"
|
||||
echo '%document' >> "$1"
|
||||
echo '\begin{document}' >> "$1"
|
||||
echo '' >> "$1"
|
||||
echo '\maketitle' >> "$1"
|
||||
echo '' >> "$1"
|
||||
if [ "$bibliography" = "y" ]; then
|
||||
echo "\bibliographystyle{$bibstyle}" >> "$1"
|
||||
echo "\bibliography{$HOME/documents/bibliographies/$bibfile}" >> "$1"
|
||||
fi
|
||||
echo '\end{document}' >> "$1"
|
||||
|
||||
# check if neovim is installed
|
||||
if type "nvim" &> /dev/null; then
|
||||
nvim "$1"
|
||||
else
|
||||
vim "$1"
|
||||
fi
|
||||
fi
|
5
.local/bin/webupdate
Executable file
5
.local/bin/webupdate
Executable file
@ -0,0 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Little script to update my website
|
||||
|
||||
rsync -avrP --rsh='ssh' $HOME/public_html swytch@davidjulien.xyz:~/ && notify-send 'davidjulien.xyz' 'website updated'
|
36
.profile
Normal file
36
.profile
Normal file
@ -0,0 +1,36 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This file is sourced when launching a DM from startx/xinit
|
||||
|
||||
# environment variables
|
||||
##XDG_BASE_DIRECTORIES
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
## paths
|
||||
export PATH="$PATH:$(du --exclude ".git" "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
|
||||
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
|
||||
export LESSHISTFILE="-"
|
||||
|
||||
## default programs
|
||||
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
||||
export EDITOR="nvim"
|
||||
export TERMINAL="st"
|
||||
export READER="zathura"
|
||||
export BROWSER="brave"
|
||||
export INCOGNITO="brave --incognito"
|
||||
|
||||
## program settings
|
||||
export LESS_TERMCAP_md="$(printf '%b' '\e[01;32m')"
|
||||
export LESS_TERMCAP_me="$(printf '%b' '\e[0m')"
|
||||
export LESS_TERMCAP_se="$(printf '%b' '\e[0m')"
|
||||
export LESS_TERMCAP_so="$(printf '%b' '\e[01;44;33em')"
|
||||
export LESS_TERMCAP_ue="$(printf '%b' '\e[0m')"
|
||||
export LESS_TERMCAP_us="$(printf '%b' '\e[01;35m')"
|
||||
|
||||
export LS_COLORS='rs=0:di=01;34:ln=01;35:mh=00:pi=40;35:so=01;33:do=01;33:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=00;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;33:*.jpeg=01;33:*.mjpg=01;33:*.mjpeg=01;33:*.gif=01;33:*.bmp=01;33:*.pbm=01;33:*.pgm=01;33:*.ppm=01;33:*.tga=01;33:*.xbm=01;33:*.xpm=01;33:*.tif=01;33:*.tiff=01;33:*.png=01;33:*.svg=01;33:*.svgz=01;33:*.mng=01;33:*.pcx=01;33:*.mov=01;33:*.mpg=01;33:*.mpeg=01;33:*.m2v=01;33:*.mkv=01;33:*.webm=01;33:*.ogm=01;33:*.mp4=01;33:*.m4v=01;33:*.mp4v=01;33:*.vob=01;33:*.qt=01;33:*.nuv=01;33:*.wmv=01;33:*.asf=01;33:*.rm=01;33:*.rmvb=01;33:*.flc=01;33:*.avi=01;33:*.fli=01;33:*.flv=01;33:*.gl=01;33:*.dl=01;33:*.xcf=01;33:*.xwd=01;33:*.yuv=01;33:*.cgm=01;33:*.emf=01;33:*.ogv=01;33:*.ogx=01;33:*.aac=01;33:*.au=01;33:*.flac=01;33:*.m4a=01;33:*.mid=01;33:*.midi=01;33:*.mka=01;33:*.mp3=01;33:*.mpc=01;33:*.ogg=01;33:*.ra=01;33:*.wav=01;33:*.oga=01;33:*.opus=01;33:*.spx=01;33:*.xspf=01;33:';
|
||||
|
||||
# startx at session login
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx
|
28
.xinitrc
Normal file
28
.xinitrc
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
sysresources=/etc/X11/xinit/.Xresources
|
||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||
|
||||
# merge in defaults and keymaps
|
||||
|
||||
if [ -f $sysresources ]; then
|
||||
xrdb -merge $sysresources
|
||||
fi
|
||||
|
||||
if [ -f $sysmodmap ]; then
|
||||
xmodmap $sysmodmap
|
||||
fi
|
||||
|
||||
# start some nice programs
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
[ -f $HOME/.xprofile ] && . $HOME/.xprofile
|
||||
|
||||
# starts the WM
|
||||
exec dwm
|
249
.xmodmap
Normal file
249
.xmodmap
Normal file
@ -0,0 +1,249 @@
|
||||
keycode 8 =
|
||||
keycode 9 = Escape NoSymbol Escape
|
||||
keycode 10 = ampersand 1 ampersand 1 dead_caron dead_ogonek dead_caron dead_ogonek
|
||||
keycode 11 = eacute 2 eacute 2 asciitilde Eacute asciitilde Eacute
|
||||
keycode 12 = quotedbl 3 quotedbl 3 numbersign dead_breve numbersign dead_breve
|
||||
keycode 13 = apostrophe 4 apostrophe 4 braceleft U2014 braceleft U2014
|
||||
keycode 14 = parenleft 5 parenleft 5 bracketleft U2013 bracketleft U2013
|
||||
keycode 15 = minus 6 minus 6 bar U2011 bar U2011
|
||||
keycode 16 = egrave 7 egrave 7 grave Egrave grave Egrave
|
||||
keycode 17 = underscore 8 underscore 8 backslash trademark backslash trademark
|
||||
keycode 18 = ccedilla 9 ccedilla 9 asciicircum Ccedilla asciicircum Ccedilla
|
||||
keycode 19 = agrave 0 agrave 0 at Agrave at Agrave
|
||||
keycode 20 = parenright degree parenright degree bracketright notequal bracketright notequal
|
||||
keycode 21 = equal plus equal plus braceright plusminus braceright plusminus
|
||||
keycode 22 = BackSpace BackSpace BackSpace BackSpace
|
||||
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
|
||||
keycode 24 = a A a A ae AE ae AE
|
||||
keycode 25 = z Z z Z acircumflex Acircumflex acircumflex Acircumflex
|
||||
keycode 26 = e E e E EuroSign cent EuroSign cent
|
||||
keycode 27 = r R r R ecircumflex Ecircumflex ecircumflex Ecircumflex
|
||||
keycode 28 = t T t T thorn THORN thorn THORN
|
||||
keycode 29 = y Y y Y ydiaeresis Ydiaeresis ydiaeresis Ydiaeresis
|
||||
keycode 30 = u U u U ucircumflex Ucircumflex ucircumflex Ucircumflex
|
||||
keycode 31 = i I i I icircumflex Icircumflex icircumflex Icircumflex
|
||||
keycode 32 = o O o O oe OE oe OE
|
||||
keycode 33 = p P p P ocircumflex Ocircumflex ocircumflex Ocircumflex
|
||||
keycode 34 = dead_circumflex dead_diaeresis dead_circumflex dead_diaeresis dead_tilde dead_abovering dead_tilde dead_abovering
|
||||
keycode 35 = dollar sterling dollar sterling oslash Oslash oslash Oslash
|
||||
keycode 36 = Return NoSymbol Return
|
||||
keycode 37 = Control_L NoSymbol Control_L
|
||||
keycode 38 = q Q q Q adiaeresis Adiaeresis adiaeresis Adiaeresis
|
||||
keycode 39 = s S s S ssharp doublelowquotemark ssharp doublelowquotemark
|
||||
keycode 40 = d D d D ediaeresis Ediaeresis ediaeresis Ediaeresis
|
||||
keycode 41 = f F f F leftsinglequotemark singlelowquotemark leftsinglequotemark singlelowquotemark
|
||||
keycode 42 = g G g G rightsinglequotemark yen rightsinglequotemark yen
|
||||
keycode 43 = h H h H eth ETH eth ETH
|
||||
keycode 44 = j J j J udiaeresis Udiaeresis udiaeresis Udiaeresis
|
||||
keycode 45 = k K k K idiaeresis Idiaeresis idiaeresis Idiaeresis
|
||||
keycode 46 = l L l L U0140 U013F U0140 U013F
|
||||
keycode 47 = m M m M odiaeresis Odiaeresis odiaeresis Odiaeresis
|
||||
keycode 48 = ugrave percent ugrave percent dead_acute Ugrave dead_acute Ugrave
|
||||
keycode 49 = twosuperior threesuperior twosuperior threesuperior onesuperior dead_cedilla onesuperior dead_cedilla
|
||||
keycode 50 = Shift_L NoSymbol Shift_L
|
||||
keycode 51 = asterisk mu asterisk mu dead_grave dead_macron dead_grave dead_macron
|
||||
keycode 52 = w W w W guillemotleft leftdoublequotemark guillemotleft leftdoublequotemark
|
||||
keycode 53 = x X x X guillemotright rightdoublequotemark guillemotright rightdoublequotemark
|
||||
keycode 54 = c C c C copyright registered copyright registered
|
||||
keycode 55 = v V v V U202F leftarrow U202F leftarrow
|
||||
keycode 56 = b B b B downarrow uparrow downarrow uparrow
|
||||
keycode 57 = n N n N notsign rightarrow notsign rightarrow
|
||||
keycode 58 = comma question comma question questiondown U2026 questiondown U2026
|
||||
keycode 59 = semicolon period semicolon period multiply U22C5 multiply U22C5
|
||||
keycode 60 = colon slash colon slash division U2215 division U2215
|
||||
keycode 61 = exclam section exclam section exclamdown U2212 exclamdown U2212
|
||||
keycode 62 = Shift_R NoSymbol Shift_R
|
||||
keycode 63 = KP_Multiply U22C5 KP_Multiply U22C5 0x10000d7 VoidSymbol XF86ClearGrab 0x10000d7 VoidSymbol XF86ClearGrab
|
||||
keycode 64 = Alt_L Meta_L Alt_L Meta_L
|
||||
keycode 65 = space space space space space nobreakspace space U202F
|
||||
clear lock
|
||||
keycode 66 = Escape
|
||||
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1
|
||||
keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 XF86Switch_VT_2
|
||||
keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 XF86Switch_VT_3
|
||||
keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 XF86Switch_VT_4
|
||||
keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 XF86Switch_VT_5
|
||||
keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 XF86Switch_VT_6
|
||||
keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 XF86Switch_VT_7
|
||||
keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 F8 F8 XF86Switch_VT_8
|
||||
keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 F9 F9 XF86Switch_VT_9
|
||||
keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10
|
||||
keycode 77 = Num_Lock NoSymbol Num_Lock
|
||||
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
|
||||
keycode 79 = KP_Home KP_7 KP_Home KP_7 U2196 U21D6 U2196 U21D6
|
||||
keycode 80 = KP_Up KP_8 KP_Up KP_8 U2191 U21D1 U2191 U21D1
|
||||
keycode 81 = KP_Prior KP_9 KP_Prior KP_9 U2197 U21D7 U2197 U21D7
|
||||
keycode 82 = KP_Subtract U2212 KP_Subtract U2212 U2212 VoidSymbol XF86Prev_VMode U2212 VoidSymbol XF86Prev_VMode
|
||||
keycode 83 = KP_Left KP_4 KP_Left KP_4 U2190 U21D0 U2190 U21D0
|
||||
keycode 84 = KP_Begin KP_5 KP_Begin KP_5 U2194 U21D4 U2194 U21D4
|
||||
keycode 85 = KP_Right KP_6 KP_Right KP_6 U2192 U21D2 U2192 U21D2
|
||||
keycode 86 = KP_Add 0x100002b KP_Add 0x100002b 0x100002b VoidSymbol XF86Next_VMode 0x100002b VoidSymbol XF86Next_VMode
|
||||
keycode 87 = KP_End KP_1 KP_End KP_1 U2199 U21D9 U2199 U21D9
|
||||
keycode 88 = KP_Down KP_2 KP_Down KP_2 U2193 U21D3 U2193 U21D3
|
||||
keycode 89 = KP_Next KP_3 KP_Next KP_3 U2198 U21D8 U2198 U21D8
|
||||
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 U2195 U21D5 U2195 U21D5
|
||||
keycode 91 = KP_Delete period KP_Delete period comma U202F comma U202F
|
||||
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
|
||||
keycode 93 =
|
||||
keycode 94 = less greater less greater lessthanequal greaterthanequal lessthanequal greaterthanequal
|
||||
keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11
|
||||
keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12
|
||||
keycode 97 =
|
||||
keycode 98 = Katakana NoSymbol Katakana
|
||||
keycode 99 = Hiragana NoSymbol Hiragana
|
||||
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
|
||||
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
|
||||
keycode 102 = Muhenkan NoSymbol Muhenkan
|
||||
keycode 103 =
|
||||
keycode 104 = KP_Enter NoSymbol KP_Enter
|
||||
keycode 105 = Control_R NoSymbol Control_R
|
||||
keycode 106 = KP_Divide U2215 KP_Divide U2215 0x10000f7 VoidSymbol XF86Ungrab 0x10000f7 VoidSymbol XF86Ungrab
|
||||
keycode 107 = Print Sys_Req Print Sys_Req
|
||||
keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
|
||||
keycode 109 = Linefeed NoSymbol Linefeed
|
||||
keycode 110 = Home NoSymbol Home
|
||||
keycode 111 = Up NoSymbol Up
|
||||
keycode 112 = Prior NoSymbol Prior
|
||||
keycode 113 = Left NoSymbol Left
|
||||
keycode 114 = Right NoSymbol Right
|
||||
keycode 115 = End NoSymbol End
|
||||
keycode 116 = Down NoSymbol Down
|
||||
keycode 117 = Next NoSymbol Next
|
||||
keycode 118 = Insert NoSymbol Insert
|
||||
keycode 119 = Delete NoSymbol Delete
|
||||
keycode 120 =
|
||||
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
|
||||
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
|
||||
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
|
||||
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
|
||||
keycode 125 = KP_Equal NoSymbol KP_Equal
|
||||
keycode 126 = plusminus NoSymbol plusminus
|
||||
keycode 127 = Pause Break Pause Break
|
||||
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
|
||||
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
|
||||
keycode 130 = Hangul NoSymbol Hangul
|
||||
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
|
||||
keycode 132 =
|
||||
keycode 133 = Super_L NoSymbol Super_L
|
||||
keycode 134 = Super_R NoSymbol Super_R
|
||||
keycode 135 = Menu NoSymbol Menu
|
||||
keycode 136 = Cancel NoSymbol Cancel
|
||||
keycode 137 = Redo NoSymbol Redo
|
||||
keycode 138 = SunProps NoSymbol SunProps
|
||||
keycode 139 = Undo NoSymbol Undo
|
||||
keycode 140 = SunFront NoSymbol SunFront
|
||||
keycode 141 = XF86Copy NoSymbol XF86Copy
|
||||
keycode 142 = XF86Open NoSymbol XF86Open
|
||||
keycode 143 = XF86Paste NoSymbol XF86Paste
|
||||
keycode 144 = Find NoSymbol Find
|
||||
keycode 145 = XF86Cut NoSymbol XF86Cut
|
||||
keycode 146 = Help NoSymbol Help
|
||||
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB
|
||||
keycode 148 = XF86Calculator NoSymbol XF86Calculator
|
||||
keycode 149 =
|
||||
keycode 150 = XF86Sleep NoSymbol XF86Sleep
|
||||
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
|
||||
keycode 152 = XF86Explorer NoSymbol XF86Explorer
|
||||
keycode 153 = XF86Send NoSymbol XF86Send
|
||||
keycode 154 =
|
||||
keycode 155 = XF86Xfer NoSymbol XF86Xfer
|
||||
keycode 156 = XF86Launch1 NoSymbol XF86Launch1
|
||||
keycode 157 = XF86Launch2 NoSymbol XF86Launch2
|
||||
keycode 158 = XF86WWW NoSymbol XF86WWW
|
||||
keycode 159 = XF86DOS NoSymbol XF86DOS
|
||||
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
|
||||
keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
|
||||
keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
|
||||
keycode 163 = XF86Mail NoSymbol XF86Mail
|
||||
keycode 164 = XF86Favorites NoSymbol XF86Favorites
|
||||
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
|
||||
keycode 166 = XF86Back NoSymbol XF86Back
|
||||
keycode 167 = XF86Forward NoSymbol XF86Forward
|
||||
keycode 168 =
|
||||
keycode 169 = XF86Eject NoSymbol XF86Eject
|
||||
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject
|
||||
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
|
||||
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
|
||||
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
|
||||
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
|
||||
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
|
||||
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
|
||||
keycode 177 = XF86Phone NoSymbol XF86Phone
|
||||
keycode 178 =
|
||||
keycode 179 = XF86Tools NoSymbol XF86Tools
|
||||
keycode 180 = XF86HomePage NoSymbol XF86HomePage
|
||||
keycode 181 = XF86Reload NoSymbol XF86Reload
|
||||
keycode 182 = XF86Close NoSymbol XF86Close
|
||||
keycode 183 =
|
||||
keycode 184 =
|
||||
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
|
||||
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
|
||||
keycode 187 = parenleft NoSymbol parenleft
|
||||
keycode 188 = parenright NoSymbol parenright
|
||||
keycode 189 = XF86New NoSymbol XF86New
|
||||
keycode 190 = Redo NoSymbol Redo
|
||||
keycode 191 = XF86Tools NoSymbol XF86Tools
|
||||
keycode 192 = XF86Launch5 NoSymbol XF86Launch5
|
||||
keycode 193 = XF86Launch6 NoSymbol XF86Launch6
|
||||
keycode 194 = XF86Launch7 NoSymbol XF86Launch7
|
||||
keycode 195 = XF86Launch8 NoSymbol XF86Launch8
|
||||
keycode 196 = XF86Launch9 NoSymbol XF86Launch9
|
||||
keycode 197 =
|
||||
keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
|
||||
keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
|
||||
keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
|
||||
keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
|
||||
keycode 202 =
|
||||
keycode 203 = Mode_switch NoSymbol Mode_switch
|
||||
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
|
||||
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
|
||||
keycode 206 = NoSymbol Super_L NoSymbol Super_L
|
||||
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
|
||||
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
|
||||
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
|
||||
keycode 210 = XF86Launch3 NoSymbol XF86Launch3
|
||||
keycode 211 = XF86Launch4 NoSymbol XF86Launch4
|
||||
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
|
||||
keycode 213 = XF86Suspend NoSymbol XF86Suspend
|
||||
keycode 214 = XF86Close NoSymbol XF86Close
|
||||
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
|
||||
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
|
||||
keycode 217 =
|
||||
keycode 218 = Print NoSymbol Print
|
||||
keycode 219 =
|
||||
keycode 220 = XF86WebCam NoSymbol XF86WebCam
|
||||
keycode 221 = XF86AudioPreset NoSymbol XF86AudioPreset
|
||||
keycode 222 =
|
||||
keycode 223 = XF86Mail NoSymbol XF86Mail
|
||||
keycode 224 = XF86Messenger NoSymbol XF86Messenger
|
||||
keycode 225 = XF86Search NoSymbol XF86Search
|
||||
keycode 226 = XF86Go NoSymbol XF86Go
|
||||
keycode 227 = XF86Finance NoSymbol XF86Finance
|
||||
keycode 228 = XF86Game NoSymbol XF86Game
|
||||
keycode 229 = XF86Shop NoSymbol XF86Shop
|
||||
keycode 230 =
|
||||
keycode 231 = Cancel NoSymbol Cancel
|
||||
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
|
||||
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
|
||||
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
|
||||
keycode 235 = XF86Display NoSymbol XF86Display
|
||||
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
|
||||
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
|
||||
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
|
||||
keycode 239 = XF86Send NoSymbol XF86Send
|
||||
keycode 240 = XF86Reply NoSymbol XF86Reply
|
||||
keycode 241 = XF86MailForward NoSymbol XF86MailForward
|
||||
keycode 242 = XF86Save NoSymbol XF86Save
|
||||
keycode 243 = XF86Documents NoSymbol XF86Documents
|
||||
keycode 244 = XF86Battery NoSymbol XF86Battery
|
||||
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
|
||||
keycode 246 = XF86WLAN NoSymbol XF86WLAN
|
||||
keycode 247 =
|
||||
keycode 248 =
|
||||
keycode 249 =
|
||||
keycode 250 =
|
||||
keycode 251 =
|
||||
keycode 252 =
|
||||
keycode 253 =
|
||||
keycode 254 = XF86WWAN NoSymbol XF86WWAN
|
||||
keycode 255 = XF86RFKill NoSymbol XF86RFKill
|
23
.xprofile
Normal file
23
.xprofile
Normal file
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This file is sourced when launching a DM from startx/xinit
|
||||
|
||||
# session launch
|
||||
source $HOME/.profile
|
||||
|
||||
xss-lock -- i3lock -n -u -i $XDG_CONFIG_HOME/wall.png &
|
||||
redshift &
|
||||
pamixer --set-volume 30 &
|
||||
sbacklight set 3 &
|
||||
xinput set-prop 'Synaptics TM3072-003' 'libinput Tapping Enabled' 1 &
|
||||
xinput set-prop 'Synaptics TM3072-003' 'libinput Natural Scrolling Enabled' 1 &
|
||||
xinput set-prop 'Synaptics TM3072-003' 'libinput Accel Speed' 0.4 &
|
||||
dunst &
|
||||
bat_notify &
|
||||
AC_notify &
|
||||
setbg &
|
||||
dwmbar &
|
||||
|
||||
setxkbmap 'fr(oss)'
|
||||
xmodmap $HOME/.xmodmap
|
||||
sxhkd &
|
Reference in New Issue
Block a user