Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
y011d4 committed Jan 7, 2024
1 parent ae94baa commit a1b4560
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .config/htop/htoprc
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# 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.1
htop_version=3.2.2
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=0
highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
Expand All @@ -36,7 +38,7 @@ column_meters_0=LeftCPUs Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
tree_view=1
tree_view=0
sort_key=46
tree_sort_key=46
sort_direction=-1
Expand All @@ -46,7 +48,7 @@ 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=1
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=-1
Expand Down
4 changes: 3 additions & 1 deletion .config/i3/config
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,15 @@ mode "$mode_gaps_outer" {
}

# Some configurations below are added manualy
set $mode_display Ext Screen (h) HDMI ON, (d) DP1 ON, (x) OFF
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 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 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"

# back to normal: Enter or Escape
bindsym Return mode "default"
Expand Down
4 changes: 2 additions & 2 deletions .config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ end
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
once = true,
callback = function()
print(123345667)
if vim.fn.has("win32") == 1 or vim.fn.has("wsl") == 1 then
vim.g.clipboard = {
copy = {
Expand Down Expand Up @@ -127,7 +126,8 @@ syntax on "コードの色分け
au BufRead,BufNewFile *.md set filetype=markdown
au BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
au BufNewFile,BufRead *.sage setlocal filetype=python.py
"au BufNewFile,BufRead *.sage setlocal filetype=python.py
au BufNewFile,BufRead *.sage setlocal filetype=python
let g:C_Ctrl_j = 'off'
let g:BASH_Ctrl_j = 'off'
Expand Down
25 changes: 25 additions & 0 deletions .config/nvim/lua/copilot-setting.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
vim.b.copilot_enabled = false
vim.g.copilot_filetypes = { ["*"] = false }

-- https://zenn.dev/gentamura/articles/22ed20c9013b19
vim.g.copilot_no_tab_map = true
local keymap = vim.keymap.set
-- https://github.com/orgs/community/discussions/29817#discussioncomment-4217615
keymap(
"i",
"<C-g>",
'copilot#Accept("<CR>")',
{ silent = true, expr = true, script = true, replace_keycodes = false }
)
keymap("i", "<C-j>", "<Plug>(copilot-next)")
keymap("i", "<C-k>", "<Plug>(copilot-previous)")
keymap("i", "<C-o>", "<Plug>(copilot-dismiss)")
keymap("i", "<C-s>", "<Plug>(copilot-suggest)")
keymap("", "<Leader>c", function()
vim.b.copilot_enabled = not vim.b.copilot_enabled
if vim.b.copilot_enabled then
print("Copilot Enabled!")
else
print("Copilot Disabled")
end
end)
72 changes: 72 additions & 0 deletions .config/nvim/lua/iron-setting.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
local iron = require("iron.core")
local view = require("iron.view")
local bracketed_paste = require("iron.fts.common").bracketed_paste
local executable = function(exe)
return vim.api.nvim_call_function('executable', {exe}) == 1
end

iron.setup {
config = {
-- Whether a repl should be discarded or not
scratch_repl = true,
-- Your repl definitions come here
repl_definition = {
sh = {
-- Can be a table or a function that
-- returns a table (see below)
command = {"zsh"}
},
python = {
command = function(meta)
local filename = vim.api.nvim_buf_get_name(meta.current_bufnr)
if string.match(filename, ".*%.py") then
-- return executable("ptipython") and {"ptipython"} or {"ipython"}
return executable("ipython") and {"ipython"} or {"python"}
-- return {"ptpython"}
elseif string.match(filename, ".*%.sage$") then
return {"sage"}
else
return {"ipython"}
end
end,
format = bracketed_paste
}
},
-- How the repl window will be displayed
-- See below for more information
-- repl_open_cmd = require('iron.view').bottom(40),
-- repl_open_cmd = view.center("30%", 20)
-- repl_open_cmd = view.top("10%")
-- repl_open_cmd = "vertical botright 80 split"
repl_open_cmd = view.split.vertical.botright(50)
},
-- Iron doesn't set keymaps by default anymore.
-- You can set them here or manually add keymaps to the functions in iron.core
keymaps = {
send_motion = "<space>sc",
visual_send = "<space>sc",
send_file = "<space>sf",
send_line = "<space>sl",
send_until_cursor = "<space>su",
send_mark = "<space>sm",
mark_motion = "<space>mc",
mark_visual = "<space>mc",
remove_mark = "<space>md",
cr = "<space>s<cr>",
interrupt = "<space>s<space>",
exit = "<space>sq",
clear = "<space>cl",
},
-- If the highlight is on, you can change how it looks
-- For the available options, check nvim_set_hl
highlight = {
italic = true
},
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
}

-- iron also has a list of commands, see :h iron-commands for all available commands
vim.keymap.set('n', '<space>rs', '<cmd>IronRepl<cr>')
vim.keymap.set('n', '<space>rr', '<cmd>IronRestart<cr>')
vim.keymap.set('n', '<space>rf', '<cmd>IronFocus<cr>')
vim.keymap.set('n', '<space>rh', '<cmd>IronHide<cr>')
2 changes: 1 addition & 1 deletion .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" }
ensure_installed = { "lua_ls", "rust_analyzer", "gopls", "tsserver", "pylsp", "tailwindcss" }
}
require('mason-lspconfig').setup_handlers({ function(server)
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
Expand Down
50 changes: 48 additions & 2 deletions .config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,34 @@ require("lazy").setup({
},
--]]
-- csv を列ごとに色をつけて表示
{
--[[ {
"mechatroner/rainbow_csv",
lazy = true,
ft = "csv",
}, ]]
{
'cameron-wags/rainbow_csv.nvim',
-- config = true,
ft = {
'csv',
'tsv',
'csv_semicolon',
'csv_whitespace',
'csv_pipe',
'rfc_csv',
'rfc_semicolon'
},
cmd = {
'RainbowDelim',
'RainbowDelimSimple',
'RainbowDelimQuoted',
'RainbowMultiDelim'
},
config = function()
require("rainbow_csv").setup()
vim.keymap.set("n", "<leader>ra", "<cmd>RainbowAlign<cr>")
vim.keymap.set("n", "<leader>rs", "<cmd>RainbowShrink<cr>")
end
},
-- 構文解析に使う
{
Expand Down Expand Up @@ -789,7 +813,7 @@ require("lazy").setup({
lazy = true,
keys = { "<leader>s" },
config = function()
vim.keymap.set("n", "<leader>s", "<cmd>SymbolsOutline<cr>")
vim.keymap.set("n", "<leader>so", "<cmd>SymbolsOutline<cr>")
require("symbols-outline").setup()
end,
},
Expand Down Expand Up @@ -826,4 +850,26 @@ require("lazy").setup({
"alaviss/tree-sitter-nim",
dependencies = "nvim-treesitter/nvim-treesitter",
},
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults
})
end
},
{
"github/copilot.vim",
config = function()
require("copilot-setting")
end
},
{
"Vigemus/iron.nvim",
config = function()
require("iron-setting")
end,
}
})
4 changes: 3 additions & 1 deletion .gdbinit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# yay pwndbg (https://github.com/pwndbg/pwndbg)
source /usr/share/pwndbg/gdbinit.py
# source /usr/share/pwndbg/gdbinit.py # aur's gdbinit is dead
source ~/ghq/github.com/pwndbg/pwndbg/gdbinit.py
# ghq get https://github.com/scwuaptx/Pwngdb.git
source ~/ghq/github.com/scwuaptx/Pwngdb/pwngdb.py
source ~/ghq/github.com/scwuaptx/Pwngdb/angelheap/gdbinit.py
Expand All @@ -12,3 +13,4 @@ end
end

set startup-with-shell off
set debuginfod enabled on
1 change: 1 addition & 0 deletions .venv/python3.10.9/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ boto3 = "^1.26.127"
hashpumpy = "^1.2"
jupyterlab = "^4.0.3"
ruamel-yaml = "^0.17.32"
factordb-python = "^1.3.0"

[tool.poetry.dev-dependencies]

Expand Down

0 comments on commit a1b4560

Please sign in to comment.