change screen layout
This commit is contained in:
parent
eb151093c0
commit
ee5f5d8aba
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# monitors
|
# monitors
|
||||||
exec --no-startup-id xrandr --output DVI-D-0 --off --output HDMI-0 --mode 1366x768 --pos 1920x592 --rotate normal --output DP-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off
|
exec --no-startup-id xrandr --output DVI-D-0 --off --output HDMI-0 --mode 1920x1080 --pos 0x-1080 --rotate normal --output DP-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off
|
||||||
|
|
||||||
for_window [tiling] border pixel 3
|
for_window [tiling] border pixel 3
|
||||||
exec --no-startup-id picom --inactive-dim 0.2 --no-fading-openclose --inactive-dim-fixed --config /dev/null
|
exec --no-startup-id picom --inactive-dim 0.2 --no-fading-openclose --inactive-dim-fixed --config /dev/null
|
||||||
|
|||||||
@ -29,6 +29,16 @@ local function set_keymap_run_script(cmd)
|
|||||||
set_keymap_run_script_base("r", cmd)
|
set_keymap_run_script_base("r", cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function set_keymap_test_file_base(key, cmd)
|
||||||
|
local run_script_string = [[:tabnew %% <CR> :terminal %s %% <CR> :set nocursorline number norelativenumber <CR> G <CR>]]
|
||||||
|
local cmd_string = string.format(run_script_string, cmd)
|
||||||
|
set_keymap_base(key, cmd_string)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_keymap_test_file(cmd)
|
||||||
|
set_keymap_test_file_base("t", cmd)
|
||||||
|
end
|
||||||
|
|
||||||
local function set_keymap_run_script_by_shebang()
|
local function set_keymap_run_script_by_shebang()
|
||||||
set_keymap_run_script_base("s", [[$(head -1 % | cut -c 3-) %]])
|
set_keymap_run_script_base("s", [[$(head -1 % | cut -c 3-) %]])
|
||||||
end
|
end
|
||||||
@ -57,12 +67,18 @@ local function autocmd_format_file_by_filetype(ft, cmd)
|
|||||||
autocmd(create_function_autocmd_by_filetype(set_keymap_format_file, ft, cmd))
|
autocmd(create_function_autocmd_by_filetype(set_keymap_format_file, ft, cmd))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function autocmd_run_tests_by_filetype(ft, cmd)
|
||||||
|
autocmd(create_function_autocmd_by_filetype(set_keymap_test_file, ft, cmd))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
autocmd_run_script_by_filetype('python', 'python3')
|
autocmd_run_script_by_filetype('python', 'python3')
|
||||||
autocmd_run_script_by_filetype('go', 'go run')
|
autocmd_run_script_by_filetype('go', 'go run')
|
||||||
autocmd_run_script_by_filetype('rust', 'cargo run')
|
autocmd_run_script_by_filetype('rust', 'cargo run')
|
||||||
autocmd_run_script_by_filetype('markdown', 'glow')
|
autocmd_run_script_by_filetype('markdown', 'glow')
|
||||||
|
|
||||||
|
autocmd_run_tests_by_filetype('python', 'pytest')
|
||||||
|
|
||||||
autocmd(create_function_autocmd_by_filename(set_keymap_run_script, 'manpage', 'man -P cat -l'))
|
autocmd(create_function_autocmd_by_filename(set_keymap_run_script, 'manpage', 'man -P cat -l'))
|
||||||
|
|
||||||
autocmd_format_file_by_filetype('rust', 'cargo fmt -p')
|
autocmd_format_file_by_filetype('rust', 'cargo fmt -p')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user