chore: Initial commit
Current dotfiles settings (previously hosted on github)
This commit is contained in:
commit
ea989b8071
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.luarc.json
|
||||
222
clang-format
Normal file
222
clang-format
Normal file
@ -0,0 +1,222 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlignArrayOfStructures: Right
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: true
|
||||
PadOperators: false
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: true
|
||||
PadOperators: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCaseColons: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: AlignAfterOperator
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
AttributeMacros: []
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterExternBlock: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAdjacentStringLiterals: true
|
||||
BreakAfterAttributes: Leave
|
||||
BreakAfterJavaFieldAnnotations: true
|
||||
BreakArrays: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakInheritanceList: BeforeComma
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 80
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: false
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros: []
|
||||
IfMacros: []
|
||||
IncludeBlocks: Preserve
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentRequiresClause: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
InsertBraces: true
|
||||
InsertNewlineAtEOF: false
|
||||
InsertTrailingCommas: Wrapped
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
BinaryMinDigits: 0
|
||||
Decimal: 0
|
||||
DecimalMinDigits: 0
|
||||
Hex: 0
|
||||
HexMinDigits: 0
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
KeepEmptyLinesAtEOF: false
|
||||
LambdaBodyIndentation: Signature
|
||||
LineEnding: DeriveLF
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: All
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: Never
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakOpenParenthesis: 0
|
||||
PenaltyBreakScopeResolution: 500
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
PPIndentWidth: -1
|
||||
QualifierAlignment: Leave
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: true
|
||||
RemoveBracesLLVM: false
|
||||
RemoveParentheses: Leave
|
||||
RemoveSemicolon: true
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Leave
|
||||
ShortNamespaceLines: 1
|
||||
SkipMacroDefinitionBody: false
|
||||
SortIncludes: Never
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: Never
|
||||
SpaceAfterCStyleCast: true
|
||||
SpaceAfterLogicalNot: true
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeParensOptions:
|
||||
AfterControlStatements: true
|
||||
AfterForeachMacros: true
|
||||
AfterFunctionDefinitionName: false
|
||||
AfterFunctionDeclarationName: false
|
||||
AfterIfMacros: true
|
||||
AfterOverloadedOperator: false
|
||||
AfterPlacementOperator: true
|
||||
AfterRequiresInClause: false
|
||||
AfterRequiresInExpression: false
|
||||
BeforeNonEmptyParentheses: false
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: true
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParens: Never
|
||||
SpacesInParensOptions:
|
||||
InCStyleCasts: false
|
||||
InConditionalStatements: false
|
||||
InEmptyParentheses: false
|
||||
Other: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Latest
|
||||
StatementAttributeLikeMacros: []
|
||||
StatementMacros: []
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
VerilogBreakBetweenInstancePorts: true
|
||||
WhitespaceSensitiveMacros:
|
||||
- BOOST_PP_STRINGIZE
|
||||
- CF_SWIFT_NAME
|
||||
- NS_SWIFT_NAME
|
||||
- PP_STRINGIZE
|
||||
- STRINGIZE
|
||||
...
|
||||
|
||||
8
env.sh
Executable file
8
env.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
fi
|
||||
|
||||
export CONFIG="${XDG_CONFIG_HOME:-${HOME}/.config}"
|
||||
export ARTI_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/arti"
|
||||
9
git/config/ssh/config
Normal file
9
git/config/ssh/config
Normal file
@ -0,0 +1,9 @@
|
||||
Host github.com
|
||||
Hostname github.com
|
||||
User git
|
||||
IdentityFile ~/.ssh/erick-alcachofa
|
||||
|
||||
Host Erick3900.github.com
|
||||
Hostname github.com
|
||||
User git
|
||||
IdentityFile ~/.ssh/Erick3900
|
||||
71
git/setup.sh
Executable file
71
git/setup.sh
Executable file
@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed git
|
||||
|
||||
git config --global user.name "erick-alcachofa"
|
||||
git config --global user.email "158791341+erick-alcachofa@users.noreply.github.com"
|
||||
git config --global init.defaultBranch "main"
|
||||
|
||||
git config --global core.editor nvim
|
||||
git config --global core.pager delta
|
||||
|
||||
git config --global interactive.diffFilter 'delta --color-only'
|
||||
|
||||
git config --global delta.navigate true
|
||||
git config --global delta.line-numbers true
|
||||
|
||||
git config --global delta.minus-style "syntax \"#6d405c\""
|
||||
git config --global delta.minus-emph-style "syntax bold \"#9d5270\""
|
||||
git config --global delta.line-numbers-minus-style "\"#eb6f92\" normal"
|
||||
|
||||
git config --global delta.plus-style "syntax \"#394d60\""
|
||||
git config --global delta.plus-emph-style "syntax bold \"#487382\""
|
||||
git config --global delta.line-numbers-plus-style "\"#9ccfd8\" normal"
|
||||
|
||||
git config --global delta.whitespace-error-style "syntax \"#f6c177\""
|
||||
|
||||
git config --global delta.syntax-theme "rose-pine"
|
||||
|
||||
git config --global merge.conflictstyle diff3
|
||||
git config --global diff.colorMoved default
|
||||
|
||||
if [ -d "$HOME/secrets" ]; then
|
||||
if [ -d "$HOME/secrets/gpg" ]; then
|
||||
yay -S --needed gnupg
|
||||
|
||||
GPG_KEYS="$HOME/secrets/gpg"
|
||||
|
||||
gpg --import $GPG_KEYS/public.gpg
|
||||
gpg --import $GPG_KEYS/private.gpg
|
||||
gpg --import-ownertrust $GPG_KEYS/trust.gpg
|
||||
|
||||
SIGNING_KEY="$(gpg --list-secret-keys --keyid-format long \
|
||||
| sed -n 's/^sec\s\+.*\/\(.*\)\s\+[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\s\+\[.*\].*$/\1/p')"
|
||||
|
||||
git config --global --unset gpg.format
|
||||
git config --global commit.gpgSign true
|
||||
git config --global user.signingkey $SIGNING_KEY
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/secrets/ssh" ]; then
|
||||
yay -S --needed openssh
|
||||
|
||||
sudo systemctl start sshd
|
||||
|
||||
SSH_KEYS="$HOME/secrets/ssh"
|
||||
|
||||
mkdir -p $HOME/.ssh
|
||||
mv $HOME/secrets/ssh/* $HOME/.ssh/
|
||||
ln -f -s $DOTFILES/git/ssh/config $HOME/.ssh/config
|
||||
|
||||
ssh-add ~/.ssh/Erick3900
|
||||
ssh-add ~/.ssh/erick-alcachofa
|
||||
fi
|
||||
fi
|
||||
111
gui/dunst/config/dunstrc
Normal file
111
gui/dunst/config/dunstrc
Normal file
@ -0,0 +1,111 @@
|
||||
[global]
|
||||
monitor = 0
|
||||
follow = none
|
||||
|
||||
width = (300,400)
|
||||
origin = top-right
|
||||
offset = 11x39
|
||||
scale = 0
|
||||
|
||||
# Maximum number of notification (0 means no limit)
|
||||
notification_limit = 5
|
||||
|
||||
progress_bar = true
|
||||
progress_bar_height = 10
|
||||
progress_bar_frame_width = 1
|
||||
progress_bar_min_width = 300
|
||||
progress_bar_max_width = 300
|
||||
progress_bar_corner_radius = 2
|
||||
|
||||
icon_corner_radius = 0
|
||||
|
||||
indicate_hidden = yes
|
||||
|
||||
transparency = 0
|
||||
|
||||
separator_height = 2
|
||||
|
||||
padding = 10
|
||||
horizontal_padding = 10
|
||||
|
||||
text_icon_padding = 0
|
||||
icon_theme = "Kanagawa"
|
||||
enable_recursive_icon_lookup = true
|
||||
|
||||
frame_width = 1
|
||||
|
||||
gap_size = 3
|
||||
corner_radius = 2
|
||||
|
||||
sort = yes
|
||||
idle_threshold = 120
|
||||
|
||||
font = UbuntuMono Nerd Font Mono 12
|
||||
line_height = 0
|
||||
|
||||
markup = full
|
||||
|
||||
alignment = left
|
||||
vertical_alignment = center
|
||||
|
||||
show_age_threshold = 60
|
||||
word_wrap = yes
|
||||
|
||||
ellipsize = middle
|
||||
ignore_newline = no
|
||||
stack_duplicates = true
|
||||
hide_duplicate_count = false
|
||||
|
||||
show_indicators = yes
|
||||
|
||||
icon_position = left
|
||||
|
||||
min_icon_size = 32
|
||||
max_icon_size = 32
|
||||
|
||||
# icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
sticky_history = yes
|
||||
history_length = 20
|
||||
|
||||
browser = /usr/bin/xdg-open
|
||||
|
||||
always_run_script = true
|
||||
|
||||
title = Dunst
|
||||
class = Dunst
|
||||
|
||||
ignore_dbusclose = false
|
||||
force_xwayland = false
|
||||
force_xinerama = false
|
||||
|
||||
mouse_left_click = do_action, close_current
|
||||
mouse_middle_click = close_all
|
||||
mouse_right_click = close_current
|
||||
|
||||
[experimental]
|
||||
per_monitor_dpi = false
|
||||
|
||||
[urgency_low]
|
||||
foreground = "#DCD7BA"
|
||||
background = "#2D4F67"
|
||||
highlight = "#658594"
|
||||
frame_color = "#658594"
|
||||
default_icon = "dialog-information"
|
||||
format = "<b><span foreground='#DCD7BA'>%s</span></b>\n%b"
|
||||
|
||||
[urgency_normal]
|
||||
foreground = "#DCD7BA"
|
||||
background = "#1F1F28"
|
||||
highlight = "#E6C384"
|
||||
frame_color = "#E6C384"
|
||||
default_icon = "dialog-warning"
|
||||
format = "<b><span foreground='#E6C384'>%s</span></b>\n%b"
|
||||
|
||||
[urgency_critical]
|
||||
foreground = "#DCD7BA"
|
||||
background = "#223249"
|
||||
highlight = "#E46876"
|
||||
frame_color = "#E46876"
|
||||
default_icon = "dialog-error"
|
||||
format = "<b><span foreground='#E46876'>%s</span></b>\nAS%b"
|
||||
14
gui/dunst/setup.sh
Executable file
14
gui/dunst/setup.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed dunst
|
||||
|
||||
mkdir -p $CONFIG/dunst
|
||||
|
||||
ln -f -s $DOTFILES/gui/dunst/config/dunstrc "$CONFIG/dunst/dunstrc"
|
||||
181
gui/i3/config/config
Normal file
181
gui/i3/config/config
Normal file
@ -0,0 +1,181 @@
|
||||
set $mod Mod4
|
||||
|
||||
font pango:UbuntuMono Nerd Font Mono Bold 12
|
||||
|
||||
title_align center
|
||||
focus_wrapping no
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3status killall -SIGUSR1 i3status
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
floating_modifier $mod
|
||||
|
||||
tiling_drag modifier titlebar
|
||||
|
||||
bindsym $mod+Return exec wezterm
|
||||
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id exec ~/dotfiles/gui/scripts/launcher.sh
|
||||
bindsym $mod+Shift+x exec --no-startup-id exec ~/dotfiles/gui/scripts/power-menu.sh
|
||||
|
||||
bindsym $mod+i exec --no-startup-id exec warpd --normal
|
||||
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l 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+v split h
|
||||
bindsym $mod+x split v
|
||||
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
bindsym $mod+minus exec "~/dotfiles/gui/scripts/restore-scratchpad.sh"
|
||||
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
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"
|
||||
|
||||
workspace $ws1 output DisplayPort-2
|
||||
workspace $ws2 output HDMI-A-0
|
||||
workspace $ws3 output DisplayPort-0
|
||||
workspace $ws4 output DisplayPort-0
|
||||
|
||||
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+m exec "~/dotfiles/gui/scripts/swap-workspaces.sh"
|
||||
bindsym $mod+Shift+m move workspace to output left
|
||||
|
||||
bindsym $mod+g exec "~/dotfiles/gui/scripts/screenshot.sh"
|
||||
bindsym $mod+Shift+g exec "scrot -f -s -e 'mv $f ~/media/pictures/screenshots && cat ~/media/pictures/screenshots/$f | xclip -sel clip -t image/png -i'"
|
||||
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
mode "resize" {
|
||||
bindsym h resize shrink width 5 px or 5 ppt
|
||||
bindsym j resize grow height 5 px or 5 ppt
|
||||
bindsym k resize shrink height 5 px or 5 ppt
|
||||
bindsym l resize grow width 5 px or 5 ppt
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
bindsym $mod+c mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="task_dialog"] floating enable
|
||||
|
||||
for_window [class="vol"] floating enable, resize set 800 500, move to scratchpad
|
||||
for_window [class="ttrm|sys"] floating enable, resize set 1000 680, move to scratchpad
|
||||
for_window [class="scrcpy"] floating enable, move to scratchpad
|
||||
|
||||
for_window [class="iwgtk"] floating enable, position center
|
||||
for_window [class="Gpick"] floating enable, move position center
|
||||
|
||||
assign [class="Spotify"] $ws4
|
||||
assign [class="discord"] $ws3
|
||||
assign [class="TelegramDesktop"] $ws3
|
||||
|
||||
gaps inner 12
|
||||
gaps outer 0
|
||||
|
||||
default_border pixel
|
||||
default_border pixel 3
|
||||
default_floating_border pixel
|
||||
default_floating_border pixel 3
|
||||
|
||||
hide_edge_borders none
|
||||
|
||||
popup_during_fullscreen smart
|
||||
|
||||
for_window [all] title_window_icon yes
|
||||
for_window [all] title_window_icon padding 5
|
||||
|
||||
set $clear #00000000
|
||||
set $base #1F1F28
|
||||
set $surface #363646
|
||||
set $overlay #223249
|
||||
set $muted #2D4F67
|
||||
set $subtle #49443C
|
||||
set $text #DCD7BA
|
||||
set $love #D27E99
|
||||
set $gold #E6C384
|
||||
set $rose #E46876
|
||||
set $pine #658594
|
||||
set $foam #6A9589
|
||||
set $iris #957FB8
|
||||
|
||||
# Border Backgr Text Indica ChBord
|
||||
client.focused $clear $muted $text $pine $love
|
||||
client.focused_inactive $clear $muted $text $pine $overlay
|
||||
client.unfocused $clear $overlay $text $pine $overlay
|
||||
client.urgent $clear $roam $text $pine $overlay
|
||||
client.background $clear
|
||||
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# exec --no-startup-id dbus-update-activation-environment --all
|
||||
# exec --no-startup-id gnome-keyring-daemon --start --components=secrets
|
||||
|
||||
exec --no-startup-id ~/dotfiles/gui/scripts/picom.sh
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
exec_always --no-startup-id "nitrogen --restore"
|
||||
|
||||
exec_always --no-startup-id ~/dotfiles/gui/scripts/polybar.sh
|
||||
|
||||
bindsym $mod+t exec "~/dotfiles/gui/scripts/launch-scratchpad.sh '/usr/bin/wezterm-gui start --class ttrm' 'ttrm'"
|
||||
bindsym $mod+p exec "~/dotfiles/gui/scripts/launch-scratchpad.sh '/usr/bin/wezterm-gui start --class vol -e pulsemixer' 'vol'"
|
||||
bindsym $mod+o exec "~/dotfiles/gui/scripts/launch-scratchpad.sh '/usr/bin/wezterm-gui start --class sys -e btop' 'sys'"
|
||||
bindsym $mod+u exec "~/dotfiles/gui/scripts/launch-scratchpad.sh 'scrcpy -m 2048 -S -t' 'scrcpy'"
|
||||
7
gui/i3/config/greeter.conf
Normal file
7
gui/i3/config/greeter.conf
Normal file
@ -0,0 +1,7 @@
|
||||
[Greeter]
|
||||
content-align=center
|
||||
show-power=true
|
||||
show-keyboard=false
|
||||
show-a11y=false
|
||||
background=/home/alcachofa/dotfiles/gui/wallpapers/rose-pine-moon.jpg
|
||||
draw_user_background=true
|
||||
16
gui/i3/config/gtk/gtk-3.0/settings.ini
Normal file
16
gui/i3/config/gtk/gtk-3.0/settings.ini
Normal file
@ -0,0 +1,16 @@
|
||||
[Settings]
|
||||
gtk-theme-name=rose-pine-gtk
|
||||
gtk-icon-theme-name=rose-pine-moon-icons
|
||||
gtk-font-name=Ubuntu Nerd Font 10
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
||||
gtk-xft-rgba=none
|
||||
16
gui/i3/config/gtk/gtkrc-2.0
Normal file
16
gui/i3/config/gtk/gtkrc-2.0
Normal file
@ -0,0 +1,16 @@
|
||||
include "/home/alcachofa/.gtkrc-2.0.mine"
|
||||
gtk-theme-name="rose-pine-gtk"
|
||||
gtk-icon-theme-name="rose-pine-moon-icons"
|
||||
gtk-font-name="Ubuntu Nerd Font 10"
|
||||
gtk-cursor-theme-name="BreezeX-RosePineDawn-Linux"
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintfull"
|
||||
gtk-xft-rgba="none"
|
||||
32
gui/i3/config/qt/qt5ct.conf
Normal file
32
gui/i3/config/qt/qt5ct.conf
Normal file
@ -0,0 +1,32 @@
|
||||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt5ct/colors/waves.conf
|
||||
custom_palette=false
|
||||
icon_theme=Kanagawa
|
||||
standard_dialogs=gtk2
|
||||
style=qt5gtk2
|
||||
|
||||
[Fonts]
|
||||
fixed="Ubuntu Nerd Font,11,-1,5,50,0,0,0,0,0"
|
||||
general="Ubuntu Nerd Font,11,-1,5,50,0,0,0,0,0"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
buttonbox_layout=0
|
||||
cursor_flash_time=1000
|
||||
dialog_buttons_have_icons=1
|
||||
double_click_interval=400
|
||||
gui_effects=@Invalid()
|
||||
keyboard_scheme=2
|
||||
menus_have_icons=true
|
||||
show_shortcuts_in_context_menus=true
|
||||
stylesheets=@Invalid()
|
||||
toolbutton_style=4
|
||||
underline_shortcut=1
|
||||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\xf~\0\0\x2K\0\0\x13+\0\0\x6j\0\0\x3\xdd\0\0\x2S\0\0\a\x7f\0\0\x6^\0\0\0\x2\x2\0\0\0\a\x80\0\0\xf\x81\0\0\x2N\0\0\x13(\0\0\x6g)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
ignored_applications=@Invalid()
|
||||
32
gui/i3/config/qt/qt6ct.conf
Normal file
32
gui/i3/config/qt/qt6ct.conf
Normal file
@ -0,0 +1,32 @@
|
||||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
icon_theme=Kanagawa
|
||||
standard_dialogs=gtk2
|
||||
style=qt6gtk2
|
||||
|
||||
[Fonts]
|
||||
fixed="Ubuntu Nerd Font,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
|
||||
general="Ubuntu Nerd Font,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
buttonbox_layout=0
|
||||
cursor_flash_time=1000
|
||||
dialog_buttons_have_icons=2
|
||||
double_click_interval=400
|
||||
gui_effects=@Invalid()
|
||||
keyboard_scheme=2
|
||||
menus_have_icons=true
|
||||
show_shortcuts_in_context_menus=true
|
||||
stylesheets=@Invalid()
|
||||
toolbutton_style=4
|
||||
underline_shortcut=0
|
||||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\xf~\0\0\x2K\0\0\x13+\0\0\x6j\0\0\x4\x39\0\0\x2X\0\0\v\xb6\0\0\x6u\0\0\0\x2\x2\0\0\0\a\x80\0\0\xf\x81\0\0\x2N\0\0\x13(\0\0\x6g)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
ignored_applications=@Invalid()
|
||||
1
gui/i3/config/xfce4/helpers.rc
Normal file
1
gui/i3/config/xfce4/helpers.rc
Normal file
@ -0,0 +1 @@
|
||||
TerminalEmulator=wezterm
|
||||
55
gui/i3/setup.sh
Executable file
55
gui/i3/setup.sh
Executable file
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed ttf-cascadia-mono-nerd \
|
||||
ttf-cascadia-code-nerd \
|
||||
ttf-fantasque-nerd \
|
||||
ttf-iosevka-nerd \
|
||||
ttf-jetbrains-mono-nerd \
|
||||
ttf-monofur-nerd \
|
||||
ttf-mononoki-nerd \
|
||||
ttf-ubuntu-mono-nerd \
|
||||
ttf-ubuntu-nerd \
|
||||
ttf-icomoon-feather \
|
||||
noto-fonts \
|
||||
noto-fonts-cjk \
|
||||
ttf-font-awesome \
|
||||
ttf-joypixels \
|
||||
ttf-liberation
|
||||
|
||||
yay -S --needed i3 i3lock-color lightdm lightdm-slick-greeter
|
||||
|
||||
sudo systemctl enable lightdm
|
||||
|
||||
sudo sed -i 's/^\(#\s*\)\?\(greeter-session=\).*$/\2lightdm-slick-greeter/' /etc/lightdm/lightdm.conf
|
||||
sudo ln -f -s $DOTFILES/gui/i3/config/greeter.conf /etc/lightdm/slick-greeter.conf
|
||||
|
||||
yay -S --needed dex feh warpd scrot
|
||||
|
||||
mkdir -p $CONFIG/i3
|
||||
|
||||
ln -f -s $DOTFILES/gui/i3/config/config "$CONFIG/i3/config"
|
||||
|
||||
yay -S --needed rose-pine-gtk-theme-full
|
||||
yay -S --needed qt5gtk2 qt6gtk2
|
||||
yay -S --needed qt5ct qt6ct
|
||||
|
||||
ln -f -s $DOTFILES/gui/i3/config/gtk/gtkrc-2.0 $HOME/.gtkrc-2.0
|
||||
|
||||
mkdir -p $CONFIG/gtk-3.0
|
||||
ln -f -s $DOTFILES/gui/i3/config/gtk/gtk-3.0/settings.ini $CONFIG/gtk-3.0/settings.ini
|
||||
|
||||
mkdir -p $CONFIG/qt5ct
|
||||
mkdir -p $CONFIG/qt6ct
|
||||
|
||||
ln -f -s $DOTFILES/gui/i3/config/qt/qt5ct.conf $CONFIG/qt5ct/qt5ct.conf
|
||||
ln -f -s $DOTFILES/gui/i3/config/qt/qt6ct.conf $CONFIG/qt6ct/qt6ct.conf
|
||||
|
||||
mkdir -p $CONFIG/xfce4
|
||||
cp -s $DOTFILES/i3/config/xfce4/helpers.rc $CONFIG/xfce4/helpers.rc
|
||||
180
gui/picom/config/picom.conf
Normal file
180
gui/picom/config/picom.conf
Normal file
@ -0,0 +1,180 @@
|
||||
#################################
|
||||
# Animations #
|
||||
#################################
|
||||
animations = (
|
||||
{
|
||||
triggers = ["close", "hide"];
|
||||
opacity = {
|
||||
curve = "cubic-bezier(0.2, 1, 0.2, 1)";
|
||||
duration = 0.05;
|
||||
start = "window-raw-opacity-before";
|
||||
end = 0;
|
||||
};
|
||||
blur-opacity = "opacity";
|
||||
shadow-opacity = "opacity";
|
||||
},
|
||||
{
|
||||
triggers = ["open", "show"];
|
||||
opacity = {
|
||||
curve = "cubic-bezier(0.2, 1, 0.2, 1)";
|
||||
duration = 0.5;
|
||||
start = 0;
|
||||
end = "window-raw-opacity";
|
||||
};
|
||||
blur-opacity = "opacity";
|
||||
shadow-opacity = "opacity";
|
||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||
scale-x = {
|
||||
curve = "cubic-bezier(0.2, 1.3, 0.2, 1)";
|
||||
duration = 0.5;
|
||||
start = 0.6;
|
||||
end = 1;
|
||||
};
|
||||
scale-y = "scale-x";
|
||||
shadow-scale-x = "scale-x";
|
||||
shadow-scale-y = "scale-y";
|
||||
shadow-offset-x = "offset-x";
|
||||
shadow-offset-y = "offset-y";
|
||||
},
|
||||
{
|
||||
triggers = ["geometry"];
|
||||
scale-x = {
|
||||
curve = "cubic-bezier(0.2, 0, 0.2, 1.2)";
|
||||
duration = 0.22;
|
||||
start = "window-width-before / window-width";
|
||||
end = 1;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "cubic-bezier(0.2, 0, 0.2, 1.2)";
|
||||
duration = 0.22;
|
||||
start = "window-height-before / window-height";
|
||||
end = 1;
|
||||
};
|
||||
offset-x = {
|
||||
curve = "cubic-bezier(0.2, 0, 0.2, 1.2)";
|
||||
duration = 0.22;
|
||||
start = "window-x-before - window-x";
|
||||
end = 0;
|
||||
};
|
||||
offset-y = {
|
||||
curve = "cubic-bezier(0.2, 0, 0.2, 1.2)";
|
||||
duration = 0.22;
|
||||
start = "window-y-before - window-y";
|
||||
end = 0;
|
||||
};
|
||||
shadow-scale-x = "scale-x";
|
||||
shadow-scale-y = "scale-y";
|
||||
shadow-offset-x = "offset-x";
|
||||
shadow-offset-y = "offset-y";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
#################################
|
||||
# Shadows #
|
||||
#################################
|
||||
|
||||
shadow = true;
|
||||
shadow-radius = 10;
|
||||
shadow-opacity = 0.75;
|
||||
shadow-offset-x = -8;
|
||||
shadow-offset-y = -8;
|
||||
shadow-color = "#111111";
|
||||
|
||||
|
||||
#################################
|
||||
# Fading #
|
||||
#################################
|
||||
|
||||
fading = true;
|
||||
fade-in-step = 0.02;
|
||||
fade-out-step = 0.02;
|
||||
fade-delta = 4;
|
||||
no-fading-openclose = true;
|
||||
|
||||
|
||||
#################################
|
||||
# Transparency / Opacity #
|
||||
#################################
|
||||
|
||||
# inactive-opacity = 0.95;
|
||||
inactive-opacity-override = false;
|
||||
frame-opacity = 1.0;
|
||||
active-opacity = 1.0;
|
||||
focus-exclude = [];
|
||||
opacity-rule = [
|
||||
"100:class_g = 'kitty' && !_NET_WM_STATE@:32a",
|
||||
"0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[2]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[3]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[4]:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
|
||||
#################################
|
||||
# Corners #
|
||||
#################################
|
||||
|
||||
corner-radius = 5;
|
||||
rounded-corners-exclude = [];
|
||||
|
||||
|
||||
#################################
|
||||
# Background Blurring #
|
||||
#################################
|
||||
blur-method = "dual_kawase";
|
||||
blur-size = 12;
|
||||
blur-deviation = true;
|
||||
blur-strength = 5;
|
||||
blur-background = true;
|
||||
blur-background-frame = false;
|
||||
blur-background-fixed = false;
|
||||
blur-xern = "3x3box";
|
||||
blur-background-exclude = [
|
||||
#"window_type = 'dock'",
|
||||
#"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
|
||||
|
||||
#################################
|
||||
# General Settings #
|
||||
#################################
|
||||
|
||||
backend = "glx";
|
||||
dithered-present = false;
|
||||
vsync = true;
|
||||
mark-wmwin-focused = false;
|
||||
mark-ovredir-focused = false;
|
||||
detect-rounded-corners = true;
|
||||
detect-client-opacity = true;
|
||||
use-ewmh-active-win = true;
|
||||
detect-transient = true;
|
||||
glx-no-stencil = true;
|
||||
use-damage = true;
|
||||
log-level = "warn";
|
||||
wintypes:
|
||||
{
|
||||
tooltip = {
|
||||
fade = true;
|
||||
shadow = true;
|
||||
opacity = 1.0;
|
||||
focus = true;
|
||||
full-shadow = false;
|
||||
};
|
||||
dock = {
|
||||
shadow = false;
|
||||
clip-shadow-above = true;
|
||||
}
|
||||
dnd = {
|
||||
shadow = false;
|
||||
}
|
||||
popup_menu = {
|
||||
opacity = 1.0;
|
||||
}
|
||||
dropdown_menu = {
|
||||
opacity = 1.0;
|
||||
}
|
||||
};
|
||||
14
gui/picom/setup.sh
Executable file
14
gui/picom/setup.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed picom-git
|
||||
|
||||
mkdir -p $CONFIG/picom
|
||||
|
||||
ln -f -s $DOTFILES/gui/picom/config/picom.conf "$CONFIG/picom/picom.conf"
|
||||
14
gui/polybar/config/colors.ini
Normal file
14
gui/polybar/config/colors.ini
Normal file
@ -0,0 +1,14 @@
|
||||
[color]
|
||||
base = #1F1F28
|
||||
surface = #363646
|
||||
overlay = #223249
|
||||
muted = #2D4F67
|
||||
subtle = #49443C
|
||||
text = #DCD7BA
|
||||
love = #D27E99
|
||||
gold = #E6C384
|
||||
rose = #E46876
|
||||
pine = #658594
|
||||
foam = #6A9589
|
||||
iris = #957FB8
|
||||
clear = #00000000
|
||||
68
gui/polybar/config/config.ini
Normal file
68
gui/polybar/config/config.ini
Normal file
@ -0,0 +1,68 @@
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
|
||||
include-file = ~/.config/polybar/colors.ini
|
||||
include-file = ~/.config/polybar/modules.ini
|
||||
|
||||
[bar/main]
|
||||
width = 100%
|
||||
height = 28
|
||||
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
|
||||
background = ${color.base}
|
||||
foreground = ${color.text}
|
||||
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
border-size = 0
|
||||
|
||||
line-size = 4
|
||||
|
||||
padding = 0
|
||||
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
font-0 = UbuntuMono Nerd Font Mono:style=Medium:size=12;2
|
||||
font-1 = UbuntuMono Nerd Font Mono:style=Medium:size=16;4
|
||||
font-2 = UbuntuMono Nerd Font Propo:style=Medium:size=20;6
|
||||
font-3 = UbuntuMono Nerd Font Propo:style=Bold:size=13;3
|
||||
|
||||
separator = ""
|
||||
|
||||
dim-value = 1.0
|
||||
|
||||
tray-position = none
|
||||
tray-detached = false
|
||||
|
||||
|
||||
[bar/top]
|
||||
inherit = bar/main
|
||||
modules-left = launcher spc i3-mode workspaces sep title
|
||||
modules-center = spotify
|
||||
modules-right = dunst sep audio sep date spc power-menu
|
||||
enable-ipc = true
|
||||
|
||||
[bar/bot]
|
||||
inherit = bar/main
|
||||
bottom = true
|
||||
modules-left = spc network sep wifi
|
||||
modules-center = cpu spc memory sep gpu spc gpu-memory
|
||||
modules-right = fs_root sep fs_home spc systray spc
|
||||
enable-ipc = true
|
||||
|
||||
|
||||
; [settings]
|
||||
; throttle-output = 5
|
||||
; throttle-output-for = 10
|
||||
; screenchange-reload = false
|
||||
; compositing-background = source
|
||||
; compositing-foreground = over
|
||||
; compositing-overline = over
|
||||
; compositing-underline = over
|
||||
; compositing-border = over
|
||||
; pseudo-transparency = false
|
||||
256
gui/polybar/config/modules.ini
Normal file
256
gui/polybar/config/modules.ini
Normal file
@ -0,0 +1,256 @@
|
||||
[module/audio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume = "<ramp-volume> <label-volume>"
|
||||
format-mute = "<label-mute>"
|
||||
|
||||
label-volume = "%percentage:3%%"
|
||||
|
||||
label-muted = "%{T2}%{T-} 0%"
|
||||
|
||||
ramp-volume-0 = "%{T2}%{T-}"
|
||||
ramp-volume-1 = "%{T2}%{T-}"
|
||||
ramp-volume-2 = "%{T2}%{T-}"
|
||||
|
||||
|
||||
[module/dunst]
|
||||
type = custom/ipc
|
||||
initial = 3
|
||||
|
||||
hook-0 = echo "%{T2}%{A1:dunstctl set-paused true && polybar-msg hook dunst 2:}%{A}%{T-}" &
|
||||
hook-1 = echo "%{T2}%{A1:dunstctl set-paused false && polybar-msg hook dunst 1:}%{A}%{T-}" &
|
||||
hook-2 = zsh -c "if [ `dunstctl is-paused` = 'true' ]; then; polybar-msg hook dunst 2; else; polybar-msg hook dunst 1; fi"
|
||||
|
||||
|
||||
[module/wifi]
|
||||
type = internal/network
|
||||
|
||||
interface = wlan0
|
||||
interface-type = wireless
|
||||
|
||||
format-connected = "<ramp-signal> <label-connected>"
|
||||
format-disconnected = "<label-disconnected>"
|
||||
|
||||
label-connected = "%essid:0:15:...% ( %downspeed%; %upspeed%)"
|
||||
label-disconnected = "%ifname% offline"
|
||||
|
||||
ramp-signal-0 = "%{T2}%{T-}"
|
||||
ramp-signal-1 = "%{T2}%{T-}"
|
||||
ramp-signal-2 = "%{T2}%{T-}"
|
||||
ramp-signal-3 = "%{T2}%{T-}"
|
||||
ramp-signal-4 = "%{T2}%{T-}"
|
||||
|
||||
|
||||
[module/network]
|
||||
type = internal/network
|
||||
|
||||
interface = enp6s0
|
||||
interface-type = wired
|
||||
|
||||
format-connected = "%{T2}%{T-} <label-connected>"
|
||||
format-disconnected = "<label-disconnected>"
|
||||
|
||||
label-connected = "%ifname:0:15:...% ( %downspeed%; %upspeed%)"
|
||||
label-disconnected = "%ifname% offline"
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
|
||||
interval = 1
|
||||
|
||||
format = "<label>"
|
||||
|
||||
label = "CPU: %percentage%%"
|
||||
|
||||
|
||||
[module/gpu]
|
||||
type = custom/script
|
||||
|
||||
tail = true
|
||||
interval = 1
|
||||
|
||||
format = "GPU: <label>"
|
||||
exec = ~/dotfiles/gui/scripts/gpu-load.sh
|
||||
|
||||
|
||||
[module/gpu-memory]
|
||||
type = custom/script
|
||||
|
||||
interval = 1
|
||||
tail = true
|
||||
|
||||
format = "vRAM: <label>"
|
||||
exec = ~/dotfiles/gui/scripts/gpu-memory.sh
|
||||
|
||||
|
||||
[module/fs_root]
|
||||
type = internal/fs
|
||||
|
||||
mount-0 = "/"
|
||||
|
||||
interval = 30
|
||||
|
||||
fixed-values = false
|
||||
|
||||
format-mounted-prefix = "%{T2}%{T-} "
|
||||
format-unmounted-prefix = "%{T2}%{T-} "
|
||||
|
||||
format-mounted = "<label-mounted>"
|
||||
format-unmounted = "<label-unmounted>"
|
||||
|
||||
label-mounted = "%used%/%total%"
|
||||
label-unmounted = "%mountpoint%: unmounted"
|
||||
|
||||
|
||||
[module/fs_home]
|
||||
type = internal/fs
|
||||
|
||||
mount-0 = "/home"
|
||||
|
||||
interval = 30
|
||||
|
||||
fixed-values = false
|
||||
|
||||
format-mounted-prefix = "%{T2}%{T-} "
|
||||
format-unmounted-prefix = "%{T2}%{T-} "
|
||||
|
||||
format-mounted = "<label-mounted>"
|
||||
format-unmounted = "<label-unmounted>"
|
||||
|
||||
label-mounted = "%used%/%total%"
|
||||
label-unmounted = "%mountpoint%: unmounted"
|
||||
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
|
||||
interval = 2
|
||||
|
||||
format = "RAM: <label>"
|
||||
|
||||
label = "%mb_used% (%percentage_used:3:3%%)"
|
||||
|
||||
|
||||
[module/title]
|
||||
type = internal/xwindow
|
||||
|
||||
format = "<label>"
|
||||
|
||||
label = "%title:0:35:...%"
|
||||
|
||||
|
||||
[module/i3-mode]
|
||||
type = internal/i3
|
||||
|
||||
enable-scroll = false
|
||||
|
||||
format = "<label-mode>"
|
||||
|
||||
format-suffix = "%{T2} %{T-}"
|
||||
|
||||
label-mode-font = 4
|
||||
label-mode-padding = 1
|
||||
|
||||
label-mode-foreground = ${color.text}
|
||||
label-mode-background = ${color.pine}
|
||||
|
||||
|
||||
[module/workspaces]
|
||||
type = internal/i3
|
||||
|
||||
show-urgent = true
|
||||
|
||||
index-sort = true
|
||||
|
||||
enable-scroll = false
|
||||
|
||||
format = "<label-state>"
|
||||
format-font = 4
|
||||
|
||||
label-focused = "%name%"
|
||||
label-focused-padding = 1
|
||||
label-focused-background = ${color.overlay}
|
||||
label-focused-underline = ${color.love}
|
||||
|
||||
label-unfocused = "%name%"
|
||||
label-unfocused-padding = 1
|
||||
|
||||
label-visible = %name%
|
||||
label-visible-padding = 1
|
||||
|
||||
label-urgent = "%name%"
|
||||
label-urgent-padding = 1
|
||||
label-urgent-foreground = ${color.base}
|
||||
label-urgent-background = ${color.iris}
|
||||
label-urgent-underline = ${color.surface}
|
||||
|
||||
|
||||
[module/launcher]
|
||||
type = custom/text
|
||||
label = "%{T3}%{T-}"
|
||||
|
||||
label-background = ${color.gold}
|
||||
label-foreground = ${color.base}
|
||||
|
||||
label-padding = 1
|
||||
|
||||
click-left = ~/dotfiles/gui/scripts/launcher.sh & disown
|
||||
|
||||
|
||||
[module/power-menu]
|
||||
type = custom/text
|
||||
label = "%{T3}%{T-}"
|
||||
|
||||
label-background = ${color.gold}
|
||||
label-foreground = ${color.base}
|
||||
label-padding = 1
|
||||
|
||||
click-left = ~/dotfiles/gui/scripts/power-menu.sh & disown
|
||||
|
||||
|
||||
[module/systray]
|
||||
type = internal/tray
|
||||
format-margin = 8px
|
||||
tray-spacing = 16px
|
||||
tray-size = 100%
|
||||
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
|
||||
tail = true
|
||||
interval = 1
|
||||
|
||||
format = "%{T2}%{T-} <label>"
|
||||
exec = ~/dotfiles/gui/scripts/scroll-spotify-status.sh
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
|
||||
interval = 1
|
||||
|
||||
format = "<label>"
|
||||
|
||||
label = "%time%"
|
||||
|
||||
time = "%{T2}%{T-} %I:%M %p"
|
||||
time-alt = "%{T2}%{T-} %a, %d %b %Y"
|
||||
|
||||
|
||||
[module/sep]
|
||||
type = custom/text
|
||||
|
||||
content = "%{T2} | %{T-}"
|
||||
|
||||
content-background = ${color.base}
|
||||
content-foreground = ${color.overlay}
|
||||
|
||||
|
||||
[module/spc]
|
||||
type = custom/text
|
||||
|
||||
content = "%{T2} %{T-}"
|
||||
|
||||
content-background = ${color.base}
|
||||
content-foreground = ${color.overlay}
|
||||
17
gui/polybar/setup.sh
Executable file
17
gui/polybar/setup.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed python-distutils-extra
|
||||
yay -S --needed polybar zscroll-git playerctl pactl
|
||||
|
||||
mkdir -p $CONFIG/polybar
|
||||
|
||||
for f in $DOTFILES/gui/polybar/config/*.ini; do
|
||||
ln -f -s $f "$CONFIG/polybar/$(basename $f)"
|
||||
done
|
||||
16
gui/rofi/config/colors.rasi
Normal file
16
gui/rofi/config/colors.rasi
Normal file
@ -0,0 +1,16 @@
|
||||
* {
|
||||
clear: #00000000;
|
||||
base: #1F1F28;
|
||||
surface: #363646;
|
||||
overlay: #223249;
|
||||
muted: #2D4F67;
|
||||
subtle: #49443C;
|
||||
text: #DCD7BA;
|
||||
love: #D27E99;
|
||||
gold: #E6C384;
|
||||
rose: #E46876;
|
||||
pine: #658594;
|
||||
foam: #6A9589;
|
||||
iris: #957FB8;
|
||||
}
|
||||
|
||||
9
gui/rofi/config/config.rasi
Normal file
9
gui/rofi/config/config.rasi
Normal file
@ -0,0 +1,9 @@
|
||||
configuration {
|
||||
kb-row-up: "Up,Alt+k";
|
||||
kb-row-down: "Down,Alt+j";
|
||||
kb-row-select: "Control+space,Control+y";
|
||||
kb-row-left: "Alt+h";
|
||||
kb-row-right: "Alt+l";
|
||||
}
|
||||
|
||||
@import "default"
|
||||
22
gui/rofi/config/confirm.rasi
Normal file
22
gui/rofi/config/confirm.rasi
Normal file
@ -0,0 +1,22 @@
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
font: "UbuntuMono Nerd Font Mono 12";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 225px;
|
||||
padding: 25px;
|
||||
border: 2px;
|
||||
border-radius: 8px;
|
||||
border-color: @love;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @text;
|
||||
}
|
||||
86
gui/rofi/config/launcher.rasi
Normal file
86
gui/rofi/config/launcher.rasi
Normal file
@ -0,0 +1,86 @@
|
||||
@import "colors.rasi"
|
||||
|
||||
configuration {
|
||||
font: "UbuntuMono Nerd Font Mono 12";
|
||||
show-icons: true;
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: true;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @clear;
|
||||
border: 3px;
|
||||
border-color: @love;
|
||||
width: 300px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
background-color: @clear;
|
||||
children: [ prompt, entry ];
|
||||
expand: false;
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @clear;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 12px 15px 12px 15px;
|
||||
background-color: @gold;
|
||||
text-color: @base;
|
||||
font: "UbuntuMono Nerd Font Propo 16";
|
||||
}
|
||||
|
||||
entry {
|
||||
enabled: true;
|
||||
padding: 12px 15px 12px 15px;
|
||||
background-color: @overlay;
|
||||
text-color: @text;
|
||||
placeholder: "Search...";
|
||||
blink: true;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @base;
|
||||
padding: 10px 10px 10px 10px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
lines: 10;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @overlay;
|
||||
text-color: @text;
|
||||
orientation: horizontal;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: @clear;
|
||||
text-color: @text;
|
||||
size: 24px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: @clear;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
vertical-align: 0.5;
|
||||
padding: 0px 0px 0px 6px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: #21202e;
|
||||
}
|
||||
54
gui/rofi/config/power-menu.rasi
Normal file
54
gui/rofi/config/power-menu.rasi
Normal file
@ -0,0 +1,54 @@
|
||||
@import "colors.rasi"
|
||||
|
||||
configuration {
|
||||
font: "UbuntuMono Nerd Font Mono 12";
|
||||
show-icons: false;
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: true;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @clear;
|
||||
width: 120px;
|
||||
location: north east;
|
||||
x-offset: 0;
|
||||
y-offset: 32px;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @clear;
|
||||
children: [ listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @base;
|
||||
padding: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
lines: 6;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @overlay;
|
||||
text-color: @text;
|
||||
orientation: horizontal;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: @clear;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
vertical-align: 0.5;
|
||||
padding: 0px 0px 0px 6px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: #21202e;
|
||||
}
|
||||
84
gui/rofi/config/scratchpad.rasi
Normal file
84
gui/rofi/config/scratchpad.rasi
Normal file
@ -0,0 +1,84 @@
|
||||
@import "colors.rasi"
|
||||
|
||||
configuration {
|
||||
font: "UbuntuMono Nerd Font Mono 12";
|
||||
show-icons: true;
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: true;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @clear;
|
||||
border: 3px;
|
||||
border-color: @love;
|
||||
width: 300px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
background-color: @clear;
|
||||
children: [ prompt, entry ];
|
||||
expand: false;
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @clear;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 12px 15px 12px 15px;
|
||||
background-color: @gold;
|
||||
text-color: @base;
|
||||
font: "UbuntuMono Nerd Font Propo 16";
|
||||
}
|
||||
|
||||
entry {
|
||||
enabled: true;
|
||||
padding: 12px 15px 12px 15px;
|
||||
background-color: @overlay;
|
||||
text-color: @text;
|
||||
placeholder: "Search...";
|
||||
blink: true;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @base;
|
||||
padding: 10px 10px 10px 10px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
lines: 10;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @overlay;
|
||||
text-color: @text;
|
||||
orientation: horizontal;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
enabled: false;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: @clear;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
vertical-align: 0.5;
|
||||
padding: 0px 0px 0px 6px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: #21202e;
|
||||
}
|
||||
16
gui/rofi/setup.sh
Executable file
16
gui/rofi/setup.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed rofi
|
||||
|
||||
mkdir -p $CONFIG/rofi
|
||||
|
||||
for f in $DOTFILES/gui/rofi/config/*.rasi; do
|
||||
ln -f -s $f "$CONFIG/rofi/$(basename $f)"
|
||||
done
|
||||
3
gui/scripts/gpu-load.sh
Executable file
3
gui/scripts/gpu-load.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
printf "%3d%%" $(amdgpu_top -d -J | jq '.[0].gpu_activity.GFX.value')
|
||||
9
gui/scripts/gpu-memory.sh
Executable file
9
gui/scripts/gpu-memory.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
data=$(amdgpu_top -d -J | jq '.[0].VRAM | "\(."Total VRAM".value),\(."Total VRAM Usage".value)"' | tr -d "\"")
|
||||
|
||||
total=$(echo $data | cut -d"," -f1 | tr -d '[:space:]')
|
||||
used=$(echo $data | cut -d"," -f2 | tr -d '[:space:]')
|
||||
percentage=$(awk -vu=$used -vt=$total 'BEGIN{printf "%3.0f", u/t*100.0 }')
|
||||
|
||||
echo "$used MiB ($percentage%)"
|
||||
22
gui/scripts/launch-scratchpad.sh
Executable file
22
gui/scripts/launch-scratchpad.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
match=$1
|
||||
i3match=$2
|
||||
|
||||
start=$3
|
||||
|
||||
if [ -z "$start" ]; then
|
||||
start=$match
|
||||
fi
|
||||
|
||||
if pgrep -f "^$match" >/dev/null; then
|
||||
i3-msg "[class=\"$i3match\"] scratchpad show"
|
||||
i3-msg "[class=\"$i3match\"] move position center"
|
||||
else
|
||||
bash -c "$start &>/dev/null & disown"
|
||||
|
||||
~/dotfiles/gui/scripts/run-until-output.sh true ~/dotfiles/gui/scripts/window-wait.sh $i3match
|
||||
|
||||
i3-msg "[class=\"$i3match\"] scratchpad show"
|
||||
i3-msg "[class=\"$i3match\"] move position center"
|
||||
fi
|
||||
7
gui/scripts/launcher.sh
Executable file
7
gui/scripts/launcher.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rofi \
|
||||
-show drun \
|
||||
-modi drun \
|
||||
-no-lazy-grab \
|
||||
-theme ~/.config/rofi/launcher.rasi
|
||||
22
gui/scripts/picom.sh
Executable file
22
gui/scripts/picom.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if pgrep -x -f 'bash.*picom/launch.*' | grep -v $$ >/dev/null; then
|
||||
kill -9 `pgrep -x -f 'bash.*picom/launch.*' | grep -v $$`
|
||||
fi
|
||||
|
||||
while pgrep -u $UID -x -f 'bash.*picom/launch.*' | grep -v $$ >/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
while true; do
|
||||
if pgrep -x "picom" >/dev/null; then
|
||||
pkill picom
|
||||
fi
|
||||
|
||||
while pgrep -u $UID -x picom >/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
picom --log-level info --config ~/.config/picom/picom.conf 2>&1 | tee -a /tmp/picom.log
|
||||
notify-send -u critical -t 2500 "Picom died, running loop again"
|
||||
done
|
||||
10
gui/scripts/polybar.sh
Executable file
10
gui/scripts/polybar.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
polybar-msg cmd quit
|
||||
|
||||
while pgrep -u $UID -x polybar >/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
polybar -q top 2>&1 | tee /tmp/polybar_top.log & disown
|
||||
polybar -q bot 2>&1 | tee /tmp/polybar_bot.log & disown
|
||||
117
gui/scripts/power-menu.sh
Executable file
117
gui/scripts/power-menu.sh
Executable file
@ -0,0 +1,117 @@
|
||||
rofi_command="rofi -m 2 -theme ~/.config/rofi/power-menu.rasi"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
|
||||
# Options
|
||||
windows=" Windows"
|
||||
shutdown=" Shutdown"
|
||||
reboot=" Restart"
|
||||
lock=" Lock"
|
||||
suspend=" Sleep"
|
||||
logout=" Logout"
|
||||
|
||||
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown\n$windows"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Power Menu" -dmenu -selected-row 0)"
|
||||
|
||||
confirm_exit() {
|
||||
rofi -dmenu \
|
||||
-i \
|
||||
-no-fixed-num-lines \
|
||||
-p "Are You Sure? " \
|
||||
-theme ~/.config/rofi/confirm.rasi
|
||||
}
|
||||
|
||||
msg() {
|
||||
notify-send "Unrecognized option"
|
||||
}
|
||||
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl poweroff
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
TEXT='#ff9dfee6'
|
||||
BLANK='#00000000'
|
||||
CLEAR='#ffffff22'
|
||||
WRONG='#880000bb'
|
||||
DEFAULT='#ff9dfee6'
|
||||
VERIFYING='#ff9dfee6'
|
||||
|
||||
sleep 1
|
||||
|
||||
i3lock \
|
||||
--insidever-color=$CLEAR \
|
||||
--ringver-color=$VERIFYING \
|
||||
\
|
||||
--insidewrong-color=$CLEAR \
|
||||
--ringwrong-color=$WRONG \
|
||||
\
|
||||
--inside-color=$BLANK \
|
||||
--ring-color=$DEFAULT \
|
||||
--line-color=$BLANK \
|
||||
--separator-color=$DEFAULT \
|
||||
\
|
||||
--verif-color=$TEXT \
|
||||
--wrong-color=$TEXT \
|
||||
--time-color=$TEXT \
|
||||
--date-color=$TEXT \
|
||||
--layout-color=$TEXT \
|
||||
--keyhl-color=$WRONG \
|
||||
--bshl-color=$WRONG \
|
||||
\
|
||||
--screen 1 \
|
||||
--blur 1 \
|
||||
--clock \
|
||||
--indicator \
|
||||
--time-str="%H:%M:%S" \
|
||||
--date-str="%A, %Y-%m-%d" \
|
||||
--keylayout 1
|
||||
;;
|
||||
$suspend)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl suspend
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3-msg exit
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$windows)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
. ~/dotfiles/gui/scripts/reboot-to-windows.sh
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
4
gui/scripts/reboot-to-windows.sh
Executable file
4
gui/scripts/reboot-to-windows.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo grub-reboot "Windows 11"
|
||||
systemctl reboot
|
||||
28
gui/scripts/restore-scratchpad.sh
Executable file
28
gui/scripts/restore-scratchpad.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
raw_output=$(echo $(i3-msg -t get_tree | jq '[.nodes[] | select(.name == "__i3") | .nodes[].nodes[] | select(.name == "__i3_scratch") | .floating_nodes[].nodes[] | pick(.window_properties.title, .window_properties.class, .id, .window) | "\(.window)\\\\\(.window_properties.title)\\0icon\\x1f\(.window_properties.class)"] | join("\\n")' | tr -d '"'))
|
||||
|
||||
output=$(echo -e "$raw_output")
|
||||
|
||||
rows=$(printf "%s" "$(echo -e $output | tr '\0' '\377')")
|
||||
|
||||
IFS=$'\n' read -rd '' -a entries <<< "$rows"
|
||||
|
||||
selected=$(
|
||||
for line in "${entries[@]}"; do
|
||||
echo "$line" | cut -d '\' -f 2 | tr '\377' '\0'
|
||||
done \
|
||||
| rofi \
|
||||
-sync\
|
||||
-dmenu\
|
||||
-format i\
|
||||
-no-custom\
|
||||
-p ""\
|
||||
-theme ~/.config/rofi/scratchpad.rasi
|
||||
)
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
window_id=$(echo "${entries[$selected]}" | cut -d '\' -f 1)
|
||||
|
||||
i3-msg "[id=$window_id] scratchpad show, floating toggle"
|
||||
fi
|
||||
11
gui/scripts/run-until-output.sh
Executable file
11
gui/scripts/run-until-output.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
match=$1
|
||||
|
||||
shift
|
||||
|
||||
bash -c 'echo "$$"; exec stdbuf -oL "$0" "$@"' $@ | (
|
||||
read -r pid &&
|
||||
sed "/$match/q" &&
|
||||
kill -s PIPE "$pid"
|
||||
)
|
||||
20
gui/scripts/screens.sh
Executable file
20
gui/scripts/screens.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
args=""
|
||||
|
||||
for monitor in $(xrandr | sed -n 's/^\(.*\)\s\+connected.*$/\1/p'); do
|
||||
case $monitor in
|
||||
HDMI-A-0)
|
||||
args="$args --output $monitor --mode 1920x1080 --rotate normal --rate 120.0 --pos 1920x0"
|
||||
;;
|
||||
DisplayPort-0)
|
||||
args="$args --output $monitor --mode 1920x1080 --rotate normal --rate 120.0 --pos -1920x0"
|
||||
;;
|
||||
DisplayPort-2)
|
||||
args="$args --output $monitor --mode 1920x1080 --rotate normal --rate 120.0 --pos 0x0 --primary"
|
||||
;; esac
|
||||
done
|
||||
|
||||
if [[ ! -z "$args" ]]; then
|
||||
xrandr $args
|
||||
fi
|
||||
4
gui/scripts/screenshot.sh
Executable file
4
gui/scripts/screenshot.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sleep 0.2
|
||||
scrot -f $1 -e 'mv $f ~/media/pictures/screenshots'
|
||||
11
gui/scripts/scroll-spotify-status.sh
Executable file
11
gui/scripts/scroll-spotify-status.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# see man zscroll for documentation of the following parameters
|
||||
zscroll -l 30 \
|
||||
--delay 0.2 \
|
||||
--match-command "`dirname $0`/spotify-status.sh --status" \
|
||||
--match-text "Playing" "--scroll 1" \
|
||||
--match-text "Paused" "--scroll 0" \
|
||||
--update-check true "`dirname $0`/spotify-status.sh" &
|
||||
|
||||
wait
|
||||
51
gui/scripts/spotify-status.sh
Executable file
51
gui/scripts/spotify-status.sh
Executable file
@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The name of polybar bar which houses the main spotify module and the control modules.
|
||||
PARENT_BAR="main"
|
||||
PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1)
|
||||
|
||||
# Set the source audio player here.
|
||||
# Players supporting the MPRIS spec are supported.
|
||||
# Examples: spotify, vlc, chrome, mpv and others.
|
||||
# Use `playerctld` to always detect the latest player.
|
||||
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
|
||||
PLAYER="spotify"
|
||||
|
||||
# Format of the information displayed
|
||||
# Eg. {{ artist }} - {{ album }} - {{ title }}
|
||||
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
|
||||
FORMAT="{{ title }} - {{ artist }}"
|
||||
|
||||
# Sends $2 as message to all polybar PIDs that are part of $1
|
||||
update_hooks() {
|
||||
while IFS= read -r id
|
||||
do
|
||||
polybar-msg -p "$id" hook spotify-play-pause $2 1>/dev/null 2>&1
|
||||
done < <(echo "$1")
|
||||
}
|
||||
|
||||
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
|
||||
EXIT_CODE=$?
|
||||
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
STATUS=$PLAYERCTL_STATUS
|
||||
else
|
||||
STATUS="No player is running"
|
||||
fi
|
||||
|
||||
if [ "$1" == "--status" ]; then
|
||||
echo "$STATUS"
|
||||
else
|
||||
if [ "$STATUS" = "Stopped" ]; then
|
||||
echo "No music is playing"
|
||||
elif [ "$STATUS" = "Paused" ]; then
|
||||
update_hooks "$PARENT_BAR_PID" 2
|
||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
||||
elif [ "$STATUS" = "No player is running" ]; then
|
||||
echo "No playback active"
|
||||
else
|
||||
update_hooks "$PARENT_BAR_PID" 1
|
||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
||||
fi
|
||||
fi
|
||||
|
||||
34
gui/scripts/swap-workspace.sh
Normal file
34
gui/scripts/swap-workspace.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DISPLAY_CONFIG=$(
|
||||
i3-msg -t get_outputs \
|
||||
| jq -r '.[]|"\(.name):\(.current_workspace)"' \
|
||||
| grep -E "(DisplayPort-2|HDMI-A-0)"
|
||||
)
|
||||
|
||||
DISPLAYS_COUNT=$(echo "$DISPLAY_CONFIG" | wc -l)
|
||||
|
||||
FOCUSED=$(i3-msg -t get_workspaces | jq -r 'map(select(.focused)) | .[] | "\(.output)"')
|
||||
|
||||
echo $DISPLAYS_COUNT
|
||||
|
||||
if [[ $DISPLAYS_COUNT -eq "2" ]]; then
|
||||
WORKSPACE_HDMI=$(echo "$DISPLAY_CONFIG" | grep "HDMI-A-0" | cut -d':' -f2)
|
||||
WORKSPACE_DSPL=$(echo "$DISPLAY_CONFIG" | grep "DisplayPort-2" | cut -d':' -f2)
|
||||
|
||||
echo $WORKSPACE_HDMI $WORKSPACE_DSPL
|
||||
|
||||
i3-msg workspace "$WORKSPACE_HDMI"
|
||||
i3-msg move workspace to output DisplayPort-2
|
||||
|
||||
sleep 0.04
|
||||
|
||||
i3-msg workspace "$WORKSPACE_DSPL"
|
||||
i3-msg move workspace to output HDMI-A-0
|
||||
|
||||
sleep 0.04
|
||||
|
||||
echo $FOCUSED
|
||||
|
||||
i3-msg focus output $FOCUSED
|
||||
fi
|
||||
28
gui/scripts/swap-workspaces.sh
Executable file
28
gui/scripts/swap-workspaces.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DISPLAY_CONFIG=$(
|
||||
i3-msg -t get_outputs \
|
||||
| jq -r '.[]|"\(.name):\(.current_workspace)"' \
|
||||
| grep -E "(DisplayPort-2|HDMI-A-0)"
|
||||
)
|
||||
|
||||
DISPLAYS_COUNT=$(echo "$DISPLAY_CONFIG" | wc -l)
|
||||
|
||||
FOCUSED=$(i3-msg -t get_workspaces | jq -r 'map(select(.focused)) | .[] | "\(.output)"')
|
||||
|
||||
if [[ $DISPLAYS_COUNT -eq "2" ]]; then
|
||||
WORKSPACE_HDMI=$(echo "$DISPLAY_CONFIG" | grep "HDMI-A-0" | cut -d':' -f2)
|
||||
WORKSPACE_DSPL=$(echo "$DISPLAY_CONFIG" | grep "DisplayPort-2" | cut -d':' -f2)
|
||||
|
||||
i3-msg workspace "$WORKSPACE_HDMI"
|
||||
i3-msg move workspace to output DisplayPort-2
|
||||
|
||||
sleep 0.04
|
||||
|
||||
i3-msg workspace "$WORKSPACE_DSPL"
|
||||
i3-msg move workspace to output HDMI-A-0
|
||||
|
||||
sleep 0.04
|
||||
|
||||
i3-msg focus output $FOCUSED
|
||||
fi
|
||||
17
gui/scripts/wallpaper.sh
Executable file
17
gui/scripts/wallpaper.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
count=0
|
||||
|
||||
for monitor in $(xrandr | sed -n 's/^\(.*\)\s\+connected.*$/\1/p'); do
|
||||
case $monitor in
|
||||
HDMI-A-0)
|
||||
args="$args --output $monitor --mode 1920x1080 --rotate normal --rate 120.0 --pos 1920x0"
|
||||
;;
|
||||
DisplayPort-0)
|
||||
args="$args --output $monitor --mode 1920x1080 --rotate left --rate 120.0 --pos -1080x-575"
|
||||
;;
|
||||
DisplayPort-2)
|
||||
args="$args --output $monitor --mode 1920x1080 --rotate normal --rate 120.0 --pos 0x0 --primary"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
6
gui/scripts/window-wait.sh
Executable file
6
gui/scripts/window-wait.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
i3match=$1
|
||||
|
||||
i3-msg -m -t subscribe '["window"]' \
|
||||
| jq 'if .change == "new" and .container.window_properties.class == "'$i3match'" then true else false end'
|
||||
80
gui/setup.sh
Executable file
80
gui/setup.sh
Executable file
@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
|
||||
if [ ! -d "$DOTFILES" ]; then
|
||||
if [ ! -x "$(command -v git)" ]; then
|
||||
sudo pacman -Syu
|
||||
sudo pacman -S --needed git
|
||||
fi
|
||||
|
||||
git clone https://github.com/erick-alcachofa/dotfiles $DOTFILES
|
||||
fi
|
||||
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
if [ ! -x "$(command -v yay)" ]; then
|
||||
. $DOTFILES/yay.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed \
|
||||
xorg \
|
||||
xorg-xinit \
|
||||
|
||||
. $DOTFILES/gui/i3/setup.sh
|
||||
. $DOTFILES/gui/picom/setup.sh
|
||||
. $DOTFILES/gui/dunst/setup.sh
|
||||
. $DOTFILES/gui/polybar/setup.sh
|
||||
. $DOTFILES/gui/rofi/setup.sh
|
||||
. $DOTFILES/gui/wezterm/setup.sh
|
||||
|
||||
yay -S --needed \
|
||||
obs-studio \
|
||||
vlc \
|
||||
ufw \
|
||||
flac \
|
||||
gimp \
|
||||
opus \
|
||||
gpick \
|
||||
qimgv \
|
||||
arandr \
|
||||
scrcpy \
|
||||
thunar \
|
||||
ffmpeg \
|
||||
jmtpfs \
|
||||
xdotool \
|
||||
firefox \
|
||||
spotify \
|
||||
discord \
|
||||
remmina \
|
||||
xreader \
|
||||
ntfs-3g \
|
||||
texinfo \
|
||||
udiskie \
|
||||
seahorse \
|
||||
guvcview \
|
||||
qpwgraph \
|
||||
opusfile \
|
||||
pipewire \
|
||||
screenkey \
|
||||
xarchiver \
|
||||
djvulibre \
|
||||
ufw-extras \
|
||||
libspectre \
|
||||
pavucontrol \
|
||||
wireplumber \
|
||||
texlive-bin \
|
||||
extfat-utils \
|
||||
pipewire-alsa \
|
||||
pipewire-jack \
|
||||
pipewire-pulse \
|
||||
squashfs-tools \
|
||||
transmission-qt \
|
||||
telegram-desktop \
|
||||
otf-latin-modern \
|
||||
ffmpegthumbnailer
|
||||
|
||||
BIN
gui/wallpapers/kanagawa.png
Normal file
BIN
gui/wallpapers/kanagawa.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 MiB |
BIN
gui/wallpapers/rose-pine-moon.png
Normal file
BIN
gui/wallpapers/rose-pine-moon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1024 KiB |
BIN
gui/wallpapers/rose-pine.png
Normal file
BIN
gui/wallpapers/rose-pine.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 261 KiB |
23
gui/wezterm/config/wezterm.lua
Normal file
23
gui/wezterm/config/wezterm.lua
Normal file
@ -0,0 +1,23 @@
|
||||
local wezterm = require('wezterm')
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.audible_bell = "Disabled"
|
||||
|
||||
config.font = wezterm.font('Zed Mono Nerd Font Mono')
|
||||
config.font_size = 12
|
||||
config.harfbuzz_features = { 'calt=0' }
|
||||
|
||||
config.color_scheme = 'MaterialDarker'
|
||||
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.use_fancy_tab_bar = false
|
||||
config.tab_bar_at_bottom = true
|
||||
config.window_padding = {
|
||||
left = 0,
|
||||
right = 0,
|
||||
bottom = 0,
|
||||
top = 0,
|
||||
}
|
||||
|
||||
return config
|
||||
14
gui/wezterm/setup.sh
Executable file
14
gui/wezterm/setup.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed wezterm
|
||||
|
||||
mkdir -p $CONFIG/wezterm
|
||||
|
||||
ln -f -s $DOTFILES/gui/wezterm/config/wezterm.lua $CONFIG/wezterm/wezterm.lua
|
||||
2
nvim/config/.gitignore
vendored
Normal file
2
nvim/config/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
lazy-lock.json
|
||||
lua/alcachofa/colorschemes/current.lua
|
||||
1
nvim/config/ftplugin/c.lua
Normal file
1
nvim/config/ftplugin/c.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt.colorcolumn = "81"
|
||||
1
nvim/config/ftplugin/cpp.lua
Normal file
1
nvim/config/ftplugin/cpp.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt.colorcolumn = "81"
|
||||
1
nvim/config/ftplugin/go.lua
Normal file
1
nvim/config/ftplugin/go.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt.colorcolumn = "81"
|
||||
2
nvim/config/ftplugin/markdown.lua
Normal file
2
nvim/config/ftplugin/markdown.lua
Normal file
@ -0,0 +1,2 @@
|
||||
vim.opt.colorcolumn = ""
|
||||
vim.o.wrap = true
|
||||
1
nvim/config/ftplugin/rust.lua
Normal file
1
nvim/config/ftplugin/rust.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt.colorcolumn = "81"
|
||||
1
nvim/config/ftplugin/zig.lua
Normal file
1
nvim/config/ftplugin/zig.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt.colorcolumn = "81"
|
||||
43
nvim/config/ignorefile
Normal file
43
nvim/config/ignorefile
Normal file
@ -0,0 +1,43 @@
|
||||
*._*
|
||||
*#*
|
||||
*.a
|
||||
*.ams
|
||||
*.bc
|
||||
*.c#*
|
||||
*.code-workspace
|
||||
*.gemtags*
|
||||
*.i
|
||||
*.js
|
||||
*.lck
|
||||
*.merge.*
|
||||
*.o
|
||||
*.old
|
||||
*.out
|
||||
*.patch
|
||||
*.plist
|
||||
*.pyc
|
||||
*.results
|
||||
*.rpm
|
||||
*.scss
|
||||
*.so
|
||||
*.swp
|
||||
*.tmp*
|
||||
*DS_Store
|
||||
.Trash/
|
||||
.cache/
|
||||
.cargo/
|
||||
.ccls-cache/
|
||||
.clangd/
|
||||
.cquery_cache/
|
||||
.data/
|
||||
.git/
|
||||
.history/
|
||||
.vscode/
|
||||
__pycache__/
|
||||
node_modules/
|
||||
.npm/
|
||||
.local/
|
||||
packages/
|
||||
tags
|
||||
tmp/
|
||||
build**
|
||||
63
nvim/config/init.lua
Normal file
63
nvim/config/init.lua
Normal file
@ -0,0 +1,63 @@
|
||||
-- vim.opt.runtimepath:append("~/.config/nvim/syntax")
|
||||
|
||||
vim.opt.syntax = 'on'
|
||||
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.guicursor = { "n-v-c-sm-i-ci-ve:block", "r-cr-o:hor20" }
|
||||
|
||||
vim.opt.showmode = false
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.showmatch = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.ruler = true
|
||||
vim.opt.visualbell = true
|
||||
vim.opt.encoding = "UTF-8"
|
||||
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.opt.mouse = "a"
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.autoread = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.writebackup = false
|
||||
|
||||
vim.opt.cmdheight = 1
|
||||
vim.opt.shortmess:append({ n = true })
|
||||
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
vim.opt.jumpoptions = "stack"
|
||||
|
||||
vim.opt.laststatus = 2
|
||||
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.scrolloff = 5
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.background = "dark"
|
||||
vim.opt.isfname:append("@-@")
|
||||
vim.opt.fillchars = 'eob: '
|
||||
|
||||
vim.opt.ea = true
|
||||
|
||||
require("mappings")
|
||||
require("package-manager")
|
||||
19
nvim/config/lua/mappings.lua
Normal file
19
nvim/config/lua/mappings.lua
Normal file
@ -0,0 +1,19 @@
|
||||
vim.g.mapleader = " "
|
||||
|
||||
vim.keymap.set("i", "<C-s>", "<Esc>:w<cr>a", { silent = true })
|
||||
vim.keymap.set("n", "<C-s>", ":w<cr>", { silent = true })
|
||||
|
||||
vim.keymap.set("i", "<A-K>", "<Esc>:m -2<CR>a", { silent = true })
|
||||
vim.keymap.set("n", "<A-K>", ":m -2<CR>", { silent = true })
|
||||
vim.keymap.set("v", "<A-K>", ":m '<-2<CR>gv=gv", { silent = true })
|
||||
|
||||
vim.keymap.set("i", "<A-J>", "<Esc>:m +1<CR>a", { silent = true })
|
||||
vim.keymap.set("n", "<A-J>", ":m +1<CR>", { silent = true })
|
||||
vim.keymap.set("v", "<A-J>", ":m '>+1<CR>gv=gv", { silent = true })
|
||||
|
||||
vim.keymap.set("n", "<A-d>", "\"_d", { silent = true })
|
||||
vim.keymap.set("v", "<A-d>", "\"_d", { silent = true })
|
||||
|
||||
vim.keymap.set("n", "x", "v<A-d>", { silent = true, remap = true })
|
||||
|
||||
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||
20
nvim/config/lua/package-manager.lua
Normal file
20
nvim/config/lua/package-manager.lua
Normal file
@ -0,0 +1,20 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup("plugins")
|
||||
14
nvim/config/lua/plugins/auto-pairs.lua
Normal file
14
nvim/config/lua/plugins/auto-pairs.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp"
|
||||
},
|
||||
config = function(plugin, opts)
|
||||
require("nvim-autopairs").setup({})
|
||||
|
||||
require("cmp").event:on(
|
||||
"confirm_done",
|
||||
require("nvim-autopairs.completion.cmp").on_confirm_done()
|
||||
)
|
||||
end
|
||||
}
|
||||
9
nvim/config/lua/plugins/blankline.lua
Normal file
9
nvim/config/lua/plugins/blankline.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return { -- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
config = function()
|
||||
require("ibl").setup {
|
||||
indent = { char = "┊" },
|
||||
scope = { enabled = false },
|
||||
}
|
||||
end,
|
||||
}
|
||||
294
nvim/config/lua/plugins/colorscheme.lua
Normal file
294
nvim/config/lua/plugins/colorscheme.lua
Normal file
@ -0,0 +1,294 @@
|
||||
local colorscheme_path = vim.fn.stdpath('state') .. '/colorscheme'
|
||||
|
||||
local function load()
|
||||
local file = io.open(colorscheme_path, 'r')
|
||||
|
||||
if not file then
|
||||
return nil
|
||||
end
|
||||
|
||||
local name = file:read('*l')
|
||||
|
||||
file:close()
|
||||
|
||||
return name
|
||||
end
|
||||
|
||||
local function save(colorscheme)
|
||||
local file = io.open(colorscheme_path, 'w+')
|
||||
|
||||
if not file then
|
||||
error("Failed to save colorscheme")
|
||||
end
|
||||
|
||||
file:write(colorscheme)
|
||||
file:flush()
|
||||
file:close()
|
||||
end
|
||||
|
||||
local rose_pine = {
|
||||
"rose-pine/nvim",
|
||||
name = "rose-pine",
|
||||
config = function(_, opts)
|
||||
vim.opt.background = "dark"
|
||||
require("rose-pine").setup(opts)
|
||||
vim.cmd.colorscheme("rose-pine")
|
||||
end,
|
||||
opts = {
|
||||
variant = "main",
|
||||
dark_variant = "main",
|
||||
dim_inactive_windows = false,
|
||||
extend_background_behind_borders = true,
|
||||
|
||||
enable = {
|
||||
terminal = false,
|
||||
legacy_highlights = false,
|
||||
migrations = true,
|
||||
},
|
||||
|
||||
styles = {
|
||||
bold = true,
|
||||
italic = true,
|
||||
transparency = true
|
||||
},
|
||||
|
||||
highlight_groups = {
|
||||
Comment = {
|
||||
fg = "foam"
|
||||
},
|
||||
VertSplit = {
|
||||
fg = "muted",
|
||||
bg = "muted"
|
||||
},
|
||||
TelescopeTitle = {
|
||||
fg = "rose",
|
||||
bg = "overlay"
|
||||
},
|
||||
TelescopePromptNormal = {
|
||||
bg = "surface"
|
||||
},
|
||||
TelescopePromptBorder = {
|
||||
fg = "surface",
|
||||
bg = "none"
|
||||
},
|
||||
TelescopeResultsNormal = {
|
||||
bg = "overlay",
|
||||
},
|
||||
TelescopeResultsBorder = {
|
||||
fg = "overlay",
|
||||
bg = "none"
|
||||
},
|
||||
TelescopePreviewNormal = {
|
||||
bg = "#21202e"
|
||||
},
|
||||
TelescopePreviewBorder = {
|
||||
fg = "#21202e",
|
||||
bg = "none"
|
||||
},
|
||||
TelescopeSelection = {
|
||||
bg = "base"
|
||||
}
|
||||
},
|
||||
|
||||
before_highlight = function(group, highlight, palette)
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
local kanagawa = {
|
||||
"rebelot/kanagawa.nvim",
|
||||
name = "kanagawa",
|
||||
config = function(_, opts)
|
||||
require("kanagawa").setup(opts)
|
||||
vim.cmd.colorscheme("kanagawa")
|
||||
end,
|
||||
opts = {
|
||||
theme = "wave",
|
||||
undercurl = false,
|
||||
typeStyle = {},
|
||||
functionStyle = {},
|
||||
statementStyle = { bold = false },
|
||||
commentStyle = { italic = false },
|
||||
keywordStyle = { italic = false },
|
||||
transparent = false,
|
||||
dimInactive = false,
|
||||
terminalColors = true,
|
||||
colors = {
|
||||
theme = {
|
||||
all = {
|
||||
ui = {
|
||||
bg_gutter = "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
overrides = function(colors)
|
||||
local theme = colors.theme
|
||||
|
||||
return {
|
||||
TelescopeTitle = { fg = theme.ui.special, bold = true },
|
||||
TelescopePromptNormal = { bg = theme.ui.bg_p1 },
|
||||
TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 },
|
||||
TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 },
|
||||
TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 },
|
||||
TelescopePreviewNormal = { bg = theme.ui.bg_dim },
|
||||
TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim },
|
||||
|
||||
Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 },
|
||||
PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
|
||||
PmenuSbar = { bg = theme.ui.bg_m1 },
|
||||
PmenuThumb = { bg = theme.ui.bg_p2 },
|
||||
}
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
local material = {
|
||||
'marko-cerovac/material.nvim',
|
||||
name = 'material',
|
||||
lazy = false,
|
||||
config = function(_, opts)
|
||||
vim.g.material_style = "darker"
|
||||
|
||||
local c = require("material.colors")
|
||||
|
||||
opts.custom_highlights = {
|
||||
TelescopeTitle = {
|
||||
fg = c.main.white,
|
||||
bg = c.main.darkorange,
|
||||
bold = true
|
||||
},
|
||||
TelescopePromptNormal = {
|
||||
bg = c.editor.bg_alt
|
||||
},
|
||||
TelescopePromptBorder = {
|
||||
fg = c.editor.bg_alt,
|
||||
bg = c.editor.bg_alt
|
||||
},
|
||||
TelescopeResultsNormal = {
|
||||
bg = c.editor.active,
|
||||
},
|
||||
TelescopeResultsBorder = {
|
||||
bg = c.editor.active,
|
||||
fg = c.editor.active
|
||||
},
|
||||
TelescopePreviewNormal = {
|
||||
bg = c.editor.bg,
|
||||
},
|
||||
TelescopePreviewBorder = {
|
||||
bg = c.editor.bg,
|
||||
fg = c.editor.bg
|
||||
},
|
||||
}
|
||||
|
||||
require("material").setup(opts)
|
||||
|
||||
vim.cmd.colorscheme("material")
|
||||
end,
|
||||
opts = {
|
||||
async_loading = false,
|
||||
contrast = {
|
||||
sidebars = true,
|
||||
floating_windows = true,
|
||||
cursor_line = true,
|
||||
},
|
||||
plugins = {
|
||||
"gitsigns",
|
||||
"harpoon",
|
||||
"indent-blankline",
|
||||
"nvim-tree",
|
||||
"nvim-cmp",
|
||||
},
|
||||
disable = {
|
||||
colored_cursor = true,
|
||||
borders = true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
local oldworld = {
|
||||
"dgox16/oldworld.nvim",
|
||||
name = "oldworld",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function(_, opts)
|
||||
require("oldworld").setup(opts)
|
||||
vim.cmd.colorscheme("oldworld")
|
||||
end,
|
||||
opts = {
|
||||
integrations = {
|
||||
lsp = true,
|
||||
markdown = true,
|
||||
treesitter = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local monokai_pro = {
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
name = "monokai-pro",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function(_, opts)
|
||||
require('monokai-pro').setup(opts)
|
||||
vim.cmd.colorscheme("monokai-pro")
|
||||
end,
|
||||
opts = {
|
||||
filter = "spectrum"
|
||||
}
|
||||
}
|
||||
|
||||
local specs = {
|
||||
rose_pine,
|
||||
kanagawa,
|
||||
material,
|
||||
oldworld,
|
||||
monokai_pro
|
||||
}
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
"Theme",
|
||||
function(opts)
|
||||
save(opts.args)
|
||||
|
||||
local name = load()
|
||||
|
||||
if name and name ~= '' then
|
||||
for _, spec in ipairs(specs) do
|
||||
if spec.name == name then
|
||||
spec.config(nil, spec.opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
{
|
||||
desc = "Set nvim colorscheme from defined themes",
|
||||
nargs = 1,
|
||||
complete = function()
|
||||
local list = {}
|
||||
|
||||
for _, spec in ipairs(specs) do
|
||||
table.insert(list, spec.name)
|
||||
end
|
||||
|
||||
return list
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
local name = load()
|
||||
|
||||
if name and name ~= '' then
|
||||
for _, spec in ipairs(specs) do
|
||||
if spec.name == name then
|
||||
spec.lazy = false
|
||||
spec.priority = 1000
|
||||
else
|
||||
spec.priority = nil
|
||||
spec.lazy = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return specs
|
||||
15
nvim/config/lua/plugins/deadcolumn.lua
Normal file
15
nvim/config/lua/plugins/deadcolumn.lua
Normal file
@ -0,0 +1,15 @@
|
||||
return {
|
||||
"Bekaboo/deadcolumn.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
scope = "visible",
|
||||
|
||||
modes = function()
|
||||
return true
|
||||
end,
|
||||
|
||||
blending = {
|
||||
threshold = 1,
|
||||
},
|
||||
}
|
||||
}
|
||||
9
nvim/config/lua/plugins/gitsigns.lua
Normal file
9
nvim/config/lua/plugins/gitsigns.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function(_, opts)
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
|
||||
}
|
||||
}
|
||||
47
nvim/config/lua/plugins/harpoon.lua
Normal file
47
nvim/config/lua/plugins/harpoon.lua
Normal file
@ -0,0 +1,47 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
|
||||
harpoon:setup({})
|
||||
|
||||
local conf = require("telescope.config").values
|
||||
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
require("telescope.pickers").new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table {
|
||||
results = file_paths
|
||||
},
|
||||
previewer = conf.file_previewer {},
|
||||
sorter = conf.generic_sorter {}
|
||||
}):find()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>fh", function() toggle_telescope(harpoon:list()) end)
|
||||
|
||||
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
||||
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end)
|
||||
|
||||
vim.keymap.set("n", "<leader>hk", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<leader>hj", function() harpoon:list():next() end)
|
||||
|
||||
vim.keymap.set("n", "<leader>hq", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<leader>hw", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<leader>he", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<leader>hr", function() harpoon:list():select(4) end)
|
||||
vim.keymap.set("n", "<leader>ht", function() harpoon:list():select(5) end)
|
||||
end
|
||||
}
|
||||
6
nvim/config/lua/plugins/init.lua
Normal file
6
nvim/config/lua/plugins/init.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"junegunn/fzf",
|
||||
"numToStr/Comment.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"christoomey/vim-tmux-navigator",
|
||||
}
|
||||
19
nvim/config/lua/plugins/leap.lua
Normal file
19
nvim/config/lua/plugins/leap.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
"ggandor/leap.nvim",
|
||||
dependencies = {
|
||||
"tpope/vim-repeat"
|
||||
},
|
||||
config = function(_, opts)
|
||||
local leap = require("leap")
|
||||
|
||||
for k, v in pairs(opts) do
|
||||
leap.opts[k] = v
|
||||
end
|
||||
|
||||
leap.add_default_mappings(true)
|
||||
|
||||
vim.keymap.set("n", "s", function()
|
||||
require("leap").leap({ target_windows = { vim.api.nvim_get_current_win() } })
|
||||
end)
|
||||
end
|
||||
}
|
||||
287
nvim/config/lua/plugins/lsp.lua
Normal file
287
nvim/config/lua/plugins/lsp.lua
Normal file
@ -0,0 +1,287 @@
|
||||
return {
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v2.x",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"onsails/lspkind.nvim",
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
build = ":MasonUpdate",
|
||||
},
|
||||
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
|
||||
{
|
||||
"j-hui/fidget.nvim",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"nvim-java/nvim-java",
|
||||
dependencies = {
|
||||
"nvim-java/lua-async-await",
|
||||
"nvim-java/nvim-java-core",
|
||||
"nvim-java/nvim-java-test",
|
||||
"nvim-java/nvim-java-dap",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local lsp = require("lsp-zero").preset {}
|
||||
local cmp = require("cmp")
|
||||
local util = require("lspconfig.util");
|
||||
local lspkind = require("lspkind")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
lsp.ensure_installed {
|
||||
"zls",
|
||||
"html",
|
||||
"taplo",
|
||||
"jdtls",
|
||||
"cssls",
|
||||
"cmake",
|
||||
"ts_ls",
|
||||
"bashls",
|
||||
"lua_ls",
|
||||
"yamlls",
|
||||
"jsonls",
|
||||
"pyright",
|
||||
"gradle_ls",
|
||||
"rust_analyzer",
|
||||
"markdown_oxide",
|
||||
"golangci_lint_ls",
|
||||
}
|
||||
|
||||
lspconfig.zls.setup {}
|
||||
lspconfig.html.setup {}
|
||||
lspconfig.taplo.setup {}
|
||||
lspconfig.cssls.setup {}
|
||||
lspconfig.cmake.setup {}
|
||||
lspconfig.ts_ls.setup {}
|
||||
lspconfig.bashls.setup {}
|
||||
lspconfig.jsonls.setup {}
|
||||
lspconfig.pyright.setup {}
|
||||
lspconfig.gradle_ls.setup {}
|
||||
lspconfig.rust_analyzer.setup {}
|
||||
lspconfig.markdown_oxide.setup {}
|
||||
lspconfig.golangci_lint_ls.setup {}
|
||||
|
||||
vim.g.zig_fmt_autosave = false
|
||||
|
||||
lspconfig.yamlls.setup {
|
||||
settings = {
|
||||
yaml = {
|
||||
keyOrdering = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = "LuaJIT"
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { "vim" }
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if os.getenv("NIX_CC") ~= nil then
|
||||
lspconfig.clangd.setup {
|
||||
root_dir = util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands.json'
|
||||
),
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--header-insertion=never",
|
||||
"--offset-encoding=utf-16",
|
||||
"--query-driver="
|
||||
.. os.getenv("NIX_CC") .. "/bin/g++" .. ","
|
||||
.. os.getenv("NIX_CC") .. "/bin/gcc"
|
||||
}
|
||||
}
|
||||
else
|
||||
lspconfig.clangd.setup {
|
||||
root_dir = util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands.json'
|
||||
),
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--header-insertion=never",
|
||||
"--offset-encoding=utf-16",
|
||||
"--query-driver=gcc,g++"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
require('java').setup {}
|
||||
lspconfig.jdtls.setup {}
|
||||
|
||||
local cmp_mappings = {
|
||||
['<Up>'] = cmp.mapping.select_prev_item({
|
||||
behavior = cmp.SelectBehavior.Insert
|
||||
}),
|
||||
['<Down>'] = cmp.mapping.select_next_item({
|
||||
behavior = cmp.SelectBehavior.Insert
|
||||
}),
|
||||
['<C-y>'] = cmp.mapping.confirm({
|
||||
select = true,
|
||||
behavior = cmp.ConfirmBehavior.Replace
|
||||
}),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}
|
||||
|
||||
lsp.setup_nvim_cmp {
|
||||
mapping = cmp_mappings,
|
||||
formatting = {
|
||||
fields = {
|
||||
"kind",
|
||||
"abbr",
|
||||
"menu"
|
||||
},
|
||||
format = lspkind.cmp_format({
|
||||
maxwidth = 50,
|
||||
before = function(entry, vim_item)
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
|
||||
vim_item.menu = ({
|
||||
buffer = "[Buff]",
|
||||
nvim_lsp = "[LSP ]",
|
||||
ultisnips = "[Snps]",
|
||||
nvim_lua = "[Lua ]",
|
||||
cmp_tabnine = "[TbNn]",
|
||||
look = "[Look]",
|
||||
path = "[Path]",
|
||||
spell = "[Spll]",
|
||||
calc = "[Calc]",
|
||||
emoji = "[Emji]"
|
||||
})[entry.source.name]
|
||||
|
||||
return vim_item
|
||||
end
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
lsp.set_preferences({
|
||||
suggest_lsp_servers = false,
|
||||
sign_icons = {
|
||||
error = 'E',
|
||||
warn = 'W',
|
||||
hint = 'H',
|
||||
info = 'I'
|
||||
}
|
||||
})
|
||||
|
||||
lsp.on_attach(function(_, bufnr)
|
||||
local snacks = require('snacks')
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
|
||||
vim.keymap.set('n', '<leader>vd', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
|
||||
|
||||
vim.keymap.set('n', 'gD', snacks.picker.lsp_declarations, opts)
|
||||
vim.keymap.set('n', 'gd', snacks.picker.lsp_definitions, opts)
|
||||
vim.keymap.set('n', 'gi', snacks.picker.lsp_implementations, opts)
|
||||
vim.keymap.set('n', 'gr', snacks.picker.lsp_references, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
vim.keymap.set('n', '<leader>K', vim.lsp.buf.signature_help, opts)
|
||||
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>cf', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
|
||||
vim.keymap.set('n', '<leader>fs', snacks.picker.lsp_symbols, opts)
|
||||
vim.keymap.set('n', '<leader>fd', snacks.picker.diagnostics, opts)
|
||||
end)
|
||||
|
||||
lsp.nvim_workspace()
|
||||
lsp.setup()
|
||||
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = {
|
||||
prefix = "◉",
|
||||
spacing = 6
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
52
nvim/config/lua/plugins/lua-line.lua
Normal file
52
nvim/config/lua/plugins/lua-line.lua
Normal file
@ -0,0 +1,52 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
globalstatus = true,
|
||||
component_separators = {
|
||||
left = '',
|
||||
right = ''
|
||||
},
|
||||
section_separators = {
|
||||
left = '',
|
||||
right = ''
|
||||
},
|
||||
disabled_filetypes = {
|
||||
statusline = { 'NvimTree' }
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
fmt = function(str)
|
||||
return str:sub(1, 1)
|
||||
end
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
'branch',
|
||||
'diff',
|
||||
'diagnostics'
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
'filename',
|
||||
symbols = {
|
||||
modified = "[*]",
|
||||
readonly = "[]",
|
||||
unnamed = " ? ",
|
||||
newfile = "[+]"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
lualine_x = { 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
}
|
||||
}
|
||||
}
|
||||
9
nvim/config/lua/plugins/markdown.lua
Normal file
9
nvim/config/lua/plugins/markdown.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
'MeanderingProgrammer/markdown.nvim',
|
||||
main = "render-markdown",
|
||||
opts = {},
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
}
|
||||
20
nvim/config/lua/plugins/osyank.lua
Normal file
20
nvim/config/lua/plugins/osyank.lua
Normal file
@ -0,0 +1,20 @@
|
||||
return {
|
||||
"ojroques/nvim-osc52",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("osc52").setup {
|
||||
max_length = 0,
|
||||
silent = false,
|
||||
trim = false,
|
||||
}
|
||||
|
||||
local function copy()
|
||||
if ((vim.v.event.operator == "y" or vim.v.event.operator == "d")
|
||||
and vim.v.event.regname == "") then
|
||||
require("osc52").copy_register("")
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
||||
end
|
||||
}
|
||||
130
nvim/config/lua/plugins/snacks.lua
Normal file
130
nvim/config/lua/plugins/snacks.lua
Normal file
@ -0,0 +1,130 @@
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
"<leader>nn",
|
||||
function()
|
||||
require("snacks").picker.explorer()
|
||||
end,
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>ss",
|
||||
function()
|
||||
require("snacks").scratch()
|
||||
end,
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>sl",
|
||||
function()
|
||||
require("snacks").scratch.select()
|
||||
end,
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>zz",
|
||||
function()
|
||||
require("snacks").zen.zoom()
|
||||
end,
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>zt",
|
||||
function()
|
||||
require("snacks").zen()
|
||||
end,
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>f/",
|
||||
function()
|
||||
require("snacks").picker.lines {
|
||||
layout = { preset = "dropdown" }
|
||||
}
|
||||
end,
|
||||
silent = true
|
||||
},
|
||||
{
|
||||
"<leader>fg",
|
||||
function()
|
||||
require("snacks").picker.grep()
|
||||
end,
|
||||
silent = true
|
||||
},
|
||||
{
|
||||
"<leader>ff",
|
||||
function()
|
||||
require("snacks").picker.files()
|
||||
end,
|
||||
silent = true
|
||||
},
|
||||
{
|
||||
"<leader>fb",
|
||||
function()
|
||||
require("snacks").picker.buffers()
|
||||
end,
|
||||
silent = true
|
||||
},
|
||||
{
|
||||
"<leader>fr",
|
||||
function()
|
||||
require("snacks").picker.resume()
|
||||
end,
|
||||
silent = true
|
||||
}
|
||||
},
|
||||
opts = {
|
||||
animate = { enabled = false },
|
||||
big_file = { enabled = true },
|
||||
image = { enabled = true },
|
||||
picker = {
|
||||
matcher = {
|
||||
frecency = true,
|
||||
},
|
||||
ui_select = true,
|
||||
},
|
||||
dashboard = {
|
||||
enabled = true,
|
||||
},
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 3000,
|
||||
},
|
||||
input = {
|
||||
enabled = true,
|
||||
expand = true,
|
||||
win = {
|
||||
style = "input"
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
only_scope = true,
|
||||
scope = {
|
||||
enabled = true
|
||||
},
|
||||
animate = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
explorer = {
|
||||
replace_netrw = true,
|
||||
},
|
||||
scratch = {
|
||||
ft = function()
|
||||
return "markdown"
|
||||
end
|
||||
},
|
||||
zen = {
|
||||
toggles = {
|
||||
dim = true,
|
||||
},
|
||||
show = {
|
||||
statusline = true,
|
||||
tabline = false
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
46
nvim/config/lua/plugins/todo-comments.lua
Normal file
46
nvim/config/lua/plugins/todo-comments.lua
Normal file
@ -0,0 +1,46 @@
|
||||
return {
|
||||
'folke/todo-comments.nvim',
|
||||
keys = {
|
||||
{
|
||||
"<leader>tt",
|
||||
function()
|
||||
require('snacks').picker.todo_comments()
|
||||
end
|
||||
}
|
||||
},
|
||||
opts = {
|
||||
signs = true,
|
||||
keywords = {
|
||||
BUG = {
|
||||
icon = " ",
|
||||
color = "error",
|
||||
},
|
||||
TODO = {
|
||||
icon = " ",
|
||||
color = "info"
|
||||
},
|
||||
HACK = {
|
||||
icon = " ",
|
||||
color = "warning"
|
||||
},
|
||||
WARN = {
|
||||
icon = " ",
|
||||
color = "warning",
|
||||
},
|
||||
PERF = {
|
||||
icon = " ",
|
||||
},
|
||||
NOTE = {
|
||||
icon = " ",
|
||||
color = "hint",
|
||||
alt = {
|
||||
"INFO"
|
||||
}
|
||||
},
|
||||
TEST = {
|
||||
icon = "⏲ ",
|
||||
color = "test",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
44
nvim/config/lua/plugins/tree-sitter.lua
Normal file
44
nvim/config/lua/plugins/tree-sitter.lua
Normal file
@ -0,0 +1,44 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function(plugin, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
modules = {},
|
||||
ignore_install = {},
|
||||
auto_install = false,
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"go",
|
||||
"asm",
|
||||
"cpp",
|
||||
"lua",
|
||||
"vim",
|
||||
"ini",
|
||||
"zig",
|
||||
"rust",
|
||||
"bash",
|
||||
"json",
|
||||
"make",
|
||||
"toml",
|
||||
"yaml",
|
||||
"cmake",
|
||||
"regex",
|
||||
"printf",
|
||||
"vimdoc",
|
||||
"markdown",
|
||||
"dockerfile",
|
||||
"markdown_inline",
|
||||
},
|
||||
sync_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
additional_vim_regex_highlighting = false
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
}
|
||||
}
|
||||
23
nvim/config/lua/plugins/yazi.lua
Normal file
23
nvim/config/lua/plugins/yazi.lua
Normal file
@ -0,0 +1,23 @@
|
||||
return {
|
||||
"mikavilpas/yazi.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{
|
||||
"<leader>yy",
|
||||
"<cmd>Yazi<cr>",
|
||||
desc = "Open yazi at the current file",
|
||||
},
|
||||
{
|
||||
-- Open in the current working directory
|
||||
"<leader>yc",
|
||||
"<cmd>Yazi cwd<cr>",
|
||||
desc = "Open the file manager in nvim's working directory",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
open_for_directories = false,
|
||||
keymaps = {
|
||||
show_help = '<f1>',
|
||||
},
|
||||
},
|
||||
}
|
||||
20
nvim/setup.sh
Executable file
20
nvim/setup.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed neovim xclip
|
||||
|
||||
if [ -d "$CONFIG/nvim" ]; then
|
||||
rm -fr $CONFIG/nvim
|
||||
fi
|
||||
|
||||
if [ -d $CONFIG/nvim ]; then
|
||||
rm $CONFIG/nvim
|
||||
fi
|
||||
|
||||
ln -f -s $DOTFILES/nvim/config $CONFIG/nvim
|
||||
27
setup.sh
Executable file
27
setup.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
|
||||
if [ ! -d "$DOTFILES" ]; then
|
||||
if [ ! -x "$(command -v git)" ]; then
|
||||
sudo pacman -Syu
|
||||
sudo pacman -S --needed git
|
||||
fi
|
||||
|
||||
git clone https://github.com/erick-alcachofa/dotfiles $DOTFILES
|
||||
fi
|
||||
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
. $DOTFILES/yay.sh
|
||||
. $DOTFILES/git/setup.sh
|
||||
|
||||
. $DOTFILES/zsh/setup.sh
|
||||
. $DOTFILES/tmux/setup.sh
|
||||
. $DOTFILES/nvim/setup.sh
|
||||
|
||||
. $DOTFILES/gui/setup.sh
|
||||
|
||||
|
||||
60
tmux/config/tmux.conf
Normal file
60
tmux/config/tmux.conf
Normal file
@ -0,0 +1,60 @@
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
|
||||
set -g @plugin 'erick-alcachofa/kanagawa.tmux'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
|
||||
|
||||
set -g @rose_pine_variant 'main'
|
||||
set -g @rose_pine_date_time ''
|
||||
|
||||
set -g @rose_pine_disable_active_window_menu 'on'
|
||||
set -g @rose_pine_status_left_prepend_section '#{tmux_mode_indicator}'
|
||||
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
||||
set -g allow-passthrough on
|
||||
|
||||
set -g status-position bottom
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
|
||||
set -sg escape-time 10
|
||||
set -g focus-events on
|
||||
|
||||
unbind C-b
|
||||
set-option -g prefix C-Space
|
||||
bind-key C-Space send-prefix
|
||||
|
||||
bind $ split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
unbind '"'
|
||||
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
set -s set-clipboard on
|
||||
set-option -g history-limit 100000
|
||||
|
||||
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
|
||||
|
||||
unbind -T copy-mode MouseDragEnd1Pane
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
|
||||
|
||||
set -g mouse on
|
||||
set -g mode-style "fg=#191724,bg=#ebbcba"
|
||||
51
tmux/config/tmuxinator/default.yml
Normal file
51
tmux/config/tmuxinator/default.yml
Normal file
@ -0,0 +1,51 @@
|
||||
# /home/alcachofa/.config/tmuxinator/default.yml
|
||||
|
||||
name: default
|
||||
root: <%= ENV["PWD"] %>
|
||||
|
||||
# Optional tmux socket
|
||||
# socket_name: foo
|
||||
|
||||
# Note that the pre and post options have been deprecated and will be replaced by
|
||||
# project hooks.
|
||||
|
||||
# Project hooks
|
||||
|
||||
# Runs on project start, always
|
||||
# on_project_start: command
|
||||
|
||||
# Run on project start, the first time
|
||||
# on_project_first_start: command
|
||||
|
||||
# Run on project start, after the first time
|
||||
# on_project_restart: command
|
||||
|
||||
# Run on project exit ( detaching from tmux session )
|
||||
# on_project_exit: command
|
||||
|
||||
# Run on project stop
|
||||
# on_project_stop: command
|
||||
|
||||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
||||
# pre_window: rbenv shell 2.0.0-p247
|
||||
|
||||
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
||||
# tmux_options: -f ~/.tmux.mac.conf
|
||||
|
||||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
|
||||
# tmux_command: byobu
|
||||
|
||||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
|
||||
startup_window: editor
|
||||
|
||||
# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used.
|
||||
# startup_pane: 1
|
||||
|
||||
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
||||
# attach: false
|
||||
|
||||
windows:
|
||||
- editor:
|
||||
panes:
|
||||
- nvim
|
||||
- shell:
|
||||
21
tmux/setup.sh
Executable file
21
tmux/setup.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -Syu
|
||||
|
||||
yay -S --needed tmux tmuxinator
|
||||
|
||||
if [ -d "$CONFIG/tmux" ]; then
|
||||
rm -fr $CONFIG/tmux
|
||||
fi
|
||||
|
||||
mkdir -p $CONFIG/tmux/plugins
|
||||
|
||||
git clone https://github.com/tmux-plugins/tpm $CONFIG/tmux/plugins/tpm
|
||||
|
||||
ln -f -s $DOTFILES/tmux/config/tmux.conf $CONFIG/tmux/tmux.conf
|
||||
ln -f -s $DOTFILES/tmux/config/tmuxinator $CONFIG/tmuxinator
|
||||
13
yay.sh
Executable file
13
yay.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo pacman -Syu
|
||||
|
||||
sudo pacman -S --needed git base-devel
|
||||
|
||||
mkdir -p ~/dev/opt
|
||||
|
||||
git clone https://aur.archlinux.org/yay.git ~/dev/opt/yay
|
||||
|
||||
cd ~/dev/opt/yay
|
||||
|
||||
makepkg -si
|
||||
245
zsh/config/dircolors
Normal file
245
zsh/config/dircolors
Normal file
@ -0,0 +1,245 @@
|
||||
COLOR tty
|
||||
|
||||
TERM ansi
|
||||
TERM *color*
|
||||
TERM con[0-9]*x[0-9]*
|
||||
TERM cons25
|
||||
TERM console
|
||||
TERM cygwin
|
||||
TERM dtterm
|
||||
TERM dvtm
|
||||
TERM dvtm-256color
|
||||
TERM Eterm
|
||||
TERM eterm-color
|
||||
TERM fbterm
|
||||
TERM gnome
|
||||
TERM gnome-256color
|
||||
TERM hurd
|
||||
TERM jfbterm
|
||||
TERM konsole
|
||||
TERM konsole-256color
|
||||
TERM kterm
|
||||
TERM linux
|
||||
TERM linux-c
|
||||
TERM mlterm
|
||||
TERM putty
|
||||
TERM putty-256color
|
||||
TERM rxvt*
|
||||
TERM rxvt-unicode
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-unicode256
|
||||
TERM screen*
|
||||
TERM screen-256color
|
||||
TERM st
|
||||
TERM st-256color
|
||||
TERM terminator
|
||||
TERM tmux*
|
||||
TERM tmux-256color
|
||||
TERM vt100
|
||||
TERM xterm*
|
||||
TERM xterm-color
|
||||
TERM xterm-88color
|
||||
TERM xterm-256color
|
||||
|
||||
#+-----------------+
|
||||
#+ Global Defaults +
|
||||
#+-----------------+
|
||||
NORMAL 00
|
||||
RESET 0
|
||||
|
||||
FILE 00
|
||||
DIR 01;34
|
||||
LINK 36
|
||||
MULTIHARDLINK 04;36
|
||||
|
||||
FIFO 04;01;36
|
||||
SOCK 04;33
|
||||
DOOR 04;01;36
|
||||
BLK 01;33
|
||||
CHR 33
|
||||
|
||||
ORPHAN 31
|
||||
MISSING 01;37;41
|
||||
|
||||
EXEC 01;36
|
||||
|
||||
SETUID 01;04;37
|
||||
SETGID 01;04;37
|
||||
CAPABILITY 01;37
|
||||
|
||||
STICKY_OTHER_WRITABLE 01;37;44
|
||||
OTHER_WRITABLE 01;04;34
|
||||
STICKY 04;37;44
|
||||
|
||||
#+-------------------+
|
||||
#+ Extension Pattern +
|
||||
#+-------------------+
|
||||
#+--- Archives ---+
|
||||
.7z 01;32
|
||||
.ace 01;32
|
||||
.alz 01;32
|
||||
.arc 01;32
|
||||
.arj 01;32
|
||||
.bz 01;32
|
||||
.bz2 01;32
|
||||
.cab 01;32
|
||||
.cpio 01;32
|
||||
.deb 01;32
|
||||
.dz 01;32
|
||||
.ear 01;32
|
||||
.gz 01;32
|
||||
.jar 01;32
|
||||
.lha 01;32
|
||||
.lrz 01;32
|
||||
.lz 01;32
|
||||
.lz4 01;32
|
||||
.lzh 01;32
|
||||
.lzma 01;32
|
||||
.lzo 01;32
|
||||
.rar 01;32
|
||||
.rpm 01;32
|
||||
.rz 01;32
|
||||
.sar 01;32
|
||||
.t7z 01;32
|
||||
.tar 01;32
|
||||
.taz 01;32
|
||||
.tbz 01;32
|
||||
.tbz2 01;32
|
||||
.tgz 01;32
|
||||
.tlz 01;32
|
||||
.txz 01;32
|
||||
.tz 01;32
|
||||
.tzo 01;32
|
||||
.tzst 01;32
|
||||
.war 01;32
|
||||
.xz 01;32
|
||||
.z 01;32
|
||||
.Z 01;32
|
||||
.zip 01;32
|
||||
.zoo 01;32
|
||||
.zst 01;32
|
||||
|
||||
#+--- Audio ---+
|
||||
.aac 32
|
||||
.au 32
|
||||
.flac 32
|
||||
.m4a 32
|
||||
.mid 32
|
||||
.midi 32
|
||||
.mka 32
|
||||
.mp3 32
|
||||
.mpa 32
|
||||
.mpeg 32
|
||||
.mpg 32
|
||||
.ogg 32
|
||||
.opus 32
|
||||
.ra 32
|
||||
.wav 32
|
||||
|
||||
#+--- Customs ---+
|
||||
.3des 01;35
|
||||
.aes 01;35
|
||||
.gpg 01;35
|
||||
.pgp 01;35
|
||||
|
||||
#+--- Documents ---+
|
||||
.doc 32
|
||||
.docx 32
|
||||
.dot 32
|
||||
.odg 32
|
||||
.odp 32
|
||||
.ods 32
|
||||
.odt 32
|
||||
.otg 32
|
||||
.otp 32
|
||||
.ots 32
|
||||
.ott 32
|
||||
.pdf 32
|
||||
.ppt 32
|
||||
.pptx 32
|
||||
.xls 32
|
||||
.xlsx 32
|
||||
|
||||
#+--- Executables ---+
|
||||
.app 01;36
|
||||
.bat 01;36
|
||||
.btm 01;36
|
||||
.cmd 01;36
|
||||
.com 01;36
|
||||
.exe 01;36
|
||||
.reg 01;36
|
||||
|
||||
#+--- Ignores ---+
|
||||
*~ 02;37
|
||||
.bak 02;37
|
||||
.BAK 02;37
|
||||
.log 02;37
|
||||
.log 02;37
|
||||
.old 02;37
|
||||
.OLD 02;37
|
||||
.orig 02;37
|
||||
.ORIG 02;37
|
||||
.swo 02;37
|
||||
.swp 02;37
|
||||
|
||||
#+--- Images ---+
|
||||
.bmp 32
|
||||
.cgm 32
|
||||
.dl 32
|
||||
.dvi 32
|
||||
.emf 32
|
||||
.eps 32
|
||||
.gif 32
|
||||
.jpeg 32
|
||||
.jpg 32
|
||||
.JPG 32
|
||||
.mng 32
|
||||
.pbm 32
|
||||
.pcx 32
|
||||
.pgm 32
|
||||
.png 32
|
||||
.PNG 32
|
||||
.ppm 32
|
||||
.pps 32
|
||||
.ppsx 32
|
||||
.ps 32
|
||||
.svg 32
|
||||
.svgz 32
|
||||
.tga 32
|
||||
.tif 32
|
||||
.tiff 32
|
||||
.xbm 32
|
||||
.xcf 32
|
||||
.xpm 32
|
||||
.xwd 32
|
||||
.xwd 32
|
||||
.yuv 32
|
||||
|
||||
#+--- Video ---+
|
||||
.anx 32
|
||||
.asf 32
|
||||
.avi 32
|
||||
.axv 32
|
||||
.flc 32
|
||||
.fli 32
|
||||
.flv 32
|
||||
.gl 32
|
||||
.m2v 32
|
||||
.m4v 32
|
||||
.mkv 32
|
||||
.mov 32
|
||||
.MOV 32
|
||||
.mp4 32
|
||||
.mpeg 32
|
||||
.mpg 32
|
||||
.nuv 32
|
||||
.ogm 32
|
||||
.ogv 32
|
||||
.ogx 32
|
||||
.qt 32
|
||||
.rm 32
|
||||
.rmvb 32
|
||||
.swf 32
|
||||
.vob 32
|
||||
.webm 32
|
||||
.wmv 32
|
||||
70
zsh/config/fastfetch/config.jsonc
Normal file
70
zsh/config/fastfetch/config.jsonc
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "none"
|
||||
},
|
||||
"display": {
|
||||
"disableLinewrap": true,
|
||||
"separator": " "
|
||||
},
|
||||
"modules": [
|
||||
"break",
|
||||
{
|
||||
"type": "colors",
|
||||
"paddingLeft": 2,
|
||||
"symbol": "circle"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"key": " OS ",
|
||||
"keyColor": "red",
|
||||
"type": "os"
|
||||
},
|
||||
{
|
||||
"key": " Machine ",
|
||||
"keyColor": "green",
|
||||
"type": "host"
|
||||
},
|
||||
{
|
||||
"key": " Kernel ",
|
||||
"keyColor": "magenta",
|
||||
"type": "kernel"
|
||||
},
|
||||
{
|
||||
"key": " WM ",
|
||||
"keyColor": "blue",
|
||||
"type": "wm"
|
||||
},
|
||||
{
|
||||
"key": " Shell ",
|
||||
"keyColor": "cyan",
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"key": " Terminal ",
|
||||
"keyColor": "red",
|
||||
"type": "terminal"
|
||||
},
|
||||
{
|
||||
"key": " CPU ",
|
||||
"keyColor": "yellow",
|
||||
"type": "cpu"
|
||||
},
|
||||
{
|
||||
"key": " GPU ",
|
||||
"keyColor": "blue",
|
||||
"type": "gpu"
|
||||
},
|
||||
{
|
||||
"key": " Memory ",
|
||||
"keyColor": "magenta",
|
||||
"type": "memory"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "colors",
|
||||
"paddingLeft": 2,
|
||||
"symbol": "circle"
|
||||
}
|
||||
]
|
||||
}
|
||||
0
zsh/config/profile
Normal file
0
zsh/config/profile
Normal file
9
zsh/config/ripgreprc
Normal file
9
zsh/config/ripgreprc
Normal file
@ -0,0 +1,9 @@
|
||||
# Using glob patterns to include/exclude files or folders
|
||||
--glob=!git/*
|
||||
|
||||
# Only check case if a capital letter is explicitly typed
|
||||
--smart-case
|
||||
|
||||
# Follow through hidden files/dirs
|
||||
--follow
|
||||
--no-messages
|
||||
216
zsh/config/starship/starship.toml
Normal file
216
zsh/config/starship/starship.toml
Normal file
@ -0,0 +1,216 @@
|
||||
format = """
|
||||
$os\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_commit\
|
||||
$git_state\
|
||||
$git_metrics\
|
||||
$git_status\
|
||||
$docker_context\
|
||||
$package\
|
||||
$nix_shell\
|
||||
$env_var\
|
||||
$sudo\
|
||||
$cmd_duration\
|
||||
$python\
|
||||
$line_break\
|
||||
$jobs\
|
||||
$status\
|
||||
$direnv\
|
||||
$container\
|
||||
$username\
|
||||
$character"""
|
||||
|
||||
add_newline = false
|
||||
continuation_prompt = ' '
|
||||
|
||||
[direnv]
|
||||
disabled = false
|
||||
format = '[$loaded]($style)'
|
||||
loaded_msg = ' '
|
||||
unloaded_msg = ''
|
||||
style = 'bold green'
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
format = '[$user]($style) '
|
||||
aliases = { "artichoke" = "$", "root" = "#" }
|
||||
|
||||
[hostname]
|
||||
ssh_only = true
|
||||
format = '[@$hostname]($style) '
|
||||
ssh_symbol = ''
|
||||
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[buf]
|
||||
symbol = " "
|
||||
|
||||
[c]
|
||||
format = 'via [$symbol($name $version)]($style)'
|
||||
symbol = " "
|
||||
detect_files = ['CMakeLists.txt', 'compile_commands.json']
|
||||
commands = [ [ 'cc', '--version' ] ]
|
||||
|
||||
[cmake]
|
||||
disabled = true
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[crystal]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
fish_style_pwd_dir_length = 1
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[fennel]
|
||||
symbol = " "
|
||||
|
||||
[fossil_branch]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[guix_shell]
|
||||
symbol = " "
|
||||
|
||||
[gradle]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[haxe]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[kotlin]
|
||||
symbol = " "
|
||||
|
||||
[lua]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[ocaml]
|
||||
symbol = " "
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[pijul_channel]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
detect_extensions = []
|
||||
pyenv_version_name = true
|
||||
|
||||
[rlang]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = " "
|
||||
|
||||
[zig]
|
||||
symbol = " "
|
||||
15
zsh/config/user-dirs.dirs
Normal file
15
zsh/config/user-dirs.dirs
Normal file
@ -0,0 +1,15 @@
|
||||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run.
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
XDG_DESKTOP_DIR="$HOME/desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/public"
|
||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||
XDG_MUSIC_DIR="$HOME/media/audios"
|
||||
XDG_PICTURES_DIR="$HOME/media/pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/media/videos"
|
||||
1
zsh/config/yazi/init.lua
Normal file
1
zsh/config/yazi/init.lua
Normal file
@ -0,0 +1 @@
|
||||
require("starship"):setup()
|
||||
54
zsh/config/zshenv
Normal file
54
zsh/config/zshenv
Normal file
@ -0,0 +1,54 @@
|
||||
function prepend_path() {
|
||||
case ":$PATH:" in
|
||||
*:"$1":*)
|
||||
;;
|
||||
*)
|
||||
export PATH="$1${PATH:+:${PATH}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
# Spicetify
|
||||
if [ -d "$HOME/.spicetify" ]; then
|
||||
prepend_path "$HOME/.spicetify"
|
||||
fi
|
||||
|
||||
# Personal binaries
|
||||
if [ -f "$ARTI_HOME/env.sh" ]; then
|
||||
source "$ARTI_HOME/env.sh"
|
||||
fi
|
||||
|
||||
if [ -f "$CONFIG/cpp_env" ]; then
|
||||
source "$CONFIG/cpp_env"
|
||||
fi
|
||||
|
||||
export FZF_ALT_C_COMMAND=''
|
||||
export FZF_CTRL_T_COMMAND=''
|
||||
export FZF_DEFAULT_COMMAND='rg --files'
|
||||
|
||||
export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"
|
||||
|
||||
export TERMINAL='xterm-256color'
|
||||
export COLORTERM=truecolor
|
||||
|
||||
export STARSHIP_LOG='error'
|
||||
|
||||
export DIRENV_LOG_FORMAT=
|
||||
|
||||
export QT_QPA_PLATFORMTHEME='qt5ct'
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
export EDITOR='nvim'
|
||||
export VISUAL='nvim'
|
||||
|
||||
export PAGER='less'
|
||||
export MANPAGER='nvim +Man!'
|
||||
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
export CPM_SOURCE_CACHE=$HOME/dev/.cpm-cache
|
||||
285
zsh/config/zshrc
Normal file
285
zsh/config/zshrc
Normal file
@ -0,0 +1,285 @@
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
prepend_path "$HOME/.local/bin"
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/.cargo/bin" ]; then
|
||||
prepend_path "$HOME/.cargo/bin"
|
||||
fi
|
||||
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||
|
||||
if [ ! -d "$ZINIT_HOME" ]; then
|
||||
mkdir -p "$(dirname $ZINIT_HOME)"
|
||||
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||
fi
|
||||
|
||||
source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
zinit light zsh-users/zsh-completions
|
||||
zinit light chisui/zsh-nix-shell
|
||||
zinit light Aloxaf/fzf-tab
|
||||
|
||||
zinit snippet OMZP::git
|
||||
|
||||
bindkey -v
|
||||
|
||||
autoload -z edit-command-line
|
||||
autoload -U up-line-or-beginning-search
|
||||
autoload -U down-line-or-beginning-search
|
||||
|
||||
zle -N edit-command-line
|
||||
zle -N up-line-or-beginning-search
|
||||
zle -N down-line-or-beginning-search
|
||||
|
||||
bindkey "^[[A" up-line-or-beginning-search
|
||||
if [[ -n "${terminfo[kcuu1]}" ]]; then
|
||||
bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
fi
|
||||
|
||||
bindkey "^[[B" down-line-or-beginning-search
|
||||
if [[ -n "${terminfo[kcud1]}" ]]; then
|
||||
bindkey "${terminfo[kcud1]}" down-line-or-beginning-search
|
||||
fi
|
||||
|
||||
bindkey -M viins '^[[1;3C' forward-word
|
||||
bindkey -M viins '^[[1;3D' backward-word
|
||||
|
||||
bindkey -M viins '^[e' edit-command-line
|
||||
bindkey -M vicmd '^[e' edit-command-line
|
||||
|
||||
bindkey -M viins '^[^?' backward-delete-word
|
||||
|
||||
export HISTSIZE=99999
|
||||
export HISTFILE=~/.zsh_history
|
||||
export SAVEHIST=$HISTSIZE
|
||||
export HISTDUP=erase
|
||||
|
||||
setopt appendhistory
|
||||
setopt sharehistory
|
||||
setopt hist_ignore_space
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_find_no_dups
|
||||
|
||||
test -r ~/.dircolors && eval $(dircolors ~/.dircolors)
|
||||
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd --color=always --icon=always $realpath'
|
||||
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'lsd --color=always --icon=always $realpath'
|
||||
zstyle ':fzf-tab:complete:systemctl-*:*' fzf-preview 'SYSTEMD_COLORS=1 systemctl status $word'
|
||||
|
||||
function files() {
|
||||
thunar $@ &>/dev/null & disown
|
||||
}
|
||||
|
||||
function onbg() {
|
||||
$@ &>/dev/null & disown
|
||||
}
|
||||
|
||||
function openbg() {
|
||||
xdg-open $@ &>/dev/null & disown
|
||||
}
|
||||
|
||||
function open() {
|
||||
devour xdg-open $@
|
||||
}
|
||||
|
||||
function yy() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
|
||||
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
|
||||
local cwd="$(cat -- "$tmp")"
|
||||
|
||||
if [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
cd "$cwd"
|
||||
fi
|
||||
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
|
||||
function realpath() {
|
||||
local reqp="$1"
|
||||
/usr/bin/realpath -m -L "$(eval "echo $reqp")"
|
||||
}
|
||||
|
||||
function smrt_pd() {
|
||||
local reqp=$(realpath $1)
|
||||
|
||||
while IFS= read -r entry; do
|
||||
local entryp=$(realpath `echo "$entry" | cut -f2`)
|
||||
local entryn=$(echo "$entry" | cut -f1)
|
||||
|
||||
if [[ "$entryp" = "$reqp" ]]; then
|
||||
pd +$entryn
|
||||
return 0
|
||||
fi
|
||||
done < <(dirs -p -v -l)
|
||||
|
||||
pd $reqp
|
||||
}
|
||||
|
||||
function errcho() {
|
||||
>&2 echo "$@"
|
||||
}
|
||||
|
||||
function zmatch() {
|
||||
local dir="$@[-1]"
|
||||
local matches="$(zoxide query $@)"
|
||||
|
||||
if [[ -z "$matches" ]]; then
|
||||
errcho "Not found: $dir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$matches"
|
||||
return 0
|
||||
}
|
||||
|
||||
function zpd() {
|
||||
local dir="$@"
|
||||
|
||||
if [[ -z "$dir" ]]; then
|
||||
local matches="$(zmatch -i $dir 2>/dev/null)"
|
||||
|
||||
if [[ -z "$matches" ]]; then
|
||||
errcho "Not found: $dir"
|
||||
return 0
|
||||
fi
|
||||
|
||||
smrt_pd "$matches"
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
case "$dir" in
|
||||
-)
|
||||
zpd "$OLDPWD"
|
||||
;;
|
||||
/*|~*)
|
||||
smrt_pd "$dir"
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
if [[ -d "$dir" ]]; then
|
||||
smrt_pd "$dir"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local matches="$(zmatch -l $dir 2>/dev/null)"
|
||||
|
||||
if [[ -z "$matches" ]]; then
|
||||
errcho "Not found: $dir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ $(echo "$matches" | wc -l) -eq 1 ]]; then
|
||||
smrt_pd "$matches"
|
||||
return 0;
|
||||
fi
|
||||
|
||||
matches="$(zmatch -i $dir 2>/dev/null)"
|
||||
|
||||
if [[ -z "$matches" ]]; then
|
||||
errcho "Not found: $dir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
smrt_pd "$matches"
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function pd() {
|
||||
pushd "$@" &>/dev/null && dirs -p -v
|
||||
}
|
||||
|
||||
function ppd() {
|
||||
popd "$@" &>/dev/null && dirs -p -v
|
||||
}
|
||||
|
||||
function pkill() {
|
||||
kill "$@" `psf`
|
||||
}
|
||||
|
||||
function cd() {
|
||||
local reqp
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
reqp=$HOME
|
||||
else
|
||||
reqp=$(realpath $1)
|
||||
fi
|
||||
|
||||
while IFS= read -r entry; do
|
||||
local entryp=$(realpath `echo "$entry" | cut -f2`)
|
||||
local entryn=$(echo "$entry" | cut -f1)
|
||||
|
||||
if [[ "$entryp" = "$reqp" ]]; then
|
||||
ppd &>/dev/null
|
||||
pd +$(($entryn - 1))
|
||||
return 0
|
||||
fi
|
||||
done < <(dirs -p -v -l | tail -n +2)
|
||||
|
||||
builtin cd $1 && dirs -p -v
|
||||
}
|
||||
|
||||
function rwhich() {
|
||||
readlink -f `which "$@"`
|
||||
}
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
|
||||
alias z='cd'
|
||||
|
||||
alias ds='dirs -p -v'
|
||||
|
||||
alias l='lsd -Al'
|
||||
alias ls='lsd'
|
||||
|
||||
alias tree='lsd --tree'
|
||||
|
||||
alias df='duf'
|
||||
alias du='dust'
|
||||
|
||||
alias psf="ps -ef | fzf | awk '{ print \$2 }'"
|
||||
|
||||
alias cat='bat -p -P'
|
||||
alias clip='xclip -sel clip'
|
||||
|
||||
alias mv='mv -i'
|
||||
alias rm='rip'
|
||||
|
||||
alias smux='tmuxinator start'
|
||||
alias mux='tmuxinator'
|
||||
|
||||
alias su='sudo \su -'
|
||||
|
||||
alias dsmux='tmuxinator start default -n `basename $PWD`'
|
||||
|
||||
alias dot="dot -Gmargin=0.2 -Gbgcolor=#00000000 -Gcolor=#e0def4ff -Gfontcolor=#e0def4ff -Ncolor=#e0def4ff -Nfontcolor=#e0def4ff -Ecolor=#e0def4ff -T png"
|
||||
alias plant="java -jar ~/.local/share/plantuml.jar"
|
||||
|
||||
alias idot="\\dot -Gmargin=0.2 -Gbgcolor=#00000000 -Gcolor=#e0def4ff -Gfontcolor=#e0def4ff -Ncolor=#e0def4ff -Nfontcolor=#e0def4ff -Ecolor=#e0def4ff -T png | wezterm imgcat"
|
||||
alias iplant="java -jar ~/.local/share/plantuml.jar -p | wezterm imgcat"
|
||||
|
||||
alias icat="wezterm imgcat"
|
||||
|
||||
WORDCHARS=''
|
||||
|
||||
autoload -Uz compinit && compinit
|
||||
zinit cdreplay -q
|
||||
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
eval "$(zoxide init zsh --cmd zxd)"
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
fastfetch
|
||||
62
zsh/setup.sh
Executable file
62
zsh/setup.sh
Executable file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DOTFILES" ]; then
|
||||
export DOTFILES=$HOME/dotfiles
|
||||
source $DOTFILES/env.sh
|
||||
fi
|
||||
|
||||
yay -S --needed \
|
||||
fd \
|
||||
fzf \
|
||||
bat \
|
||||
git \
|
||||
lsd \
|
||||
sed \
|
||||
tar \
|
||||
zsh \
|
||||
grep \
|
||||
wget \
|
||||
yazi \
|
||||
which \
|
||||
unzip \
|
||||
rsync \
|
||||
zoxide \
|
||||
direnv \
|
||||
ripgrep \
|
||||
gettext \
|
||||
starship \
|
||||
readline \
|
||||
fastfetch \
|
||||
findutils \
|
||||
pulsemixer
|
||||
|
||||
chsh -s $(which zsh)
|
||||
|
||||
mkdir -p "$(bat --config-dir)/themes"
|
||||
|
||||
pushd "$(bat --config-dir)/themes"
|
||||
|
||||
curl --remote-name-all https://raw.githubusercontent.com/rose-pine/tm-theme/main/dist/themes/rose-pine{,-dawn,-moon}.tmTheme
|
||||
|
||||
bat cache --build
|
||||
|
||||
echo '--theme="rose-pine"' >> "$(bat --config-file)"
|
||||
|
||||
popd
|
||||
|
||||
ln -f -s $DOTFILES/zsh/config/zshrc ~/.zshrc
|
||||
ln -f -s $DOTFILES/zsh/config/profile ~/.profile
|
||||
ln -f -s $DOTFILES/zsh/config/zshenv ~/.zshenv
|
||||
ln -f -s $DOTFILES/zsh/config/dircolors ~/.dircolors
|
||||
|
||||
ln -f -s $DOTFILES/zsh/config/starship/starship.toml $CONFIG/starship.toml
|
||||
|
||||
mkdir -p $CONFIG/yazi
|
||||
ln -f -s $DOTFILES/zsh/config/yazi/theme.toml $CONFIG/yazi/theme.toml
|
||||
ln -f -s $DOTFILES/zsh/config/yazi/keymaps.toml $CONFIG/yazi/keymaps.toml
|
||||
|
||||
mkdir -p $CONFIG/fastfetch
|
||||
ln -f -s $DOTFILES/zsh/config/fastfetch/config.jsonc $CONFIG/fastfetch/config.jsonc
|
||||
|
||||
mkdir -p $HOME/{desktop,downloads,templates,public,documents,media/audios,media/pictures,media/videos}
|
||||
ln -f -s $DOTFILES/zsh/config/user-dirs.dirs $CONFIG/user-dirs.dirs
|
||||
Loading…
x
Reference in New Issue
Block a user