diff options
-rw-r--r-- | etc/.cfgl/config | 6 | ||||
-rw-r--r-- | etc/locale.conf | 2 | ||||
-rw-r--r-- | etc/locale.gen | 13 | ||||
-rw-r--r-- | etc/nftables.conf | 6 | ||||
-rw-r--r-- | etc/pacman.conf | 10 | ||||
l--------- | etc/resolv.conf | 1 | ||||
-rw-r--r-- | etc/services | 82 | ||||
-rw-r--r-- | etc/ssh/sshd_config | 25 | ||||
-rw-r--r-- | etc/sudoers | 9 | ||||
-rw-r--r-- | home/xyz/.bashrc | 56 | ||||
-rw-r--r-- | home/xyz/.config/htop/htoprc | 43 | ||||
-rw-r--r-- | home/xyz/.config/nvim/init.vim | 63 | ||||
-rw-r--r-- | home/xyz/.config/systemd/user/ssh-agent.service | 2 | ||||
-rwxr-xr-x | home/xyz/.local/bin/cfg | 1 | ||||
-rwxr-xr-x | home/xyz/.local/bin/gita | 2 | ||||
-rwxr-xr-x | home/xyz/.local/bin/gitfork | 8 | ||||
-rwxr-xr-x | home/xyz/.local/bin/gitpu | 19 | ||||
-rwxr-xr-x | home/xyz/.local/bin/gitsetup | 6 | ||||
-rwxr-xr-x | home/xyz/.local/bin/mmi | 2 | ||||
-rwxr-xr-x | home/xyz/.local/bin/mvln | 3 | ||||
-rwxr-xr-x | home/xyz/.local/bin/mvtr | 3 | ||||
-rwxr-xr-x | home/xyz/.local/bin/o | 2 | ||||
-rwxr-xr-x | home/xyz/.local/bin/time-uuid (renamed from home/xyz/.local/bin/time.uuid) | 2 | ||||
-rwxr-xr-x | home/xyz/.local/bin/upd | 99 | ||||
-rwxr-xr-x | home/xyz/.local/bin/wh | 2 | ||||
-rw-r--r-- | home/xyz/.profile | 60 |
26 files changed, 249 insertions, 278 deletions
diff --git a/etc/.cfgl/config b/etc/.cfgl/config index 905f17be..ca4ebfad 100644 --- a/etc/.cfgl/config +++ b/etc/.cfgl/config @@ -11,12 +11,6 @@ fetch = +refs/heads/*:refs/remotes/origin/* [commit] gpgsign = false -[branch "master"] - remote = origin - merge = refs/heads/master -[remote "usb"] - url = /run/media/xyz/Ventoy/git_bare_repos/config_local_arch - fetch = +refs/heads/*:refs/remotes/usb/* [branch "studio"] remote = origin merge = refs/heads/studio diff --git a/etc/locale.conf b/etc/locale.conf index 6737e875..01ec548f 100644 --- a/etc/locale.conf +++ b/etc/locale.conf @@ -1 +1 @@ -LANG=en_US.utf8 +LANG=en_US.UTF-8 diff --git a/etc/locale.gen b/etc/locale.gen index a094efe7..a4e3c9f3 100644 --- a/etc/locale.gen +++ b/etc/locale.gen @@ -9,17 +9,11 @@ # where <locale> is one of the locales given in /usr/share/i18n/locales # and <charset> is one of the character sets listed in /usr/share/i18n/charmaps # -# Examples: -# en_US ISO-8859-1 -# en_US.UTF-8 UTF-8 -# de_DE ISO-8859-1 -# de_DE@euro ISO-8859-15 -# # The locale-gen command will generate all the locales, # placing them in /usr/lib/locale. # -# A list of supported locales is included in this file. -# Uncomment the ones you need. +# A list of supported locales is given in /usr/share/i18n/SUPPORTED +# and is included in this file. Uncomment the needed locales below. # #aa_DJ.UTF-8 UTF-8 #aa_DJ ISO-8859-1 @@ -99,7 +93,6 @@ #bs_BA.UTF-8 UTF-8 #bs_BA ISO-8859-2 #byn_ER UTF-8 -C.UTF-8 UTF-8 #ca_AD.UTF-8 UTF-8 #ca_AD ISO-8859-15 #ca_ES.UTF-8 UTF-8 @@ -398,6 +391,7 @@ en_US ISO-8859-1 #pt_PT@euro ISO-8859-15 #quz_PE UTF-8 #raj_IN UTF-8 +#rif_MA UTF-8 #ro_RO.UTF-8 UTF-8 #ro_RO ISO-8859-2 #ru_RU.KOI8-R KOI8-R @@ -446,6 +440,7 @@ en_US ISO-8859-1 #sv_SE ISO-8859-1 #sw_KE UTF-8 #sw_TZ UTF-8 +#syr UTF-8 #szl_PL UTF-8 #ta_IN UTF-8 #ta_LK UTF-8 diff --git a/etc/nftables.conf b/etc/nftables.conf index 47605bfb..999b91ac 100644 --- a/etc/nftables.conf +++ b/etc/nftables.conf @@ -6,8 +6,7 @@ # some codes from https://wiki.archlinux.org/title/Nftables # needed for reload config using `sudo systemctl restart nftables` or `sudo nft -f /etc/nftables.conf` -table inet my_table -delete table inet my_table +flush ruleset table inet my_table { @@ -22,9 +21,8 @@ table inet my_table { meta l4proto ipv6-icmp accept tcp dport ssh accept - #tcp dport searx accept - tcp dport qrcp accept udp dport mdns accept + #tcp dport iperf3 accept pkttype host limit rate 5/second counter reject with icmpx type admin-prohibited counter comment "count any other traffic" diff --git a/etc/pacman.conf b/etc/pacman.conf index 49ff54d0..293be916 100644 --- a/etc/pacman.conf +++ b/etc/pacman.conf @@ -34,7 +34,7 @@ Color #NoProgressBar CheckSpace #VerbosePkgLists -ParallelDownloads = 5 +ParallelDownloads = 8 # 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. @@ -69,11 +69,11 @@ LocalFileSigLevel = Optional # repo name header and Include lines. You can add preferred servers immediately # after the header, and they will be used before the default mirrors. -[fly] -Server = file:///home/xyz/programs/repos/fly/$arch +#[fly] +#Server = file:///home/xyz/programs/repos/fly/$arch -#[fly-any] -#Server = file:///home/xyz/programs/repos/fly/any +[fly-any] +Server = file:///home/xyz/programs/repos/fly/any #[core-testing] #Include = /etc/pacman.d/mirrorlist diff --git a/etc/resolv.conf b/etc/resolv.conf new file mode 120000 index 00000000..36396629 --- /dev/null +++ b/etc/resolv.conf @@ -0,0 +1 @@ +/run/systemd/resolve/stub-resolv.conf
\ No newline at end of file diff --git a/etc/services b/etc/services index 4bbdc73e..32ae60c0 100644 --- a/etc/services +++ b/etc/services @@ -1366,6 +1366,8 @@ apex-mesh 912/tcp apex-mesh 912/udp apex-edge 913/tcp apex-edge 913/udp +rift-lies 914/udp +rift-ties 915/udp rndc 953/tcp ftps-data 989/tcp ftps-data 989/udp @@ -3848,6 +3850,8 @@ simple-tx-rx 2257/tcp simple-tx-rx 2257/udp rcts 2258/tcp rcts 2258/udp +bid-serv 2259/tcp +bid-serv 2259/udp apc-2260 2260/tcp apc-2260 2260/udp comotionmaster 2261/tcp @@ -4066,6 +4070,8 @@ service-ctrl 2367/tcp service-ctrl 2367/udp opentable 2368/tcp opentable 2368/udp +bif-p2p 2369/tcp +bif-p2p 2369/udp l3-hbmon 2370/tcp l3-hbmon 2370/udp rda 2371/tcp @@ -5901,6 +5907,8 @@ deskview 3298/udp pdrncs 3299/tcp pdrncs 3299/udp ceph 3300/tcp +tarantool 3301/tcp +tarantool 3301/udp mcs-fastmail 3302/tcp mcs-fastmail 3302/udp opsession-clnt 3303/tcp @@ -7217,8 +7225,8 @@ iconp 3972/tcp iconp 3972/udp progistics 3973/tcp progistics 3973/udp -citysearch 3974/tcp -citysearch 3974/udp +xk22 3974/tcp +xk22 3974/udp airshot 3975/tcp airshot 3975/udp opswagent 3976/tcp @@ -7677,7 +7685,7 @@ trim-event 4322/tcp trim-event 4322/udp trim-ice 4323/tcp trim-ice 4323/udp -geognosisman 4325/tcp +geognosisadmin 4325/tcp geognosisman 4325/udp geognosis 4326/tcp geognosis 4326/udp @@ -8084,6 +8092,8 @@ xmcp 4788/tcp vxlan 4789/udp vxlan-gpe 4790/udp roce 4791/udp +unified-bus 4792/tcp +unified-bus 4792/udp iims 4800/tcp iims 4800/udp iwec 4801/tcp @@ -8450,6 +8460,8 @@ padl2sim 5236/tcp padl2sim 5236/udp mnet-discovery 5237/tcp mnet-discovery 5237/udp +attune 5242/tcp +xycstatus 5243/tcp downtools 5245/tcp downtools-disc 5245/udp capwap-control 5246/udp @@ -8890,6 +8902,7 @@ icmpd 5813/tcp icmpd 5813/udp spt-automation 5814/tcp spt-automation 5814/udp +autopassdaemon 5820/tcp shiprush-d-ch 5841/tcp reversion 5842/tcp wherehoo 5859/tcp @@ -8901,17 +8914,38 @@ diameters 5868/sctp jute 5883/tcp rfb 5900/tcp rfb 5900/udp -cm 5910/tcp -cm 5910/udp +ff-ice 5903/tcp +ff-ice 5903/udp +ff-ice 5903/sctp +ag-swim 5904/tcp +ag-swim 5904/udp +ag-swim 5904/sctp +asmgcs 5905/tcp +asmgcs 5905/udp +asmgcs 5905/sctp +rpas-c2 5906/tcp +rpas-c2 5906/udp +rpas-c2 5906/sctp +dsd 5907/tcp +dsd 5907/udp +dsd 5907/sctp +ipsma 5908/tcp +ipsma 5908/udp +ipsma 5908/sctp +agma 5909/tcp +agma 5909/udp +agma 5909/sctp +ats-atn 5910/tcp +ats-atn 5910/udp cm 5910/sctp -cpdlc 5911/tcp -cpdlc 5911/udp +ats-acars 5911/tcp +ats-acars 5911/udp cpdlc 5911/sctp -fis 5912/tcp -fis 5912/udp +ais-met 5912/tcp +ais-met 5912/udp fis 5912/sctp -ads-c 5913/tcp -ads-c 5913/udp +aoc-acars 5913/tcp +aoc-acars 5913/udp ads-c 5913/sctp indy 5963/tcp indy 5963/udp @@ -9365,6 +9399,7 @@ acmsoda 6969/tcp acmsoda 6969/udp conductor 6970/tcp conductor-mpx 6970/sctp +qolyester 6980/udp MobilitySrv 6997/tcp MobilitySrv 6997/udp iatp-highpri 6998/tcp @@ -9640,12 +9675,13 @@ imqbrokerd 7676/tcp imqbrokerd 7676/udp sun-user-https 7677/tcp sun-user-https 7677/udp -pando-pub 7680/tcp -pando-pub 7680/udp +ms-do 7680/tcp +ms-do 7680/udp dmt 7683/tcp bolt 7687/tcp collaber 7689/tcp collaber 7689/udp +sovd 7690/tcp klio 7697/tcp klio 7697/udp em7-secom 7700/tcp @@ -9822,6 +9858,7 @@ senomix07 8058/udp senomix08 8059/tcp senomix08 8059/udp aero 8060/udp +nikatron-dev 8061/tcp toad-bi-appsrvr 8066/tcp infi-async 8067/tcp ucs-isc 8070/tcp @@ -9923,8 +9960,8 @@ synapse-nhttps 8243/tcp synapse-nhttps 8243/udp espeasy-p2p 8266/udp robot-remote 8270/tcp -pando-sec 8276/tcp -pando-sec 8276/udp +ms-mcc 8276/tcp +ms-mcc 8276/udp synapse-nhttp 8280/tcp synapse-nhttp 8280/udp libelle 8282/tcp @@ -9977,6 +10014,7 @@ espeech-rtp 8417/tcp espeech-rtp 8417/udp aritts 8423/tcp pgbackrest 8432/tcp +aws-as2 8433/udp cybro-a-bus 8442/tcp cybro-a-bus 8442/udp pcsync-https 8443/tcp @@ -9985,6 +10023,7 @@ pcsync-http 8444/tcp pcsync-http 8444/udp copy 8445/tcp copy-disc 8445/udp +matrix-fed 8448/tcp npmp 8450/tcp npmp 8450/udp nexentamv 8457/tcp @@ -10289,6 +10328,7 @@ secure-ts 9318/udp guibase 9321/tcp guibase 9321/udp gnmi-gnoi 9339/tcp +gribi 9340/tcp mpidcmgr 9343/tcp mpidcmgr 9343/udp mphlpdmc 9344/tcp @@ -10675,6 +10715,7 @@ warehouse 12322/tcp warehouse 12322/udp italk 12345/tcp italk 12345/udp +carb-repl-ctrl 12546/tcp tsaf 12753/tcp tsaf 12753/udp netperf 12865/tcp @@ -10719,6 +10760,7 @@ dsmcc-download 13821/udp dsmcc-ccp 13822/tcp dsmcc-ccp 13822/udp bmdss 13823/tcp +a-trust-rpc 13832/tcp ucontrol 13894/tcp ucontrol 13894/udp dta-systems 13929/tcp @@ -10817,6 +10859,7 @@ amt-redir-tls 16995/tcp amt-redir-tls 16995/udp isode-dua 17007/tcp isode-dua 17007/udp +ncpu 17010/tcp vestasdlp 17184/tcp soundsvirtual 17185/tcp soundsvirtual 17185/udp @@ -10920,8 +10963,10 @@ faircom-db 19790/tcp iec-104-sec 19998/tcp dnp-sec 19999/tcp dnp-sec 19999/udp +dnp-sec 19999/sctp dnp 20000/tcp dnp 20000/udp +dnp 20000/sctp microsan 20001/tcp microsan 20001/udp commtact-http 20002/tcp @@ -10970,6 +11015,7 @@ vofr-gateway 21590/tcp vofr-gateway 21590/udp tvpm 21800/tcp tvpm 21800/udp +sal 21801/tcp webphone 21845/tcp webphone 21845/udp netspeak-is 21846/tcp @@ -11333,6 +11379,7 @@ ng-control 38412/sctp xn-control 38422/sctp e1-interface 38462/sctp f1-control 38472/sctp +psqlmws 38638/tcp sruth 38800/tcp secrmmsafecopya 38865/tcp vroa 39063/tcp @@ -11366,6 +11413,7 @@ candrp 42509/tcp candrp 42509/udp caerpc 42510/tcp caerpc 42510/udp +curiosity 42999/tcp recvr-rc 43000/tcp recvr-rc-disc 43000/udp reachout 43188/tcp @@ -11461,6 +11509,4 @@ nusrp 49001/tcp nusdp-disc 49001/udp inspider 49150/tcp # my services -jackett 9117/tcp -searx 49152/tcp -qrcp 49153/tcp +iperf3 53497/tcp diff --git a/etc/ssh/sshd_config b/etc/ssh/sshd_config index ad7e1f20..1438778c 100644 --- a/etc/ssh/sshd_config +++ b/etc/ssh/sshd_config @@ -1,4 +1,15 @@ -# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ +# `man sshd_config` says "for each keyword, the first obtained value will be used". So I decided to put my configs before all others to override them all. +# Based on manpage, setting PasswordAuthentication no, and Arch Linux default KbdInteractiveAuthentication no, with other defaults seems already equivalent to AuthenticationMethods publickey, but I still put it here for redundancy. +# https://wiki.archlinux.org/title/OpenSSH#Force_public_key_authentication +AuthenticationMethods publickey +PermitRootLogin no +PasswordAuthentication no +# KbdInteractiveAuthentication no and UsePAM yes are Arch Linux default settings see /etc/ssh/sshd_config.d/00-archlinux.conf, I need these configs, I put them here just in case Arch Linux change the defaults in the future. +KbdInteractiveAuthentication no +UsePAM yes + +# Include drop-in configurations +Include /etc/ssh/sshd_config.d/*.conf # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -29,7 +40,7 @@ # Authentication: #LoginGraceTime 2m -PermitRootLogin no +#PermitRootLogin prohibit-password #StrictModes yes #MaxAuthTries 6 #MaxSessions 10 @@ -54,11 +65,11 @@ AuthorizedKeysFile .ssh/authorized_keys #IgnoreRhosts yes # To disable tunneled clear text passwords, change to no here! -PasswordAuthentication no +#PasswordAuthentication yes #PermitEmptyPasswords no # Change to no to disable s/key passwords -KbdInteractiveAuthentication no +#KbdInteractiveAuthentication yes # Kerberos options #KerberosAuthentication no @@ -75,11 +86,11 @@ KbdInteractiveAuthentication no # be allowed through the KbdInteractiveAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via KbdInteractiveAuthentication may bypass -# the setting of "PermitRootLogin without-password". +# the setting of "PermitRootLogin prohibit-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and KbdInteractiveAuthentication to 'no'. -UsePAM yes +#UsePAM no #AllowAgentForwarding yes #AllowTcpForwarding yes @@ -88,7 +99,7 @@ UsePAM yes #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes -PrintMotd no # pam does that +#PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes #PermitUserEnvironment no diff --git a/etc/sudoers b/etc/sudoers index 65cd7ca1..cfd22989 100644 --- a/etc/sudoers +++ b/etc/sudoers @@ -59,15 +59,22 @@ ## Uncomment to use a hard-coded PATH instead of the user's to find commands # Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ## +## Uncomment to restore the historic behavior where a command is run in +## the user's own terminal. +# Defaults !use_pty +## ## Uncomment to send mail if the user does not enter the correct password. # Defaults mail_badpass ## ## Uncomment to enable logging of a command's output, except for ## sudoreplay and reboot. Use sudoreplay to play back logged sessions. +## Sudo will create up to 2,176,782,336 I/O logs before recycling them. +## Set maxseq to a smaller number if you don't have unlimited disk space. # Defaults log_output # Defaults!/usr/bin/sudoreplay !log_output # Defaults!/usr/local/bin/sudoreplay !log_output # Defaults!REBOOT !log_output +# Defaults maxseq = 1000 ## ## Runas alias specification @@ -82,7 +89,7 @@ root ALL=(ALL:ALL) ALL %wheel ALL=(ALL:ALL) ALL ## Same thing without a password -#%wheel ALL=(ALL:ALL) NOPASSWD: ALL +# %wheel ALL=(ALL:ALL) NOPASSWD: ALL ## Uncomment to allow members of group sudo to execute any command # %sudo ALL=(ALL:ALL) ALL diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc index 4597afb4..be28f908 100644 --- a/home/xyz/.bashrc +++ b/home/xyz/.bashrc @@ -32,17 +32,22 @@ esac PS1="\[$(tput setaf 2)\][\u@\h \W]\$ \[$(tput sgr0)\]" # https://github.com/LukeSmithxyz/voidrice/blob/master/.config/shell/aliasrc -for cmd in iotop nethogs hardcode-fixer ventoy du units_cur fbgrab powertop nft rpi-imager fdisk; do +for cmd in hardcode-fixer ventoy du units_cur fbgrab powertop nft rpi-imager fdisk dmesg; do alias $cmd="sudo $cmd" done -for cmd in pacdiff 'tree -a'; do - alias ${cmd%% *}="sudo -E $cmd" +for cmd in pacdiff visudo; do + alias $cmd="sudo -E $cmd" +done +for cmd in loop o 'watch -c'; do + alias ${cmd%% *}="$cmd " done unset cmd # same name alias absolutely-proprietary='echo n | absolutely-proprietary -f' alias alsamixer='alsamixer -V all' +# I can't find a quick and easy way to temperory disable cloc config file except to change config file. Using an alias can disable --vcs with just \cloc. +alias cloc='cloc --vcs auto' alias diff='diff --color=auto' alias grep='grep --color=auto' #alias info='info --vi-keys' @@ -53,38 +58,57 @@ alias remind='remind -@' alias rm='rm -I' alias sdcv='sdcv --color' alias shellcheck='shellcheck -x' +alias tree='tree -aC | "$PAGER"' alias uname='uname -a' -alias watch='watch -c' # different name +alias a=alarm # /dev/ttyACM0 can be in config file, or as environmantal variable, see /usr/share/doc/adafruit-ampy/README.md -alias ap='sudo ampy -p /dev/ttyACM0' +#alias ap='ampy -p /dev/ttyACM0' +alias b='lsblk -o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSED,FSUSE%,MOUNTPOINTS' alias c=cfg +#alias cr=curl +alias cri='curl -Is' +alias crig='curl -Is www.google.com' alias d='\sdcv --color' +alias e='"$PAGER"' +# https://superuser.com/a/1202867 +alias fdu="find . -maxdepth 1 -execdir du -sh '{}' \+ | sort -h" alias g=git +alias gcd='git clone --depth=1' +alias gr='\grep --color=auto -i' +alias grr='\grep --color=auto -iIR' +alias h=htop alias l='\ls --color=auto -A --group-directories-first' alias ll='\ls --color=auto -lAh --group-directories-first' +#alias lo=loop +alias lop='loop ping' +alias lopd='loop ping 9.9.9.9' alias m=man alias p=pacman alias pt=pactree alias pu=paru alias qre='qrencode -t utf8i -m 1' -alias r='rem -c+2 -@' -alias s='sudo ' # https://askubuntu.com/a/22043 +alias r='rem -cu+2 -@' +# https://askubuntu.com/a/22043 +alias s='sudo ' alias se='sudo -E ' +alias ska='ssh ka' +alias sp='ssh pp' alias spd='speedtest; librespeed-cli' alias sv=sudoedit alias sy=systemctl -alias tp='sudo tio /dev/ttyACM0' -alias v='$EDITOR' -alias va='$EDITOR "$XDG_DOCUMENTS_DIR/notes/computer/arch_install.md"' -alias vc='$EDITOR "$XDG_DOCUMENTS_DIR/notes/computer/cli_notes.md"' -alias vq='$EDITOR "$XDG_DOCUMENTS_DIR/notes/others/questions_ideas_tips.md"' -alias vr='$EDITOR "$DOTREMINDERS"' -alias vvrc='$EDITOR +e\ \$MYVIMRC' +alias syd='systemctl list-dependencies --all' +alias sydr='systemctl list-dependencies --all --reverse' +alias sye='systemctl list-unit-files --state=enabled' +alias sys='systemctl status' +alias syu='systemctl --user' +alias syue='systemctl --user list-unit-files --state=enabled' +alias syus='systemctl --user status' +alias v='"$EDITOR"' +alias vd='vidir2 --linktargets' +alias vrc='"$EDITOR" +e\ \$MYVIMRC' alias za='zoxide add' - -# almost never use #alias zq='zoxide query' #alias zqi='zoxide query -i' diff --git a/home/xyz/.config/htop/htoprc b/home/xyz/.config/htop/htoprc index 48d07e69..cb80a1bc 100644 --- a/home/xyz/.config/htop/htoprc +++ b/home/xyz/.config/htop/htoprc @@ -1,12 +1,8 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -htop_version=3.1.0 -config_reader_min_version=2 +htop_version=3.2.0 +config_reader_min_version=3 fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=46 -sort_direction=-1 -tree_sort_key=0 -tree_sort_direction=1 hide_kernel_threads=1 hide_userland_threads=1 shadow_other_users=0 @@ -21,10 +17,8 @@ highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=0 -tree_view=0 -tree_view_always_by_pid=0 -all_branches_collapsed=0 header_margin=1 +screen_tabs=1 detailed_cpu_time=0 cpu_count_from_one=0 show_cpu_usage=1 @@ -38,7 +32,30 @@ enable_mouse=1 delay=15 hide_function_bar=0 header_layout=two_50_50 -column_meters_0=AllCPUs Memory Swap -column_meter_modes_0=1 1 1 -column_meters_1=Tasks LoadAverage DiskIO NetworkIO -column_meter_modes_1=2 2 2 2 +column_meters_0=LeftCPUs Memory Uptime LoadAverage Systemd +column_meter_modes_0=1 1 2 2 2 +column_meters_1=RightCPUs Swap Tasks DiskIO NetworkIO +column_meter_modes_1=1 1 2 2 2 +tree_view=0 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim index b08d967d..d73e0ba0 100644 --- a/home/xyz/.config/nvim/init.vim +++ b/home/xyz/.config/nvim/init.vim @@ -8,18 +8,19 @@ call plug#begin() "Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } "Plug 'junegunn/fzf.vim' "Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' } -Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } +"Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } " chriskempson/base16-vim doesn't do bold/italic for markdown syntax, and not maintained -" fnune/base16-vim and RRethy/nvim-base16 seem both work, both support tree-sitter -Plug 'fnune/base16-vim' +" tinted-theming/base16-vim and RRethy/nvim-base16 seem both work, both support tree-sitter +" I prefer tinted-theming/base16-vim in the past because of darker status bar color? +Plug 'tinted-theming/base16-vim' " nvim-treesitter does not support markdown right now, so wait "Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update " use latest vim-markdown Plug 'tpope/vim-markdown' " alternatives: h-hg/fcitx.nvim, rlue/vim-barbaric, lilydjwg/fcitx.vim -Plug 'rlue/vim-barbaric' +"Plug 'rlue/vim-barbaric' " alternatives: 'thinca/vim-ref' with 'eiiches/vim-ref-info', 'HiPhish/info.vim', 'alx741/vinfo' -Plug 'HiPhish/info.vim' +Plug 'https://gitlab.com/HiPhish/info.vim.git' call plug#end() " next line must put below `Plug 'glacambre/firenvim'`, else if click github issue textarea, then click elsewhere, then click textarea, textarea will not be selected (no cursor in it), not sure why @@ -57,7 +58,8 @@ augroup END " :h markdown, for vim default tpope/vim-markdown "let g:markdown_folding = 1 -let g:markdown_minlines = 500 +" g:markdown_minlines before nvim 0.8, 500 works well; version 0.8 makes even 400 noticeable slow when keep pressing gk +let g:markdown_minlines = 350 "let g:markdown_fenced_languages = ['python', 'sh', 'vim', 'c', 'cpp'] " netrw-p preview vertial split @@ -68,7 +70,7 @@ let g:netrw_winsize = 20 filetype plugin on " fold is slow and buggy, at least for different kinds of vim-markdown, disable it, not sure if works or not -set nofoldenable +"set nofoldenable language en_US set number relativenumber @@ -80,9 +82,6 @@ colorscheme base16-tomorrow-night " set dir to current editing file's dir set autochdir -" always use system for ALL instead of use + and * operator? -"set clipboard+=unnamedplus - " Spaces & Tabs set tabstop=4 " number of visual spaces per TAB set softtabstop=4 " number of spaces in tab when editing @@ -90,24 +89,30 @@ set shiftwidth=4 " number of spaces to use for autoindent "set expandtab " tabs are space " https://www.zhihu.com/question/22363620/answer/21199296 -" last line seems is default to neovim but not vim -set fileencodings=ucs-bom,utf-8,utf-16,gbk,big5,gb18030,latin1 +" euc-cn=gb2312, cp936=gbk +" it is recommended by `:h fileencodings` to put ucs-bom at first and latin1 at last +" based on my experience, if put utf-16 in front of euc-cn, euc-cn will have mojibake +" based on my experience, if put big5 in front of euc-cn and cp936, euc-cn will have mojibake +" according to zhihu comment, if put gb18030 in front of big5 , big5 will have mojibake +" according to wikipedia articles, euc-cn is preceded by cp936 which is preceded by gb18030, gb18030 is backward compatible with cp936 which seems is backward compatible with euc-cn +set fileencodings=ucs-bom,utf-8,euc-cn,cp936,big5,gb18030,utf-16,latin1 +" seems is default to neovim but not vim set encoding=utf-8 " some file on win10 display as unix but is dos -"if has('win32') -" set fileformats=dos -" " windows 10 bug, need this to change cursor back to vertical bar after leaving neovim -" " the number after ver seems no effects, maybe because neovim is exited -" " https://github.com/alacritty/alacritty/issues/2839#issuecomment-766421840 -" " use of ! after autocmd see youtube video above, not fully understood -" autocmd! VimLeave * set guicursor=a:ver25 -"endif - -" don't generate those three types of files -set nobackup -set noswapfile -set noundofile +if has('win32') + set fileformats=dos + " windows 10 bug, need this to change cursor back to vertical bar after leaving neovim + " the number after ver seems no effects, maybe because neovim is exited + " https://github.com/alacritty/alacritty/issues/2839#issuecomment-766421840 + " use of ! after autocmd see youtube video above, not fully understood + autocmd! VimLeave * set guicursor=a:ver25 +endif + +" if don't want to generate swap file +"set noswapfile +" nvim backup file defualt off, see `:h nobackup` `:set backup?` +" nvim undo file default off, see `:h noundofile` `:set undofile?` " gg=G work for .xml files now,:h matchit-activate " https://stackoverflow.com/questions/21408222/vim-indent-xml-file/28365920#28365920 @@ -117,6 +122,10 @@ packadd! matchit set ignorecase set smartcase +" disable mouse support +" :h disable-mouse +set mouse= + " map ctrl+h/j/k/l to move between split windows map <C-h> <C-w>h map <C-j> <C-w>j @@ -124,8 +133,8 @@ map <C-k> <C-w>k map <C-l> <C-w>l " moving in long line -nnoremap k gk -nnoremap j gj +"nnoremap k gk +"nnoremap j gj nnoremap o o<Esc> nnoremap O O<Esc> diff --git a/home/xyz/.config/systemd/user/ssh-agent.service b/home/xyz/.config/systemd/user/ssh-agent.service index 66fa63ef..e867c4b1 100644 --- a/home/xyz/.config/systemd/user/ssh-agent.service +++ b/home/xyz/.config/systemd/user/ssh-agent.service @@ -11,7 +11,7 @@ Type=simple Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket # DISPLAY required for ssh-askpass to work Environment=DISPLAY=:0 -ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK -t 3600 # github White-Oak approach # https://github.com/White-Oak/arch-setup-for-dummies/blob/master/setting-up-ssh-agent.md diff --git a/home/xyz/.local/bin/cfg b/home/xyz/.local/bin/cfg index 3f7ec29d..92a097e7 100755 --- a/home/xyz/.local/bin/cfg +++ b/home/xyz/.local/bin/cfg @@ -1,5 +1,6 @@ #!/bin/sh +umask 077 while getopts lsmM opt; do case $opt in #c) diff --git a/home/xyz/.local/bin/gita b/home/xyz/.local/bin/gita index 27b45549..9e445761 100755 --- a/home/xyz/.local/bin/gita +++ b/home/xyz/.local/bin/gita @@ -11,7 +11,7 @@ while getopts cls f; do done shift $((OPTIND-1)) -mes="${1:-refactor}" +mes="${1:-update}" $cmd add -u $cmd commit -m "$mes" diff --git a/home/xyz/.local/bin/gitfork b/home/xyz/.local/bin/gitfork deleted file mode 100755 index cefc4f68..00000000 --- a/home/xyz/.local/bin/gitfork +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -git clone "$1" -cd "$(basename "$1" .git)" || exit -git remote add upstream "$2" -git branch fly -git checkout fly -git push --set-upstream origin fly diff --git a/home/xyz/.local/bin/gitpu b/home/xyz/.local/bin/gitpu deleted file mode 100755 index fcc32be9..00000000 --- a/home/xyz/.local/bin/gitpu +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ]; then - git checkout master - git pull upstream master - git push - git checkout fly - git merge --no-edit master - git push -else - for dir ; do - git -C "$dir" checkout master - git -C "$dir" pull upstream master - git -C "$dir" push - git -C "$dir" checkout fly - git -C "$dir" merge --no-edit master - git -C "$dir" push - done -fi diff --git a/home/xyz/.local/bin/gitsetup b/home/xyz/.local/bin/gitsetup deleted file mode 100755 index 56f91d76..00000000 --- a/home/xyz/.local/bin/gitsetup +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -git clone "$1" -cd "$(basename "$1" .git)" || exit -git remote add upstream "$2" -git checkout fly diff --git a/home/xyz/.local/bin/mmi b/home/xyz/.local/bin/mmi index cad872cc..350fe505 100755 --- a/home/xyz/.local/bin/mmi +++ b/home/xyz/.local/bin/mmi @@ -19,7 +19,7 @@ shift $((OPTIND-1)) if [ -z "$1" ]; then eval "$cmd" else - for dir ; do + for dir; do cd "$dir" || exit eval "$cmd" cd "$origin" || exit diff --git a/home/xyz/.local/bin/mvln b/home/xyz/.local/bin/mvln index fb540390..54cef541 100755 --- a/home/xyz/.local/bin/mvln +++ b/home/xyz/.local/bin/mvln @@ -25,6 +25,3 @@ else shift done fi - -# for test -#rm -rf ~/test/A\ A/; mkdir -p ~/test/A\ A/; cp -r ~/test/0t/ ~/test/A\ A/1t/; mvln ~/test/A\ A/1t/* ~/test/A\ A/; tree ~/test/A\ A/ diff --git a/home/xyz/.local/bin/mvtr b/home/xyz/.local/bin/mvtr index 850f8dba..28eebf0f 100755 --- a/home/xyz/.local/bin/mvtr +++ b/home/xyz/.local/bin/mvtr @@ -9,6 +9,3 @@ # -exec can't replace -execdir here, can write a -exec version find "$@" -depth -execdir sh -c 'dest="$(echo "$1" | tr -d "\047" | sed -E -e "s/([[:lower:]])([[:upper:]])/\1_\2/g" | tr "[:upper:] " "[:lower:]_" | tr -s "[:punct:]" | sed -E -e "s#/-#/#g" -e "s/_([[:punct:]])/\1/g" -e "s/([[:punct:]])_/\1/g" | tr -s "[:punct:]")"; [ -e "$dest" ] || mv -v -- "$1" "$dest"' shell '{}' \; - -# for test -#mkdir -p ~/test/A\ A/; rm -rf ~/test/A\ A/1t/; cp -r ~/test/0t/ ~/test/A\ A/1t/; time mvtr ~/test/A\ A/1t/; tree ~/test/A\ A/1t/ diff --git a/home/xyz/.local/bin/o b/home/xyz/.local/bin/o index d70a6d76..8fb066c7 100755 --- a/home/xyz/.local/bin/o +++ b/home/xyz/.local/bin/o @@ -13,6 +13,8 @@ # using `>&-` or `2>&-` doesn't completely close mpv's output when run sth. like `o mpv file.mkv` # base on above observations, I choose to use `>/dev/null 2>&1` instead +# need ; before } when it is in the same line as { ? https://www.shellcheck.net/wiki/SC1056 + if [ $# -eq 1 ] && [ -e "$1" ] && { ! [ -x "$1" ] || [ -d "$1" ];}; then case "$1" in # libreoffice, please don't let firefox eat your shit diff --git a/home/xyz/.local/bin/time.uuid b/home/xyz/.local/bin/time-uuid index 11cc67ad..bdaf4b3d 100755 --- a/home/xyz/.local/bin/time.uuid +++ b/home/xyz/.local/bin/time-uuid @@ -3,4 +3,4 @@ # echo current nanosecond since epoch and alpha-numerically ordered UUID # https://stackoverflow.com/questions/28681650/generate-alpha-numerically-ordered-uuids-over-time?noredirect=1&lq=1 # https://askubuntu.com/questions/342842/what-does-this-command-mean-awk-f-print-4 -echo "$(date '+%s.%N').$(uuidgen -t | awk -F- '{OFS="-"; print $3,$2,$1,$4,$5}')" +echo "$(date '+%s-%N')-$(uuidgen -t | awk -F- '{OFS="-"; print $3,$2,$1,$4,$5}')" diff --git a/home/xyz/.local/bin/upd b/home/xyz/.local/bin/upd index 8fd6f24b..4552db43 100755 --- a/home/xyz/.local/bin/upd +++ b/home/xyz/.local/bin/upd @@ -2,34 +2,13 @@ all () { fast + clean usb - #qb - #kg - #ncm refl - #gall } clean () { - #nsxiv -c - # my ways - # -exec can't replace -execdir here - #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty -execdir rmdir -- '{}' \+ - # -exec can replace -execdir here - #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -execdir rmdir --ignore-fail-on-non-empty -- '{}' \+ - # nsxiv man page way - #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty ! -name '.' -exec rmdir -- '{}' \; - - #rm "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefs.js.backup."* - - # https://unix.stackexchange.com/questions/92095/reset-atq-list-to-zero - sudo systemctl stop atd - echo 0 | sudo tee /var/spool/atd/.SEQ > /dev/null - sudo systemctl start atd - - #rm -rf "$XDG_VIDEOS_DIR/recordings/tmp/" - - sudo pacman -Sc --noconfirm + paru -aSc --noconfirm } # basic daily stuff @@ -38,100 +17,60 @@ fast () { misc } -gall () { - gallery-dl --download-archive "$XDG_DOCUMENTS_DIR/database/gallery-dl.sqlite3" -d "$XDG_PICTURES_DIR/anime/gallery-dl/" -i "$XDG_CONFIG_HOME/myconf/gallery_urls" -} - -userjs () { - kill $(pidof "$BROWSER") - "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefsCleaner.sh" -s - "$HOME/.mozilla/firefox/xxxxxxxx.fly/updater.sh" -us -} - -kg () { - curlkg -u649b9e82272a348b -- "$XDG_MUSIC_DIR/not_pure/lan_lan/kg/" - #curlkg -u64949d822c25328c -- "$XDG_MUSIC_DIR/not_pure/cheng_ruan/kg/" -} - misc () { - "$EDITOR" +PlugUpgrade +PlugClean! +PlugUpdate +qa - tldr --update - sudo hardcode-fixer - sudo units_cur - awk '!a[$0]++' "$XDG_DATA_HOME/sdcv_history" | sponge "$XDG_DATA_HOME/sdcv_history" - - # temperory solution before find a way of using git submodule or subtree with `cfg -l` - #git --git-dir=/home/xyz/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks/.git/ --work-tree=/home/xyz/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks/ pull - - #userjs - clean -} - -ncm () { - curlncm -a48860966 -- "$XDG_MUSIC_DIR/not_pure/lan_lan/ncm/artist/" - #curlncm -a46703185 -- "$XDG_MUSIC_DIR/not_pure/cheng_ruan/ncm/artist/" - #curlncm -a30382647 -- "$XDG_MUSIC_DIR/not_pure/qi_tian_sakura/ncm/artist/" - - curlncm -r793052426 -- "$XDG_MUSIC_DIR/not_pure/lan_lan/ncm/djradio/" - #curlncm -r792968433 -- "$XDG_MUSIC_DIR/not_pure/cheng_ruan/ncm/djradio/" - #curlncm -r792042397 -- "$XDG_MUSIC_DIR/not_pure/qi_tian_sakura/ncm/djradio/" + "$EDITOR" +PlugClean! +PlugUpdate +qa + rustup update } pac () { pacpacs="$(sudo pacman --noconfirm -Syu | tee /dev/tty | grep '^Packages' | cut -d' ' -f3-)" - aurpacs="$(paru --noconfirm -aSyu | tee /dev/tty | grep '^Aur' | cut -d' ' -f3-)" + aurpacs="$(paru --noconfirm -aSu | tee /dev/tty | grep '^Aur' | cut -d' ' -f3-)" # part steal from aur comment # sometimes "ERROR: Failure while downloading": https://github.com/neovim/neovim/issues/15709 # echo 1, printf 1 and yes 1 all works? not sure why # aur neovim-nightly-bin has some issue on 12/26/2021? switch to community repo neovim temporary #rm -rf ~/.cache/paru/clone/neovim-nightly-bin/ && echo 1 | PARU_PAGER=cat paru --rebuild --redownload neovim-nightly-bin - sudo pacman -Fy + pacman -Qqme > "$XDG_CONFIG_HOME/myconf/pacman_Qqme" + pacman -Qqne > "$XDG_CONFIG_HOME/myconf/pacman_Qqne" + systemctl list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/sye" + systemctl --user list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/syue" # pacdiff default use pacman database, so no need `sudo -E` for find, but will be a little bit slower log="$log updated pacman packages: $pacpacs updated aur packages: $aurpacs pacdiff: $(pacdiff -o | tr '\n' ' ') +checkrebuild: $(checkrebuild) " } -qb () { - rm -r -- "$HOME/programs/qbittorrent_search_plugins/" - curlqb "$HOME/programs/qbittorrent_search_plugins/" -} - refl () { - sudo reflector --verbose --save /etc/pacman.d/mirrorlist --score 50 --fastest 45 + # why not use http: + # https://www.reddit.com/r/archlinux/comments/kx149z/should_i_use_http_mirrors/ + # https://www.reddit.com/r/archlinux/comments/ej4k4d/is_it_safe_to_use_not_secured_http_pacman_mirrors/ + # rsync may need to change XferCommand in /etc/pacman.conf + # https://www.reddit.com/r/archlinux/comments/mynw6e/rsync_mirrors_with_pacman/ + # need --delay so no super out of sync mirrors + sudo reflector --verbose --save /etc/pacman.d/mirrorlist --country us --protocol https --delay 1 --latest 25 --score 25 --fastest 10 } usb () { - cfg -l push usb cfg -s push - git --git-dir="$XDG_DOCUMENTS_DIR/notes/.git/" --work-tree="$XDG_DOCUMENTS_DIR/notes/" push usb - git --git-dir="$HOME/programs/reminders/.git/" --work-tree="$HOME/programs/reminders/" push usb - # not sure if useful or not - sync } if [ $# -eq 0 ]; then fast else - while getopts acfgjkmnpqru opt; do + while getopts acfmpru opt; do case $opt in a)all;; c)clean;; f)fast;; - g)gall;; - j)userjs;; - k)kg;; m)misc;; - n)ncm;; p)pac;; - q)qb;; r)refl;; u)usb;; \?)exit 1;; esac done fi - -printf '%s' "$log" +[ "$log" ] && printf '%s' "$log" | tee "$XDG_DOCUMENTS_DIR/logs/upd.log" diff --git a/home/xyz/.local/bin/wh b/home/xyz/.local/bin/wh index 4206c363..d20f0de6 100755 --- a/home/xyz/.local/bin/wh +++ b/home/xyz/.local/bin/wh @@ -8,4 +8,4 @@ sgr0="$(tput sgr0)" for cmd in type whatis whereis which "pacman -Qo --color always"; do printf '\n%s\n%s\n' "$setaf$cmd $*$sgr0" "$($cmd "$@" 2>&1)" #printf '\n\033[0;34m%s\033[0m\n%s\n' "$setaf$cmd $*$sgr0" "$($cmd "$@" 2>&1)" -done | $PAGER +done | "$PAGER" diff --git a/home/xyz/.profile b/home/xyz/.profile index f2cc4d20..b4dd4240 100644 --- a/home/xyz/.profile +++ b/home/xyz/.profile @@ -3,6 +3,7 @@ export XDG_CONFIG_HOME="$HOME/.config/" export XDG_CACHE_HOME="$HOME/.cache/" export XDG_DATA_HOME="$HOME/.local/share/" +export XDG_STATE_HOME="$HOME/.local/state/" . "$XDG_CONFIG_HOME/user-dirs.dirs" export XDG_DESKTOP_DIR @@ -18,72 +19,43 @@ PATH="$(find "$HOME/.local/bin" -type d -exec printf '%s:' '{}' \+)$PATH" export PATH export HISTSIZE=15000 export HISTFILESIZE=15000 +export HISTCONTROL=ignorespace +# sqlite uses VISUAL for the edit() SQL function default text editor +# https://sqlite.org/cli.html +export VISUAL=nvim export EDITOR=nvim -export BROWSER=firefox +export PAGER=less # -X seems can keep the output if exit less? # -F is useful when sdcv need user to manually select similar word, after selection if no -F less will not quit if one screen # but other situation seems less use -F as default? # steal from sdcv arch wiki -export PAGER=less +# CALCURSE_PAGER less can't use -F, else ? and > hotkey will only blink the text export LESS=-FRXi -export SDCV_PAGER="$PAGER" -export SDCV_HISTSIZE=10000 -# CALCURSE_PAGER less can't use -F, else ? and > hotkey will only blink the text -#export CALCURSE_PAGER=less -# not posix export MANPAGER='nvim +Man!' -export MANSECT='1p:1:n:l:8:3p:3:0p:0:2:5:4:9:6:7' +# This MANSECT prioritize POSIX manpages. After use it for a long time, I think it is not suitable for me any more. +#export MANSECT='1p:1:n:l:8:3p:3:0p:0:2:5:4:9:6:7' export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export INPUTRC="$XDG_CONFIG_HOME/.inputrc" -#export QT_QPA_PLATFORMTHEME=qt5ct -#export QT_QPA_PLATFORMTHEME=gtk2 -export QT_QPA_PLATFORMTHEME=qt6ct -#export QT_STYLE_OVERRIDE=kvantum -#export SXHKD_SHELL=sh +# Thanks to https://github.com/trialuser02/qt6gtk2/pull/5 # enable color for `tree` command, not forced export CLICOLOR=1 # for pacdiff, without using aur neovim-drop-in or neovim-symlinks export DIFFPROG='nvim -d' export MAKEFLAGS="-j$(nproc --all)" -export DOTREMINDERS="$HOME/programs/reminders/.reminders" -export GTK_IM_MODULE=fcitx -export QT_IM_MODULE=fcitx -export XMODIFIERS=@im=fcitx # use sudo find for some files or dirs that has no permission ex: ~/.cache/paru/clone/ #export FZF_DEFAULT_COMMAND="fd --no-ignore --hidden --exclude .git" #export FZF_CTRL_T_COMMAND="fd --absolute-path --no-ignore --hidden --exclude .git" #export FZF_ALT_C_COMMAND="fd --no-ignore --hidden --type d --exclude .git" -export FZF_DEFAULT_COMMAND="sudo find . -mindepth 1 -path '*/\.git' -prune -o -print" +export FZF_DEFAULT_COMMAND="find . -mindepth 1 -path '*/\.git' -prune -o -print" # https://askubuntu.com/questions/444551/get-absolute-path-of-files-using-find-command # following two lines if use "" on the outermost, will not perfom expected, not sure why -export FZF_CTRL_T_COMMAND='sudo find "$PWD" -mindepth 1 -path "*/\.git" -prune -o -print' +export FZF_CTRL_T_COMMAND='find "$PWD" -mindepth 1 -path "*/\.git" -prune -o -print' #export FZF_CTRL_T_COMMAND='sudo find "$(pwd)" -path "*/\.git" -prune -o -print' # ~+ is bashism #export FZF_CTRL_T_COMMAND="sudo find ~+ -path '*/\.git' -prune -o -print" -export FZF_ALT_C_COMMAND="sudo find . -mindepth 1 -path '*/\.git' -prune -o -type d -print" - -export SCR_WIDTH=1600 -export SCR_HEIGHT=900 - -# for clipmenu -# set clipmenud to store clipboard only, don't store selection (primary) -#export CM_SELECTIONS="clipboard" -# X11, copy / close program / paste to another program, if 0 will paste nothing -#export CM_OWN_CLIPBOARD=1 -#export CM_MAX_CLIPS=8 - -# GDK_SCALE and GDK_DPI_SCALE should be use at the same time -# more see bookmarks about dpi -# not sure if correct -#export GDK_SCALE=1.36 -#export GDK_DPI_SCALE=0.73 -# correct but not sure if fits me -#export GDK_SCALE=2 -#export GDK_DPI_SCALE=0.5 - -playerctld daemon +export FZF_ALT_C_COMMAND="find . -mindepth 1 -path '*/\.git' -prune -o -type d -print" # must source .bashrc after export _ZO_ECHO=1 and INPUTRC=..., else these two env will has no effect, don't know why # here `. ~/.bashrc` same as `source ~/.bashrc`, see `source filename` in `man bash`, and `. file` in `man dash` @@ -91,9 +63,3 @@ playerctld daemon # https://github.com/koalaman/shellcheck/wiki/SC3046 #[[ -f ~/.bashrc ]] && . ~/.bashrc [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" - -# startx when login, should be put after environmental variables for .xinitrc to use -# use `[ "$XDG_VTNR" ]` to avoid "-bash: [: : integer expression expected" warning/error message, when `sudo su - xyz` or ssh into a remote server, not sure if best practice or not -#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then -# exec startx -#fi |