Skip to content

Commit

Permalink
update 20241014
Browse files Browse the repository at this point in the history
  • Loading branch information
y011d4 committed Oct 14, 2024
1 parent a1b4560 commit 1cb7043
Show file tree
Hide file tree
Showing 14 changed files with 310 additions and 59 deletions.
26 changes: 21 additions & 5 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ set -g theme_color_scheme dark

fish_add_path $HOME/.pyenv/bin
eval "$(pyenv init -)"
if test -e $HOME/.virtualenvs/3.10.9/bin/activate.fish
source $HOME/.virtualenvs/3.10.9/bin/activate.fish
end

alias dotfiles="git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME"

Expand Down Expand Up @@ -95,13 +92,15 @@ end
# abbr --add nvim_edit_py --position command --regex ".+\.py" --function nvim_edit

abbr --add n nvim

abbr --add pwnenv "docker exec -it pwn bash"
abbr --add curlp "curl -XPOST -H \"Content-Type: application/json\""

# set -gx DOCKER_HOST "unix:///run/user/1000/docker.sock"
fish_add_path $HOME/bin
fish_add_path $HOME/go/bin
fish_add_path $HOME/.dotnet/tools
fish_add_path $HOME/.local/bin
fish_add_path $HOME/.cargo/bin

if test -e $HOME/.cargo/env
bass source $HOME/.cargo/env
Expand All @@ -111,6 +110,23 @@ set -gx FLYCTL_INSTALL "/home/y011d4/.fly"
fish_add_path $FLYCTL_INSTALL/bin

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/y011d4/google-cloud-sdk/path.fish.inc' ]; . '/home/y011d4/google-cloud-sdk/path.fish.inc'; end
# if [ -f '/home/y011d4/google-cloud-sdk/path.fish.inc' ]; . '/home/y011d4/google-cloud-sdk/path.fish.inc'; end

set -ga fish_user_paths /home/y011d4/.nimble/bin

if test -e $HOME/.elan/env
source $HOME/.elan/env
end

# .envrc の内容を読み込む
eval (direnv hook fish)
# nodenv
status --is-interactive; and source (nodenv init -|psub)
# eval (nodenv init - | source)
# fish_add_path $HOME/.nodenv/shims

# if test -e $HOME/.virtualenvs/3.10.9/bin/activate.fish
# source $HOME/.virtualenvs/3.10.9/bin/activate.fish
# end

# source /home/y011d4/.cache/yay/google-cloud-cli/pkg/google-cloud-cli/opt/google-cloud-cli/path.fish.inc
7 changes: 7 additions & 0 deletions .config/flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[flake8]
max-line-length = 4300
ignore =
# E203 whitespace before ':'
E203,
# W503: Line break occurred before a binary operator
W503,
# E231: Missing whitespace after ',', ';', or ':'
E231
6 changes: 3 additions & 3 deletions .config/htop/htoprc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.2.2
htop_version=3.3.0
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
Expand Down Expand Up @@ -48,16 +48,16 @@ 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=PERCENT_CPU
.tree_view=0
.tree_view_always_by_pid=0
.tree_view=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
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
6 changes: 3 additions & 3 deletions .config/i3/config
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@ mode "$mode_gaps_outer" {
set $mode_display [Ext Screen] (h) HDMI ON, (d) DP1 ON, (x) OFF [Keyboard] (k) Enabled (K) Disabled
# set $mode_display Ext Screen (h) HDMI ON, (x) HDMI OFF, (d) HDMI same
mode "$mode_display" {
bindsym h exec --no-startup-id xrandr --output HDMI1 --mode 2560x1440 --below eDP1, mode "default"
bindsym d exec --no-startup-id xrandr --output DP1 --mode 2560x1440 --below eDP1, mode "default"
bindsym h exec --no-startup-id xrandr --output HDMI-1 --mode 2560x1440 --below eDP-1, mode "default"
bindsym d exec --no-startup-id xrandr --output DP-1 --mode 2560x1440 --below eDP-1, mode "default"
# bindsym d exec --no-startup-id xrandr --output HDMI1 --mode $(xrandr | grep HDMI1 -A 2 | tail -n 1 | awk '{print $1}') --same-as eDP1, mode "default"
bindsym x exec --no-startup-id xrandr --output HDMI1 --auto --off && xrandr --output DP1 --auto --off, mode "default"
bindsym x exec --no-startup-id xrandr --output HDMI-1 --auto --off && xrandr --output DP-1 --auto --off, mode "default"
bindsym k exec --no-startup-id xinput enable $(xinput --list | grep "AT Translated" | grep -oP "id=\K\d+"), mode "default"
bindsym Shift+k exec --no-startup-id xinput disable $(xinput --list | grep "AT Translated" | grep -oP "id=\K\d+"), mode "default"

Expand Down
2 changes: 2 additions & 0 deletions .config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ local options = {
swapfile = false, --swap file is not created
autoread = true, --vim automatically reload when saved in other action
list = true, --invisible character is displayed

conceallevel = 2,
}

for k, v in pairs(options) do
Expand Down
4 changes: 2 additions & 2 deletions .config/nvim/lua/copilot-setting.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vim.b.copilot_enabled = false
vim.g.copilot_filetypes = { ["*"] = false }
-- vim.b.copilot_enabled = false
-- vim.g.copilot_filetypes = { ["*"] = false }

-- https://zenn.dev/gentamura/articles/22ed20c9013b19
vim.g.copilot_no_tab_map = true
Expand Down
2 changes: 1 addition & 1 deletion .config/nvim/lua/iron-setting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ iron.setup {
sh = {
-- Can be a table or a function that
-- returns a table (see below)
command = {"zsh"}
command = {"bash"}
},
python = {
command = function(meta)
Expand Down
6 changes: 3 additions & 3 deletions .config/nvim/lua/mason-lspconfig-setting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require("neodev").setup({
require('mason').setup()
require('mason-lspconfig').setup {
-- ensure_installed = { "sumneko_lua", "rust_analyzer", "gopls", "tsserver", "pylsp" }
ensure_installed = { "lua_ls", "rust_analyzer", "gopls", "tsserver", "pylsp", "tailwindcss" }
ensure_installed = { "lua_ls", "rust_analyzer", "gopls", "pylsp", "tailwindcss" }
}
require('mason-lspconfig').setup_handlers({ function(server)
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
Expand All @@ -20,7 +20,7 @@ require('mason-lspconfig').setup_handlers({ function(server)

-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
--[[ local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gh', vim.lsp.buf.hover, bufopts)
--vim.keymap.set('n', 'gf', '<cmd>lua vim.lsp.buf.format{filter=function(client) return client.name ~= "tsserver" end}<CR>')
vim.keymap.set('n', 'gf', function() vim.lsp.buf.format { async = true } end, bufopts)
Expand All @@ -32,7 +32,7 @@ require('mason-lspconfig').setup_handlers({ function(server)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gt', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', 'gn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts) ]]
if server == 'pylsp' then
-- install pylsp plugins: https://github.com/williamboman/mason-lspconfig.nvim/blob/main/lua/mason-lspconfig/server_configurations/pylsp/README.md
-- なぜか isort は null-ls のものが動かないので、 pylsp を使う
Expand Down
2 changes: 2 additions & 0 deletions .config/nvim/lua/null-ls-setting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ null_ls.setup {
null_ls.builtins.diagnostics.shellcheck,

null_ls.builtins.formatting.csharpier,

null_ls.builtins.formatting.sqlfmt,
},
}
Loading

0 comments on commit 1cb7043

Please sign in to comment.