commit 0bfc2d27ae265d4056c0c66b2fba53ad9aa7b322 Author: Kuoi Date: Fri Jun 24 13:34:06 2022 +0100 first commit diff --git a/dot_config/mako/config b/dot_config/mako/config new file mode 100644 index 0000000..b93f597 --- /dev/null +++ b/dot_config/mako/config @@ -0,0 +1,20 @@ +font=sans 10 +background-color=#e6e6fadd +text-color=#333333ff +border-color=#b3b3ffdd +border-radius=4 +height=500 +# avoid covering firefox's tabs and buttons +outer-margin=75,0,0,0 +layer=overlay + +[urgency=high] +text-color=#ff5c57ff +border-color=#ff5c57bb + +[mode=locked] +layer=top + +[mode=dnd] +invisible=1 + diff --git a/dot_config/swaylock/config b/dot_config/swaylock/config new file mode 100644 index 0000000..6e39093 --- /dev/null +++ b/dot_config/swaylock/config @@ -0,0 +1,2 @@ +color=#7f7f7f +image=$HOME/.config/swaylock/bg.png diff --git a/dot_config/swaylock/executable_bg.png b/dot_config/swaylock/executable_bg.png new file mode 100644 index 0000000..cfec7a3 Binary files /dev/null and b/dot_config/swaylock/executable_bg.png differ diff --git a/dot_config/terminator/executable_config b/dot_config/terminator/executable_config new file mode 100644 index 0000000..335a762 --- /dev/null +++ b/dot_config/terminator/executable_config @@ -0,0 +1,42 @@ +[global_config] + focus = system + window_state = maximise + broadcast_default = off + title_transmit_bg_color = "#d30102" + suppress_multiple_term_dialog = True +[keybindings] + split_horiz = h + split_vert = v + close_term = q + copy = C + paste = V + close_window = w +[profiles] + [[default]] + background_color = "#282828" + background_darkness = 0.85 + background_type = transparent + cursor_shape = ibeam + cursor_color = "#7ECBF7" + cursor_color_fg = False + font = Source Code Variable 12 + foreground_color = "#ebdbb2" + show_titlebar = False + scrollbar_position = hidden + scrollback_lines = 1000 + scrollback_infinite = True + palette = "#44a4e8:#f66151:#d8f104:#f9f06b:#268bd2:#d33682:#2aa198:#f6f5f4:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#ffffff" + use_system_font = False + bold_is_bright = True + copy_on_selection = True + background_image = None +[layouts] + [[default]] + [[[child1]]] + type = Terminal + parent = window0 + profile = default + [[[window0]]] + type = Window + parent = "" +[plugins] diff --git a/dot_config/terminator/executable_config.bak b/dot_config/terminator/executable_config.bak new file mode 100644 index 0000000..7b66378 --- /dev/null +++ b/dot_config/terminator/executable_config.bak @@ -0,0 +1,39 @@ +[global_config] + focus = system + window_state = maximise + broadcast_default = off + title_transmit_bg_color = "#d30102" + suppress_multiple_term_dialog = True +[keybindings] + split_horiz = h + split_vert = v + copy = C + paste = V +[profiles] + [[default]] + background_color = "#2e3436" + background_darkness = 0.85 + background_type = transparent + cursor_shape = ibeam + cursor_color = "#7ECBF7" + cursor_color_fg = False + font = Source Code Variable 12 + foreground_color = "#d3d7cf" + show_titlebar = False + scrollbar_position = hidden + scrollback_lines = 1000 + palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#f6f5f4:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#ffffff" + use_system_font = False + bold_is_bright = True + copy_on_selection = True + background_image = None +[layouts] + [[default]] + [[[child1]]] + type = Terminal + parent = window0 + profile = default + [[[window0]]] + type = Window + parent = "" +[plugins] diff --git a/dot_config/waybar/config b/dot_config/waybar/config new file mode 100644 index 0000000..42688b8 --- /dev/null +++ b/dot_config/waybar/config @@ -0,0 +1,119 @@ +{ + "layer": "top", + "position": "top", + "height": 17, + "spacing": 4, + "margin-top": 3, + "margin-bottom": 3, + + // Choose the order of the modules + + "modules-left":[ "idle_inhibitor", "cpu", "memory", "temperature"], + "modules-center": [ "custom/launcher", "wlr/taskbar", "custom/update"], + "modules-right":[ "battery", "pulseaudio", "network", "bluetooth", "clock", "tray", "custom/power"], + // Modules configuration + + "wlr/taskbar": { + "format": "{icon}", + "icon-size": 23, + "icon-theme": "Tela", + "tooltip-format": "{title}", + "on-click": "minimize", + "on-click-middle": "close", + "on-click-right": "activate" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + "icon-size": 20, + "spacing": 10 + }, + "clock": { + // "timezone": "Europe/London", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%Y-%m-%d %H:%M}" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false, + "on-click": "terminator -e 'htop'" + }, + "memory": { + "format": "{}% ", + "on-click": "terminator -e 'htop'" + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "", "", ""] + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "Connected  ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}", + "on-click": "terminator -e 'nmtui'" + + }, + "bluetooth": { + "format": "", + "format-disabled": "", + "on-click": "blueberry", + "tooltip-format": "{}" + }, + "pulseaudio": { + "format": "{volume}% {icon}", + "format-bluetooth": "{volume}% {icon}", + "format-bluetooth-muted": "{icon} {format_source}", + "format-muted": "{format_source}", + "format-source": "", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/launcher":{ + "format": "", + "on-click": "wofi", + "on-click-right": "killall wofi" + }, + "custom/update":{ + "format": "", + "on-click": "terminator -e 'sudo pacman -Syu && echo Done - Press enter to exit; read _/'" + }, + "custom/power":{ + "format": "⏻", + "on-click": "wlogout -C $HOME/.config/wglout/config" + }, +} + diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css new file mode 100644 index 0000000..2aefeac --- /dev/null +++ b/dot_config/waybar/style.css @@ -0,0 +1,227 @@ +* { + border: none; + border-radius: 0px; + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Roboto, Helvetica, Arial, sans-serif; + font-size: 13px; + min-height: 0; +} + +window#waybar { + background-color: transparent; + color: white; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + + +#workspaces button { + background: #f9f06b; + color: white; + border-radius: 20px; + +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +#workspaces button:hover { + background: lightblue; + color: white; + border-bottom: 3px solid white; + +} + +#workspaces button.focused { + background: #f9f06b; + color: white; +} + +#workspaces button.focused:hover { + background: lightblue; + color: white; + border-bottom: 3px solid white; + +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #64727D; + border-bottom: 3px solid white; +} + +#clock, +#custom-power, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#network, +#pulseaudio, +#custom-media, +#custom-launcher, +#custom-update, +#custom-layout, +#taskbar, +#tray, +#mode, +#idle_inhibitor, +#bluetoth { + padding: 0 10px; + color: black; +} + +#window, +#workspaces { + margin: 0px 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0px; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0px; +} + +#clock { + background-color: #268bd2; + color: white; +} + +#custom-power { + background-color: #268bd2; + color: white; + border-radius: 0px 20px 20px 0px; + margin-right: 4px; + +} + +#bluetooth { + background-color: #268bd2; + color: white; +} + +#battery { + background-color: #268bd2; + color: white; + border-radius: 20px 0px 0px 20px; + margin-left: 4px; +} + +#battery.charging, #battery.plugged { + color: white; + background-color: #268bd2; +} + +@keyframes blink { + to { + background-color: #268bd2; + color: white; + } +} + +#battery.critical:not(.charging) { + background-color: #268bd2; + color: white; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +label:focus { + background-color: #f9f06b; +} + +#cpu { + background-color: #268bd2; + color: white; +} + +#memory { + background-color: #268bd2; + color: white; +} + +#disk { + background-color: #268bd2; + color: white; +} + +#network { + background-color: #268bd2; + color: white; +} + +#network.disconnected { + background-color: #268bd2; + color: white; +} + +#pulseaudio { + background-color: #268bd2; + color: white; +} + +#pulseaudio.muted { + background-color: #268bd2; + color: white; +} + +#custom-update{ + background-color: #268bd2; + color: white; + font-size: 18px; + border-radius: 20px; + margin-left: 2px; +} + +#custom-launcher{ + background-color: #268bd2; + color: white; + font-size: 25px; + border-radius: 20px; + margin-right: 2px; +} + +#taskbar { + background-color: #f9f06b; + border-radius: 20px; + +} + +#temperature { + background-color: #268bd2; + color: white; + border-radius: 0px 20px 20px 0px; +} + +#tray { + background-color: #268bd2; + color: white; +} + +#idle_inhibitor { + background-color: #268bd2; + color: white; + border-radius: 20px 0px 0px 20px; + +} + +#idle_inhibitor.activated { + background-color: #268bd2; + color: white; + border-radius: 20px 0px 0px 20px; + +} + diff --git a/dot_config/wayfire.ini b/dot_config/wayfire.ini new file mode 100644 index 0000000..91c7613 --- /dev/null +++ b/dot_config/wayfire.ini @@ -0,0 +1,361 @@ +# Default config for Wayfire +# +# Copy this to ~/.config/wayfire.ini and edit it to your liking. +# +# Take the tutorial to get started. +# https://github.com/WayfireWM/wayfire/wiki/Tutorial +# +# Read the Configuration document for a complete reference. +# https://github.com/WayfireWM/wayfire/wiki/Configuration + +# Input configuration ────────────────────────────────────────────────────────── + +# Example configuration: +# +[input] +xkb_layout = us +xkb_variant = dvorak,bepo +natural_scroll = enabled +# +# See Input options for a complete reference. +# https://github.com/WayfireWM/wayfire/wiki/Configuration#input + +[input-device:Wacom One by Wacom S Pen] +output = eDP-1 +# + +# Output configuration ───────────────────────────────────────────────────────── + +# Example configuration: +# +[output:eDP-1] +#mode = 1920x1080@60000 +mode = 2400x1350@60000 +position = 0,0 +transform = normal +scale = 1.000000 +# +# You can get the names of your outputs with wlr-randr. +# https://github.com/emersion/wlr-randr +# +# See also kanshi for configuring your outputs automatically. +# https://wayland.emersion.fr/kanshi/ +# +# See Output options for a complete reference. +# https://github.com/WayfireWM/wayfire/wiki/Configuration#output + +# Core options ───────────────────────────────────────────────────────────────── + +[core] + +# List of plugins to be enabled. +# See the Configuration document for a complete list. +plugins = \ + alpha \ + animate \ + autostart \ + command \ + cube \ + decoration \ + expo \ + fast-switcher \ + fisheye \ + grid \ + idle \ + invert \ + move \ + oswitch \ + place \ + resize \ + switcher \ + vswitch \ + window-rules \ + wm-actions \ + wobbly \ + wrot \ + zoom \ + spacing + +# Note: [blur] is not enabled by default, because it can be resource-intensive. +# Feel free to add it to the list if you want it. +# You can find its documentation here: +# https://github.com/WayfireWM/wayfire/wiki/Configuration#blur + +# Close focused window. +close_top_view = KEY_Q | KEY_F4 + +# Workspaces arranged into a grid: 3 × 3. +vwidth = 3 +vheight = 3 + +# Prefer client-side decoration or server-side decoration +preferred_decoration_mode = server + +# Mouse bindings ─────────────────────────────────────────────────────────────── + +# Drag windows by holding down Super and left mouse button. +[move] +activate = BTN_LEFT + +# Resize them with right mouse button + Super. +[resize] +activate = BTN_RIGHT + +# Zoom in the desktop by scrolling + Super. +[zoom] +modifier = + +# Change opacity by scrolling with Super + Alt. +[alpha] +modifier = + +# Rotate windows with the mouse. +[wrot] +activate = BTN_RIGHT + +# Fisheye effect. +[fisheye] +toggle = KEY_F + +# Startup commands ───────────────────────────────────────────────────────────── + +[autostart] + +# Automatically start background and panel. +# Set to false if you want to override the default clients. +environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY +autostart_wf_shell = false + +# chromium screenshare +0_0 = systemctl --user import-environment +xdg = sleep 1 && (XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=sway /usr/lib/xdg-desktop-portal --replace & /usr/lib/xdg-desktop-portal-wlr) + +# Set the wallpaper, start a panel and dock if you want one. +# https://github.com/WayfireWM/wf-shell +# +# These are started by the autostart_wf_shell option above. +# +background = swaybg -i $HOME/.config/swaylock/bg.png +panel = waybar +# dock = wf-dock + +# Output configuration +# https://wayland.emersion.fr/kanshi/ +# outputs = kanshi +#email = geary +# Notifications +# https://wayland.emersion.fr/mako/ +notifications = mako + +# input +fcitx5 = fcitx + +# KDEConnect +kdeconnect = kdeconnect-indicator + +# Screen color temperature +# https://sr.ht/~kennylevinsen/wlsunset/ +gamma = wlsunset + +# Idle configuration +# https://github.com/swaywm/swayidle +# https://github.com/swaywm/swaylock +idle = swayidle before-sleep swaylock + +# XDG desktop portal +# Needed by some GTK applications +portal = /usr/libexec/xdg-desktop-portal + +# Example configuration: +# +[idle] +# toggle = KEY_Z +screensaver_timeout = 360000 +dpms_timeout = 360000 +# +# Disables the compositor going idle with Super + z. +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds. + +# Applications ───────────────────────────────────────────────────────────────── + +[command] + +# Start a terminal +# https://github.com/alacritty/alacritty +binding_terminal = KEY_T +command_terminal = terminator + +# Start your launcher +# https://hg.sr.ht/~scoopta/wofi +# Note: Add mode=run or mode=drun to ~/.config/wofi/config. +# You can also specify the mode with --show option. +binding_launcher = KEY_ENTER +command_launcher = wofi + +# Screen locker +# https://github.com/swaywm/swaylock +binding_lock = KEY_ESC +command_lock = swaylock -C $HOME/.config/swaylock/conig + + +# Logout +# https://github.com/ArtsyMacaw/wlogout +binding_logout = KEY_ESC +command_logout = wlogout -p xdg + +# Screenshots +# https://wayland.emersion.fr/grim/ +# https://wayland.emersion.fr/slurp/ +binding_screenshot = KEY_SYSRQ +command_screenshot = grim ~/Pictures/$(date '+%F_%T').png +binding_screenshot_interactive = KEY_SYSRQ +command_screenshot_interactive = slurp | grim -g - ~/Pictures/$(date '+%F_%T').png +binding_screenshot_clipboard = KEY_SYSRQ +command_screenshot_clipboard = slurp -b ff00ff20 -B ff00ff20 -c ff00ff80 -o | grim -g - - | wl-copy --type image/png + +# Screencast +binding_screencast = KEY_SYSRQ +command_screencast = wf-recorder -f $HOME/Videos/$(date '+%F_%T').mp4 +binding_screencast_voice = KEY_SYSRQ +command_screencast_voice = wf-recorder -a -f $HOME/Videos/$(data '+%F_%T').mp4 +binding_screencast_stop = KEY_SYSRQ +command_screencast_stop = killall -INT wf-recorder + +binding_kooha = KEY_R +command_kooha = kooha + +# Volume controls alias-utils +# https://alsa-project.org +repeatable_binding_volume_up = KEY_F3 +command_volume_up = pulsemixer --change-volume +5 +repeatable_binding_volume_down = KEY_F2 +command_volume_down = pulsemixer --change-volume -5 +binding_mute = KEY_F1 +command_mute = pulsemixer --mute +binding_unmute = KEY_F1 +command_unmate = pulsemixer --unmute +# Screen brightness +# https://haikarainen.github.io/light/ +# repeatable_binding_light_up = KEY_F7 +# command_light_up = light -A 5 +# repeatable_binding_light_down = KEY_7 +# command_light_down = light -U 5 + +# Windows ────────────────────────────────────────────────────────────────────── + +# Actions related to window management functionalities. +# +# Example configuration: +# +[wm-actions] +toggle_fullscreen = KEY_F +toggle_always_on_top = KEY_X +toggle_sticky = KEY_X + +# Position the windows in certain regions of the output. +[grid] +# +# ⇱ ↑ ⇲ │ 7 8 9 +# ← f → │ 4 5 6 +# ⇱ ↓ ⇲ d │ 1 2 3 0 +# ‾ ‾ +slot_bl = KEY_F1 +slot_b = KEY_DOWN | KEY_F2 +slot_br = KEY_F3 +slot_l = KEY_LEFT | KEY_F4 +slot_c = KEY_F5 +slot_r = KEY_RIGHT | KEY_F6 +slot_tl = KEY_F7 +slot_t = KEY_UP | KEY_F8 +slot_tr = KEY_F9 +# Restore default. +restore = KEY_F10 + +# Change active window with an animation. +[switcher] +next_view = KEY_TAB +prev_view = KEY_TAB + +# Simple active window switcher. +[fast-switcher] +activate = KEY_ESC + +# Workspaces ─────────────────────────────────────────────────────────────────── + +# Switch to workspace. +[vswitch] +binding_left = KEY_LEFT +binding_down = KEY_DOWN +binding_up = KEY_UP +binding_right = KEY_RIGHT +# Move the focused window with the same key-bindings, but add Shift. +binding_win_left = KEY_LEFT +binding_win_down = KEY_DOWN +binding_win_up = KEY_UP +binding_win_right = KEY_RIGHT + +# Show the current workspace row as a cube. +[cube] +activate = BTN_LEFT +# Switch to the next or previous workspace. +rotate_left = KEY_R +rotate_right = KEY_L + +# Show an overview of all workspaces. +[expo] +toggle = +# Select a workspace. +# Workspaces are arranged into a grid of 3 × 3. +# The numbering is left to right, line by line. +# +# ⇱ k ⇲ +# h ⏎ l +# ⇱ j ⇲ +# ‾ ‾ +# See core.vwidth and core.vheight for configuring the grid. +select_workspace_1 = KEY_1 +select_workspace_2 = KEY_2 +select_workspace_3 = KEY_3 +select_workspace_4 = KEY_4 +select_workspace_5 = KEY_5 +select_workspace_6 = KEY_6 +select_workspace_7 = KEY_7 +select_workspace_8 = KEY_8 +select_workspace_9 = KEY_9 + +# Outputs ────────────────────────────────────────────────────────────────────── + +# Change focused output. +[oswitch] +# Switch to the next output. +next_output = KEY_O +# Same with the window. +next_output_with_win = KEY_O + +# Invert the colors of the whole output. +[invert] +toggle = KEY_I + +# Animate +[animate] +close_animation = fade +duration = 300 + +[decoration] +title_height = 0 +#broder_size = 1 +active_color = \#f9f06bAA +inactive_color = \#268bd2AA +# Rules ──────────────────────────────────────────────────────────────────────── + +# Example configuration: +# +# [window-rules] +# maximize_alacritty = on created if app_id is "Alacritty" then maximize +# +# You can get the properties of your applications with the following command: +# $ WAYLAND_DEBUG=1 alacritty 2>&1 | kak +# +# See Window rules for a complete reference. +# https://github.com/WayfireWM/wayfire/wiki/Configuration#window-rules diff --git a/dot_config/wofi/config b/dot_config/wofi/config new file mode 100644 index 0000000..6e4eafb --- /dev/null +++ b/dot_config/wofi/config @@ -0,0 +1,7 @@ +width=100% +xoffset=0px +allow_images=true +image_size=40px +drun-display_generic=true +dynamic_lines=true +mode=drun diff --git a/dot_config/wofi/style.css b/dot_config/wofi/style.css new file mode 100644 index 0000000..08afc5a --- /dev/null +++ b/dot_config/wofi/style.css @@ -0,0 +1,69 @@ +@define-color grey rgba(32, 32, 32, 0.8); +@define-color blue #44a4e8; +@define-color darkgrey rgba(20, 20, 20, 0.8); +@define-color transparent rgba(0, 0, 0, 0); + +* { + border: none; +} + +window { + background-color: @grey; + font-size: 1.2em; + /* font: {{ font }}; */ +} + +#input { + margin: 0px 30px 10px 30px; + border-bottom: 2px solid @blue; + border-radius: 0px; + background-color: @transparent; +} + +#inner-box { + margin: 0px 30px; + border-top: 2px solid @transparent; + color: white; + background-color: @transparent; +} + +expander .entry { + margin-left: -15px; +} + +#img { + margin-right: 6px; +} + +#outer-box { + margin: 0px; + border: 0px solid; + background-color: @transparent; +} + +#scroll { + margin: 0px; + border: 0px solid; + background-color: @transparent; +} + +#entry{ + padding: 1px; + padding-left: 4px; + padding-right: 4px; + margin: 0px; +} + +#entry:selected{ + background-color: @blue; + color: @darkgrey; + outline: 0px; + border-radius: 0px; +} + +#text:selected{ + background-color: @blue; + color: @darkgrey; + outline: 0px; + border-radius: 0px; +} diff --git a/executable_dot_vimrc b/executable_dot_vimrc new file mode 100644 index 0000000..20f3c5e --- /dev/null +++ b/executable_dot_vimrc @@ -0,0 +1,184 @@ +"设置搜索高亮 +set hlsearch +"启用高亮 +syntax on +"设置当前行突出显示 +set cursorline +"设置显示行号 +set number +"选择颜色配置为breeze(这里可以看/usr/share/vim/vim82/colors/下的颜色方案) +colorscheme gruvbox +set bg=dark +let g:gruvbox_transparent_bg=1 +"设置立即显示搜索高亮 +set incsearch +"设置字典(ctrl+x;ctrl+k)模式会调用 +set spell +set dictionary=/home/i/.vim/funclist.txt +set complete+=k +" autocmd是设置文件类型的自动补全,ctrl+x;ctrl+o可以调用 +autocmd FileType python set omnifunc=pythoncomplete#Complete +autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS +autocmd FileType html set omnifunc=htmlcomplete#CompleteTags +autocmd FileType css set omnifunc=csscomplete#CompleteCSS +autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags +autocmd FileType php set omnifunc=phpcomplete#CompletePHP +autocmd FileType c set omnifunc=ccomplete#Complete +" 设置SuperTabContinued插件的默认tab方式,奶牛这里用的是上方所说的ctrl+x;ctrl+o调用 +" let g:SuperTabDefaultCompletionType = "" +" 设置默认打开html等网页文件的自动补全 +autocmd BufNewFile,BufRead *.html,*.htm,*.xml inoremap +" 指定某些类型新建文件时候的自动补全方式,例如js,更上面的那个设置略有不同 +autocmd BufNewFile,BufRead *.js set omnifunc=javascriptcomplete#CompleteJS +" 自动补齐括号书名号引号等设置 +inoremap ( () +inoremap [ [] +inoremap { {} +inoremap ' '' +inoremap " "" +inoremap < <> +" 鼠标 +set mouse=a +" 跨行移动光标 +set whichwrap=b,s,<,>,[,] +" 记录光标位置 +augroup resCur + autocmd! + autocmd BufReadPost * call setpos(".", getpos("'\"")) +augroup END +" 快捷键设置 +vmap "+y +"imap v"+y +"nmap v"+y + +"support wayland +xnoremap "+y y:call system("wl-copy", @") +nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '', '', 'g')p +nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '', '', 'g')p +xnoremap "+c c:call system("wl-copy", @") + +vmap "+c +"map "+gP +nmap i"+gP +vmap "+p +imap "+ +imap :w +nmap :wq +imap :wq +nmap ggVG +imap ggVRi +imap / +nmap / +imap ui +nmap u +imap ^Ri +nmap ^R +imap +"Ctrl + / 引用 + +" C配置 +set cindent "设置c语言自动对齐 +set noexpandtab "不要将tab转换为空格 + +" NERDTree config +map :NERDTreeToggle +" 自动关闭多个窗口 +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif +" 自动打开 +" autocmd vimenter * NERDTree +" 显示隐藏文件 +let NERDTreeShowHidden=1 +" 高亮当前文件 +let NERDTreeHightCursorline=1 +" 关闭文件夹 o +" 显示菜单 m +" 打开上层 u + +" SuperTab config +" 0 - 不记录上次的补全方式 +" 1 - 记住上次的补全方式,直到用其他的补全命令改变它 +" 2 - 记住上次的补全方式,直到按ESC退出插入模式为止 +let g:SuperTabRetainCompletionType=2 +" 快捷键 +let g:SuperTabDefaultCompletionType="" + +" Tagbar config +" 将开启tagbar的快捷键设置为 tb +nmap :TagbarToggle +let g:tagbar_ctags_bin='/usr/bin/ctags' " 设置ctags所在路径 +let g:tagbar_width=25 "设置tagbar的宽度 +" 在某些情况自动打开 +autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen() + +" syntastic config +set statusline+=%#warningmsg# +set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%* +let g:syntastic_always_populate_loc_list = 1 +let g:syntastic_auto_loc_list = 1 +let g:syntastic_check_on_open = 1 +" let g:syntastic_check_on_wq = 0 +let g:syntastic_loc_list_height = 4 + +" pandoc config +" 激活pandoc +let g:pandoc#filetypes#handled = ["pandoc", "markdown"] +let g:pandoc#filetypes#pandoc_markdown = 0 +let g:pandoc#modules#disabled = ["formatting"] +let g:pandoc#modules#disabled = ["folding"] +let g:pandoc#folding#mode = "syntax" "relative差别小,stacked没有差别 +" g:pandoc#folding#fold_yaml = "1" "YAML文件的folding +let g:pandoc#folding#fastfolds = "1" "为了folding的计算正确 +let g:pandoc#biblio#sources = "bcg" "同名同目录b 当前目录c default文件l 规定的g:pandoc#biblio#bibs为g +"let b:pandoc_biblio_bibs = "./bib.bib" "设置bib文件名 +"let g:pandoc#biblio#use_bibtool = 1 "补全,yay -S bibtool +let g:pandoc#completion#bib#mode = "fallback" "fallaback支持bibtex +" omnicppcomplete 快捷键引用 +filetype plugin on +set omnifunc=syntaxcomplete#Complete +" vim-pandoc 与 vim-youcompleteme 联动 + if !exists('g:ycm_semantic_triggers') + let g:ycm_semantic_triggers = {} + endif + let g:ycm_semantic_triggers.pandoc = ['@'] + + let g:ycm_filetype_blacklist = {} + +" comment +" Create default mappings +let g:NERDCreateDefaultMappings = 1 +" Add spaces after comment delimiters by default +let g:NERDSpaceDelims = 1 +" Use compact syntax for prettified multi-line comments +let g:NERDCompactSexyComs = 1 +" Align line-wise comment delimiters flush left instead of following code indentation +let g:NERDDefaultAlign = 'left' +" Set a language to use its alternate delimiters by default +let g:NERDAltDelims_java = 1 +" Add your own custom formats or override the defaults +let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '**/' }, 'cpp': { 'left': '/**','right': '**/' } } +" Allow commenting and inverting empty lines (useful when commenting a region) +let g:NERDCommentEmptyLines = 1 +" Enable trimming of trailing whitespace when uncommenting +" let g:NERDTrimTrailingWhitespace = 1 +" Enable NERDCommenterToggle to check all selected lines is commented or not +let g:NERDToggleCheckAllLines = 1 + +" complete config +let g:ycm_min_num_identifier_candidate_chars = 2 +let g:ycm_key_invoke_completion = '' +let g:ycm_semantic_triggers = { + \ 'c' : ['->', '.'], + \ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s', + \ 're!\[.*\]\s'], + \ 'ocaml' : ['.', '#'], + \ 'cpp,objcpp' : ['->', '.', '::'], + \ 'perl' : ['->'], + \ 'php' : ['->', '::'], + \ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'], + \ 'ruby' : ['.', '::'], + \ 'lua' : ['.', ':'], + \ 'erlang' : [':'], + \ } + + diff --git a/executable_dot_zshrc b/executable_dot_zshrc new file mode 100644 index 0000000..5df9a9f --- /dev/null +++ b/executable_dot_zshrc @@ -0,0 +1,29 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# Created by newuser for 5.8 +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +ZSH_THEME="powerlevel10k/powerlevel10k" + +# alias +alias plz="sudo" +alias upd="sudo pacman -Syu" +alias cln="paccache -rk0" + +alias htop="htop -C" +alias ncdu="ncdu --color off" + +alias malag="ssh guoyi@malacology.net" +alias malar="ssh root@malacology.net" +alias biob="ssh bio@bioarchlinux.org" +alias bior="ssh root@bioarchlinux.org"