migrate in nvim, update bootstrap
This commit is contained in:
parent
bc09802f38
commit
3463f6c4df
16 changed files with 538 additions and 234 deletions
39
bootstrap.sh
Executable file
39
bootstrap.sh
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# install packages
|
||||||
|
sudo apt install \
|
||||||
|
fd-find \
|
||||||
|
fontconfig \
|
||||||
|
python3-neovim \
|
||||||
|
python3-pynvim \
|
||||||
|
ripgrep \
|
||||||
|
curl \
|
||||||
|
firefox \
|
||||||
|
golang-1.22 \
|
||||||
|
gpg \
|
||||||
|
imv \
|
||||||
|
inxi \
|
||||||
|
kitty \
|
||||||
|
neovim \
|
||||||
|
pipewire-alsa \
|
||||||
|
pipewire-audio \
|
||||||
|
pipewire-pulse sudo \
|
||||||
|
sway \
|
||||||
|
swaylock \
|
||||||
|
tmux \
|
||||||
|
wireplumber
|
||||||
|
|
||||||
|
# set up nerd fonts
|
||||||
|
FONT_DIR=${HOME}/.local/share/fonts/
|
||||||
|
mkdir -p ${FONT_DIR}
|
||||||
|
wget -qO- https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/DejaVuSansMono.tar.xz | tar -Jxv -C ${FONT_DIR}
|
||||||
|
fc-cache -fv
|
||||||
|
|
||||||
|
# install lazygit
|
||||||
|
go install github.com/jesseduffield/lazygit@latest
|
||||||
|
|
||||||
|
# setup moolticute
|
||||||
|
echo 'deb http://download.opensuse.org/repositories/home:/fawz:/mooltipass/Debian_Testing/ /' | sudo tee /etc/apt/sources.list.d/home:fawz:mooltipass.list
|
||||||
|
curl -fsSL https://download.opensuse.org/repositories/home:fawz:mooltipass/Debian_Testing/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_fawz_mooltipass.gpg >/dev/null
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install moolticute
|
181
config/i3/config
181
config/i3/config
|
@ -1,181 +0,0 @@
|
||||||
### ASARA'S i3 CONFIG ###
|
|
||||||
|
|
||||||
# Set mod to alt (Search is meta/win on the Pixel)
|
|
||||||
set $mod Mod1
|
|
||||||
|
|
||||||
# Set customized workspace names
|
|
||||||
set $ws1 1: Terminals
|
|
||||||
set $ws2 2: Browser
|
|
||||||
set $ws3 3: Programming
|
|
||||||
set $ws4 4: Remote
|
|
||||||
set $ws5 5: Misc
|
|
||||||
set $ws6 6: Trash
|
|
||||||
set $ws7 7: Email
|
|
||||||
set $ws8 8: Music
|
|
||||||
set $ws9 9: Chat
|
|
||||||
set $ws10 10: Compile
|
|
||||||
|
|
||||||
# workspace back and forth
|
|
||||||
workspace_auto_back_and_forth yes
|
|
||||||
|
|
||||||
# font for window titles. ISO 10646 = Unicode
|
|
||||||
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
|
||||||
|
|
||||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
|
||||||
floating_modifier $mod
|
|
||||||
|
|
||||||
# start a terminal
|
|
||||||
bindsym $mod+Return exec urxvt
|
|
||||||
|
|
||||||
# kill focused window
|
|
||||||
bindsym $mod+Shift+Q kill
|
|
||||||
|
|
||||||
# start dmenu (a program launcher)
|
|
||||||
bindsym $mod+p exec dmenu_run
|
|
||||||
|
|
||||||
# start firefox
|
|
||||||
bindsym $mod+Shift+f exec firefox || iceweasel
|
|
||||||
|
|
||||||
# start thunderbird
|
|
||||||
bindsym $mod+Shift+t exec thunderbird
|
|
||||||
|
|
||||||
# start cmus
|
|
||||||
bindsym $mod+m exec music
|
|
||||||
|
|
||||||
# change focus
|
|
||||||
bindsym $mod+j focus left
|
|
||||||
bindsym $mod+k focus down
|
|
||||||
bindsym $mod+l focus up
|
|
||||||
bindsym $mod+semicolon focus right
|
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
bindsym $mod+Left focus left
|
|
||||||
bindsym $mod+Down focus down
|
|
||||||
bindsym $mod+Up focus up
|
|
||||||
bindsym $mod+Right focus right
|
|
||||||
|
|
||||||
# move focused window
|
|
||||||
bindsym $mod+Shift+J move left
|
|
||||||
bindsym $mod+Shift+K move down
|
|
||||||
bindsym $mod+Shift+L move up
|
|
||||||
bindsym $mod+Shift+colon move right
|
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
|
|
||||||
# split in horizontal orientation
|
|
||||||
bindsym $mod+h split h
|
|
||||||
|
|
||||||
# split in vertical orientation
|
|
||||||
bindsym $mod+v split v
|
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
|
||||||
bindsym $mod+f fullscreen
|
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, default)
|
|
||||||
bindsym $mod+s layout stacking
|
|
||||||
bindsym $mod+w layout tabbed
|
|
||||||
bindsym $mod+e layout default
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
|
|
||||||
# change focus between tiling / floating windows
|
|
||||||
bindsym $mod+space focus mode_toggle
|
|
||||||
|
|
||||||
# focus the parent container
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
|
|
||||||
# focus the child container
|
|
||||||
#bindcode $mod+d focus child
|
|
||||||
|
|
||||||
# switch to workspace
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
# move focused container to workspace
|
|
||||||
bindsym $mod+Shift+exclam move container to workspace $ws1
|
|
||||||
bindsym $mod+Shift+at move container to workspace $ws2
|
|
||||||
bindsym $mod+Shift+numbersign move container to workspace $ws3
|
|
||||||
bindsym $mod+Shift+dollar move container to workspace $ws4
|
|
||||||
bindsym $mod+Shift+percent move container to workspace $ws5
|
|
||||||
bindsym $mod+Shift+asciicircum move container to workspace $ws6
|
|
||||||
bindsym $mod+Shift+ampersand move container to workspace $ws7
|
|
||||||
bindsym $mod+Shift+asterisk move container to workspace $ws8
|
|
||||||
bindsym $mod+Shift+parenleft move container to workspace $ws9
|
|
||||||
bindsym $mod+Shift+parenright move container to workspace $ws10
|
|
||||||
|
|
||||||
# reload the configuration file
|
|
||||||
bindsym $mod+Shift+C reload
|
|
||||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
||||||
bindsym $mod+Shift+R restart
|
|
||||||
# exit i3 (logs you out of your X session)
|
|
||||||
bindsym $mod+Shift+E exit
|
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
|
||||||
mode "resize" {
|
|
||||||
# These bindings trigger as soon as you enter the resize mode
|
|
||||||
|
|
||||||
# Pressing left will shrink the window’s width.
|
|
||||||
# Pressing right will grow the window’s width.
|
|
||||||
# Pressing up will shrink the window’s height.
|
|
||||||
# Pressing down will grow the window’s height.
|
|
||||||
bindsym h resize shrink width 10 px or 10 ppt
|
|
||||||
bindsym k resize grow height 10 px or 10 ppt
|
|
||||||
bindsym j resize shrink height 10 px or 10 ppt
|
|
||||||
bindsym l resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
# same bindings, but for the arrow keys
|
|
||||||
bindsym 113 resize shrink width 10 px or 10 ppt
|
|
||||||
bindsym 116 resize grow height 10 px or 10 ppt
|
|
||||||
bindsym 111 resize shrink height 10 px or 10 ppt
|
|
||||||
bindsym 114 resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
|
||||||
# finds out, if available)
|
|
||||||
bar {
|
|
||||||
status_command i3status -c /home/asara/.config/i3/i3status.conf
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# F key commands
|
|
||||||
# Lock
|
|
||||||
bindsym $mod+F5 exec i3lock -n -c 000000 -i /tmp/wallpaper
|
|
||||||
|
|
||||||
bindsym $mod+F6 exec xbacklight -dec 5
|
|
||||||
bindsym $mod+F7 exec xbacklight -inc 2
|
|
||||||
bindsym $mod+F8 exec amixer -c 0 set "HP/Speaker Auto Detect" toggle
|
|
||||||
bindsym $mod+F9 exec amixer -c 0 set PCM 5-
|
|
||||||
bindsym $mod+F10 exec amixer -c 0 set PCM 5+
|
|
||||||
|
|
||||||
# Application Workspace assignment
|
|
||||||
|
|
||||||
assign [class="Firefox"] $ws2
|
|
||||||
assign [class="Iceweasel"] $ws2
|
|
||||||
assign [title="ssh"] $ws4
|
|
||||||
assign [class="Thunderbird"] $ws7
|
|
||||||
assign [title="music"] $ws8
|
|
||||||
assign [class="Pidgin"] $ws9
|
|
||||||
|
|
||||||
# Load
|
|
||||||
exec xbacklight -set 20
|
|
||||||
exec redshift
|
|
|
@ -1,32 +0,0 @@
|
||||||
general {
|
|
||||||
output_format = "i3bar"
|
|
||||||
colors = true
|
|
||||||
interval = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
order += "volume master"
|
|
||||||
order += "battery 0"
|
|
||||||
order += "load"
|
|
||||||
order += "time"
|
|
||||||
|
|
||||||
time {
|
|
||||||
format = "%m/%d/%Y %H:%M:%S"
|
|
||||||
}
|
|
||||||
|
|
||||||
load {
|
|
||||||
format = "%1min %5min %15min"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
battery 0 {
|
|
||||||
format = "%percentage"
|
|
||||||
path = "/sys/class/power_supply/BAT%d/uevent"
|
|
||||||
low_threshold = 10
|
|
||||||
}
|
|
||||||
|
|
||||||
volume master {
|
|
||||||
format = "♪: %volume"
|
|
||||||
device = "default"
|
|
||||||
mixer = "PCM"
|
|
||||||
mixer_idx = 0
|
|
||||||
}
|
|
15
config/nvim/.neoconf.json
Normal file
15
config/nvim/.neoconf.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
201
config/nvim/LICENSE
Normal file
201
config/nvim/LICENSE
Normal file
|
@ -0,0 +1,201 @@
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
31
config/nvim/README.org
Normal file
31
config/nvim/README.org
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#+#+TITLE: my nvim config readme
|
||||||
|
#+AUTHOR: Asara <amarpreet@minhas.io>
|
||||||
|
#+DATE: 2023-07-28
|
||||||
|
* Prerequisites
|
||||||
|
Installation of this requires compiling/downloading neovim v0.8.3+. Currently tested on v0.9.1
|
||||||
|
|
||||||
|
A bootstrap script exists [[https://github.com/Asara/dotfiles/blob/master/scripts/configure_nvim.sh][here]] to quickly set up fonts and download the configuration to the appropriate location. The script requires sudo so please verify its contents before running it.
|
||||||
|
* Relevant Files
|
||||||
|
Files with links are customized
|
||||||
|
|
||||||
|
├── [[https://git.minhas.io/Asara/nvim/src/branch/main/init.lua][init.lua]]\\
|
||||||
|
├── lua\\
|
||||||
|
│ ├── config\\
|
||||||
|
│ │ ├── [[https://git.minhas.io/Asara/nvim/src/branch/main/lua/config/autocmds.lua][autocmds.lua]]\\
|
||||||
|
│ │ ├── [[https://git.minhas.io/Asara/nvim/src/branch/main/lua/config/keymaps.lua][keymaps.lua]]\\
|
||||||
|
│ │ ├── lazy.lua\\
|
||||||
|
│ │ └── [[https://git.minhas.io/Asara/nvim/src/branch/main/lua/config/options.lua][options.lua]]\\
|
||||||
|
│ └── plugins\\
|
||||||
|
│ ├── [[https://git.minhas.io/Asara/nvim/src/branch/main/lua/plugins/alpha.lua][alpha.lua]]\\
|
||||||
|
│ ├── [[https://git.minhas.io/Asara/nvim/src/branch/main/lua/plugins/core.lua][core.lua]]\\
|
||||||
|
│ └── [[https://git.minhas.io/Asara/nvim/src/branch/main/lua/plugins/theme.lua][theme.lua]]\\
|
||||||
|
└── [[https://git.minhas.io/Asara/nvim/src/branch/main/stylua.toml][stylua.toml]]
|
||||||
|
* File Details
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/init.lua][init.lua]]: initalize lazyvim and orgmode\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/lua/config/autocmds.lua][autocmds.lua]]: configure goyo for writing mode\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/lua/config/keymaps.lua][keymaps.lua]]: lazy escape\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/lua/config/options.lua][options.lua]]: basic vim options\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/lua/plugins/alpha.lua][alpha.lua]]: alpha homescreen modifications\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/lua/plugins/core.lua][core.lua]]: load in plugins\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/lua/plugins/theme.lua][theme.lua]]: theme setup\\
|
||||||
|
[[https://git.minhas.io/Asara/nvim/src/branch/main/stylua.toml][stylua.toml]]: basic styling
|
38
config/nvim/init.lua
Normal file
38
config/nvim/init.lua
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
|
require("config.lazy")
|
||||||
|
require("orgmode").setup_ts_grammar()
|
||||||
|
vim.cmd("language en_US.utf8")
|
||||||
|
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = { "org" },
|
||||||
|
},
|
||||||
|
ensure_installed = {},
|
||||||
|
sync_install = true,
|
||||||
|
auto_install = true,
|
||||||
|
ignore_install = {},
|
||||||
|
modules = {},
|
||||||
|
})
|
||||||
|
|
||||||
|
require("orgmode").setup({
|
||||||
|
org_agenda_files = { "~/org/*" },
|
||||||
|
org_default_notes_file = "~/org/notes.org",
|
||||||
|
org_capture_templates = {
|
||||||
|
t = {
|
||||||
|
description = "Tasks",
|
||||||
|
template = "* TODO %?\n %u",
|
||||||
|
target = "~/org/notes.org",
|
||||||
|
},
|
||||||
|
d = {
|
||||||
|
description = "Devvul",
|
||||||
|
template = "* TODO %?\n %u",
|
||||||
|
target = "~/org/devvul.org",
|
||||||
|
},
|
||||||
|
u = {
|
||||||
|
description = "uplateAgency",
|
||||||
|
template = "* TODO %?\n %u",
|
||||||
|
target = "~/org/uplateAgency.org",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
27
config/nvim/lua/config/autocmds.lua
Normal file
27
config/nvim/lua/config/autocmds.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
local function augroup(name)
|
||||||
|
return vim.api.nvim_create_augroup("custom_ac_" .. name, { clear = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
local goyo_enter = function()
|
||||||
|
vim.cmd("Limelight")
|
||||||
|
vim.cmd("PencilSoft")
|
||||||
|
require("lualine").hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "GoyoEnter",
|
||||||
|
callback = goyo_enter,
|
||||||
|
group = augroup("goyo_enter"),
|
||||||
|
})
|
||||||
|
|
||||||
|
local goyo_leave = function()
|
||||||
|
vim.cmd("Limelight!")
|
||||||
|
vim.cmd("NoPencil")
|
||||||
|
require("lualine").hide({ unhide = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "GoyoLeave",
|
||||||
|
callback = goyo_leave,
|
||||||
|
group = augroup("goyo_leave"),
|
||||||
|
})
|
15
config/nvim/lua/config/keymaps.lua
Normal file
15
config/nvim/lua/config/keymaps.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
local function map(mode, lhs, rhs, opts)
|
||||||
|
local keys = require("lazy.core.handler").handlers.keys
|
||||||
|
---@cast keys LazyKeysHandler
|
||||||
|
-- do not create the keymap if a lazy keys handler exists
|
||||||
|
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
|
||||||
|
opts = opts or {}
|
||||||
|
opts.silent = opts.silent ~= false
|
||||||
|
if opts.remap and not vim.g.vscode then
|
||||||
|
opts.remap = nil
|
||||||
|
end
|
||||||
|
vim.keymap.set(mode, lhs, rhs, opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
map({ "i" }, "jk", "<esc>", { desc = "Remap jk to escape in insert mode" })
|
46
config/nvim/lua/config/lazy.lua
Normal file
46
config/nvim/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
-- bootstrap lazy.nvim
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- add LazyVim and import its plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import any extras modules here
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight" } },
|
||||||
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
4
config/nvim/lua/config/options.lua
Normal file
4
config/nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
vim.opt.relativenumber = false
|
||||||
|
vim.opt.wrap = true
|
||||||
|
vim.g.terraform_fmt_on_save = 1
|
||||||
|
vim.g.hcl_fmt_autosave = 1
|
16
config/nvim/lua/plugins/core.lua
Normal file
16
config/nvim/lua/plugins/core.lua
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"fatih/vim-go",
|
||||||
|
"godlygeek/tabular",
|
||||||
|
"fladson/vim-kitty",
|
||||||
|
"hashivim/vim-terraform",
|
||||||
|
"rhadley-recurly/vim-terragrunt",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-orgmode/orgmode",
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
"junegunn/goyo.vim",
|
||||||
|
"junegunn/limelight.vim",
|
||||||
|
"preservim/vim-pencil",
|
||||||
|
"jamessan/vim-gnupg",
|
||||||
|
},
|
||||||
|
}
|
19
config/nvim/lua/plugins/theme.lua
Normal file
19
config/nvim/lua/plugins/theme.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
lazy = false,
|
||||||
|
opts = { style = "night" },
|
||||||
|
name = "catppuccin",
|
||||||
|
config = function()
|
||||||
|
require("catppuccin").setup({
|
||||||
|
flavour = "mocha",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "catppuccin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
3
config/nvim/stylua.toml
Normal file
3
config/nvim/stylua.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
column_width = 120
|
84
config/waybar/config
Normal file
84
config/waybar/config
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "bottom",
|
||||||
|
"spacing": 4, // Gaps between modules (4px)
|
||||||
|
"modules-left": [
|
||||||
|
"sway/workspaces",
|
||||||
|
"sway/mode",
|
||||||
|
"sway/scratchpad",
|
||||||
|
"custom/media"
|
||||||
|
],
|
||||||
|
"modules-center": [
|
||||||
|
"sway/window"
|
||||||
|
],
|
||||||
|
"modules-right": [
|
||||||
|
"pulseaudio",
|
||||||
|
"network",
|
||||||
|
"cpu",
|
||||||
|
"memory",
|
||||||
|
"temperature",
|
||||||
|
"battery",
|
||||||
|
"clock",
|
||||||
|
"tray"
|
||||||
|
],
|
||||||
|
"tray": {
|
||||||
|
// "icon-size": 21,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"timezone": "America/New_York",
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "{usage}% ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "{}% "
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"critical-threshold": 80,
|
||||||
|
"format": "{temperatureC}°C {icon}",
|
||||||
|
"format-icons": ["", "", ""]
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
"format-full": "{capacity}% {icon}",
|
||||||
|
"format-charging": "{capacity}% ",
|
||||||
|
"format-plugged": "{capacity}% ",
|
||||||
|
"format-alt": "{time} {icon}",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
|
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||||
|
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||||
|
"format-linked": "{ifname} (No IP) ",
|
||||||
|
"format-disconnected": "Disconnected ⚠",
|
||||||
|
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "{volume}% {icon} {format_source}",
|
||||||
|
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||||
|
"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
|
"format-muted": " {format_source}",
|
||||||
|
"format-source": "{volume}% ",
|
||||||
|
"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# download dejavu nerd-fonts
|
|
||||||
FONT_DIR=${HOME}/.local/share/fonts/
|
|
||||||
mkdir -p ${FONT_DIR}
|
|
||||||
wget -qO- https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/DejaVuSansMono.tar.xz | tar -Jxv -C ${FONT_DIR}
|
|
||||||
fc-cache -fv
|
|
||||||
|
|
||||||
git clone https://git.minhas.io/Asara/nvim ${HOME}/.config/nvim
|
|
||||||
|
|
||||||
go install github.com/jesseduffield/lazygit@latest
|
|
||||||
|
|
||||||
sudo apt install \
|
|
||||||
ripgrep \
|
|
||||||
fd-find \
|
|
||||||
python3-neovim \
|
|
||||||
python3-pynvim
|
|
||||||
|
|
||||||
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
|
|
||||||
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
|
|
||||||
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
|
|
Loading…
Reference in a new issue