save
This commit is contained in:
parent
21ecd8c1d6
commit
9485609ca2
11
.bashrc
11
.bashrc
|
@ -74,6 +74,9 @@ elif 2>/dev/null 1>&2 command -v vi; then
|
|||
alias v='vi'
|
||||
fi
|
||||
|
||||
alias tapo_bright='ssh -t pt bash -ic tapo_bright'
|
||||
alias tapo_color_ambience='ssh -t pt bash -ic tapo_color_ambience'
|
||||
alias tapo_color_ambience2='ssh -t pt bash -ic tapo_color_ambience2'
|
||||
alias gdb='gdb -q'
|
||||
alias objdump='objdump --disassembler-color=extended-color -Mintel'
|
||||
alias v='nvim'
|
||||
|
@ -143,6 +146,7 @@ CDPATH="${CDPATH}:${HOME}/projects/aoc"
|
|||
CDPATH="${CDPATH}:${HOME}/projects/aoc/2023"
|
||||
CDPATH="${CDPATH}:${HOME}/42ecole"
|
||||
CDPATH="${CDPATH}:${HOME}/42ecole/42cursus"
|
||||
CDPATH="${CDPATH}:${HOME}/onnea"
|
||||
|
||||
function paruuu () {
|
||||
read -p 'Do system upgrade (Y) or exit (n)' choice
|
||||
|
@ -176,7 +180,7 @@ function paruuu () {
|
|||
&& [ ! "${ssid-}" = "Silmaril 4 (2.4)" ] \
|
||||
&& [ -n "${ssid-}" ] \
|
||||
&& : ; then
|
||||
read -p "[31mYou're connected to '${ssid-}', update anyway (Y|n)?[m" choice
|
||||
read -p "[31mYou're connected to '${ssid-}', update anyway (Y|n)?[m" choice
|
||||
if [ ! "${choice}" = "y" -a ! "${choice}" = "Y" -a -n "${choice}" ]; then
|
||||
exit
|
||||
fi
|
||||
|
@ -329,7 +333,7 @@ export MANPAGER='nvim +Man!'
|
|||
###################### PROMPT STUFF #######################
|
||||
# If bash runs in posix mode, if should be `cut -c2-' instead
|
||||
# shellcheck disable=SC2016
|
||||
PS0='$(clear -x ; printf "${PS1@P}" ; fc -nl -1 | cut -c3- ; printf "\n")'
|
||||
# PS0='$(clear -x ; printf "${PS1@P}" ; fc -nl -1 | cut -c3- ; printf "\n")'
|
||||
|
||||
if [ ! -f "${HOME}"/.bash-preexec.sh ] ; then
|
||||
curl --silent --location \
|
||||
|
@ -546,3 +550,6 @@ aocload () {
|
|||
tmux select-pane -l
|
||||
tmux send-keys "nvim './solution.py'" ENTER
|
||||
}
|
||||
|
||||
xmodmap ~/.Xmodmap
|
||||
alias q='docker run --rm -it ghcr.io/natesales/q'
|
||||
|
|
|
@ -32,6 +32,8 @@ yellow = "#da8548"
|
|||
[colors.primary]
|
||||
background = "#282c34"
|
||||
foreground = "#bbc2cf"
|
||||
# foreground = "#000000"
|
||||
# background = "#ffffff"
|
||||
|
||||
[colors.selection]
|
||||
background = "#3e4451"
|
||||
|
@ -398,12 +400,13 @@ program = "/bin/sh"
|
|||
|
||||
[window]
|
||||
dynamic_padding = false
|
||||
dynamic_title = true
|
||||
opacity = 1.0
|
||||
startup_mode = "Windowed"
|
||||
|
||||
[window.dimensions]
|
||||
columns = 100
|
||||
lines = 85
|
||||
columns = 90
|
||||
lines = 25
|
||||
|
||||
[window.padding]
|
||||
x = 0
|
||||
|
|
|
@ -11,4 +11,4 @@ ColorMyPencils("gruvbox")
|
|||
-- ColorMyPencils("habamax")
|
||||
|
||||
-- For outside
|
||||
-- ColorMyPencils("peachpuff")
|
||||
-- ColorMyPencils("zellner")
|
||||
|
|
|
@ -86,7 +86,7 @@ null_ls.setup({
|
|||
}
|
||||
})
|
||||
|
||||
require("norme").setup({
|
||||
-- Your configuration
|
||||
cmd = os.getenv('HOME') .. '/.local/bin/norminette'
|
||||
})
|
||||
-- require("norme").setup({
|
||||
-- -- Your configuration
|
||||
-- cmd = os.getenv('HOME') .. '/.local/bin/norminette'
|
||||
-- })
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
require 'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "vimdoc", "javascript", "typescript", "python", "bash", "c", "lua", "vim", "vimdoc", "query" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
ignore_install = { "help" },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
node_incremental = "v",
|
||||
node_decremental = "V",
|
||||
},
|
||||
},
|
||||
}
|
||||
--- require 'nvim-treesitter.configs'.setup {
|
||||
--- -- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
--- ensure_installed = { "vimdoc", "javascript", "typescript", "python", "bash", "c", "lua", "vim", "vimdoc", "query" },
|
||||
---
|
||||
--- -- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
--- sync_install = false,
|
||||
---
|
||||
--- -- Automatically install missing parsers when entering buffer
|
||||
--- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
--- auto_install = true,
|
||||
---
|
||||
--- -- List of parsers to ignore installing (for "all")
|
||||
--- ignore_install = { "help" },
|
||||
---
|
||||
--- highlight = {
|
||||
--- enable = true,
|
||||
---
|
||||
--- -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
--- -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
--- -- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
--- -- Instead of true it can also be a list of languages
|
||||
--- additional_vim_regex_highlighting = false,
|
||||
--- },
|
||||
---
|
||||
--- incremental_selection = {
|
||||
--- enable = true,
|
||||
--- keymaps = {
|
||||
--- node_incremental = "v",
|
||||
--- node_decremental = "V",
|
||||
--- },
|
||||
--- },
|
||||
--- }
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
require("tosu")
|
||||
vim.cmd('source ~/.vim/plugin/stdheader.vim')
|
||||
vim.cmd('source ~/.vim/hm.vim')
|
||||
|
|
|
@ -51,3 +51,6 @@ vim.keymap.set("v", "<leader>C", "mz:s/\\/\\* \\(.*\\) \\*\\//\\1/g<CR>:noh<CR>`
|
|||
|
||||
vim.fn.setreg("t", "m5`1v`2y`3v`4p`1v`2p`5")
|
||||
vim.keymap.set("n", "<C-t>", "m3yiwi<CR> <C-w><ESC>m2`1bviwp`2viwp`2i<BS><ESC>`3")
|
||||
|
||||
-- vim.keymap.set("i", "{<CR>", "<CR>{<CR>}<ESC>O")
|
||||
vim.keymap.set("n", "*", "#*")
|
||||
|
|
|
@ -49,8 +49,8 @@ local function save_profiles(threshold)
|
|||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1696795921/share/lua/5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1696795921/share/lua/5.1/?/init.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1696795921/lib/luarocks/rocks-5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1696795921/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1696795921/lib/lua/5.1/?.so"
|
||||
local package_path_str = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?/init.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
|
4
.inputrc
4
.inputrc
|
@ -8,3 +8,7 @@ set page-completions off
|
|||
|
||||
TAB: menu-complete
|
||||
"\e[Z": menu-complete-backward
|
||||
|
||||
# "\e[A": history-substring-search-backward
|
||||
# "\e[B": history-substring-search-forward
|
||||
"\C-x\C-r": forward-search-history
|
||||
|
|
|
@ -6,16 +6,26 @@ done
|
|||
|
||||
dlm=" | "
|
||||
delay=1
|
||||
whitemode='0'
|
||||
|
||||
getColor() {
|
||||
if [ "${whitemode}" = "1" ]; then
|
||||
printf '%s' "000000" # black
|
||||
else
|
||||
printf '%s' "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
getDate() {
|
||||
date="$(date +"%a %d/%m/%Y %H:%M:%S")"
|
||||
# [ -n "${date}" ] && date="${dlm}^c#d08770^ ${date}^d^"
|
||||
[ -n "${date}" ] && date="${dlm}^c#d08770^📅 ${date}^d^"
|
||||
fontColor="$(getColor 'd08770')"
|
||||
# [ -n "${date}" ] && date="${dlm}^c#${fontColor}^ ${date}^d^"
|
||||
[ -n "${date}" ] && date="${dlm}^c#${fontColor}^📅 ${date}^d^"
|
||||
printf '%s' "${date}"
|
||||
}
|
||||
|
||||
getBattery() {
|
||||
battery="$(level="$(printf '%s' "$(($(cat /sys/class/power_supply/BAT1/energy_now) * 100000 / $(cat /sys/class/power_supply/BAT1/energy_full)))" | sed "s/\(...\)$/.\1%/")$([ "$(cat /sys/class/power_supply/BAT1/status)" = "Charging" ] && printf '%s' "+" || printf '%s' "-")" ; printf '%s' "${level}" ; printf '%s' "$(date "+%a %d/%m/%Y %H:%M:%S"): ${level}" >> /home/tosuman/.logs/battery.log)"
|
||||
battery="$(level="$(printf '%s' "$(($(cat /sys/class/power_supply/BAT1/energy_now) * 100000 / $(cat /sys/class/power_supply/BAT1/energy_full)))" | sed "s/\(...\)$/.\1%/")$([ "$(cat /sys/class/power_supply/BAT1/status)" = "Charging" ] && printf '%s' "+" || printf '%s' "-")" ; printf '%s' "${level}" ; printf '%s\n' "$(date "+%a %d/%m/%Y %H:%M:%S"): ${level}" >> /home/tosuman/.logs/battery.log)"
|
||||
int_battery="$(printf '%s' "${battery}" | sed 's/\..*//')"
|
||||
if [ "${int_battery}" -lt 11 ] && [ -z "$(pgrep -f qutebrowser)" ] ; then
|
||||
xdotool key "Super_L+m"
|
||||
|
@ -23,85 +33,98 @@ getBattery() {
|
|||
1>/dev/null 2>&1 qutebrowser "/home/tosuman/infopages/battery_low.html" &
|
||||
|
||||
fi
|
||||
# [ -n "${battery}" ] && battery="${dlm}^c#43f1f1^ ${battery}^d^"
|
||||
[ -n "${battery}" ] && battery="${dlm}^c#43f1f1^🔋 ${battery}^d^"
|
||||
fontColor="$(getColor '43f1f1')"
|
||||
# [ -n "${battery}" ] && battery="${dlm}^c#${fontColor}^ ${battery}^d^"
|
||||
[ -n "${battery}" ] && battery="${dlm}^c#${fontColor}^🔋 ${battery}^d^"
|
||||
printf '%s' "${battery}"
|
||||
}
|
||||
|
||||
getLayout() {
|
||||
layout="$(setxkbmap -query | grep layout | awk -F' ' '{ print $2 }')"
|
||||
# [ -n "${layout}" ] && layout="${dlm}^c#a3be8c^ ${layout}^d^"
|
||||
[ -n "${layout}" ] && layout="${dlm}^c#a3be8c^💻 ${layout}^d^"
|
||||
fontColor="$(getColor 'a3be8c')"
|
||||
# [ -n "${layout}" ] && layout="${dlm}^c#${fontColor}^ ${layout}^d^"
|
||||
[ -n "${layout}" ] && layout="${dlm}^c#${fontColor}^💻 ${layout}^d^"
|
||||
printf '%s' "${layout}"
|
||||
}
|
||||
|
||||
getWifi() {
|
||||
wifi="$(iw dev wlan0 link | grep SSID | sed -e 's/[[:blank:]]*SSID: //' -e 's/[[:blank:]]*$//')"
|
||||
[ -n "${wifi}" ] && wifi="${dlm}^c#bf616a^ ${wifi}^d^"
|
||||
fontColor="$(getColor 'bf616a')"
|
||||
[ -n "${wifi}" ] && wifi="${dlm}^c#${fontColor}^ ${wifi}^d^"
|
||||
printf '%s' "${wifi}"
|
||||
}
|
||||
|
||||
getWifi1() {
|
||||
wifi="$(iw dev wlan1 link | grep SSID | sed -e 's/[[:blank:]]*SSID: //' -e 's/[[:blank:]]*$//')"
|
||||
[ -n "${wifi}" ] && wifi="${dlm}^c#bf616a^ ${wifi}^d^"
|
||||
fontColor="$(getColor 'bf616a')"
|
||||
[ -n "${wifi}" ] && wifi="${dlm}^c#${fontColor}^ ${wifi}^d^"
|
||||
printf '%s' "${wifi}"
|
||||
}
|
||||
|
||||
getEth () {
|
||||
eth="$(2>/dev/null ip a show "$(ls /sys/class/net | grep enp | head -1)" | grep -v inet6 | grep inet | awk '{print $2}')"
|
||||
[ -n "${eth}" ] && eth="${dlm}^c#bf616a^ ${eth}^d^"
|
||||
fontColor="$(getColor 'bf616a')"
|
||||
[ -n "${eth}" ] && eth="${dlm}^c#${fontColor}^ ${eth}^d^"
|
||||
printf '%s' "${eth}"
|
||||
}
|
||||
|
||||
getNord() {
|
||||
# return 1
|
||||
nord="$(nordvpn status | grep Status | sed 's/.*Status: //')"
|
||||
# [ -n "${nord}" ] && nord="${dlm}^c#8fbcbb^嬨 ${nord}^d^"
|
||||
[ -n "${nord}" ] && nord="${dlm}^c#8fbcbb^🌐 ${nord}^d^"
|
||||
fontColor="$(getColor '8fbcbb')"
|
||||
# [ -n "${nord}" ] && nord="${dlm}^c#${fontColor}^嬨 ${nord}^d^"
|
||||
[ -n "${nord}" ] && nord="${dlm}^c#${fontColor}^🌐 ${nord}^d^"
|
||||
printf '%s' "${nord}"
|
||||
}
|
||||
|
||||
getBluetooth() {
|
||||
bluetooth="$(bluetoothctl devices | cut -f2 -d' ' | while read -r uuid ; do bluetoothctl info "${uuid}" ; done | grep -e "Connected\|Name" | sed -e "s/\t//" - | perl -0777 -pe 's/Name: (.*?)\nConnected: yes/<<>>\1/' | grep "<<>>" | sed "s/<<>>//")"
|
||||
[ -n "${bluetooth}" ] && bluetooth="${dlm}^c#81a1c1^ ${bluetooth}^d^"
|
||||
fontColor="$(getColor '81a1c1')"
|
||||
[ -n "${bluetooth}" ] && bluetooth="${dlm}^c#${fontColor}^ ${bluetooth}^d^"
|
||||
printf '%s' "${bluetooth}"
|
||||
}
|
||||
|
||||
getVolume() {
|
||||
volume="$(pulsemixer --get-volume | cut -d' ' -f1)%"
|
||||
[ -n "${volume}" ] && volume="${dlm}^c#93a1a1^🔊 ${volume}^d^"
|
||||
fontColor="$(getColor '93a1a1')"
|
||||
[ -n "${volume}" ] && volume="${dlm}^c#${fontColor}^🔊 ${volume}^d^"
|
||||
printf '%s' "${volume}"
|
||||
}
|
||||
|
||||
getRates() {
|
||||
rxtxrates="$( (cat /tmp/.datarates ; grep wlan0 /proc/net/dev) | awk '{if(l1){printf "%.3f ↑ %.3f ↓\n", ($2-l1)/1024^2*8, ($10-l2)/1024^2*8} else{l1=$2; l2=$10;}}' )"
|
||||
grep wlan0 /proc/net/dev > /tmp/.datarates
|
||||
[ -n "${rxtxrates}" ] && rxtxrates="${dlm}^c#92ee791^${rxtxrates}^d^"
|
||||
fontColor="$(getColor '92ee79')"
|
||||
[ -n "${rxtxrates}" ] && rxtxrates="${dlm}^c#${fontColor}1^${rxtxrates}^d^"
|
||||
printf '%s' "${rxtxrates}"
|
||||
}
|
||||
|
||||
getCpuTemp() {
|
||||
temp="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))°C"
|
||||
[ -n "${temp}" ] && temp="${dlm}^c#13a1a1^🌡️ ${temp}^d^"
|
||||
fontColor="$(getColor '13a1a1')"
|
||||
[ -n "${temp}" ] && temp="${dlm}^c#${fontColor}^🌡️ ${temp}^d^"
|
||||
printf '%s' "${temp}"
|
||||
}
|
||||
|
||||
getWattage() {
|
||||
wattage="$(awk '{printf "%.0f", $1*10^-6}' /sys/class/power_supply/BAT1/power_now)"
|
||||
[ -n "${wattage}" ] && wattage="${dlm}^c#5e81ac^⚡ ${wattage}W^d^"
|
||||
fontColor="$(getColor '5e81ac')"
|
||||
[ -n "${wattage}" ] && wattage="${dlm}^c#${fontColor}^⚡ ${wattage}W^d^"
|
||||
printf '%s' "${wattage}"
|
||||
|
||||
}
|
||||
|
||||
getBrightness() {
|
||||
brightness="$(cat /sys/class/backlight/amdgpu_bl1/brightness)/255"
|
||||
[ -n "${brightness}" ] && brightness="${dlm}^c#4321f1^🔆 ${brightness}^d^"
|
||||
fontColor="$(getColor '4321f1')"
|
||||
[ -n "${brightness}" ] && brightness="${dlm}^c#${fontColor}^🔆 ${brightness}^d^"
|
||||
printf '%s' "${brightness}"
|
||||
}
|
||||
|
||||
getNumberOfTmuxSessions() {
|
||||
numberOfSessions="$(2>/dev/null tmux ls | wc -l)"
|
||||
[ ! "${numberOfSessions}" = "0" ] && numberOfSessions="${dlm}^c#92ee791^ ${numberOfSessions}^d^"
|
||||
fontColor="$(getColor '92ee79')"
|
||||
[ ! "${numberOfSessions}" = "0" ] && numberOfSessions="${dlm}^c#${fontColor}1^ ${numberOfSessions}^d^"
|
||||
printf '%s' "${numberOfSessions}"
|
||||
}
|
||||
|
||||
|
|
|
@ -54,3 +54,7 @@ bind-key -r -T prefix C-k resize-pane -U 2
|
|||
bind-key -r -T prefix C-l resize-pane -R 2
|
||||
|
||||
bind-key -T prefix C-u popup -E '~/.local/bin/tmux_urls.py'
|
||||
|
||||
set-option -g set-titles on
|
||||
|
||||
run-shell ~/repos/tmux-copycat/copycat.tmux
|
||||
|
|
Loading…
Reference in New Issue