commit b3fcc223647062a9eedbd5e07d37466049694b82 Author: Rikuoh Date: Thu Aug 17 14:14:00 2023 +0900 migrate diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..5a0e7b5 --- /dev/null +++ b/.Xresources @@ -0,0 +1,49 @@ +!! Import colorscheme +#define S_foreground #cacacc +#define S_background #1C1E27 +#define S_black #3C3E47 +#define S_red #E4436F +#define S_green #24e39d +#define S_yellow #EDA685 +#define S_blue #2095B4 +#define S_magenta #B367CF +#define S_cyan #00A5AF +#define S_lightgrey #b5b5ba +#define S_darkgrey #6C6F93 +#define S_darkred #D95882 +#define S_darkgreen #68DDC4 +#define S_darkyellow #E8AEAA +#define S_darkblue #64A4BF +#define S_darkmagenta #B382CF +#define S_darkcyan #54AEB8 +#define S_white #cacacc + +!! Set colors +*background: S_background +*foreground: S_foreground +*color0: S_black +*color8: S_darkgrey +*color1: S_darkred +*color9: S_red +*color2: S_darkgreen +*color10: S_green +*color3: S_darkyellow +*color11: S_yellow +*color4: S_darkblue +*color12: S_blue +*color5: S_darkmagenta +*color13: S_magenta +*color6: S_darkcyan +*color14: S_cyan +*color7: S_lightgrey +*color15: S_white + + +!! Set DPI +Xft.dpi: 140 +Xft.auohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.antialias: 1 +Xft.rgba: rgb +Xcursor.size: 32 diff --git a/.alacritty.yml b/.alacritty.yml new file mode 100644 index 0000000..177ffb2 --- /dev/null +++ b/.alacritty.yml @@ -0,0 +1,79 @@ +# シェル +shell: + program: /usr/bin/zsh + args: + - --login + +# カーソル +cursor: + style: + shape: Underline + blinking: Always + unfocused_hollow: false + blink_interval: 470 + +# タブスペース +tabspaces: 4 + +# ウインドウ +window: + opacity: 0.95 + padding: + x: 0 + y: 0 + dynamic_padding: false + +# フォント +font: + size: 13 + normal: + family: 'UDEV Gothic 35NFLG' + style: Regular + bold: + family: 'UDEV Gothic 35NFLG' + style: Bold + italic: + family: 'UDEV Gothic 35NFLG' + style: Italic + bold_italic: + family: 'UDEV Gothic 35NFLG' + style: Bold Italic + +# 環境変数 +env: + TERM: alacritty + +# Colors (Horizon Dark) +colors: + # Primary colors + primary: + background: '0x1c1e26' + foreground: '0xe0e0e0' + + # Cursor + cursor: + cursor: '0x00ff00' + vi_mode_cursor: + cursor: '0x00ff00' + + # Normal colors + normal: + black: '0x16161c' + red: '0xe95678' + green: '0x29d398' + yellow: '0xfab795' + blue: '0x26bbd9' + magenta: '0xee64ac' + cyan: '0x59e1e3' + white: '0xd5d8da' + + # Bright colors + bright: + black: '0x5b5858' + red: '0xec6a88' + green: '0x3fdaa4' + yellow: '0xfbc3a7' + blue: '0x3fc4de' + magenta: '0xf075b5' + cyan: '0x6be4e6' + white: '0xd5d8da' diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 new file mode 100644 index 0000000..d59308f --- /dev/null +++ b/.gtkrc-2.0 @@ -0,0 +1,19 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +include "/home/riq0h/.gtkrc-2.0.mine" +gtk-theme-name="Breeze" +gtk-icon-theme-name="Qogir" +gtk-font-name="Noto Sans CJK JP 11" +gtk-cursor-theme-name="Qogir" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_TEXT +gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="rgb" diff --git a/.profile b/.profile new file mode 100644 index 0000000..c428acf --- /dev/null +++ b/.profile @@ -0,0 +1,2 @@ +export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/riq0h/.fzf/bin:/home/riq0h/.local/share/gem/ruby/3.0.0/bin:/home/riq0h/go/bin" +[ "$XDG_CURRENT_DESKTOP" = "KDE" ] || [ "$XDG_CURRENT_DESKTOP" = "GNOME" ] || export QT_QPA_PLATFORMTHEME="qt5ct" diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..53c2654 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,114 @@ +# prefixL[M-aɕύX +set -g prefix M-a + +# M-b̃L[oCh +unbind M-b + +# }EXLɂ +set-option -g mouse on + +# ftHgVF̐ݒ +set-option -g default-shell /bin/zsh +set-option -g default-command /bin/zsh + +# L[Xg[ÑfBC炷 +set -sg escape-time 0 + +# EBhẼCfbNX1n߂ +set -g base-index 1 + +# yC̃CfbNX1n߂ +set-window-option -g pane-base-index 1 + +# ݒt@C[h +bind-key r source-file ~/.tmux.conf \; display "Reloaded." + +# M-a*2tmux̃vOM-a𑗂 +bind-key M-a send-prefix + +# EChE +bind-key -n M-s split-window -v -c "#{pane_current_path}" +bind-key -n M-v split-window -h -c "#{pane_current_path}" + +bind-key -n M-Left select-pane -L +bind-key -n M-Right select-pane -R +bind-key -n M-Up select-pane -U +bind-key -n M-Down select-pane -D + +bind-key -n M-w new-window + +bind-key -n M-Tab select-window -t :+ +bind-key -n M-1 select-window -t 1 +bind-key -n M-2 select-window -t 2 +bind-key -n M-3 select-window -t 3 +bind-key -n M-4 select-window -t 4 +bind-key -n M-5 select-window -t 5 +bind-key -n M-6 select-window -t 6 +bind-key -n M-7 select-window -t 7 +bind-key -n M-8 select-window -t 8 +bind-key -n M-9 select-window -t 9 + +bind-key -n M-h select-pane -L +bind-key -n M-l select-pane -R +bind-key -n M-j select-pane -D +bind-key -n M-k select-pane -U + +bind-key -n M-q kill-pane +bind-key q kill-window + +# Rs[[h +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -bi" +bind-key -T copy-mode-vi Y send-keys -X copy-line "xsel -bi" +bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -bi" +bind-key Space copy-mode +bind-key p paste-buffer + +# Vim̃L[oChŃyCTCY +bind-key -r H resize-pane -L 3 +bind-key -r J resize-pane -D 3 +bind-key -r K resize-pane -U 3 +bind-key -r L resize-pane -R 3 + +# 256F[gp +set -g default-terminal "tmux-256color" +set -ga terminal-overrides ",$TERM:Tc" + +# yC̘g +set -g pane-border-lines single + +# Xe[^Xo[ݒ肷 +set-option -g status-position "top" +set -g status-justify "left" +set -g status "on" +set -g status-left-style "none" +set -g message-command-style "fg=#c5cdd9,bg=#414550" +set -g status-right-style "none" +set -g pane-active-border-style "fg=#a0c980" +set -g status-style "none,bg=#33353f" +set -g message-style "fg=#c5cdd9,bg=#414550" +set -g pane-border-style "fg=#414550" +set -g status-right-length "100" +set -g status-left-length "100" +set-window-option -g window-status-activity-style "none,fg=#a0c980,bg=#33353f" +set-window-option -g window-status-separator "" +set-window-option -g window-status-style "none,fg=#c5cdd9,bg=#33353f" +set -g status-left "#[fg=#2c2e34,bg=#a0c980] #S #[fg=#a0c980,bg=#33353f,nobold,nounderscore,noitalics]" +set -g status-right "" +set-window-option -g window-status-format "#[fg=#33353f,bg=#33353f,nobold,nounderscore,noitalics]#[default] #I #W #[fg=#33353f,bg=#33353f,nobold,nounderscore,noitalics]" +set-window-option -g window-status-current-format "#[fg=#33353f,bg=#414550,nobold,nounderscore,noitalics]#[fg=#c5cdd9,bg=#414550] #I #W #[fg=#414550,bg=#33353f,nobold,nounderscore,noitalics]" + +## tbV̊Ԋuݒ肷 +set -g status-interval 1 + +## tH[JXCxg +set -g focus-events on + +## BWAm[eBtBP[VLɂ +set-window-option -g monitor-activity on +set -g visual-activity on + +## AlcrittytmuxLɂ +set-option -ga terminal-overrides ",alacritty:RGB" diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..025d075 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,8 @@ +export LANG="ja_JP.UTF-8" +export XMODIFIERS="@im=fcitx" +export XMODIFIER="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_MODULE=fcitx +export DefaultIMModule=fcitx +exec i3 +xset -b diff --git a/.xprofile b/.xprofile new file mode 100644 index 0000000..d0ef362 --- /dev/null +++ b/.xprofile @@ -0,0 +1,6 @@ +export LANG="ja_JP.UTF-8" +export XMODIFIERS="@im=fcitx" +export XMODIFIER="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_MODULE=fcitx +export DefaultIMModule=fcitx diff --git a/.zpreztorc b/.zpreztorc new file mode 100644 index 0000000..107c831 --- /dev/null +++ b/.zpreztorc @@ -0,0 +1,37 @@ +# 色彩 +zstyle ':prezto:*:*' color 'yes' + +# プリロード +zstyle ':prezto:load' pmodule \ + 'archive' \ + 'environment' \ + 'terminal' \ + 'editor' \ + 'history' \ + 'directory' \ + 'spectrum' \ + 'utility' \ + 'completion' \ + 'syntax-highlighting' \ + 'history-substring-search' \ + 'prompt' + +# キーマップ +zstyle ':prezto:module:editor' key-bindings 'emacs' + +# テーマ +zstyle ':prezto:module:prompt' theme 'pure' + +# ハイライト +zstyle ':prezto:module:syntax-highlighting' color 'yes' +zstyle ':prezto:module:syntax-highlighting' highlighters \ + 'main' \ + 'brackets' \ + 'pattern' + +# 途中まで打ったコマンドの履歴を検索 +zstyle ':prezto:module:history-substring-search' case-sensitive 'yes' +zstyle ':prezto:module:history-substring-search' color 'yes' +zstyle ':prezto:module:history-substring-search:color' found '' +zstyle ':prezto:module:history-substring-search:color' not-found '' +zstyle ':prezto:module:history-substring-search' globbing-flags '' diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..b03a94d --- /dev/null +++ b/.zshrc @@ -0,0 +1,101 @@ +# Preztoにぶん投げ +if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then + source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" +fi + +# 上位階層に移動するコマンド +alias a='cd ../' +alias aa='cd ../../' +alias aaa='cd ../../../' + +# デフォルトエディタをVimにする +export EDITOR=nvim +alias sudo='sudo -E ' +alias v=nvim +alias vim=nvim + +# paruを短縮する +alias poo=paru + +# exaをls代わりにする +alias ls='exa --icons -a' +alias lsa='exa --icons -T -a' + +# batをcatの代わりにする +alias cat=bat + +# clearを短縮する +alias cls=clear + +# 天気情報 +alias wttr='() { curl -H "Accept-Language: ${LANG%_ja}" wttr.in/"${1:-Saitama}" }' + +# BAT関連 +export BAT_THEME="TwoDark" + +# Zoxide関連 +eval "$(zoxide init zsh)" +zle -N zi +bindkey '^z' zi + +# Tailscale関連 +alias tlsc='sudo tailscale up --exit-node-allow-lan-access --exit-node=mystech' +alias tlscd='sudo tailscale down' + +# fzf関連 +export PATH="$PATH:$HOME/.fzf/bin" +export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git"' +export FZF_DEFAULT_OPTS='--ansi --height 40% --reverse --border=none' + +export FZF_CTRL_T_COMMAND='rg --files --hidden --follow --glob "!**/.git/*"' +export FZF_CTRL_T_OPTS=" + --preview 'bat --color=always --style=header,grid {}' + --preview-window=right:60%" + +fadd() { + local out q n addfiles + while out=$( + git status --short | + awk '{if (substr($0,2,1) !~ / /) print $2}' | + fzf-tmux --multi --exit-0 --expect=ctrl-d); do + q=$(head -1 <<< "$out") + n=$[$(wc -l <<< "$out") - 1] + addfiles=(`echo $(tail "-$n" <<< "$out")`) + [[ -z "$addfiles" ]] && continue + if [ "$q" = ctrl-d ]; then + git diff --color=always $addfiles | less -R + else + git add $addfiles + fi + done +} + +rga-fzf() { +RG_PREFIX="rga --files-with-matches" +local file +file="$( + FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \ + fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \ + --phony -q "$1" \ + --bind "change:reload:$RG_PREFIX {q}" \ + --preview-window="70%:wrap" +)" && +echo "opening $file" && +xdg-open "$file" +} + +# tmux関連 +alias tx="tmuximum" +if [ -z $TMUX ]; then + tmuximum +fi + +# 履歴関連 +HISTFILE=~/.zsh_history # ヒストリを保存するファイル +HISTSIZE=10000 # メモリに保存されるヒストリの件数 +SAVEHIST=10000 # 保存されるヒストリの件数 +setopt bang_hist # !を使ったヒストリ展開を行う(d) +setopt extended_history # ヒストリに実行時間も保存する +setopt hist_reduce_blanks # 余分なスペースを削除してヒストリに保存する + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh diff --git a/alacritty.yml b/alacritty.yml new file mode 100644 index 0000000..b38e3e2 --- /dev/null +++ b/alacritty.yml @@ -0,0 +1,81 @@ +# シェル +shell: + program: /Windows/System32/wsl.exe ~ -d Distrod + +# カーソル +cursor: + style: + shape: Underline + blinking: Always + unfocused_hollow: false + blink_interval: 470 + +# タブスペース +tabspaces: 4 + +# フォント +font: + size: 12 + normal: + family: 'UDEV Gothic 35NFLG' + style: Regular + bold: + family: 'UDEV Gothic 35NFLG' + style: Bold + italic: + family: 'UDEV Gothic 35NFLG' + style: Italic + bold_italic: + family: 'UDEV Gothic 35NFLG' + style: Bold Italic + +# ウインドウ +window: + dimensions: + columms: 370 + line: 250 + decorations: full + opacity: 0.97 + padding: + x: 0 + y: 0 + dynamic_padding: false + +# 環境変数 +env: + TERM: alacritty + +# Colors (Horizon Dark) +colors: + # Primary colors + primary: + background: '0x1c1e26' + foreground: '0xe0e0e0' + + # Cursor colors + cursor: + cursor: '0x00ff00' + vi_mode_cursor: + cursor: '0x00ff00' + + # Normal colors + normal: + black: '0x16161c' + red: '0xe95678' + green: '0x29d398' + yellow: '0xfab795' + blue: '0x26bbd9' + magenta: '0xee64ac' + cyan: '0x59e1e3' + white: '0xd5d8da' + + # Bright colors + bright: + black: '0x5b5858' + red: '0xec6a88' + green: '0x3fdaa4' + yellow: '0xfbc3a7' + blue: '0x3fc4de' + magenta: '0xf075b5' + cyan: '0x6be4e6' + white: '0xd5d8da' diff --git a/colors-rofi.rasi b/colors-rofi.rasi new file mode 100644 index 0000000..16a8a36 --- /dev/null +++ b/colors-rofi.rasi @@ -0,0 +1,165 @@ +* { + active-background: #68DDC4; + active-foreground: @foreground; + normal-background: @background; + normal-foreground: @foreground; + urgent-background: #D95882; + urgent-foreground: @foreground; + + alternate-active-background: @background; + alternate-active-foreground: @foreground; + alternate-normal-background: @background; + alternate-normal-foreground: @foreground; + alternate-urgent-background: @background; + alternate-urgent-foreground: @foreground; + + selected-active-background: #D95882; + selected-active-foreground: @foreground; + selected-normal-background: #f08080; + selected-normal-foreground: @background; + selected-urgent-background: #D95882; + selected-urgent-foreground: @foreground; + + background-color: @background; + background: #1C1E27; + foreground: #cacacc; + border-color: #E8AEAA; + spacing: 4; +} + +#window { + background-color: @background; + border: 2px; + padding: 1ch; + width: 500px; +} + +#mainbox { + border: 0; + padding: 0; +} + +#message { + border: 2px 0px 0px; + border-color: @border-color; + padding: 1px; +} + +#textbox { + text-color: @foreground; +} + +#inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} + +#textbox-prompt-colon { + expand: false; + str: ""; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +} + +#listview { + fixed-height: 0; + border: 2px 0px 0px; + border-color: @border-color; + spacing: 0px; + scrollbar: false; + padding: 6px 0px 0px; + lines: 5; +} + +#element { + border: 0; + padding: 8px; +} + +#element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} + +#element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} + +#element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} + +#element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} + +#element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} + +#element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} + +#element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} + +#element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} + +#element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} + +#scrollbar { + width: 4px; + border: 0; + handle-width: 8px; + padding: 0; +} + +#sidebar { + border: 2px 0px 0px; + border-color: @border-color; +} + +#button { + text-color: @normal-foreground; +} + +#button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} + +#inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} + +#case-indicator { + spacing: 0; + text-color: @normal-foreground; +} + +#entry { + spacing: 0; + text-color: @normal-foreground; +} + +#prompt { + spacing: 1; + margin: 0px 0px 4px 0em; + text-color: @normal-foreground; +} + diff --git a/config b/config new file mode 100644 index 0000000..76198c7 --- /dev/null +++ b/config @@ -0,0 +1,261 @@ +# 神は言った――「光あれ」 +set $mod Mod4 + +# ウインドウタイトルのフォント +font pango:Noto Sans CJK JP 8 + +# フローティングウインドウの操作キー +floating_modifier $mod + +# ターミナル +bindsym $mod+Return exec --no-startup-id alacritty + +# ファイラー +bindsym $mod+m exec --no-startup-id thunar + +# タスクキル +bindsym $mod+q kill + +# ランチャー +bindsym $mod+z exec --no-startup-id "rofi -show drun" +bindsym $mod+x exec --no-startup-id "rofi -show run" + +# ウインドウフォーカス +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# 代替ウインドウフォーカス +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# ウインドウ交換 +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# 代替ウインドウ交換 +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# 水平ウインドウ分割 +bindsym $mod+s split v + +# 垂直ウインドウ分割 +bindsym $mod+v split h + +# フルスクリーン +bindsym $mod+f fullscreen toggle + +# ウインドウの分割切り替え +bindsym $mod+e layout toggle split + +# ウインドウフロート +bindsym $mod+w floating toggle + +# フロートウインドウフォーカス +bindsym $mod+space focus mode_toggle + +# 親コンテナへのフォーカス +bindsym $mod+a focus parent + +# 子コンテナへのフォーカス +bindsym $mod+b focus child + +# ワークスペース変数 +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# ワークスペースの移動 +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# ウインドウを他のワークスペースに移動する +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# 設定再読込み +bindsym $mod+Shift+c reload + +# 再起動 +bindsym $mod+Shift+r restart + +# ウインドウリサイズ +mode "RESIZE" { + bindsym h resize shrink width 10 px or 5 ppt + bindsym j resize grow height 10 px or 5 ppt + bindsym k resize shrink height 10 px or 5 ppt + bindsym l resize grow width 10 px or 5 ppt + + # 代替 + bindsym Left resize shrink width 10 px or 5 ppt + bindsym Down resize grow height 10 px or 5 ppt + bindsym Up resize shrink height 10 px or 5 ppt + bindsym Right resize grow width 10 px or 5 ppt + + # 通常モード遷移 + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "RESIZE" + +# コマンドモード――これによりキーバインドは実質無制限となる! +bindsym $mod+c mode "CMD" +mode "CMD"{ + bindsym v exec vivaldi-stable; mode "default" + bindsym f exec "flameshot gui" mode "default" + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+c mode "default" +} + +# シャットダウンシークエンス +bindsym $mod+Shift+e mode "SHUTDOWN SEQUENCE" +mode "SHUTDOWN SEQUENCE"{ + bindsym p exec "systemctl poweroff" + bindsym r exec "systemctl reboot" + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+Shift+e mode "default" +} + +# ステータスバーの色 +set $background #2B303B +set $foreground #C0C5CE +set $lightred #BF616A +set $lightgreen #A3BE8C +set $lightyellow #EBCB8B +set $lightblue #8FA1B3 +set $lightmagenta #B48EAD +set $lightcyan #96B5B4 +set $lightwhite #C0C5CE +set $pink #FFB6C1 +set $orange #F08080 + +# ステータスバー関連 +bar { + font pango:UDEV Gothic 35 13 + mode dock + position top + workspace_buttons yes + strip_workspace_numbers yes + binding_mode_indicator yes + tray_padding 2 + colors { + background $background + focused_background $background + statusline $lightred + focused_statusline $lightred + # 左からborder, bg, fg + focused_workspace $orange $orange $background + active_workspace $background $background $foreground + inactive_workspace $background $background $foreground + urgent_workspace $green $green $background + binding_mode $green $green $background + } + status_command /usr/bin/bumblebee-status -m playerctl datetime \ + -p playerctl.hide="true" playerctl.format="{{artist}} - {{title}}" playerctl.layout="playerctl.song" datetime.format="%m/%d %H:%M" -t monotone +} + +# i3wm全体の色 +set $bg #1C1E27 +set $fg #CACACC +set $darkred #D95882 +set $red #E4436F +set $darkgreen #68DDC4 +set $green #24E39D +set $darkyellow #E8AEAA +set $yellow #EDA685 +set $darkblue #64A4BF +set $blue #2095B4 +set $darkmagenta #B382CF +set $darkcyan #54AEB8 +set $cyan #00A5AF +set $darkwhite #CACACC +set $white #CACACA +set $darkgrey #6C6F93 + +# フォーカスカラー +# class border background text indicator child_border +client.focused $bg $darkgrey $fg $yellow $darkyellow +client.unfocused $bg $bg $fg $yellow $bg + +# ウインドウの枠の太さ +for_window [class="^.*"] border pixel 2 + +# ウインドウ間の隙間の広さ +gaps top 6 +gaps bottom 6 +gaps right 6 +gaps left 6 +gaps inner 6 + +# マウスでフォーカスしない +focus_follows_mouse no + +# 自動起動 +exec --no-startup-id dunst +exec --no-startup-id "picom -b" +exec --no-startup-id xfce4-power-manager +exec --no-startup-id fcitx5 +exec --no-startup-id vivaldi-stable +exec --no-startup-id discord +exec --no-startup-id slack +exec --no-startup-id parcellite +exec --no-startup-id "./sh/mount.sh" +exec --no-startup-id "feh --no-fehbg --bg-scale ~/Wallpaper.png" +exec --no-startup-id "xset r rate 200 30" + +# フローティング起動一覧 +for_window [class="Thunar"] floating enable, resize set 1024 780 +for_window [class="Lxappearance"] floating enable, resize set 800 600 +for_window [class="Pavucontrol"] floating enable, resize set 800 600 +for_window [class="fcitx5-config-qt"] floating enable +for_window [class="mozc_tool"] floating enable, resize set 800 600 +for_window [class="VirtualBox Manager"] floating enable, resize set 1280 1024 +for_window [class="VirtualBox Machine"] floating enable +for_window [class="Io.github.celluloid_player.Celluloid"] floating enable +for_window [class="feh"] floating enable, resize set 1280 1024 +for_window [class="transmission-gtk"] floating enable +for_window [class="stacer"] floating enable +for_window [class="Mousepad"] floating enable, resize set 1280 1024 +for_window [class="Xfce4-power-manager-settings"] floating enable, resize 1024 780 +for_window [class="qt5ct"] floating enable, resize set 1024 780 +for_window [class="Qtconfig-qt4"] floating enable, resize set 1024 780 +for_window [class="kdeconnect-app"] floating enbale + +# ワークスペース指定一覧 +assign [class="discord"] workspace 3 +assign [class="Slack"] workspace 3 diff --git a/config.rasi b/config.rasi new file mode 100644 index 0000000..090e05c --- /dev/null +++ b/config.rasi @@ -0,0 +1,5 @@ +configuration { + font: "Noto Sans CJK JP 18"; + drun-display-format: "{name}"; +} +@import "colors-rofi.rasi" diff --git a/dunstrc b/dunstrc new file mode 100644 index 0000000..0f03560 --- /dev/null +++ b/dunstrc @@ -0,0 +1,245 @@ +[global] +font = Noto Sans CJK JP 12 + +# Allow a small subset of html markup: +# bold +# italic +# strikethrough +# underline +# +# For a complete reference see +# . +# If markup is not allowed, those tags will be stripped out of the +# message. +markup = yes +plain_text = no + +# The format of the message. Possible variables are: +# %a appname +# %s summary +# %b body +# %i iconname (including its path) +# %I iconname (without its path) +# %p progress value if set ([ 0%] to [100%]) or nothing +# Markup is allowed +format = "%s\n%b" + +# Sort messages by urgency. +sort = no + +# Show how many messages are currently hidden (because of geometry). +indicate_hidden = yes + +# Alignment of message text. +# Possible values are "left", "center" and "right". +alignment = left + +# The frequency with wich text that is longer than the notification +# window allows bounces back and forth. +# This option conflicts with "word_wrap". +# Set to 0 to disable. +bounce_freq = 0 + +# Show age of message if message is older than show_age_threshold +# seconds. +# Set to -1 to disable. +show_age_threshold = -1 + +# Split notifications into multiple lines if they don't fit into +# geometry. +word_wrap = no + +# Ignore newlines '\n' in notifications. +ignore_newline = no + +# Hide duplicate's count and stack them +stack_duplicates = yes +hide_duplicate_count = yes + +width = 300 +height = 500 +offset = 12x39 + +# Shrink window if it's smaller than the width. Will be ignored if +# width is 0. +shrink = no + +# The transparency of the window. Range: [0; 100]. +# This option will only work if a compositing windowmanager is +# present (e.g. xcompmgr, compiz, etc.). +transparency = 5 + +# Don't remove messages, if the user is idle (no mouse or keyboard input) +# for longer than idle_threshold seconds. +# Set to 0 to disable. +idle_threshold = 0 + +# Which monitor should the notifications be displayed on. +monitor = 0 + +# Display notification on focused monitor. Possible modes are: +# mouse: follow mouse pointer +# keyboard: follow window with keyboard focus +# none: don't follow anything +# +# "keyboard" needs a windowmanager that exports the +# _NET_ACTIVE_WINDOW property. +# This should be the case for almost all modern windowmanagers. +# +# If this option is set to mouse or keyboard, the monitor option +# will be ignored. +follow = none + +# Should a notification popped up from history be sticky or timeout +# as if it would normally do. +sticky_history = yes + +# Maximum amount of notifications kept in history +history_length = 5 + +# Display indicators for URLs (U) and actions (A). +show_indicators = no + +# The height of a single line. If the height is smaller than the +# font height, it will get raised to the font height. +# This adds empty space above and under the text. +line_height = 3 + +# Draw a line of "separatpr_height" pixel height between two +# notifications. +# Set to 0 to disable. +separator_height = 2 + +# Padding between text and separator. +padding = 6 + +# Horizontal padding. +horizontal_padding = 6 + +# Define a color for the separator. +# possible values are: +# * auto: dunst tries to find a color fitting to the background; +# * foreground: use the same color as the foreground; +# * frame: use the same color as the frame; +# * anything else will be interpreted as a X color. +separator_color = frame + +# Print a notification on startup. +# This is mainly for error detection, since dbus (re-)starts dunst +# automatically after a crash. +startup_notification = false + +# dmenu path. +dmenu = /usr/bin/dmenu -p dunst: + +# Browser for opening urls in context menu. +browser = /usr/bin/google-chrome-stable -new-tab + +# Align icons left/right/off +icon_position = left +max_icon_size = 80 + +# Paths to default icons. +icon_path = /usr/share/icons/Qogir/symbolic/status + +frame_width = 1 +frame_color = "#a3be8c" + +[shortcuts] + +# Shortcuts are specified as [modifier+][modifier+]...key +# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", +# "mod3" and "mod4" (windows-key). +# Xev might be helpful to find names for keys. + +# Close notification. +close = ctrl+space + +# Close all notifications. +close_all = ctrl+shift+space + +# Redisplay last message(s). +# On the US keyboard layout "grave" is normally above TAB and left +# of "1". +history = ctrl+grave + +# Context menu. +context = ctrl+shift+period + +[urgency_low] +# IMPORTANT: colors have to be defined in quotation marks. +# Otherwise the "#" and following would be interpreted as a comment. +frame_color = "#2b303b" +foreground = "#c0c5ce" +background = "#2b303b" +#background = "#2B313C" +timeout = 3 + +[urgency_normal] +frame_color = "#a3be8c" +foreground = "#c0c5ce" +background = "#2b303b" +#background = "#2B313C" +timeout = 3 + +[urgency_critical] +frame_color = "#f08080" +foreground = "#c0c5ce" +background = "#2b303b" +#background = "#2B313C" +timeout = 5 + + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +# vim: ft=cfg diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..7f52671 --- /dev/null +++ b/init.lua @@ -0,0 +1,733 @@ +----GENERAL SETTINGS +local opt = vim.opt +vim.g.mapleader = ' ' +opt.helplang = 'ja', 'en' +opt.tabstop = 2 +opt.shiftwidth = 2 +opt.expandtab = true +opt.list = true +opt.listchars = {tab='»-', trail='-', eol='↲', extends='»', precedes='«', nbsp='%'} +opt.wrap = true +opt.signcolumn = 'yes' +opt.smartcase = true +opt.ignorecase = true +opt.wrapscan = true +opt.hidden = true +opt.startofline = false +opt.showmatch = true +opt.matchtime = 1 +opt.guicursor = '' +opt.cursorline = true +opt.wildmenu = true +opt.number = true +opt.showcmd = true +opt.autoread = true +opt.hlsearch = true +opt.backspace:append{'indent', 'eol', 'start'} +opt.showtabline = 1 +opt.laststatus = 3 +opt.ambiwidth = 'single' +opt.confirm = true +opt.pumblend = 15 +opt.winblend = 15 +opt.mouse = 'a' +opt.cmdheight = 2 +opt.timeout = true +opt.ttimeout = true +opt.ttimeoutlen = 10 +opt.clipboard:append{'unnamedplus'} +opt.termguicolors = true +opt.showmode = false +opt.completeopt:append{'menuone', 'noinsert'} +opt.backup = false +opt.swapfile = false +opt.encoding = 'utf-8' +opt.fileencodings = {'utf-8', 'iso-2022-jp', 'cp932', 'euc-jp', 'sjis'} +vim.opt.shortmess:append('I') +vim.cmd('set completeopt-=preview') + + +----ADVANCED SETTINGS + +--KEEP CURSOR +vim.api.nvim_create_autocmd({ 'BufReadPost' }, { + pattern = { '*' }, + callback = function() + vim.api.nvim_exec('silent! normal! g`"zv', false) + end, +}) + + +----KEY MAPPING + +--EDIT +vim.keymap.set('n', 'ew', ':w') +vim.keymap.set('n', 'eq', ':wq') +vim.keymap.set('n', 'Q', ':quit!') +vim.keymap.set('n', 'q', ':bd') +vim.keymap.set('n', '', ':%s///cg') +vim.keymap.set('n', '', ":echo wordcount()['chars']") + +--TAB +vim.keymap.set('n', '', ':bprev', {silent = true}) +vim.keymap.set('n', 't', ':tabclose', {silent = true}) +vim.keymap.set('n', ']b', ':bnext', {silent =true}) + +--SPLIT +vim.keymap.set('n', 'sv', ':vsplit', {silent = true}) +vim.keymap.set('n', 'sp', ':split', {silent =true}) + +--NOP +vim.keymap.set('n', '', '') +vim.keymap.set('n', '<2-MiddleMouse>', '') +vim.keymap.set('n', '<3-MiddleMouse>', '') +vim.keymap.set('n', '<4-MiddleMouse>', '') +vim.keymap.set('i', '<1-MiddleMouse>', '') +vim.keymap.set('i', '<2-MiddleMouse>', '') +vim.keymap.set('i', '<3-MiddleMouse>', '') +vim.keymap.set('i', '<4-MiddleMouse>', '') +vim.keymap.set('n', 'qq', '') +vim.keymap.set('n', 'gg', '') +vim.keymap.set('n', 'ZZ', '') +vim.keymap.set('n', 'ZQ', '') +vim.keymap.set('n', '', '') +vim.keymap.set('n', '', '') +vim.keymap.set('n', 'x', '"_x') +vim.keymap.set('v', 'x', '"_x') +vim.keymap.set('n', 's', '"_s') + +--MOVE +vim.keymap.set('n', 'k', 'gk') +vim.keymap.set('n', 'j', 'gj') +vim.keymap.set('n', '', 'gk') +vim.keymap.set('n', '', 'gj') +vim.keymap.set('n', 'O', ":call append(expand('.'), '')j") +vim.keymap.set('n', 'sh', 'h') +vim.keymap.set('n', 'sj', 'j') +vim.keymap.set('n', 'sk', 'k') +vim.keymap.set('n', 'sl', 'l') +vim.keymap.set('n', 'sH', 'H') +vim.keymap.set('n', 'sJ', 'J') +vim.keymap.set('n', 'sK', 'K') +vim.keymap.set('n', 'sL', 'L') + +--COPY +vim.keymap.set('n', 'p', ']p') +vim.keymap.set('n', 'P', ']P') +vim.keymap.set('n', ']p', 'p') +vim.keymap.set('n', ']P', 'P') + + +----PLUGINS + +--MANAGER +local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require('lazy').setup({ +defaults = {lazy = true}, +{'nvim-lualine/lualine.nvim', event = 'VeryLazy'}, +{'nvim-telescope/telescope.nvim', cmd = 'Telescope'}, +{'nvim-telescope/telescope-file-browser.nvim', event = 'VeryLazy'}, +{'lewis6991/gitsigns.nvim', config = true, event = 'VeryLazy'}, +{'ryanoasis/vim-devicons', event = 'VeryLazy'}, +{'nvim-tree/nvim-web-devicons', event = 'VeryLazy'}, +{'williamboman/mason.nvim', event = 'BufRead', cmd = {'Mason', 'MasonInstall'},}, +{'neovim/nvim-lspconfig', event = 'LspAttach'}, +{'williamboman/mason-lspconfig.nvim', event = 'LspAttach'}, +{'mfussenegger/nvim-dap', event = 'LspAttach'}, +{'rcarriga/nvim-dap-ui', event = 'LspAttach'}, +{'suketa/nvim-dap-ruby', config = true, event = 'LspAttach'}, +{'j-hui/fidget.nvim', config = true, event = 'LspAttach'}, +{'sainnhe/edge', event = 'VeryLazy'}, +{'nvim-lua/plenary.nvim', event = 'VeryLazy'}, +{'stevearc/dressing.nvim', event = 'VeryLazy'}, +{'hrsh7th/nvim-cmp', event = 'InsertEnter, CmdlineEnter'}, +{'hrsh7th/cmp-nvim-lsp', event = 'InsertEnter'}, +{'hrsh7th/cmp-buffer', event = 'InsertEnter'}, +{'hrsh7th/cmp-path', event = 'InsertEnter'}, +{'hrsh7th/cmp-vsnip', event = 'InsertEnter'}, +{'hrsh7th/cmp-cmdline', event = 'ModeChanged'}, +{'hrsh7th/cmp-nvim-lsp-signature-help', event = 'InsertEnter'}, +{'hrsh7th/cmp-nvim-lsp-document-symbol', event = 'InsertEnter'}, +{'hrsh7th/cmp-calc', event = 'InsertEnter'}, +{'onsails/lspkind.nvim', event = 'InsertEnter'}, +{'hrsh7th/vim-vsnip', event = 'InsertEnter'}, +{'hrsh7th/vim-vsnip-integ', event = 'InsertEnter'}, +{'rafamadriz/friendly-snippets', event = 'InsertEnter'}, +{'nvim-treesitter/nvim-treesitter', event = 'BufNewFile, BufRead'}, +{'yioneko/nvim-yati', event = 'VeryLazy'}, +{'windwp/nvim-autopairs', config = true, event = 'InsertEnter'}, +{'andymass/vim-matchup', event = 'VeryLazy'}, +{'Maan2003/lsp_lines.nvim', config = true, event = 'BufNewFile, BufRead'}, +{'lambdalisue/suda.vim', cmd = {'SudaWrite', 'SudaRead'},}, +{'lukas-reineke/indent-blankline.nvim', event = 'BufNewFile, BufRead'}, +{'kevinhwang91/nvim-hlslens', event = 'BufNewFile, BufRead'}, +{'numToStr/Comment.nvim', config = true, event = 'VeryLazy'}, +{'rhysd/clever-f.vim', event = 'VeryLazy'}, +{'luochen1990/rainbow', event = 'BufNewFile, BufRead'}, +{'echasnovski/mini.surround', event = 'ModeChanged'}, +{'echasnovski/mini.ai', event = 'ModeChanged'}, +{'mvllow/modes.nvim', event = 'BufNewFile, BufRead'}, +{'monaqa/dial.nvim', event = 'VeryLazy'}, +{'tpope/vim-repeat', event = 'VeryLazy'}, +{'dstein64/vim-startuptime', cmd = 'StartupTime'}, +{'vim-jp/vimdoc-ja', ft = 'help'}, + +--non-lazy +{'vim-denops/denops.vim', lazy = false}, +{'yuki-yano/fuzzy-motion.vim', lazy = false}, +{'lambdalisue/gin.vim', lazy = false}, +{'rbtnn/vim-ambiwidth', lazy = false}, +{'lambdalisue/kensaku-search.vim', lazy = false}, +{'lambdalisue/kensaku.vim', lazy = false}, +{'brenoprata10/nvim-highlight-colors', config = true, lazy = false}, + +--disable default plugins + performance = { + rtp = { + disable_plugins = { + 'netrw', + 'netrwPlugin', + 'netrwSettings', + 'netrwFileHandlers', + 'gzip', + 'zip', + 'zipPlugin', + 'tar', + 'tarPlugin', + 'getscript', + 'getscriptPlugin', + 'vimball', + 'vimballPlugin', + '2html_plugin', + 'logipat', + 'rrhelper', + 'spellfile_plugin', + 'sql_completion', + }, + }, + }, +}) + + +--lualine +require('lualine').setup { +options = { + icons_enabled = true, + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = {'TelescopePrompt'}, + always_divide_middle = true, + colored = false, + globalstatus = true, + }, + sections = { + lualine_a = {''}, + lualine_b = {'branch', 'diff'}, + lualine_c = { + { + 'filename', + path = 1, + file_status = true, + shorting_target = 40, + symbols = { + modified = '[+]', + readonly = '[RO]', + unnamed = 'Untitled', + } + } + }, + lualine_x = {'filetype'}, + lualine_y = { + { + 'diagnostics', + source = {'nvim-lsp'}, + }, + {'progress'}, + {'location'} + }, + lualine_z = {''} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + extensions = {} +} + + +--telescope +require('telescope').setup({ + defaults = { + borderchars = { "─", "│", "─", "│", "┌", "┐", "┘", "└" }, + color_devicons = true, + file_ignore_patterns = { 'node_modules', '.git', '.svg', '.npm', 'go', 'MEGA'}, + mappings = { + i = { + [''] = require('telescope.actions').close, + }, + }, + }, +}) + +vim.keymap.set('n', '.', 'Telescope find_files hidden=true') +vim.keymap.set('n', ',', 'Telescope oldfiles') +vim.keymap.set('n', 'l', 'Telescope live_grep grep_open_files=true') +vim.keymap.set('n', 'k', 'Telescope live_grep') +vim.keymap.set('n', 'f', 'Telescope buffers') +vim.keymap.set('n', 'h', 'Telescope help_tags') +vim.keymap.set('n', 'y', 'Telescope registers') +vim.keymap.set('n', 'gd', 'Telescope lsp_definitions') +vim.keymap.set('n', 'gr', 'Telescope lsp_references') +vim.keymap.set('n', 'gi', 'Telescope lsp_implementations') +vim.keymap.set('n', 'gx', 'Telescope diagnostics') +vim.keymap.set('n', 'e', 'Telescope file_browser') + +local fb_actions = require 'telescope'.extensions.file_browser.actions +local previewers = require('telescope.previewers') +local Job = require('plenary.job') +local new_maker = function(filepath, bufnr, opts) + filepath = vim.fn.expand(filepath) + Job:new({ + command = 'file', + args = { '--mime-type', '-b', filepath }, + on_exit = function(j) + local mime_type = vim.split(j:result()[1], '/')[1] + if mime_type == 'text' then + previewers.buffer_previewer_maker(filepath, bufnr, opts) + else + vim.schedule(function() + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { 'BINARY' }) + end) + end + end + }):sync() +end + + +--LSP +local on_attach = function(client, bufnr) + client.server_capabilities.documentFormattingProvider = false + local set = vim.keymap.set + set('n', 'K', 'lua vim.lsp.buf.hover()') + set('n', 'ls', 'lua vim.lsp.buf.signature_help()') + set('n', 'ln', 'lua vim.lsp.buf.rename()') + set('n', 'la', 'lua vim.lsp.buf.code_action()') + set('n', 'l[', 'lua vim.lsp.diagnostic.goto_prev()') + set('n', 'l]', 'lua vim.lsp.diagnostic.goto_next()') + set('n', 'lf', 'lua vim.lsp.buf.format {async = true}') + end +vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with( +vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = false }) +require('mason').setup() +require('mason-lspconfig').setup() +require('mason-lspconfig').setup_handlers { + function(server_name) + require('lspconfig')[server_name].setup { + on_attach = on_attach, + capabilities = capabilities, + } + end +} + + +--DAP +local function map(mode, lhs, rhs, opts) + local options = {noremap = true} + if opts then options = vim.tbl_extend('force', options, opts) end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +map("n", "5", ":lua require'dap'.continue()", { silent = true}) +map("n", "6", ":lua require'dap'.step_over()", { silent = true}) +map("n", "7", ":lua require'dap'.step_into()", { silent = true}) +map("n", "8", ":lua require'dap'.step_out()", { silent = true}) +map("n", "b", ":lua require'dap'.toggle_breakpoint()", { silent = true}) +map("n", "c", ":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))", { silent = true}) +map("n", "i", ":lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))", { silent = true}) +map("n", "d", ":lua require'dapui'.toggle()", { silent = true}) +map("n", "d", ":lua require'dapui'.eval()", { silent = true}) + + +---DAP-UI +require("dapui").setup({ + icons = { expanded = "▾", collapsed = "▸", current_frame = "▸" }, + mappings = { + -- Use a table to apply multiple mappings + expand = { "", "<2-LeftMouse>" }, + open = "o", + remove = "d", + edit = "e", + repl = "r", + toggle = "t", + }, + expand_lines = vim.fn.has("nvim-0.7") == 1, + layouts = { + { + elements = { + -- Elements can be strings or table with id and size keys. + { id = "scopes", size = 0.25 }, + "breakpoints", + "stacks", + "watches", + }, + size = 40, -- 40 columns + position = "left", + }, + { + elements = { + "repl", + }, + size = 0.25, -- 25% of total lines + position = "bottom", + }, + }, + controls = { + -- Requires Neovim nightly (or 0.8 when released) + enabled = true, + -- Display controls in this element + element = "repl", + icons = { + pause = "", + play = "", + step_into = "", + step_over = "", + step_out = "", + step_back = "", + run_last = "↻", + terminate = "□", + }, + }, + floating = { + max_height = nil, -- These can be integers or a float between 0 and 1. + max_width = nil, -- Floats will be treated as percentage of your screen. + border = "single", -- Border style. Can be "single", "double" or "rounded" + mappings = { + close = { "q", "" }, + }, + }, + windows = { indent = 1 }, + render = { + max_type_length = nil, -- Can be integer or nil. + max_value_lines = 100, -- Can be integer or nil. + } +}) + + +--nvim-cmp +local cmp = require('cmp') +local lspkind = require('lspkind') + + cmp.setup({ + snippet = { + expand = function(args) + vim.fn['vsnip#anonymous'](args.body) + end + }, + + window = { + completion = cmp.config.window.bordered({ + border = 'single' + }), + documentation = cmp.config.window.bordered({ + border = 'single' + }), + }, + + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), + }), + + formatting = { + format = lspkind.cmp_format({ + mode = 'symbol', + maxwidth = 50, + ellipsis_char = '...', + }) + }, + + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'vsnip' }, + { name = 'nvim_lsp_signature_help' }, + { name = 'calc' }, + }, { + { name = 'buffer', keyword_length = 2 }, + }) + }) + + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'nvim_lsp_document_symbol' } + }, { + { name = 'buffer' } + }) + }) + + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline', keyword_length = 2 } + }) + }) + +local capabilities = require('cmp_nvim_lsp').default_capabilities() +vim.cmd('let g:vsnip_filetypes = {}') + + +--nvim-treesitter +require'nvim-treesitter.configs'.setup { + highlight = { + enable = true, + disable = {'help', 'markdown', 'toml'}, + }, + refactor = { + highlight_defintions = { + enable = true, + }, + }, + yati = { + enable = true, + }, + matchup = { + enable = true, + enable_quotes = true, + }, + ensure_installed = 'all' +} + + +--dressing +require('dressing').setup({ + input = { + border = 'single', + }, + builtin = { + border = 'single', + }, +}) + + +--indent_blankline +require('indent_blankline').setup { + show_end_of_line = true, +} + + +--modes +require('modes').setup({ + colors = { + copy = '#FFEE55', + delete = '#DC669B', + insert = '#55AAEE', + visual = '#DD5522', + }, +}) + + +--nvim-hlslens +require('hlslens').setup() +local kopts = {noremap = true, silent = true} + +vim.keymap.set('n', 'n', + [[execute('normal! ' . v:count1 . 'n')lua require('hlslens').start()]], + kopts) +vim.keymap.set('n', 'N', + [[execute('normal! ' . v:count1 . 'N')lua require('hlslens').start()]], + kopts) +vim.keymap.set('n', '*', [[*lua require('hlslens').start()]], kopts) +vim.keymap.set('n', '#', [[#lua require('hlslens').start()]], kopts) +vim.keymap.set('n', 'g*', [[g*lua require('hlslens').start()]], kopts) +vim.keymap.set('n', 'g#', [[g#lua require('hlslens').start()]], kopts) +vim.keymap.set('n', '', ':nohl', kopts) + + +--fuzzy-motion +vim.keymap.set('n', 'S', 'FuzzyMotion') +vim.cmd("let g:fuzzy_motion_matchers = ['kensaku', 'fzf']") + + +--kensaku-search +vim.keymap.set('c', '', '(kensaku-search-replace)') + + +--clever-f +vim.cmd('let g:clever_f_across_no_line = 1') +vim.cmd('let g:clever_f_ignore_case = 1') +vim.cmd('let g:clever_f_smart_case = 1') +vim.cmd("let g:clever_f_chars_match_any_signs = ';'") +vim.cmd('let g:clever_f_use_migemo = 1') + + +--mini.surround +require('mini.surround').setup({ + mappings = { + highlight = 'sx', + }, + custom_surroundings = { + ['{'] = { + input = { '%b{}', '^.().*().$' }, + output = { left = '{', right = '}' }, + }, + ['}'] = { + input = { '%b{}', '^.%{().*()%}.$' }, + output = { left = '{{', right = '}}' }, + }, + ['('] = { + input = { '%b()', '^.().*().$' }, + output = { left = '(', right = ')' }, + }, + [')'] = { + input = { '%b()', '^.%(().*()%).$' }, + output = { left = '((', right = '))' }, + }, + ['['] = { + input = { '%b[]', '^.().*().$' }, + output = { left = '[', right = ']' }, + }, + [']'] = { + input = { '%b[]', '^.%[().*()%].$' }, + output = { left = '[[', right = ']]' }, + }, + ['<'] = { + input = { '%b<>', '^.().*().$' }, + output = { left = '<', right = '>' }, + }, + ['>'] = { + input = { '%b[]', '^.<().*()>.$' }, + output = { left = '<<', right = '>>' }, + }, + ['j'] = { + input = function() + local ok, val = pcall(vim.fn.getchar) + if not ok then return end + local char = vim.fn.nr2char(val) + + local dict = { + ['('] = { '(().-())' }, + ['{'] = { '{().-()}' }, + ['['] = { '「().-()」' }, + [']'] = { '『().-()』' }, + ['<'] = { '<().-()>' }, + ['"'] = { '”().-()”' }, + } + + if char == 'b' then + local ret = {} + for _, v in pairs(dict) do table.insert(ret, v) end + return { ret } + end + + if dict[char] then return dict[char] end + + error('%s is unsupported surroundings in Japanese') + end, + output = function() + local ok, val = pcall(vim.fn.getchar) + if not ok then return end + local char = vim.fn.nr2char(val) + + local dict = { + ['('] = { left = '(', right = ')' }, + ['{'] = { left = '{', right = '}' }, + ['['] = { left = '「', right = '」' }, + [']'] = { left = '『', right = '』' }, + ['<'] = { left = '<', right = '>' }, + ['"'] = { left = '”', right = '”' }, + } + + if not dict[char] then error('%s is unsupported surroundings in Japanese') end + + return dict[char] + end + } + }, +}) + + +--mini.ai +require('mini.ai').setup({ + custom_textobjects = { + ['{'] = { '%b{}', '^.().*().$' }, + ['}'] = { '%b{}', '^.%{().*()%}.$' }, + ['('] = { '%b()', '^.().*().$' }, + [')'] = { '%b()', '^.%(().*()%).$' }, + ['['] = { '%b[]', '^.().*().$' }, + [']'] = { '%b[]', '^.%[().*()%].$' }, + [''] = { '%b<', '^.().*().$' }, + ['>'] = { '%b', '^.().*().$' }, + ['j'] = function() + local ok, val = pcall(vim.fn.getchar) + if not ok then return end + local char = vim.fn.nr2char(val) + + local dict = { + ['('] = { '(().-())' }, + ['{'] = { '{().-()}' }, + ['['] = { '「().-()」' }, + [']'] = { '『().-()』' }, + ['<'] = { '<().-()>' }, + ['"'] = { '”().-()”' }, + } + + if char == 'b' then + local ret = {} + for _, v in pairs(dict) do table.insert(ret, v) end + return { ret } + end + + if dict[char] then return dict[char] end + + error('%s is unsupported textobjects in Japanese') + end + } +}) + + +--rainbow +vim.cmd('let g:rainbow_active = 1') +vim.cmd("let g:indent_guides_exclude_filetypes = ['help']") + + +--dial +vim.keymap.set('n', '', require('dial.map').inc_normal(), {noremap = true}) +vim.keymap.set('n', '', require('dial.map').dec_normal(), {noremap = true}) +vim.keymap.set('v', '', require('dial.map').inc_visual(), {noremap = true}) +vim.keymap.set('v', '', require('dial.map').dec_visual(), {noremap = true}) +vim.keymap.set('v', 'g', require('dial.map').inc_gvisual(), {noremap = true}) +vim.keymap.set('v', 'g', require('dial.map').dec_gvisual(), {noremap = true}) + + +--gin +vim.keymap.set('n', 'gs', ':GitStatus', {silent = true}) +vim.keymap.set('n', 'ga', ':Gin add .', {silent = true}) +vim.keymap.set('n', 'gc', ":Gin commit -m ''") +vim.keymap.set('n', 'gp', ':Gin push') + + +--OTHER SETTINGS +vim.cmd('colorscheme edge') diff --git a/laptop/.Xresources b/laptop/.Xresources new file mode 100644 index 0000000..dd94655 --- /dev/null +++ b/laptop/.Xresources @@ -0,0 +1,49 @@ +!! Import colorscheme +#define S_foreground #cacacc +#define S_background #1C1E27 +#define S_black #3C3E47 +#define S_red #E4436F +#define S_green #24e39d +#define S_yellow #EDA685 +#define S_blue #2095B4 +#define S_magenta #B367CF +#define S_cyan #00A5AF +#define S_lightgrey #b5b5ba +#define S_darkgrey #6C6F93 +#define S_darkred #D95882 +#define S_darkgreen #68DDC4 +#define S_darkyellow #E8AEAA +#define S_darkblue #64A4BF +#define S_darkmagenta #B382CF +#define S_darkcyan #54AEB8 +#define S_white #cacacc + +!! Set colors +*background: S_background +*foreground: S_foreground +*color0: S_black +*color8: S_darkgrey +*color1: S_darkred +*color9: S_red +*color2: S_darkgreen +*color10: S_green +*color3: S_darkyellow +*color11: S_yellow +*color4: S_darkblue +*color12: S_blue +*color5: S_darkmagenta +*color13: S_magenta +*color6: S_darkcyan +*color14: S_cyan +*color7: S_lightgrey +*color15: S_white + +!! Set DPI +Xft.dpi: 160 +Xft.auohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.antialias: 1 +Xft.rgba: rgb + +Xcursor.size: 16 diff --git a/laptop/.alacritty.yml b/laptop/.alacritty.yml new file mode 100644 index 0000000..952cffe --- /dev/null +++ b/laptop/.alacritty.yml @@ -0,0 +1,80 @@ +# シェル +shell: + program: /usr/bin/zsh + args: + - --login + +# カーソル +cursor: + style: + shape: Underline + blinking: Always + unfocused_hollow: false + blink_interval: 470 + +# タブスペース +tabspaces: 4 + +# ウインドウ +window: + opacity: 0.95 + padding: + x: 0 + y: 0 + dynamic_padding: false + +# フォント +font: + size: 20 + normal: + family: 'UDEV Gothic 35NFLG' + style: Regular + bold: + family: 'UDEV Gothic 35NFLG' + style: Bold + italic: + family: 'UDEV Gothic 35NFLG' + style: Italic + bold_italic: + family: 'UDEV Gothic 35NFLG' + style: Bold Italic + +# 環境変数 +env: + WINIT_X11_SCALE_FACTOR: '1.0' + TERM: alacritty + +# Colors (Horizon Dark) +colors: + # Primary colors + primary: + background: '0x1c1e26' + foreground: '0xe0e0e0' + + # Cursor + cursor: + cursor: '0x00ff00' + vi_mode_cursor: + cursor: '0x00ff00' + + # Normal colors + normal: + black: '0x16161c' + red: '0xe95678' + green: '0x29d398' + yellow: '0xfab795' + blue: '0x26bbd9' + magenta: '0xee64ac' + cyan: '0x59e1e3' + white: '0xd5d8da' + + # Bright colors + bright: + black: '0x5b5858' + red: '0xec6a88' + green: '0x3fdaa4' + yellow: '0xfbc3a7' + blue: '0x3fc4de' + magenta: '0xf075b5' + cyan: '0x6be4e6' + white: '0xd5d8da' diff --git a/laptop/.xintrc b/laptop/.xintrc new file mode 100644 index 0000000..470a75a --- /dev/null +++ b/laptop/.xintrc @@ -0,0 +1,8 @@ +export LANG="ja_JP.UTF-8" +export XMODIFIERS="@im=fcitx" +export XMODIFIER="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_MODULE=fcitx +export DefaultIMModule=fcitx +exec i3 +xrdb -merge ~/.Xresources diff --git a/laptop/10-capslock.conf b/laptop/10-capslock.conf new file mode 100644 index 0000000..f1ca7ce --- /dev/null +++ b/laptop/10-capslock.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "keyboard Setting" + MatchIsKeyboard "yes" + Option "XkbOptions" "ctrl:nocaps" + Option "XkbOptions" "ctrl:swapcaps" +EndSection diff --git a/laptop/90-touchpad.conf b/laptop/90-touchpad.conf new file mode 100644 index 0000000..c9c786e --- /dev/null +++ b/laptop/90-touchpad.conf @@ -0,0 +1,9 @@ +Section "InputClass" + Identifier "touchpad" + MatchIsTouchpad "on" + Driver "libinput" + Option "Tapping" "on" + Option "ScrollMethod" "twofinger" + Option "AccelProfile" "adaptive" +EndSection + diff --git a/laptop/colors-rofi.rasi b/laptop/colors-rofi.rasi new file mode 100644 index 0000000..8ff70ea --- /dev/null +++ b/laptop/colors-rofi.rasi @@ -0,0 +1,165 @@ +* { + active-background: #68DDC4; + active-foreground: @foreground; + normal-background: @background; + normal-foreground: @foreground; + urgent-background: #D95882; + urgent-foreground: @foreground; + + alternate-active-background: @background; + alternate-active-foreground: @foreground; + alternate-normal-background: @background; + alternate-normal-foreground: @foreground; + alternate-urgent-background: @background; + alternate-urgent-foreground: @foreground; + + selected-active-background: #D95882; + selected-active-foreground: @foreground; + selected-normal-background: #f08080; + selected-normal-foreground: @background; + selected-urgent-background: #D95882; + selected-urgent-foreground: @foreground; + + background-color: @background; + background: #1C1E27; + foreground: #cacacc; + border-color: #E8AEAA; + spacing: 4; +} + +#window { + background-color: @background; + border: 2px; + padding: 2ch; + width: 500px; +} + +#mainbox { + border: 0; + padding: 0; +} + +#message { + border: 2px 0px 0px; + border-color: @border-color; + padding: 1px; +} + +#textbox { + text-color: @foreground; +} + +#inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} + +#textbox-prompt-colon { + expand: false; + str: ""; + margin: 0px 0.3em 0em 0em; + text-color: @normal-foreground; +} + +#listview { + fixed-height: 0; + border: 2px 0px 0px; + border-color: @border-color; + spacing: 0px; + scrollbar: false; + padding: 6px 0px 0px; + lines: 4; +} + +#element { + border: 0; + padding: 8px; +} + +#element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} + +#element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} + +#element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} + +#element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} + +#element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} + +#element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} + +#element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} + +#element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} + +#element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} + +#scrollbar { + width: 4px; + border: 0; + handle-width: 8px; + padding: 0; +} + +#sidebar { + border: 2px 0px 0px; + border-color: @border-color; +} + +#button { + text-color: @normal-foreground; +} + +#button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} + +#inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px; +} + +#case-indicator { + spacing: 0; + text-color: @normal-foreground; +} + +#entry { + spacing: 0; + text-color: @normal-foreground; +} + +#prompt { + spacing: 1; + margin: 0px 0px 4px 0em; + text-color: @normal-foreground; +} + diff --git a/laptop/config b/laptop/config new file mode 100644 index 0000000..5473129 --- /dev/null +++ b/laptop/config @@ -0,0 +1,264 @@ +# 神は言った――「光あれ」 +set $mod Mod4 + +# ウインドウタイトルのフォント +font pango:Noto Sans CJK JP 8 + +# フローティングウインドウの操作キー +floating_modifier $mod + +# ターミナル +bindsym $mod+Return exec --no-startup-id alacritty + +# ファイラー +bindsym $mod+m exec --no-startup-id thunar + +# タスクキル +bindsym $mod+q kill + +# ランチャー +bindsym $mod+z exec --no-startup-id "rofi -show drun" +bindsym $mod+x exec --no-startup-id "rofi -show run" + +# ウインドウフォーカス +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# 代替ウインドウフォーカス +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# ウインドウ交換 +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# 代替ウインドウ交換 +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# 水平ウインドウ分割 +bindsym $mod+s split v + +# 垂直ウインドウ分割 +bindsym $mod+v split h + +# フルスクリーン +bindsym $mod+f fullscreen toggle + +# ウインドウの分割切り替え +bindsym $mod+e layout toggle split + +# ウインドウフロート +bindsym $mod+w floating toggle + +# フロートウインドウフォーカス +bindsym $mod+space focus mode_toggle + +# 親コンテナへのフォーカス +bindsym $mod+a focus parent + +# 子コンテナへのフォーカス +bindsym $mod+b focus child + +# ワークスペース変数 +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# ワークスペースの移動 +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# ウインドウを他のワークスペースに移動する +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# 設定の再読込み +bindsym $mod+Shift+c reload + +# 再起動 +bindsym $mod+Shift+r restart + +# ウインドウリサイズ +mode "RESIZE" { + # リサイズキー + bindsym h resize shrink width 10 px or 5 ppt + bindsym j resize grow height 10 px or 5 ppt + bindsym k resize shrink height 10 px or 5 ppt + bindsym l resize grow width 10 px or 5 ppt + + # 代替リサイズキー + bindsym Left resize shrink width 10 px or 5 ppt + bindsym Down resize grow height 10 px or 5 ppt + bindsym Up resize shrink height 10 px or 5 ppt + bindsym Right resize grow width 10 px or 5 ppt + + # ノーマルモードへ遷移 + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "RESIZE" + +# コマンドモード――これによりキーバインドは実質無制限となる! +bindsym $mod+c mode "CMD" +mode "CMD"{ + bindsym v exec vivaldi-stable; mode "default" + bindsym f exec "flameshot gui" mode "default" + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+c mode "default" +} + +# シャットダウンシークエンス +bindsym $mod+Shift+e mode "SHUTDOWN SEQUENCE" +mode "SHUTDOWN SEQUENCE"{ + bindsym p exec "systemctl poweroff" + bindsym r exec "systemctl reboot" + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+Shift+e mode "default" +} + +# ステータスバーの色 +set $background #2B303B +set $foreground #C0C5CE +set $lightred #BF616A +set $lightgreen #A3BE8C +set $lightyellow #EBCB8B +set $lightblue #8FA1B3 +set $lightmagenta #B48EAD +set $lightcyan #96B5B4 +set $lightwhite #C0C5CE +set $pink #FFB6C1 +set $orange #F08080 + +# ステータスバー関連 +bar { + font pango:UDEV Gothic 35 11 + mode dock + position top + workspace_buttons yes + strip_workspace_numbers yes + binding_mode_indicator yes + tray_padding 2 + colors { + background $background + focused_background $background + statusline $lightred + focused_statusline $lightred + # 左からborder, bg, fg + focused_workspace $orange $orange $background + active_workspace $background $background $foreground + inactive_workspace $background $background $foreground + urgent_workspace $green $green $background + binding_mode $green $green $background + } + status_command /usr/bin/bumblebee-status -m playerctl pasink pasource datetime battery \ + -p playerctl.hide="true" playerctl.format="{{artist}} - {{title}}" playerctl.layout="playerctl.song" datetime.format="%m/%d %H:%M" -t monotone +} + +# i3wm全体の色 +set $bg #1C1E27 +set $fg #cacacc +set $darkred #D95882 +set $red #E4436F +set $darkgreen #68DDC4 +set $green #24e39d +set $darkyellow #E8AEAA +set $yellow #EDA685 +set $darkblue #64A4BF +set $blue #2095B4 +set $darkmagenta #B382CF +set $darkcyan #54AEB8 +set $cyan #00A5AF +set $darkwhite #cacacc +set $white #cacaca +set $darkgrey #6C6F93 + +# フォーカスカラー +# class border background text indicator child_border +client.focused $bg $darkgrey $fg $yellow $darkyellow +client.unfocused $bg $bg $fg $yellow $bg + +# ウインドウ枠の太さ +for_window [class="^.*"] border pixel 2 + +# gaps +gaps top 5 +gaps bottom 5 +gaps right 5 +gaps left 5 +gaps inner 5 + +# マウスでフォーカスしない +focus_follows_mouse no + +# 音量調整 +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym XF86AudioMute exec pactl set-sink-mute alsa_output.pci-0000_00_1f.3.analog-stereo toggle +bindsym XF86AudioMicMute exec pactl set-source-mute alsa_input.pci-0000_00_1f.3.analog-stereo toggle + +# 輝度調整 +bindsym XF86MonBrightnessUp exec light -A 10 +bindsym XF86MonBrightnessDown exec light -U 10 + +# 自動起動 +exec --no-startup-id dunst +exec --no-startup-id "picom -b --experimental-backends" +exec --no-startup-id xfce4-power-manager +exec --no-startup-id fcitx5 +exec --no-startup-id light-locker --lock-on-suspend +exec --no-startup-id "feh --no-fehbg --bg-scale ~/Wallpaper.png" +exec --no-startup-id "xset r rate 200 30" +exec --no-startup-id "libinput-gestures-setup start" + +# フローティング起動一覧 +for_window [class="Bitwarden"] floating enable +for_window [class="Thunar"] floating enable +for_window [class="Lxappearance"] floating enable, resize set 800 600 +for_window [class="Pavucontrol"] floating enable, resize set 800 600 +for_window [class="feh"] floating enable, resize set 1280 1024 +for_window [class="fcitx5-config-qt"] floating enable +for_window [class="mozc_tool"] floating enable, resize set 600 400 +for_window [class="Blueman-manager"] floating enable, resize set 800 600 +for_window [class="L3afpad"] floating enable, resize set 800 600 +for_window [class="qt5ct"] floating enable, resize set 800 600 +for_window [class="Qtconfig-qt4"] floating enable, resize set 800 600 + +# ワークスペース指定一覧 +assign [class="discord"] workspace 3 +assign [class="Slack"] workspace 4 diff --git a/laptop/config.rasi b/laptop/config.rasi new file mode 100644 index 0000000..33c640f --- /dev/null +++ b/laptop/config.rasi @@ -0,0 +1,5 @@ +configuration { + font: "Noto Sans CJK JP 19"; + drun-display-format: "{name}"; +} +@import "colors-rofi.rasi" diff --git a/laptop/dunstrc b/laptop/dunstrc new file mode 100644 index 0000000..b576d52 --- /dev/null +++ b/laptop/dunstrc @@ -0,0 +1,245 @@ +[global] +font = Noto Sans CJK JP 11 + +# Allow a small subset of html markup: +# bold +# italic +# strikethrough +# underline +# +# For a complete reference see +# . +# If markup is not allowed, those tags will be stripped out of the +# message. +markup = yes +plain_text = no + +# The format of the message. Possible variables are: +# %a appname +# %s summary +# %b body +# %i iconname (including its path) +# %I iconname (without its path) +# %p progress value if set ([ 0%] to [100%]) or nothing +# Markup is allowed +format = "%s\n%b" + +# Sort messages by urgency. +sort = no + +# Show how many messages are currently hidden (because of geometry). +indicate_hidden = yes + +# Alignment of message text. +# Possible values are "left", "center" and "right". +alignment = left + +# The frequency with wich text that is longer than the notification +# window allows bounces back and forth. +# This option conflicts with "word_wrap". +# Set to 0 to disable. +bounce_freq = 0 + +# Show age of message if message is older than show_age_threshold +# seconds. +# Set to -1 to disable. +show_age_threshold = -1 + +# Split notifications into multiple lines if they don't fit into +# geometry. +word_wrap = yes + +# Ignore newlines '\n' in notifications. +ignore_newline = no + +# Hide duplicate's count and stack them +stack_duplicates = yes +hide_duplicate_count = yes + +width = 300 +height = 100 +offset = 10x35 + +# Shrink window if it's smaller than the width. Will be ignored if +# width is 0. +shrink = no + +# The transparency of the window. Range: [0; 100]. +# This option will only work if a compositing windowmanager is +# present (e.g. xcompmgr, compiz, etc.). +transparency = 5 + +# Don't remove messages, if the user is idle (no mouse or keyboard input) +# for longer than idle_threshold seconds. +# Set to 0 to disable. +idle_threshold = 0 + +# Which monitor should the notifications be displayed on. +monitor = 0 + +# Display notification on focused monitor. Possible modes are: +# mouse: follow mouse pointer +# keyboard: follow window with keyboard focus +# none: don't follow anything +# +# "keyboard" needs a windowmanager that exports the +# _NET_ACTIVE_WINDOW property. +# This should be the case for almost all modern windowmanagers. +# +# If this option is set to mouse or keyboard, the monitor option +# will be ignored. +follow = none + +# Should a notification popped up from history be sticky or timeout +# as if it would normally do. +sticky_history = yes + +# Maximum amount of notifications kept in history +history_length = 5 + +# Display indicators for URLs (U) and actions (A). +show_indicators = no + +# The height of a single line. If the height is smaller than the +# font height, it will get raised to the font height. +# This adds empty space above and under the text. +line_height = 3 + +# Draw a line of "separatpr_height" pixel height between two +# notifications. +# Set to 0 to disable. +separator_height = 2 + +# Padding between text and separator. +padding = 6 + +# Horizontal padding. +horizontal_padding = 6 + +# Define a color for the separator. +# possible values are: +# * auto: dunst tries to find a color fitting to the background; +# * foreground: use the same color as the foreground; +# * frame: use the same color as the frame; +# * anything else will be interpreted as a X color. +separator_color = frame + +# Print a notification on startup. +# This is mainly for error detection, since dbus (re-)starts dunst +# automatically after a crash. +startup_notification = false + +# dmenu path. +dmenu = /usr/bin/dmenu -p dunst: + +# Browser for opening urls in context menu. +browser = /usr/bin/google-chrome-stable -new-tab + +# Align icons left/right/off +icon_position = left +max_icon_size = 100 + +# Paths to default icons. +icon_path = /usr/share/icons/Qogir/symbolic/status + +frame_width = 2 +frame_color = "#a3be8c" + +[shortcuts] + +# Shortcuts are specified as [modifier+][modifier+]...key +# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", +# "mod3" and "mod4" (windows-key). +# Xev might be helpful to find names for keys. + +# Close notification. +close = ctrl+space + +# Close all notifications. +close_all = ctrl+shift+space + +# Redisplay last message(s). +# On the US keyboard layout "grave" is normally above TAB and left +# of "1". +history = ctrl+grave + +# Context menu. +context = ctrl+shift+period + +[urgency_low] +# IMPORTANT: colors have to be defined in quotation marks. +# Otherwise the "#" and following would be interpreted as a comment. +frame_color = "#2b303b" +foreground = "#c0c5ce" +background = "#2b303b" +#background = "#2B313C" +timeout = 3 + +[urgency_normal] +frame_color = "#a3be8c" +foreground = "#c0c5ce" +background = "#2b303b" +#background = "#2B313C" +timeout = 3 + +[urgency_critical] +frame_color = "#f08080" +foreground = "#c0c5ce" +background = "#2b303b" +#background = "#2B313C" +timeout = 5 + + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +# vim: ft=cfg diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..e030438 --- /dev/null +++ b/main.lua @@ -0,0 +1,12 @@ +local fcitx = require("fcitx") + +fcitx.watchEvent(fcitx.EventType.KeyEvent, "handler") + +function handler(sym, state, release) + if ((sym == 65307 and state == 0) or (sym == 91 and state == 4)) and + not release + then + fcitx.setCurrentInputMethod("keyboard-us") + end + return false +end diff --git a/monotone.json b/monotone.json new file mode 100644 index 0000000..bc97c4c --- /dev/null +++ b/monotone.json @@ -0,0 +1,67 @@ +{ + "icons": [ "awesome-fonts" ], + "colors": [{ + "red": "#BF616A", + "orange": "#F08080", + "yellow": "#EBCB8B", + "green": "#A3BE8C" + }], + "defaults": { + "separator-block-width": 0, + "separator": "", + "warning": { + "fg": "#2B303B", + "bg": "#f08080" + }, + "critical": { + "fg": "#2B303B", + "bg": "#BF616A" + } + }, + "cycle": [ + { "fg": "#C0C5CE", "bg": "#2B303B"} + ], + "dnf": { + "good": { + "fg": "#A3BE8C", + "bg": "#2B303B" + } + }, + "apt": { + "good": { + "fg": "#A3BE8C", + "bg": "#2B303B" + } + }, + "pacman": { + "good": { + "fg": "#A3BE8C", + "bg": "#2B303B" + } + }, + "battery": { + "charged": { + "fg": "#2B303B", + "bg": "#A3BE8C" + }, + "charging": { + "fg": "#2B303B", + "bg": "#A3BE8C" + } + }, + "pomodoro": { + "paused": { + "fg": "#2B303B", + "bg": "#F08080" + }, + "work": { + "fg": "#2B303B", + "bg": "#EBCB8B" + }, + "break": { + "fg": "#A3BE8C", + "bg": "#2B303B" + } + } + +} diff --git a/picom.conf b/picom.conf new file mode 100644 index 0000000..0adcc0a --- /dev/null +++ b/picom.conf @@ -0,0 +1,425 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 9; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Avoid drawing shadows on dock/panel windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dock-shadow = false + +# Don't draw shadows on drag-and-drop windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dnd-shadow = false + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Do not paint shadows on shaped windows. Note shaped windows +# here means windows setting its shape through X Shape extension. +# Those using ARGB background is beyond our control. +# Deprecated, use +# shadow-exclude = 'bounding_shaped' +# or +# shadow-exclude = 'bounding_shaped && !rounded_corners' +# instead. +# +# shadow-ignore-shaped = '' + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.15; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.15; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 1; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 1; + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +# blur-size = 12 +# +# blur-deviation = false + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = '' +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +backend = "glx"; +#backend = "xrender"; + +# Enable/disable VSync. +# vsync = false +vsync = true + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +#refresh-rate = 60 + +# Limit picom to repaint at most once every 1 / 'refresh_rate' second to +# boost performance. This should not be used with +# vsync drm/opengl/opengl-oml +# as they essentially does sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +# +# sw-opti = + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +# glx-no-stencil = false + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = true + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = '' + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = '/path/to/your/log/file' + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = '/path/to/your/log/file' + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 1; focus = true; full-shadow = false; }; + dock = { shadow = true} + dnd = { shadow = false; } + popup_menu = { opacity = 1; } + dropdown_menu = { opacity = 1; } +}; + + + diff --git a/pipewire.conf b/pipewire.conf new file mode 100644 index 0000000..c122f86 --- /dev/null +++ b/pipewire.conf @@ -0,0 +1,258 @@ +# Daemon config file for PipeWire version "0.3.59" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #library.name.system = support/libspa-support + #context.data-loop.library.name.system = support/libspa-support + #support.dbus = true + #link.max-buffers = 64 + link.max-buffers = 16 # version < 3 clients can't handle more + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #clock.power-of-two-quantum = true + #log.level = 2 + #cpu.zero.denormals = false + + core.daemon = true # listening for socket connections + core.name = pipewire-0 # core name and socket name + + ## Properties for the DSP configuration. + default.clock.rate = 44100 + #default.clock.allowed-rates = [ 48000 ] + default.clock.quantum = 4096 + default.clock.min-quantum = 16 + #default.clock.max-quantum = 2048 + #default.clock.quantum-limit = 8192 + #default.video.width = 640 + #default.video.height = 480 + #default.video.rate.num = 25 + #default.video.rate.denom = 1 + # + #settings.check-quantum = false + #settings.check-rate = false + # + # These overrides are only applied when running in a vm. + vm.overrides = { + default.clock.min-quantum = 1024 + } +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + avb.* = avb/libspa-avb + api.alsa.* = alsa/libspa-alsa + api.v4l2.* = v4l2/libspa-v4l2 + api.libcamera.* = libcamera/libspa-libcamera + api.bluez5.* = bluez5/libspa-bluez5 + api.vulkan.* = vulkan/libspa-vulkan + api.jack.* = jack/libspa-jack + support.* = support/libspa-support + #videotestsrc = videotestsrc/libspa-videotestsrc + #audiotestsrc = audiotestsrc/libspa-audiotestsrc +} + +context.modules = [ + #{ name = + # [ args = { = ... } ] + # [ flags = [ [ ifexists ] [ nofail ] ] + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # + + # Uses realtime scheduling to boost the audio thread priorities. This uses + # RTKit if the user doesn't have permission to use regular realtime + # scheduling. + { name = libpipewire-module-rt + args = { + nice.level = -11 + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # The profile module. Allows application to access profiler + # and performance data. It provides an interface that is used + # by pw-top and pw-profiler. + { name = libpipewire-module-profiler } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata } + + # Creates a factory for making devices that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-device-factory } + + # Creates a factory for making nodes that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-node-factory } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device } + + # The portal module monitors the PID of the portal process + # and tags connections with the same PID as portal + # connections. + { name = libpipewire-module-portal + flags = [ ifexists nofail ] + } + + # The access module can perform access checks and block + # new clients. + { name = libpipewire-module-access + args = { + # access.allowed to list an array of paths of allowed + # apps. + #access.allowed = [ + # /usr/bin/pipewire-media-session + #] + + # An array of rejected paths. + #access.rejected = [ ] + + # An array of paths with restricted access. + #access.restricted = [ ] + + # Anything not in the above lists gets assigned the + # access.force permission. + #access.force = flatpak + } + } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter } + + # Makes a factory for creating links between ports. + { name = libpipewire-module-link-factory } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager } + + # Use libcanberra to play X11 Bell + #{ name = libpipewire-module-x11-bell + # args = { + # #sink.name = "" + # #sample.name = "bell-window-system" + # #x11.display = null + # #x11.xauthority = null + # } + #} +] + +context.objects = [ + #{ factory = + # [ args = { = ... } ] + # [ flags = [ [ nofail ] ] + #} + # + # Creates an object from a PipeWire factory with the given parameters. + # If nofail is given, errors are ignored (and no object is created). + # + #{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } } + #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] } + #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } } + #{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } } + #{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } } + #{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } } + + # A default dummy driver. This handles nodes marked with the "node.always-driver" + # property when no other driver is currently active. JACK clients need this. + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Dummy-Driver + node.group = pipewire.dummy + priority.driver = 20000 + } + } + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Freewheel-Driver + priority.driver = 19000 + node.group = pipewire.freewheel + node.freewheel = true + } + } + # This creates a new Source node. It will have input ports + # that you can link, to provide audio for this source. + #{ factory = adapter + # args = { + # factory.name = support.null-audio-sink + # node.name = "my-mic" + # node.description = "Microphone" + # media.class = "Audio/Source/Virtual" + # audio.position = "FL,FR" + # } + #} + + # This creates a single PCM source device for the given + # alsa device path hw:0. You can change source to sink + # to make a sink in the same way. + #{ factory = adapter + # args = { + # factory.name = api.alsa.pcm.source + # node.name = "alsa-source" + # node.description = "PCM Source" + # media.class = "Audio/Source" + # api.alsa.path = "hw:0" + # api.alsa.period-size = 1024 + # api.alsa.headroom = 0 + # api.alsa.disable-mmap = false + # api.alsa.disable-batch = false + # audio.format = "S16LE" + # audio.rate = 48000 + # audio.channels = 2 + # audio.position = "FL,FR" + # } + #} +] + +context.exec = [ + #{ path = [ args = "" ] } + # + # Execute the given program with arguments. + # + # You can optionally start the session manager here, + # but it is better to start it as a systemd service. + # Run the session manager with -h for options. + # + #{ path = "/usr/bin/pipewire-media-session" args = "" } + # + # You can optionally start the pulseaudio-server here as well + # but it is better to start it as a systemd service. + # It can be interesting to start another daemon here that listens + # on another address with the -a option (eg. -a tcp:4713). + # + #{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } +]