├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── X11
├── 20-trackpoint.conf
├── 70-synaptics.conf
├── Xresources
├── fontconfig
│ ├── conf.d
│ │ ├── 30-icons.conf
│ │ ├── 91-noto-color-emoji.conf
│ │ ├── 94-arabic.conf
│ │ └── 96-japanese.conf
│ └── fonts.conf
├── picom
│ └── picom.conf
├── rofi
│ └── config
└── xinitrc
├── alacritty
├── alacritty.toml
├── colors.toml.example
└── themes
│ ├── dark.toml
│ └── light.toml
├── bin
├── android-mount
├── calendar
├── color_spaces.pl
├── fehbg
├── git-changeauthor
├── git-pretty-log
├── git-release
├── gnome-bg
├── nvim-ctrl.sh
├── prayer
├── printscreen
├── screenlock
├── screenlock-i3lock
├── switch-layout
├── sysmenu
├── sysupdates
├── toggle-theme
├── volumectrl
├── weather
├── xdg-get-default
└── xdg-set-default
├── cmus
├── aaku.theme
└── rc
├── ctags
└── ctags
├── deps.md
├── fastfetch
├── config.jsonc
└── logos
│ ├── arch.txt
│ └── pusheen.png
├── ghostty
├── config
└── themes
│ ├── kuroi
│ └── quietlight
├── git
├── gitattributes
├── gitconfig
├── gitconfig.secrets.example
└── gitignore
├── install
├── linux_shared
├── desktop.entries
│ ├── cmus.desktop
│ ├── newsboat.desktop
│ ├── nnn.desktop
│ ├── st.desktop
│ ├── toggle-theme.desktop
│ └── zathura.desktop
├── dunst
│ └── dunstrc
├── gtk-3.0
│ └── gtk.css
├── systemd
│ ├── powertop.service
│ ├── tlp
│ └── wakelock.service
└── zathura
│ └── zathurarc
├── macos
├── Brewfile
├── aerospace
│ └── aerospace.toml
├── sketchybar
│ ├── colors.sh
│ ├── icons.sh
│ ├── plugins
│ │ ├── aerospace.sh
│ │ ├── apple.sh
│ │ ├── battery.sh
│ │ ├── clock.sh
│ │ ├── front_app.sh
│ │ ├── space.sh
│ │ └── volume.sh
│ └── sketchybarrc
├── skhd
│ └── skhdrc
└── yabai
│ └── yabairc
├── nnn
└── plugins
│ └── launch
├── nvim
├── fnl
│ ├── colorscheme.fnl
│ └── scratch.fnl
├── ftplugin
│ ├── c.lua
│ ├── css.lua
│ ├── go.lua
│ ├── java.lua
│ ├── javascript.lua
│ ├── kt.lua
│ ├── make.lua
│ ├── ruby.lua
│ ├── scheme.lua
│ └── typescript.lua
├── init.lua
├── lazy-lock.json
├── lua
│ ├── keybindings.lua
│ ├── plugins
│ │ ├── avante.lua
│ │ ├── cmp.lua
│ │ ├── conform.lua
│ │ ├── copilot.lua
│ │ ├── fold.lua
│ │ ├── git.lua
│ │ ├── gitsigns.lua
│ │ ├── guard.lua
│ │ ├── init.lua
│ │ ├── lsp.lua
│ │ ├── null-ls.lua
│ │ ├── nvim-tree.lua
│ │ ├── telescope.lua
│ │ └── treesitter.lua
│ ├── statusline.lua
│ ├── terminal.lua
│ └── utils.lua
└── stylua.toml
├── rg
└── rgignore
├── ruby
└── irbrc
├── scheme
└── csirc
├── tmux
└── tmux.conf
├── vim
├── gvimrc
├── vim
│ ├── autoload
│ │ └── plug.vim
│ └── spell
│ │ ├── de.utf-8.spl
│ │ ├── de.utf-8.sug
│ │ ├── en.utf-8.add
│ │ └── en.utf-8.add.spl
└── vimrc
├── wayland
├── bin
│ ├── brightness.sh
│ ├── calc.sh
│ ├── hypr-monitor.sh
│ ├── import-env.sh
│ ├── launcher-drawer.sh
│ ├── power-menu.sh
│ ├── prayer.sh
│ ├── screen-lock.sh
│ ├── screenshot.sh
│ ├── set-gtk-theme.sh
│ ├── volume.sh
│ └── weather.sh
├── fuzzel
│ └── fuzzel.ini
├── hypr
│ └── hyprland.conf
├── mako
│ └── config
├── nwg-drawer
│ └── drawer.css
├── sway
│ └── config
├── swaync
│ ├── config.json
│ ├── icons
│ │ ├── bolt.png
│ │ ├── gamemode.png
│ │ ├── microphone-mute.png
│ │ ├── microphone.png
│ │ ├── music.png
│ │ ├── palette.png
│ │ ├── picture.png
│ │ ├── play.png
│ │ ├── timer.png
│ │ ├── volume-high.png
│ │ ├── volume-low.png
│ │ ├── volume-mid.png
│ │ ├── volume-mute.png
│ │ └── wand.png
│ └── style.css
├── waybar
│ ├── config-orig.jsonc
│ ├── config.jsonc
│ ├── scripts
│ │ ├── mediaplayer.py
│ │ └── weather.py
│ ├── style-orig.css
│ └── style.css
├── wofi
│ ├── config
│ └── style.css
└── wpaperd
│ └── config.toml
└── zsh
├── zprofile
├── zsh
├── aliases.zsh
├── config.zsh
├── constants.zsh
├── plugins
│ ├── autoload.zsh
│ ├── enter_to_repeat.zsh
│ ├── ffw.zsh
│ ├── fzf.zsh
│ ├── ghpr.zsh
│ ├── kp.zsh
│ ├── man.zsh
│ ├── note.zsh
│ ├── teye.zsh
│ ├── tsk.zsh
│ └── tx.zsh
├── prompt.zsh
├── secrets.zsh.example
└── variables.zsh
├── zshenv
└── zshrc
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_STORE
2 |
3 | **/secrets.zsh
4 | git/gitconfig.secrets
5 |
6 | # Ignore Vim plugins
7 | vim/vim/plugins/
8 | vim/vim/.netrwhist
9 | vim/vim/view
10 |
11 | # NVIM plugins
12 | nvim/plugin
13 |
14 | # Ignore Tmux plugins
15 | tmux/tmux/
16 |
17 | cmus/
18 |
19 | # Ignore `toggle-theme` changes
20 | alacritty/colors.yml
21 | alacritty/colors.toml
22 |
23 | linux_shared/gtk-3.0/settings.ini
24 | linux_shared/gtk-3.0/bookmarks
25 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "dwm"]
2 | path = X11/dwm
3 | url = git@gitlab.com:aonemd/dwm.git
4 | branch = master
5 | ignore = all
6 | [submodule "st"]
7 | path = X11/st
8 | url = git@gitlab.com:aonemd/st.git
9 | branch = master
10 | ignore = all
11 | [submodule "slock"]
12 | path = X11/slock
13 | url = git@gitlab.com:aonemd/slock.git
14 | branch = master
15 | ignore = all
16 | [submodule "newsboat"]
17 | path = newsboat
18 | url = git@gitlab.com:aonemd/newsboat.git
19 | branch = master
20 | ignore = all
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Ahmed Saleh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | aaku
4 |
5 |
6 |
7 | アーク (The Ark): My *nix dotfiles.
8 |
9 | [Screenshots here](https://imgur.com/a/uXBAy).
10 |
11 | ### Installation
12 |
13 | 0. Update submodules: `git submodule update --init --recursive --remote`
14 | 1. Download the repo or use Git `git clone https://gitlab.com/aonemd/aaku.git`
15 | 2. Run the installation script:
16 | - Install all: `./install`
17 | - Usage: `./install [*|dev|linux|macos|cli|fonts]`
18 |
19 | ### Notes
20 |
21 | - A note to self: [A Good Carpenter Doesn't Blame His Tools](https://aonemd.com/blog/the-dotfiles).
22 |
23 | ### License
24 |
25 | See [LICENSE](LICENSE).
26 |
--------------------------------------------------------------------------------
/X11/20-trackpoint.conf:
--------------------------------------------------------------------------------
1 | # /etc/X11/xorg.conf.d/20-trackpoint.conf
2 |
3 | Section "InputClass"
4 | Identifier "Trackpoint Wheel Emulation"
5 | MatchProduct "PS/2 Generic Mouse"
6 | MatchDevicePath "/dev/input/event*"
7 |
8 | Option "EmulateWheel" "true"
9 | Option "EmulateWheelButton" "2"
10 | Option "Emulate3Buttons" "false"
11 | Option "XAxisMapping" "6 7"
12 | Option "YAxisMapping" "4 5"
13 | EndSection
14 |
--------------------------------------------------------------------------------
/X11/70-synaptics.conf:
--------------------------------------------------------------------------------
1 | # /etc/X11/xorg.conf.d/70-synaptics.conf
2 |
3 | Section "InputClass"
4 | Identifier "touchpad catchall"
5 | Driver "synaptics"
6 | MatchIsTouchpad "on"
7 | # This option is recommend on all Linux systems using evdev, but cannot be
8 | # enabled by default. See the following link for details:
9 | # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
10 | MatchDevicePath "/dev/input/event*"
11 | EndSection
12 |
13 | Section "InputClass"
14 | Identifier "touchpad ignore duplicates"
15 | MatchIsTouchpad "on"
16 | MatchOS "Linux"
17 | MatchDevicePath "/dev/input/mouse*"
18 |
19 | Option "Ignore" "on"
20 | EndSection
21 |
22 | Section "InputClass"
23 | Identifier "touchpad"
24 | Driver "synaptics"
25 | MatchIsTouchpad "on"
26 |
27 | ## Clicking
28 | # accurate tap-to-click
29 | Option "FingerLow" "50"
30 | Option "FingerHigh" "55"
31 | Option "FastTaps" "on"
32 | Option "MinSpeed" "1"
33 | Option "MaxSpeed" "1"
34 | Option "AccelerationProfile" "2"
35 | Option "ConstantDeceleration" "4"
36 |
37 | # multi-finger taps
38 | Option "TapButton1" "1"
39 | Option "TapButton2" "3"
40 | Option "TapButton3" "2"
41 |
42 | ## Scrolling
43 | Option "VertTwoFingerScroll" "on"
44 | Option "HorizTwoFingerScroll" "on"
45 | # natural Scrolling
46 | Option "VertScrollDelta" "-111"
47 | Option "HorizScrollDelta" "-111"
48 |
49 | ## Palm detection
50 | Option "PalmDetect" "off"
51 | EndSection
52 |
--------------------------------------------------------------------------------
/X11/Xresources:
--------------------------------------------------------------------------------
1 | *termName: xterm-256color
2 |
3 | ! URxvt settings
4 | URxvt.font: xft:Hack:style=Regular:size=10
5 | URxvt.scrollBar: false
6 | URxvt*saveLines: 10000
7 | URxvt.externalBorder: 0
8 | URxvt.internalBorder: 0
9 | URxvt.perl-ext-common: default,matcher
10 | URxvt.url-launcher: $BROWSER
11 |
12 | ! XTerm settings
13 | XTerm*faceName: Hack:style=Regular:size=10
14 | XTerm*.scrollBar: false
15 | XTerm*saveLines: 10000
16 |
17 | ! Font rendering
18 | Xft.dpi: 96
19 | Xft.antialias: true
20 | Xft.hinting: true
21 | Xft.autohint: true
22 | Xft.rgba: rgb
23 | Xft.hintstyle: hintslight
24 | Xft.lcdfilter: lcddefault
25 |
26 | ! colorscheme
27 | *.foreground: #f1efee
28 | *.cursorColor: #f1efee
29 | *.background: #1b1918
30 |
31 | ! black
32 | *.color0: #1b1918
33 | *.color8: #766e6b
34 |
35 | ! red
36 | *.color1: #f22c40
37 | *.color9: #f22c40
38 |
39 | ! green
40 | *.color2: #5ab738
41 | *.color10: #5ab738
42 |
43 | ! yellow
44 | *.color3: #d5911a
45 | *.color11: #d78700
46 |
47 | ! blue
48 | *.color4: #407ee7
49 | *.color12: #407ee7
50 |
51 | ! magenta
52 | *.color5: #6666ea
53 | *.color13: #6666ea
54 |
55 | ! cyan
56 | *.color6: #00ad9c
57 | *.color14: #00ad9c
58 |
59 | ! white
60 | *.color7: #a8a19f
61 | *.color15: #f1efee
62 |
--------------------------------------------------------------------------------
/X11/fontconfig/conf.d/30-icons.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Hack
11 | icons-in-terminal
12 |
13 |
14 |
--------------------------------------------------------------------------------
/X11/fontconfig/conf.d/91-noto-color-emoji.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Noto Color Emoji
7 |
8 | true
9 |
10 |
11 |
12 |
13 | chrome
14 |
15 |
16 | Noto Color Emoji
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/X11/fontconfig/conf.d/94-arabic.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ar
7 |
8 |
9 | sans-serif
10 |
11 |
12 | Noto Naskh Arabic
13 |
14 |
15 |
16 |
17 |
18 | ar
19 |
20 |
21 | sans
22 |
23 |
24 | Noto Naskh Arabic
25 |
26 |
27 |
28 |
29 |
30 | ar
31 |
32 |
33 | serif
34 |
35 |
36 | Noto Naskh Arabic
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/X11/fontconfig/conf.d/96-japanese.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | jp
7 |
8 |
9 | sans-serif
10 |
11 |
12 | Noto Sans CJK JP
13 |
14 |
15 |
16 |
17 |
18 | jp
19 |
20 |
21 | serif
22 |
23 |
24 | Noto Serif CJK JP
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/X11/fontconfig/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | hintslight
6 | rgb
7 | lcdlight
8 | true
9 | false
10 | true
11 | false
12 |
13 |
14 |
15 |
16 |
17 | serif
18 | Noto Serif
19 |
20 |
21 |
22 | sans-serif
23 | Noto Sans
24 |
25 |
26 |
27 | sans
28 | Noto Sans
29 |
30 |
31 |
32 | monospace
33 | Hack
34 |
35 |
36 |
--------------------------------------------------------------------------------
/X11/picom/picom.conf:
--------------------------------------------------------------------------------
1 | # Shadow
2 | shadow = true; # Enabled client-side shadows on windows
3 | no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows
4 | no-dnd-shadow = true; # Don't draw shadows on DND windows
5 | clear-shadow = true; # Zero the part of the shadow's mask behind the window
6 |
7 | # Fading
8 | fading = true;
9 | fade-delta = 3; # The time between steps in a fade in milliseconds. (default 10)
10 | fade-in-step = 0.04; # Opacity change between steps while fading in. (default 0.028)
11 | fade-out-step = 0.04; # Opacity change between steps while fading out. (default 0.03)
12 |
13 | inactive-dim = 0.07;
14 |
15 | # Set VSync method. VSync methods currently available:
16 | # none: No VSync
17 | # drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
18 | # opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
19 | # opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
20 | # opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesn’t have the effect of --sw-opti unlike other methods. Experimental.
21 | # opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use.
22 | # (Note some VSync methods may not be enabled at compile time.)
23 | vsync = "opengl-swc";
24 |
25 | # Other
26 | backend = "glx";
27 | glx-no-stencil = true;
28 | glx-copy-from-front = false;
29 | use-damage = true
30 | glx-use-copysubbuffermesa = false;
31 |
32 | shadow-exclude = ["name = 'cpt_frame_window'", "name *= 'VLC'"];
33 |
34 | wintypes:
35 | {
36 | tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
37 | notify = { fade = true; shadow = false; opacity = 0.75; focus = true; };
38 | };
39 |
--------------------------------------------------------------------------------
/X11/rofi/config:
--------------------------------------------------------------------------------
1 | rofi.modi: drun,run,window
2 | rofi.matching: normal
3 | rofi.terminal: rofi-sensible-terminal
4 | rofi.kb-accept-entry: Return
5 | rofi.kb-remove-to-eol:
6 | rofi.kb-row-up: Up,Control+k
7 | rofi.kb-row-down: Down,Control+j
8 |
9 | rofi.bw: 0
10 | rofi.lines: 7
11 | rofi.width: 420
12 | rofi.padding: 20
13 | rofi.show-icons: true
14 | rofi.drun-icon-theme: la-capitaine
15 |
16 | ! ------------------------------------------------------------------------------
17 | ! ROFI Color theme
18 | ! ------------------------------------------------------------------------------
19 | rofi.color-enabled: true
20 | rofi.color-window: #121110, #111111, #100f0e
21 | rofi.color-normal: #121110, #766e6b, #121110, #100f0e, #ffffff
22 | rofi.color-active: #121110, #407ee7, #121110, #100f0e, #407ee7
23 | rofi.color-urgent: #121110, #f22c40, #121110, #100f0e, #f22c40
24 |
--------------------------------------------------------------------------------
/X11/xinitrc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | if [ -d /etc/X11/xinit/xinitrc.d ]; then
4 | for f in /etc/X11/xinit/xinitrc.d/*; do
5 | [ -x "$f" ] && . "$f"
6 | done
7 | unset f
8 | fi
9 |
10 | eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
11 | export SSH_AUTH_SOCK
12 | export QT_AUTO_SCREEN_SCALE_FACTOR=0
13 |
14 | xrdb ~/.Xresources &
15 | xsetroot -cursor_name left_ptr &
16 | xrandr --output eDP-1 --mode 1920x1080 --dpi 96 &
17 | # for track point speed
18 | xinput --set-prop "TPPS/2 Elan TrackPoint" "libinput Accel Speed" 1.0
19 | xinput --set-prop "TPPS/2 Elan TrackPoint" "libinput Accel Profile Enabled" 0 1
20 | dunst -config $HOME/.config/dunst/dunstrc &
21 | $HOME/.fehbg &
22 | picom --config $HOME/.config/picom/picom.conf -b
23 | nm-applet 2>&1 /dev/null &
24 | udiskie &
25 | dropbox &
26 | bars -C $WK/bars.toml &
27 |
28 | exec dwm
29 |
--------------------------------------------------------------------------------
/alacritty/alacritty.toml:
--------------------------------------------------------------------------------
1 | [general]
2 | live_config_reload = true
3 | import = ["~/.config/alacritty/colors.toml"]
4 |
5 | [font]
6 | size = 16.0
7 |
8 | [font.normal]
9 | # family = "Hack Nerd Font"
10 | family = "Maple Mono NF"
11 | style = "Regular"
12 |
13 | [font.offset]
14 | x = 1
15 | y = 1
16 |
17 | [[keyboard.bindings]]
18 | action = "ScrollToBottom"
19 | key = "Space"
20 | mode = "Vi|~Search"
21 | mods = "Alt"
22 |
23 | [[keyboard.bindings]]
24 | action = "ToggleViMode"
25 | key = "Space"
26 | mode = "~Search"
27 | mods = "Alt"
28 |
29 | [[keyboard.bindings]]
30 | action = "Paste"
31 | key = "V"
32 | mode = "~Vi"
33 | mods = "Control|Shift"
34 |
35 | [[keyboard.bindings]]
36 | action = "Copy"
37 | key = "C"
38 | mods = "Control|Shift"
39 |
40 | [[keyboard.bindings]]
41 | action = "SearchForward"
42 | key = "F"
43 | mode = "~Search"
44 | mods = "Control|Shift"
45 |
46 | [[keyboard.bindings]]
47 | action = "SearchBackward"
48 | key = "B"
49 | mode = "~Search"
50 | mods = "Control|Shift"
51 |
52 | [[keyboard.bindings]]
53 | action = "ClearSelection"
54 | key = "C"
55 | mode = "Vi|~Search"
56 | mods = "Control|Shift"
57 |
58 | [[keyboard.bindings]]
59 | action = "PasteSelection"
60 | key = "Y"
61 | mods = "Control|Shift"
62 |
63 | [[keyboard.bindings]]
64 | action = "ResetFontSize"
65 | key = "Key0"
66 | mods = "Alt"
67 |
68 | [[keyboard.bindings]]
69 | action = "IncreaseFontSize"
70 | key = "Equals"
71 | mods = "Alt"
72 |
73 | [[keyboard.bindings]]
74 | action = "IncreaseFontSize"
75 | key = "Plus"
76 | mods = "Alt"
77 |
78 | [[keyboard.bindings]]
79 | action = "DecreaseFontSize"
80 | key = "Minus"
81 | mods = "Alt"
82 |
83 | [window]
84 | opacity = 0.94
85 |
86 | [window.dimensions]
87 | columns = 80
88 | lines = 30
89 |
90 | [window.padding]
91 | x = 1
92 | y = 1
93 |
94 | [window.position]
95 | x = 500
96 | y = 200
97 |
--------------------------------------------------------------------------------
/alacritty/colors.toml.example:
--------------------------------------------------------------------------------
1 | [general]
2 | import = [
3 | "~/.config/alacritty/themes/light.toml",
4 | ]
5 |
--------------------------------------------------------------------------------
/alacritty/themes/dark.toml:
--------------------------------------------------------------------------------
1 | # kuroi
2 |
3 | [colors.bright]
4 | black = "#766e6b"
5 | blue = "#407ee7"
6 | cyan = "#00ad9c"
7 | green = "#5ab738"
8 | magenta = "#6666ea"
9 | red = "#f22c40"
10 | white = "#f1efee"
11 | yellow = "#d5911a"
12 |
13 | [colors.normal]
14 | black = "#1b1918"
15 | blue = "#407ee7"
16 | cyan = "#00ad9c"
17 | green = "#5ab738"
18 | magenta = "#6666ea"
19 | red = "#f22c40"
20 | white = "#a8a19f"
21 | yellow = "#d5911a"
22 |
23 | [colors.primary]
24 | background = "#1b1918"
25 | foreground = "#f1efee"
26 |
--------------------------------------------------------------------------------
/alacritty/themes/light.toml:
--------------------------------------------------------------------------------
1 | # quietlight
2 |
3 | [colors.bright]
4 | black = "#766e6b"
5 | blue = "#407ee7"
6 | cyan = "#00ad9c"
7 | green = "#5ab738"
8 | magenta = "#6666ea"
9 | red = "#f22c40"
10 | white = "#d3d3d3"
11 | yellow = "#ffe055"
12 |
13 | [colors.normal]
14 | black = "#333333"
15 | blue = "#4b83cd"
16 | cyan = "#91b3e0"
17 | green = "#448c27"
18 | magenta = "#7a3e9d"
19 | red = "#aa3731"
20 | white = "#333333"
21 | yellow = "#DCB300"
22 |
23 | [colors.primary]
24 | background = "#f5f5f5"
25 | foreground = "#333333"
26 |
--------------------------------------------------------------------------------
/bin/android-mount:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | case "$1" in
4 | mount)
5 | simple-mtpfs /media/android
6 | ;;
7 | umount)
8 | fusermount -u /media/android
9 | ;;
10 | *)
11 | echo "Usage: $0 {mount|umount}"
12 | exit 2
13 | esac
14 |
15 | exit 0
16 |
--------------------------------------------------------------------------------
/bin/calendar:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | cal -y $(date +%Y)
4 |
--------------------------------------------------------------------------------
/bin/color_spaces.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 | # Author: Todd Larason
3 | # $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.1 1999/07/11 08:49:54 dawes Exp $
4 |
5 | print "256 color mode\n\n";
6 |
7 | # display back ground colors
8 |
9 | for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) {
10 |
11 | # first the system ones:
12 | print "System colors:\n";
13 | for ($color = 0; $color < 8; $color++) {
14 | print "\x1b[${fgbg};5;${color}m::";
15 | }
16 | print "\x1b[0m\n";
17 | for ($color = 8; $color < 16; $color++) {
18 | print "\x1b[${fgbg};5;${color}m::";
19 | }
20 | print "\x1b[0m\n\n";
21 |
22 | # now the color cube
23 | print "Color cube, 6x6x6:\n";
24 | for ($green = 0; $green < 6; $green++) {
25 | for ($red = 0; $red < 6; $red++) {
26 | for ($blue = 0; $blue < 6; $blue++) {
27 | $color = 16 + ($red * 36) + ($green * 6) + $blue;
28 | print "\x1b[${fgbg};5;${color}m::";
29 | }
30 | print "\x1b[0m ";
31 | }
32 | print "\n";
33 | }
34 |
35 | # now the grayscale ramp
36 | print "Grayscale ramp:\n";
37 | for ($color = 232; $color < 256; $color++) {
38 | print "\x1b[${fgbg};5;${color}m::";
39 | }
40 | print "\x1b[0m\n\n";
41 |
42 | }
43 |
44 | print "Examples for the 3-byte color mode\n\n";
45 |
46 | for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) {
47 |
48 | # now the color cube
49 | print "Color cube\n";
50 | for ($green = 0; $green < 256; $green+=51) {
51 | for ($red = 0; $red < 256; $red+=51) {
52 | for ($blue = 0; $blue < 256; $blue+=51) {
53 | print "\x1b[${fgbg};2;${red};${green};${blue}m::";
54 | }
55 | print "\x1b[0m ";
56 | }
57 | print "\n";
58 | }
59 |
60 | # now the grayscale ramp
61 | print "Grayscale ramp:\n";
62 | for ($gray = 8; $gray < 256; $gray+=10) {
63 | print "\x1b[${fgbg};2;${gray};${gray};${gray}m::";
64 | }
65 | print "\x1b[0m\n\n";
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/bin/fehbg:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | feh --bg-fill --randomize --no-fehbg $HOME/Pictures/wallpapers/*
4 |
--------------------------------------------------------------------------------
/bin/git-changeauthor:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | export FILTER_BRANCH_SQUELCH_WARNING=1
4 |
5 | git filter-branch -f --env-filter '
6 | OLD_EMAIL='"$1"'
7 | CORRECT_EMAIL='"$2"'
8 | CORRECT_NAME='"$3"'
9 | if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
10 | then
11 | export GIT_COMMITTER_NAME="$CORRECT_NAME"
12 | export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
13 | fi
14 | if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
15 | then
16 | export GIT_AUTHOR_NAME="$CORRECT_NAME"
17 | export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
18 | fi
19 | ' --tag-name-filter cat -- --branches --tags
20 |
21 | unset FILTER_BRANCH_SQUELCH_WARNING
22 |
--------------------------------------------------------------------------------
/bin/git-pretty-log:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | git log --graph --pretty="tformat:%C(always,yellow)%h%C(always,reset) %C(always,green)%ar%C(always,reset) %C(always,bold blue)%an%C(always,reset) %C(always,red)%d%C(always,reset) %s" $* |
4 | column -t -s '{' |
5 | less -XRS --quit-if-one-screen
6 |
--------------------------------------------------------------------------------
/bin/git-release:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | git tag "$1" -e -m "$1" -m "$(printf "%s\n" "$(git log --no-merges --pretty="- %s" $(git describe --tags --abbrev=0)..HEAD)")"
4 |
--------------------------------------------------------------------------------
/bin/gnome-bg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ruser_dbus_session_bus_address="unix:path=/run/user/${UID}/bus"
4 |
5 | background_name="file://$(ls -d /home/aonemd/Pictures/Wallpapers/* | shuf -n 1)"
6 | DBUS_SESSION_BUS_ADDRESS=${ruser_dbus_session_bus_address} gsettings set org.gnome.desktop.background picture-uri $background_name
7 |
--------------------------------------------------------------------------------
/bin/nvim-ctrl.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # send command to all nvim instances
4 | #
5 | # https://github.com/chmln/nvim-ctrl/issues/1
6 |
7 | # LINUX
8 | # ls $XDG_RUNTIME_DIR/nvim.*.0 \
9 | # | xargs -I {} nvim --server {} --remote-send "$1"
10 |
11 | # MACOS
12 | fd "nvim\..*\.0" /private/var/ \
13 | | xargs -I {} nvim --server {} --remote-send "$1"
14 |
--------------------------------------------------------------------------------
/bin/prayer:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | parse_prayer_times () {
4 | local api_url="http://api.aladhan.com/timingsByCity?${PRAYER_API_PARAMS}"
5 |
6 | local response=$(curl -s "${api_url}")
7 | [[ -z $response ]] && exit 0
8 |
9 | local prayers=('Fajr' 'Sunrise' 'Dhuhr' 'Asr' 'Maghrib' 'Isha')
10 | for prayer in "${prayers[@]}"; do
11 | local prayer_parsed_time=$(echo "${response}" \
12 | | grep -o -e "\"${prayer}\":\"[0-9][0-9]:[0-9][0-9]\"" \
13 | | awk -F "\"${prayer}\":" '{print $2}' \
14 | | tr -d '"')
15 |
16 | local prayer_time_in_seconds=$(date -d "${prayer_parsed_time}" +"%s")
17 | local seconds_until_prayer=$(($prayer_time_in_seconds - $(date +'%s')))
18 | if [[ $seconds_until_prayer > 0 ]]; then
19 | (( $seconds_until_prayer < min || min == 0 )) \
20 | && min=$seconds_until_prayer \
21 | && prayer_name=$prayer \
22 | && prayer_time=$prayer_parsed_time \
23 | && seconds_left=$min
24 | fi
25 | done
26 | }
27 |
28 | print_prayer () {
29 | parse_prayer_times
30 | [[ -z $seconds_left ]] && exit 0
31 |
32 | report_mode=${BLOCK_INSTANCE:=0}
33 | if [[ $report_mode == 1 ]]; then
34 | time_left=$(date -u -d "@${seconds_left}" +'%H:%M')
35 | prayer="${prayer_name} in ${time_left}"
36 | elif [[ $report_mode == 2 ]]; then
37 | minutes_left=$(($seconds_left / 60))
38 | prayer="${prayer_name} in ${minutes_left} Minutes"
39 | elif [[ $report_mode == 3 ]]; then
40 | hours_left=$(($seconds_left / 3600))
41 | prayer="${prayer_name} in ${hours_left} Hours"
42 | else
43 | prayer="${prayer_name} ${prayer_time}"
44 | fi
45 |
46 | echo "${prayer}"
47 | }
48 |
49 | print_prayer
50 | exit 0
51 |
--------------------------------------------------------------------------------
/bin/printscreen:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | case "$1" in
4 | all)
5 | scrot $HOME/Pictures/screenshots/screenshot_`date +%Y-%m-%d_%H:%M:%S`.png
6 | ;;
7 | focused)
8 | scrot -u $HOME/Pictures/screenshots/screenshot_`date +%Y-%m-%d_%H:%M:%S`.png
9 | ;;
10 | all_delay)
11 | scrot -d 3 $HOME/Pictures/screenshots/screenshot_`date +%Y-%m-%d_%H:%M:%S`.png
12 | ;;
13 | focused_delay)
14 | scrot -u -d 3 $HOME/Pictures/screenshots/screenshot_`date +%Y-%m-%d_%H:%M:%S`.png
15 | ;;
16 | *)
17 | echo "Usage: $0 {all|focused|all_delay|focused_delay}"
18 | exit 2
19 | esac
20 |
21 | exit 0
22 |
23 |
--------------------------------------------------------------------------------
/bin/screenlock:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | # change layout to us
4 | setxkbmap us
5 | # pause dunst
6 | pkill -u $USER -USR1 dunst
7 |
8 | slock
9 |
10 | # resume dunst
11 | pkill -u $USER -USR2 dunst
12 |
--------------------------------------------------------------------------------
/bin/screenlock-i3lock:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | if [ $1 ]; then
4 | lockbg="$1"
5 | else
6 | lockbg=$(find $HOME/Pictures/wallpapers/*.png -type f | shuf -n 1)
7 | fi
8 |
9 | # change layout to us
10 | setxkbmap us
11 | # pause dunst
12 | pkill -u $USER -USR1 dunst
13 |
14 | i3lock -n -e -k \
15 | -i "$lockbg" \
16 | --veriftext="" \
17 | --wrongtext="" \
18 | --radius=15 \
19 | --indpo="x+80:h-70" \
20 | --ringcolor=ffffffff \
21 | --ringvercolor=ffffffff \
22 | --ringwrongcolor=ffffffff \
23 | --insidecolor=37344500 \
24 | --insidevercolor=407ee7ff \
25 | --insidewrongcolor=f22c40ff \
26 | --line-uses-inside \
27 | --keyhlcolor=407ee7ff \
28 | --bshlcolor=407ee7ff \
29 | --separatorcolor=00000000 \
30 | --timepos="w-140:h-80" \
31 | --timecolor=ffffffff \
32 | --datecolor=ffffffff \
33 | --datestr="%A, %d %b" \
34 | --pass-media-keys
35 |
36 | # resume dunst
37 | pkill -u $USER -USR2 dunst
38 |
--------------------------------------------------------------------------------
/bin/switch-layout:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | if (setxkbmap -query | awk '/layout/{print $2}' | grep us); then
4 | setxkbmap -layout ara -variant qwerty_digits
5 | else
6 | setxkbmap -layout us
7 | fi
8 |
--------------------------------------------------------------------------------
/bin/sysmenu:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | case "$1" in
4 | lock)
5 | screenlock
6 | ;;
7 | suspend)
8 | systemctl suspend
9 | ;;
10 | hibernate)
11 | systemctl hibernate
12 | ;;
13 | reboot)
14 | systemctl reboot
15 | ;;
16 | shutdown)
17 | systemctl poweroff
18 | ;;
19 | *)
20 | echo "Usage: $0 {lock|suspend|hibernate|reboot|shutdown}"
21 | exit 2
22 | esac
23 |
24 | exit 0
25 |
--------------------------------------------------------------------------------
/bin/sysupdates:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | update_counter=$(checkupdates | wc -l)
4 | [[ "${update_counter}" = "0" ]] && exit 0
5 |
6 | echo "There are ${update_counter} Pending Updates."
7 | notify-send "Software Updates" "There are ${update_counter} Pending Updates."
8 |
9 | exit 0
10 |
--------------------------------------------------------------------------------
/bin/toggle-theme:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # usage: source toggle-theme (toggle $theme|keep)
4 | #
5 |
6 | THEME_CONFIG_PATH=~/.config/system-theme
7 |
8 | read_system_theme() {
9 | local current=$(cat $THEME_CONFIG_PATH 2>/dev/null)
10 | echo $current
11 | }
12 |
13 | toggle() {
14 | if [[ $1 == "dark" ]]; then
15 | echo "light"
16 | elif [[ $1 == "light" ]]; then
17 | echo "dark"
18 | else
19 | echo "dark"
20 | fi
21 | }
22 |
23 | keep() {
24 | echo $1
25 | }
26 |
27 | toggle_alacritty() {
28 | local config_path="$AAKU/alacritty/colors.toml"
29 | local alacritty_file="$AAKU/alacritty/alacritty.toml"
30 |
31 | perl -i -pe "s/\w+\.toml/${theme}.toml/g" $config_path
32 |
33 | touch $alacritty_file
34 | }
35 |
36 | toggle_nvims_linux() {
37 | ls $XDG_RUNTIME_DIR/nvim.*.0 2>/dev/null \
38 | | xargs -I {} nvim --server {} --remote-send ":SetColorschemeMode $theme" >/dev/null 2>&1
39 | }
40 |
41 | toggle_nvims_macos() {
42 | nvim-ctrl.sh ":SetColorschemeMode $theme"
43 | }
44 |
45 | toggle_gtk() {
46 | gsettings set org.gnome.desktop.interface gtk-theme "Colloid-$theme"
47 | gsettings set org.gnome.desktop.interface color-scheme "prefer-$theme"
48 | }
49 |
50 | toggle_macos() {
51 | if [[ $theme == "dark" ]]; then
52 | local set_dark="true"
53 | else
54 | local set_dark="false"
55 | fi
56 |
57 | osascript -l JavaScript -e "Application('System Events').appearancePreferences.darkMode = $set_dark"
58 | }
59 |
60 | case "$1" in
61 | toggle)
62 | theme=$(toggle ${2:-$(read_system_theme)})
63 | ;;
64 | keep)
65 | theme=$(keep $(read_system_theme))
66 | ;;
67 | *)
68 | echo "Usage: $0 {toggle $theme|keep}"
69 | exit 2
70 | esac
71 |
72 | export TERM_COLOR_MODE="$theme"
73 |
74 | unameOut="$(uname -s)"
75 | case "${unameOut}" in
76 | Linux*)
77 | toggle_alacritty
78 | toggle_nvims_linux
79 | toggle_gtk
80 | ;;
81 | Darwin*)
82 | toggle_alacritty
83 | toggle_nvims_macos
84 | toggle_macos
85 | ;;
86 | CYGWIN*)
87 | echo "Windows not supported, yet!"
88 | ;;
89 | MINGW*)
90 | echo "Windows not supported, yet!"
91 | ;;
92 | *)
93 | echo "Unknow OS:${unameOut}"
94 | ;;
95 | esac
96 |
97 | # update theme config
98 | echo $theme > $THEME_CONFIG_PATH
99 |
100 | exit 0
101 |
--------------------------------------------------------------------------------
/bin/volumectrl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | SINK=1
4 |
5 | case "$1" in
6 | up)
7 | pactl set-sink-mute $SINK false ; pactl set-sink-volume $SINK +5%
8 | ;;
9 | down)
10 | pactl set-sink-mute $SINK false ; pactl set-sink-volume $SINK -5%
11 | ;;
12 | mute)
13 | pactl set-sink-mute $SINK toggle
14 | ;;
15 | mic)
16 | pactl set-source-mute 1 toggle
17 | ;;
18 | *)
19 | echo "Usage: $0 {up|down|mute|mic}"
20 | exit 2
21 | esac
22 |
23 | exit 0
24 |
--------------------------------------------------------------------------------
/bin/weather:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | parse_weather_details () {
4 | local api_key=$WEATHER_API_KEY
5 | local city_id=$WEATHER_CITY_GEOLOCATION
6 | local api_parameters="exclude=minutely,hourly,daily,alerts,flags&units=si"
7 | local api_url="https://api.darksky.net/forecast/${api_key}/${city_id}?${api_parameters}"
8 |
9 | local response=$(curl -s "${api_url}")
10 | [[ -z $response ]] && exit 0
11 |
12 | forecast=$(echo "${response}" \
13 | | grep -o -e '\"icon\":\"[a-zA-Z-]*\"' \
14 | | awk -F ':' '{print $2}' \
15 | | tr -d '"')
16 |
17 | temperature=$(echo "${response}" \
18 | | grep -o -e '\"temperature\":\-\?[0-9]*' \
19 | | awk -F ':' '{print $2}' \
20 | | tr -d '"')
21 | }
22 |
23 | print_weather () {
24 | local clear_day_icon=''
25 | local clear_night_icon=''
26 | local partly_cloudy_day_icon=''
27 | local partly_cloudy_night_icon=''
28 | local cloudy_icon=''
29 | local rain_icon=''
30 | local sleet_icon=''
31 | local snow_icon=''
32 | local wind_icon=''
33 | local fog_icon=''
34 | local celsius_icon='°C'
35 |
36 | parse_weather_details
37 | case "${forecast}" in
38 | clear-day) current_icon=$clear_day_icon;;
39 | clear-night) current_icon=$clear_night_icon;;
40 | partly-cloudy-day) current_icon=$partly_cloudy_day_icon;;
41 | partly-cloudy-night) current_icon=$partly_cloudy_night_icon;;
42 | cloudy) current_icon=$cloudy_icon;;
43 | rain) current_icon=$rain_icon;;
44 | sleet) current_icon=$sleet_icon;;
45 | snow) current_icon=$snow_icon;;
46 | wind) current_icon=$wind_icon;;
47 | fog) current_icon=$fog_icon;;
48 | esac
49 |
50 | weather="${current_icon} ${temperature}${celsius_icon}"
51 | echo "${weather}"
52 | }
53 |
54 | print_weather
55 | exit 0
56 |
--------------------------------------------------------------------------------
/bin/xdg-get-default:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | xdg-mime query default $(xdg-mime query filetype "$1")
4 |
--------------------------------------------------------------------------------
/bin/xdg-set-default:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | xdg-mime default "$1" $(xdg-mime query filetype "$2")
4 |
--------------------------------------------------------------------------------
/cmus/aaku.theme:
--------------------------------------------------------------------------------
1 | # aaku Cmus theme
2 |
3 | # upper window title
4 | set color_win_title_bg=black
5 | set color_win_title_fg=blue
6 |
7 | # track info line
8 | set color_titleline_bg=black
9 | set color_titleline_fg=blue
10 |
11 | # status line
12 | set color_statusline_bg=black
13 | set color_statusline_fg=white
14 |
15 | # bg & fg
16 | set color_win_bg=black
17 | set color_win_fg=white
18 |
19 | # currently selected item
20 | set color_win_sel_bg=233
21 | set color_win_sel_fg=blue
22 |
23 | # focused playing selected item
24 | set color_win_cur=blue
25 | set color_win_cur_sel_bg=233
26 | set color_win_cur_sel_fg=blue
27 |
28 | # unfocused playing selected item
29 | set color_win_inactive_cur_sel_bg=black
30 | set color_win_inactive_cur_sel_fg=blue
31 |
32 | # unfocused selected item
33 | set color_win_inactive_sel_bg=black
34 | set color_win_inactive_sel_fg=white
35 |
36 | # commandline
37 | set color_cmdline_bg=black
38 | set color_cmdline_fg=white
39 |
40 | # browser mode 5 fg
41 | set color_win_dir=white
42 |
43 | set color_error=red
44 | set color_info=yellow
45 |
46 | set color_separator=black
47 |
--------------------------------------------------------------------------------
/cmus/rc:
--------------------------------------------------------------------------------
1 | set output_plugin=alsa
2 | set dsp.alsa.device=default
3 | set mixer.alsa.device=default
4 | set mixer.alsa.channel=Master
5 |
--------------------------------------------------------------------------------
/ctags/ctags:
--------------------------------------------------------------------------------
1 | --tag-relative=yes
2 | --extras=+f
3 | --exclude={.git,pkg,node_modules,public,vendor}
4 | --languages=-sql
5 | --append
6 |
--------------------------------------------------------------------------------
/deps.md:
--------------------------------------------------------------------------------
1 | - git
2 | - zsh
3 | - vim
4 | - tmux
5 | - silver-searcher-git
6 | - xsel
7 | - ctags
8 | - curl
9 | - fzf
10 | - fd
11 | - rg
12 |
13 | - pacaur
14 | - alacritty
15 | - xorg-server xorg-server-utils xorg-xinit
16 | - xf86-input-synaptics xf86-input-libinput
17 | - i3-gaps i3blocks i3lock-color
18 | - polkit && systemctl enable polkit
19 | - acpi
20 | - light
21 | - alsa-utils
22 | - dunst libnotify
23 | - feh
24 | - scrot
25 | - rofi
26 | - compton
27 | - wicd
28 | - freetype2 ttf-font-awesome noto-fonts noto-fonts-cjk noto-fonts-emoji
29 |
30 | - ranger w3m udiskie
31 | - irssi
32 | - cmus
33 | - htop
34 | - tree
35 | - arander
36 | - zathura zathura-pdf-poppler
37 | - p7zip zip unzip unrar
38 | - redshift
39 | - neofetch cmatrix cowsay
40 | - vlc qt4
41 | - libinput-gestures
42 |
43 | - strace
44 | - chruby ruby-install
45 | - go go-tools
46 | - docker docker-compose && systemctl enable docker && sudo usermod -aG docker ${USER}
47 |
48 | - https://github.com/dandavison/delta
49 | - https://cli.github.com/
50 | - https://github.com/chmln/nvim-ctrl
51 |
--------------------------------------------------------------------------------
/fastfetch/config.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3 | "logo": {
4 | "type": "small",
5 | "padding": {
6 | "top": 2,
7 | "left": 2
8 | }
9 | // "type": "kitty",
10 | // "source": "~/.config/fastfetch/logos/pusheen.png",
11 | // "height": 14,
12 | },
13 | "display": {
14 | "separator": " › "
15 | },
16 | "modules": [
17 | "break",
18 | {
19 | "type": "cpu",
20 | "key": "CPU ",
21 | "keyColor": "34",
22 | },
23 | {
24 | "type": "gpu",
25 | "key": "GPU ",
26 | "keyColor": "34"
27 | },
28 | {
29 | "type": "memory",
30 | "key": "MEM ",
31 | "keyColor": "34",
32 | },
33 | {
34 | "type": "os",
35 | "key": "OS ",
36 | "keyColor": "34", // = color1
37 | },
38 | {
39 | "type": "kernel",
40 | "key": "KER ",
41 | "keyColor": "34",
42 | },
43 | {
44 | "type": "wm",
45 | "key": "WM ",
46 | "keyColor": "34",
47 | },
48 | {
49 | "type": "terminal",
50 | "key": "TER ",
51 | "keyColor": "34",
52 | },
53 | {
54 | "type": "shell",
55 | "key": "SH ",
56 | "keyColor": "34",
57 | },
58 | {
59 | "type": "packages",
60 | "key": "PKG ",
61 | "keyColor": "34",
62 | },
63 | {
64 | "type": "uptime",
65 | "key": "UP ",
66 | "keyColor": "34",
67 | },
68 | {
69 | "type": "command",
70 | "key": "AGE ",
71 | "keyColor": "blue",
72 | "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days"
73 | },
74 | "break",
75 | {
76 | "type": "custom",
77 | "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m"
78 | },
79 | ]
80 | }
81 |
--------------------------------------------------------------------------------
/fastfetch/logos/arch.txt:
--------------------------------------------------------------------------------
1 | .
2 | / \
3 | / \
4 | /\ \
5 | / \
6 | / \
7 | / .-. \
8 | / | | _\
9 | / _.' '._ \
10 | /_.-' '-._\
11 |
--------------------------------------------------------------------------------
/fastfetch/logos/pusheen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/fastfetch/logos/pusheen.png
--------------------------------------------------------------------------------
/ghostty/config:
--------------------------------------------------------------------------------
1 | font-family = "Maple Mono NF"
2 | font-size = 16
3 |
4 | theme = light:rose-pine-dawn,dark:rose-pine
5 | theme = light:quietlight,dark:kuroi
6 |
7 | window-padding-balance = true
8 | background-opacity = 0.96
9 | window-decoration = auto
10 | window-colorspace = "display-p3"
11 | window-theme = "ghostty"
12 | adw-toolbar-style = "flat"
13 |
14 | gtk-titlebar = false
15 |
16 | macos-titlebar-style = transparent
17 |
18 | confirm-close-surface = false
19 | copy-on-select = clipboard
20 | mouse-hide-while-typing = true
21 | mouse-scroll-multiplier = 2
22 |
23 | keybind = ctrl+s>r=reload_config
24 | keybind = ctrl+s>q=close_surface
25 | keybind = ctrl+s>n=new_window
26 | keybind = ctrl+s>t=new_tab
27 |
28 | keybind = ctrl+s>\=new_split:right
29 | keybind = ctrl+s>-=new_split:down
30 | keybind = ctrl+s>j=goto_split:bottom
31 | keybind = ctrl+s>k=goto_split:top
32 | keybind = ctrl+s>h=goto_split:left
33 | keybind = ctrl+s>l=goto_split:right
34 | keybind = ctrl+s>z=toggle_split_zoom
35 | keybind = ctrl+s>equal=equalize_splits
36 |
37 | keybind = global:ctrl+grave_accent=toggle_quick_terminal
38 |
--------------------------------------------------------------------------------
/ghostty/themes/kuroi:
--------------------------------------------------------------------------------
1 | palette = 0=#1b1918
2 | palette = 1=#f22c40
3 | palette = 2=#5ab738
4 | palette = 3=#d5911a
5 | palette = 4=#407ee7
6 | palette = 5=#6666ea
7 | palette = 6=#00ad9c
8 | palette = 7=#a8a19f
9 | palette = 8=#a8a19f
10 | palette = 9=#f22c40
11 | palette = 10=#5ab738
12 | palette = 11=#d5911a
13 | palette = 12=#407ee7
14 | palette = 13=#6666ea
15 | palette = 14=#00ad9c
16 | palette = 15=#a8a19f
17 | background = 1b1918
18 | foreground = f1efee
19 | cursor-color = e0def4
20 | selection-background = 91b3e0
21 | selection-foreground = 1b1918
22 |
--------------------------------------------------------------------------------
/ghostty/themes/quietlight:
--------------------------------------------------------------------------------
1 | palette = 0=#333333
2 | palette = 1=#aa3731
3 | palette = 2=#448c27
4 | palette = 3=#DCB300
5 | palette = 4=#4b83cd
6 | palette = 5=#7a3e9d
7 | palette = 6=#91b3e0
8 | palette = 7=#d3d3d3
9 | palette = 8=#333333
10 | palette = 9=#aa3731
11 | palette = 10=#448c27
12 | palette = 11=#DCB300
13 | palette = 12=#4b83cd
14 | palette = 13=#7a3e9d
15 | palette = 14=#91b3e0
16 | palette = 15=#d3d3d3
17 | background = f5f5f5
18 | foreground = 333333
19 | cursor-color = 333333
20 | selection-background = 91b3e0
21 | selection-foreground = 333333
22 |
--------------------------------------------------------------------------------
/git/gitattributes:
--------------------------------------------------------------------------------
1 | *.c diff=cpp
2 | *.h diff=cpp
3 | *.c++ diff=cpp
4 | *.h++ diff=cpp
5 | *.cpp diff=cpp
6 | *.hpp diff=cpp
7 | *.cc diff=cpp
8 | *.hh diff=cpp
9 | *.cs diff=csharp
10 | *.rb diff=ruby
11 | *.rake diff=ruby
12 | *.go diff=golang
13 | *.rs diff=rust
14 | *.py diff=python
15 | *.pl diff=perl
16 | *.lisp diff=lisp
17 | *.el diff=lisp
18 | *.scm diff=scheme
19 | *.js diff=javascript
20 | *.ts diff=javascript
21 | *.css diff=css
22 | *.html diff=html
23 | *.xhtml diff=html
24 | *.md diff=markdown
25 |
--------------------------------------------------------------------------------
/git/gitconfig:
--------------------------------------------------------------------------------
1 | [include]
2 | path = ./.gitconfig.secrets
3 |
4 | [core]
5 | editor = $EDITOR
6 | attributesfile = ./.gitattributes
7 | [merge]
8 | conflictstyle = diff3
9 | [diff]
10 | colorMoved = default
11 | [color]
12 | ui = true
13 | [rebase]
14 | autosquash = true
15 | [pull]
16 | rebase = merges
17 | [init]
18 | defaultBranch = master
19 | [url "git@github.com:"]
20 | insteadOf = https://github.com/
21 | [url "git@github.com:"]
22 | insteadOf = github.com/
23 | [alias]
24 | cl = clone
25 | s = status --short
26 | d = diff
27 | dw = diff --word-diff
28 | ds = diff --staged
29 | a = add
30 | aa = add -A
31 | ap = add --patch
32 | c = commit
33 | ca = commit --amend -C HEAD
34 | caa = commit -a --amend -C HEAD
35 | st = stash
36 | sta = stash -u
37 | sh = show --pretty=format:'%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%aD (%ar)%C(reset)%n%+B'
38 | pu = push
39 | ppush = push origin HEAD
40 | pl = pull
41 | ppull = pull origin HEAD
42 | f = fetch
43 | fa = fetch --all
44 | b = branch
45 | br = branch --sort=-committerdate --format="%(committerdate:relative)%09%(refname:short)"
46 | co = checkout
47 | m = merge
48 | rb = rebase
49 | bl = blame -w -n -M -C
50 | l = log --topo-order --pretty=format:'%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%aD (%ar)%C(reset)%n%+B'
51 | lp = log --topo-order --patch --pretty=format:'%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%aD (%ar)%C(reset)%n%+B'
52 | lo = !git pretty-log
53 | lg = log --topo-order --graph --decorate --pretty=oneline --abbrev-commit
54 | lga = log --topo-order --graph --decorate --pretty=oneline --abbrev-commit --all
55 | lh = log --topo-order --pretty=format:'%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%aD (%ar)%C(reset)%n%+B' --follow -p --
56 | lc = shortlog --summary --numbered --no-merges
57 | lcc = rev-list --count HEAD
58 | rm-merged = !git branch --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" { print $1 }' | xargs -r git branch -D
59 | coo = !git checkout $(git branch --sort=-committerdate | fzf --height=20% --reverse --info=inline)
60 |
--------------------------------------------------------------------------------
/git/gitconfig.secrets.example:
--------------------------------------------------------------------------------
1 | [user]
2 | name = MyName
3 | email = myemail@domain.com
4 |
--------------------------------------------------------------------------------
/git/gitignore:
--------------------------------------------------------------------------------
1 | .git/
2 | .hg/
3 | .svn/
4 | tmp/
5 | log/
6 | bin/
7 | node_modules/
8 | bower_components/
9 | .bundle/
10 |
--------------------------------------------------------------------------------
/install:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | unalias rm
4 | BASEDIR="$(cd "$(dirname "${ZSH_SOURCE[0]}")" && pwd)"
5 |
6 | link_config() {
7 | src=$1
8 | dst=$2
9 |
10 | rm -rf $HOME/$dst
11 | ln -sfn ${BASEDIR}/$src $HOME/$dst
12 | }
13 |
14 | link_dev() {
15 | echo "Installing Dev config..."
16 |
17 | link_config vim/vim .vim
18 | link_config vim/vimrc .vimrc
19 | link_config vim/gvimrc .gvimrc
20 |
21 | link_config nvim .config/nvim
22 |
23 | link_config zsh/zsh .zsh
24 | link_config zsh/zprofile .zprofile
25 | link_config zsh/zshenv .zshenv
26 | link_config zsh/zshrc .zshrc
27 |
28 | link_config git/gitconfig .gitconfig
29 | link_config git/gitconfig.secrets .gitconfig.secrets
30 | link_config git/gitignore .gitignore
31 | link_config git/gitattributes .gitattributes
32 |
33 | link_config tmux/tmux.conf .tmux.conf
34 | link_config ruby/irbrc .irbrc
35 | link_config scheme/csirc .csirc
36 | link_config rg/rgignore .rgignore
37 | link_config ctags/ctags .ctags
38 |
39 | link_config ghostty .config/ghostty
40 | link_config alacritty .config/alacritty
41 |
42 | echo "fetching vim plugins..."
43 | vim -c PlugInstall -c qall
44 |
45 | echo "fetching nvim plugins..."
46 | nvim -c Lazy install -c qall
47 |
48 | source $HOME/.zshrc
49 | echo "zshrc sourced."
50 | }
51 |
52 | link_linux_shared() {
53 | echo "Installing Linux shared config..."
54 |
55 | link_config linux_shared/zathura .config/zathura
56 | link_config linux_shared/gtk-3.0 .config/gtk-3.0
57 |
58 | echo "I'd just like to interject for a moment. What you’re referring to as
59 | Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it,
60 | GNU plus Linux. Linux is not an operating system unto itself, but rather
61 | another free component of a fully functioning GNU system made useful by
62 | the GNU corelibs, shell utilities and vital system components comprising
63 | a full OS as defined by POSIX. Many computer users run a modified
64 | version of the GNU system every day, without realizing it. Through a
65 | peculiar turn of events, the version of GNU which is widely used today
66 | is often called “Linux”, and many of its users are not aware that it is
67 | basically the GNU system, developed by the GNU Project. There really is
68 | a Linux, and these people are using it, but it is just a part of the
69 | system they use. Linux is the kernel: the program in the system that
70 | allocates the machine’s resources to the other programs that you run.
71 | The kernel is an essential part of an operating system, but useless by
72 | itself; it can only function in the context of a complete operating
73 | system. Linux is normally used in combination with the GNU operating
74 | system: the whole system is basically GNU with Linux added, or
75 | GNU/Linux. All the so-called “Linux” distributions are really
76 | distributions of GNU/Linux.
77 | "
78 | }
79 |
80 | link_linux_wayland() {
81 | echo "Installing Linux Wayland config..."
82 |
83 | link_config wayland/hypr .config/hypr
84 | link_config wayland/sway .config/sway
85 | link_config wayland/waybar .config/waybar
86 | link_config wayland/fuzzel .config/fuzzel
87 | link_config wayland/wofi .config/wofi
88 | link_config wayland/nwg-drawer .config/nwg-drawer
89 | link_config wayland/wpaperd .config/wpaperd
90 | link_config wayland/mako .config/mako
91 | link_config wayland/swaync .config/swaync
92 |
93 | link_linux_shared
94 | }
95 |
96 | link_linux_x11() {
97 | echo "Installing Linux X11 config..."
98 |
99 | link_config bin/fehbg .fehbg
100 | link_config X11/xinitrc .xinitrc
101 | link_config X11/Xresources .Xresources
102 | link_config X11/rofi .config/rofi
103 | link_config X11/picom .config/picom
104 | link_config X11/fontconfig .config/fontconfig
105 |
106 | link_linux_shared
107 | }
108 |
109 | link_macos() {
110 | echo "Installing MacOS config..."
111 |
112 | link_config macos/yabai .config/yabai
113 | link_config macos/skhd .config/skhd
114 | link_config macos/aerospace .config/aerospace
115 | link_config macos/sketchybar .config/sketchybar
116 | }
117 |
118 | link_cli_tools() {
119 | echo "Installing CLI tools..."
120 |
121 | link_config fastfetch .config/fastfetch
122 | link_config newsboat .newsboat
123 | # link_config nnn .config/nnn
124 | # link_config cmus .config/cmus
125 | }
126 |
127 | link_fonts() {
128 | echo "Installing Fonts..."
129 |
130 | [ -d $HOME/workspace/fonts/ ] || (git clone https://github.com/powerline/fonts.git $HOME/workspace/fonts/ && pushd $HOME/workspace/fonts && ./install.sh && popd)
131 |
132 | [ -d $HOME/workspace/fonts/icons-in-terminal/ ] || (git clone https://github.com/sebastiencs/icons-in-terminal.git $HOME/workspace/fonts/icons-in-terminal && pushd $HOME/workspace/fonts/icons-in-terminal && ./install.sh && popd)
133 |
134 | [ -d $HOME/workspace/icons/ ] || (git clone https://github.com/dhanishgajjar/terminal-icons $HOME/workspace/icons/terminal-icons)
135 | }
136 |
137 | echo "Creating workspace folder..."
138 | mkdir -p $HOME/workspace
139 | mkdir -p $HOME/.config
140 |
141 | echo "Updating Git submodules..."
142 | git submodule update --init --recursive --remote
143 |
144 | if [ $# -eq 0 ]; then
145 | echo "Installing all..."
146 | link_dev
147 | link_linux_wayland
148 | link_linux_x11
149 | link_macos
150 | link_cli_tools
151 | link_fonts
152 | elif [[ condition ]]; then
153 | while test $# -gt 0
154 | do
155 | case "$1" in
156 | dev)
157 | link_dev
158 | ;;
159 | linux)
160 | link_linux_wayland
161 | ;;
162 | linux-x)
163 | link_linux_x11
164 | ;;
165 | macos)
166 | link_macos
167 | ;;
168 | cli)
169 | link_cli_tools
170 | ;;
171 | fonts)
172 | link_fonts
173 | ;;
174 | *)
175 | echo "Usage: $0 [*|dev|linux|linux-x|macos|cli|fonts]"
176 | ;;
177 | esac
178 | shift
179 | done
180 | fi
181 |
--------------------------------------------------------------------------------
/linux_shared/desktop.entries/cmus.desktop:
--------------------------------------------------------------------------------
1 | # cp % ~/.local/share/applications/cmus.desktop
2 |
3 | [Desktop Entry]
4 | Type=Application
5 | Name=cmus
6 | Comment=Launches the cmus music player
7 | Icon=org.gnome.Music
8 | Terminal=false
9 | Exec=st -c 'Cmus' -e cmus
10 | Categories=Audio;Player;
11 | Keywords=Player;Audio;
12 | MimeType=application/ogg;application/x-ogg;audio/ogg;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-speex;audio/opus;application/x-flac;audio/flac;audio/x-flac;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;application/vnd.rn-realmedia-vbr;audio/vnd.rn-realaudio;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-real-audio;audio/x-realaudio;audio/mpeg;audio/mpg;audio/mp1;audio/mp2;audio/mp3;audio/x-mp1;audio/x-mp2;audio/x-mp3;audio/x-mpeg;audio/x-mpg;application/mpeg4-iod;application/mpeg4-muxcodetable;application/x-extension-m4a;application/x-extension-mp4;audio/aac;audio/m4a;audio/mp4;audio/x-m4a;audio/x-aac;application/x-quicktime-media-link;application/x-quicktimeplayer;
13 | StartupNotify=true
14 |
--------------------------------------------------------------------------------
/linux_shared/desktop.entries/newsboat.desktop:
--------------------------------------------------------------------------------
1 | # cp % ~/.local/share/applications/newsboat.desktop
2 |
3 | [Desktop Entry]
4 | Type=Application
5 | Name=newsboat
6 | Comment=An RSS/Atom feed reader for text terminals
7 | Icon=rss
8 | Terminal=false
9 | Exec=st -c 'Newsboat' -e newsboat
10 | Categories=News;
11 | StartupNotify=true
12 |
--------------------------------------------------------------------------------
/linux_shared/desktop.entries/nnn.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Name=nnn
4 | Comment=Launches the nnn file manager
5 | Icon=file-manager
6 | Terminal=true
7 | Exec=zsh -lc 'nnn -cdEFQrux'
8 | Categories=ConsoleOnly;System;FileTools;FileManager
9 | MimeType=inode/directory;
10 | Keywords=File;Manager;Browser;Explorer;Launcher
11 |
--------------------------------------------------------------------------------
/linux_shared/desktop.entries/st.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=st
3 | GenericName=Terminal
4 | StartupWMClass=st-256color
5 | Comment=standard terminal emulator for the X window system
6 | Exec=st -g "80x24"
7 | Icon=utilities-terminal
8 | Type=Application
9 | Categories=GTK;System;TerminalEmulator;
10 | StartupNotify=true
11 |
--------------------------------------------------------------------------------
/linux_shared/desktop.entries/toggle-theme.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Name=Toggle Theme
4 | Comment=Toggle system theme
5 | Exec=zsh -lc 'toggle-theme toggle'
6 | Terminal=false
7 | Icon=settings
8 | Keywords=Settings
9 |
--------------------------------------------------------------------------------
/linux_shared/desktop.entries/zathura.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Version=1.0
3 | Type=Application
4 | Name=Zathura
5 | Comment=A minimalistic document viewer
6 | Exec=zathura %U
7 | Terminal=false
8 | NoDisplay=true
9 | Categories=Office;Viewer;
10 | MimeType=application/pdf;
11 |
--------------------------------------------------------------------------------
/linux_shared/dunst/dunstrc:
--------------------------------------------------------------------------------
1 | [global]
2 | font = Hack 8
3 |
4 | # Allow a small subset of html markup:
5 | # bold
6 | # italic
7 | # strikethrough
8 | # underline
9 | #
10 | # For a complete reference see
11 | # .
12 | # If markup is not allowed, those tags will be stripped out of the
13 | # message.
14 | markup = yes
15 |
16 | # The format of the message. Possible variables are:
17 | # %a appname
18 | # %s summary
19 | # %b body
20 | # %i iconname (including its path)
21 | # %I iconname (without its path)
22 | # %p progress value if set ([ 0%] to [100%]) or nothing
23 | # Markup is allowed
24 | format = "%s\n%b %p"
25 |
26 | # Sort messages by urgency.
27 | sort = yes
28 |
29 | # Show how many messages are currently hidden (because of geometry).
30 | indicate_hidden = yes
31 |
32 | # Alignment of message text.
33 | # Possible values are "left", "center" and "right".
34 | alignment = left
35 |
36 | # The frequency with which text that is longer than the notification
37 | # window allows bounces back and forth.
38 | # This option conflicts with "word_wrap".
39 | # Set to 0 to disable.
40 | bounce_freq = 0
41 |
42 | # Show age of message if message is older than show_age_threshold
43 | # seconds.
44 | # Set to -1 to disable.
45 | show_age_threshold = 60
46 |
47 | # Split notifications into multiple lines if they don't fit into
48 | # geometry.
49 | word_wrap = yes
50 |
51 | # Ignore newlines '\n' in notifications.
52 | ignore_newline = no
53 |
54 |
55 | # The geometry of the window:
56 | # [{width}]x{height}[+/-{x}+/-{y}]
57 | # The geometry of the message window.
58 | # The height is measured in number of notifications everything else
59 | # in pixels. If the width is omitted but the height is given
60 | # ("-geometry x2"), the message window expands over the whole screen
61 | # (dmenu-like). If width is 0, the window expands to the longest
62 | # message displayed. A positive x is measured from the left, a
63 | # negative from the right side of the screen. Y is measured from
64 | # the top and down respectively.
65 | # The width can be negative. In this case the actual width is the
66 | # screen width minus the width defined in within the geometry option.
67 | geometry = "320x10-20+40"
68 |
69 | # Shrink window if it's smaller than the width. Will be ignored if
70 | # width is 0.
71 | shrink = no
72 |
73 | # The transparency of the window. Range: [0; 100].
74 | # This option will only work if a compositing window manager is
75 | # present (e.g. xcompmgr, compiz, etc.).
76 | transparency = 10
77 |
78 | frame_width = 1
79 | frame_color = "#141312"
80 |
81 | # Don't remove messages, if the user is idle (no mouse or keyboard input)
82 | # for longer than idle_threshold seconds.
83 | # Set to 0 to disable.
84 | idle_threshold = 120
85 |
86 | # Which monitor should the notifications be displayed on.
87 | monitor = 0
88 |
89 | # Display notification on focused monitor. Possible modes are:
90 | # mouse: follow mouse pointer
91 | # keyboard: follow window with keyboard focus
92 | # none: don't follow anything
93 | #
94 | # "keyboard" needs a window manager that exports the
95 | # _NET_ACTIVE_WINDOW property.
96 | # This should be the case for almost all modern window managers.
97 | #
98 | # If this option is set to mouse or keyboard, the monitor option
99 | # will be ignored.
100 | follow = none
101 |
102 | # Should a notification popped up from history be sticky or timeout
103 | # as if it would normally do.
104 | sticky_history = yes
105 |
106 | # Maximum amount of notifications kept in history
107 | history_length = 20
108 |
109 | # Display indicators for URLs (U) and actions (A).
110 | show_indicators = yes
111 |
112 | # The height of a single line. If the height is smaller than the
113 | # font height, it will get raised to the font height.
114 | # This adds empty space above and under the text.
115 | line_height = 5
116 |
117 | # Draw a line of "separator_height" pixel height between two
118 | # notifications.
119 | # Set to 0 to disable.
120 | separator_height = 2
121 |
122 | # Padding between text and separator.
123 | padding = 17
124 |
125 | # Horizontal padding.
126 | horizontal_padding = 17
127 |
128 | # Define a color for the separator.
129 | # possible values are:
130 | # * auto: dunst tries to find a color fitting to the background;
131 | # * foreground: use the same color as the foreground;
132 | # * frame: use the same color as the frame;
133 | # * anything else will be interpreted as a X color.
134 | separator_color = auto
135 |
136 | # Print a notification on startup.
137 | # This is mainly for error detection, since dbus (re-)starts dunst
138 | # automatically after a crash.
139 | startup_notification = false
140 |
141 | # Browser for opening urls in context menu.
142 | browser = $BROWSER
143 |
144 | # Align icons left/right/off
145 | icon_position = left
146 | max_icon_size = 32
147 |
148 | # Paths to default icons.
149 | icon_folders = /usr/share/icons/la-capitaine-icon-theme-0.5.0/status/scalable/:/usr/share/icons/la-capitaine-icon-theme-0.5.0/emblems/scalable:/usr/share/icons/la-capitaine-icon-theme-0.5.0/apps/scalable/
150 |
151 | [shortcuts]
152 | # Close notification.
153 | close = ctrl+space
154 |
155 | # Close all notifications.
156 | close_all = ctrl+shift+space
157 |
158 | # Redisplay last messages using ctrl+~
159 | history = ctrl+grave
160 |
161 | # Context menu.
162 | context = ctrl+shift+period
163 |
164 | [urgency_low]
165 | background = "#1b1918"
166 | foreground = "#a8a19f"
167 | timeout = 10
168 |
169 | [urgency_normal]
170 | background = "#1b1918"
171 | foreground = "#f1efee"
172 | timeout = 10
173 |
174 | [urgency_critical]
175 | background = "#1b1918"
176 | foreground = "#f22c40"
177 | timeout = 0
178 |
--------------------------------------------------------------------------------
/linux_shared/gtk-3.0/gtk.css:
--------------------------------------------------------------------------------
1 | .window-frame, .window-frame:backdrop {
2 | box-shadow: 0 0 0 black;
3 | border-style: none;
4 | margin: 0;
5 | border-radius: 0;
6 | }
7 |
8 | .titlebar {
9 | border-radius: 0;
10 | }
11 |
12 | window#vim-main-window {
13 | background-color: #1b1918;
14 | }
15 |
--------------------------------------------------------------------------------
/linux_shared/systemd/powertop.service:
--------------------------------------------------------------------------------
1 | ; sudo powertop --calibrate
2 | ; sudo cp % /etc/systemd/system/powertop.service
3 | ; sudo systemctl enable powertop
4 |
5 | [Unit]
6 | Description=Powertop tunings
7 |
8 | [Service]
9 | Type=oneshot
10 | ExecStart=/usr/bin/powertop --auto-tune
11 |
12 | [Install]
13 | WantedBy=multi-user.target
14 |
--------------------------------------------------------------------------------
/linux_shared/systemd/tlp:
--------------------------------------------------------------------------------
1 | # /etc/default/tlp
2 | # ------------------------------------------------------------------------------
3 | # tlp - Parameters for power save
4 |
5 | # Hint: some features are disabled by default, remove the leading # to enable
6 | # them.
7 |
8 | # Set to 0 to disable, 1 to enable TLP.
9 | TLP_ENABLE=1
10 |
11 | # Dirty page values (timeouts in secs).
12 | MAX_LOST_WORK_SECS_ON_BAT=15
13 |
14 | # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
15 | # required). Charging starts when the remaining capacity falls below the
16 | # START_CHARGE_TRESH value and stops when exceeding the STOP_CHARGE_TRESH value.
17 | # Main / Internal battery (values in %)
18 | START_CHARGE_THRESH_BAT0=75
19 | STOP_CHARGE_THRESH_BAT0=90
20 | # Ultrabay / Slice / Replaceable battery (values in %)
21 | START_CHARGE_THRESH_BAT1=75
22 | STOP_CHARGE_THRESH_BAT1=90
23 |
--------------------------------------------------------------------------------
/linux_shared/systemd/wakelock.service:
--------------------------------------------------------------------------------
1 | ; /etc/systemd/system/wakelock.service
2 | ; systemctl daemon-reload && systemctl enable wakelock.service
3 |
4 | [Unit]
5 | Description = Lock the screen after system resume
6 | Before = sleep.target
7 | Before = suspend.target
8 | Before = hibernate.target
9 | Before = hybrid-sleep.target
10 |
11 | [Service]
12 | User = aonemd
13 | Type = simple
14 | Environment = DISPLAY=:0
15 | ExecStart = /home/aonemd/workspace/aaku/bin/screenlock
16 |
17 | [Install]
18 | WantedBy = sleep.target
19 | WantedBy = suspend.target
20 | WantedBy = hibernate.target
21 | WantedBy = hybrid-sleep.target
22 |
--------------------------------------------------------------------------------
/linux_shared/zathura/zathurarc:
--------------------------------------------------------------------------------
1 | set sandbox none
2 |
3 | # Open document in fit-width mode by default
4 | set adjust-open "best-fit"
5 |
6 | # One page per row by default
7 | set pages-per-row 1
8 |
9 | #stop at page boundries
10 | set scroll-page-aware "true"
11 | set scroll-full-overlap 0.01
12 | set scroll-step 100
13 |
14 | # zoom and scroll step size
15 | set zoom-step 20
16 | set scroll-step 80
17 |
18 | # copy selection to system clipboard
19 | set selection-clipboard clipboard
20 |
21 | set window-title-basename "true"
22 | set statusbar-basename
23 |
24 | # enable incremental search
25 | set incremental-search true
26 |
27 | set statusbar-h-padding 0
28 | set statusbar-v-padding 0
29 | set page-padding 1
30 |
31 | map r reload
32 |
33 | set statusbar-fg "#B0B0B0" #04
34 | set statusbar-bg "#202020" #01
35 |
36 | set inputbar-bg "#151515" #00 currently not used
37 | set inputbar-fg "#FFFFFF" #02
38 |
39 | set notification-error-bg "#AC4142" #08
40 | set notification-error-fg "#151515" #00
41 |
42 | set notification-warning-bg "#AC4142" #08
43 | set notification-warning-fg "#151515" #00
44 |
45 | set highlight-color "#d5911a"
46 | set highlight-active-color "#d5911a"
47 |
48 | set recolor-lightcolor \#1b1918
49 | set recolor-darkcolor \#f1efee
50 | set recolor-reverse-video "true"
51 | set recolor-keephue "true"
52 |
--------------------------------------------------------------------------------
/macos/Brewfile:
--------------------------------------------------------------------------------
1 | tap "derailed/k9s"
2 | tap "felixkratz/formulae"
3 | tap "homebrew/bundle"
4 | tap "homebrew/cask-fonts"
5 | tap "homebrew/services"
6 | tap "nats-io/nats-tools"
7 | tap "nikitabobko/tap"
8 | tap "oven-sh/bun"
9 | tap "rhysd/git-brws", "https://github.com/rhysd/git-brws"
10 | tap "withgraphite/tap"
11 | tap "xwmx/taps"
12 | brew "webp"
13 | brew "jpeg-xl"
14 | brew "aom"
15 | brew "automake"
16 | brew "aws-vault"
17 | brew "readline"
18 | brew "python@3.11"
19 | brew "awscli"
20 | brew "bison"
21 | brew "btop"
22 | brew "node"
23 | brew "terraform"
24 | brew "cdktf"
25 | brew "pycparser"
26 | brew "cffi"
27 | brew "chruby"
28 | brew "curl"
29 | brew "libavif"
30 | brew "gd"
31 | brew "krb5"
32 | brew "php"
33 | brew "composer"
34 | brew "cpufetch"
35 | brew "docutils"
36 | brew "fastfetch"
37 | brew "fd"
38 | brew "fennel"
39 | brew "gnutls"
40 | brew "openjpeg"
41 | brew "leptonica"
42 | brew "libarchive"
43 | brew "openblas"
44 | brew "openvino"
45 | brew "tesseract"
46 | brew "ffmpeg"
47 | brew "flyctl"
48 | brew "freeglut"
49 | brew "fzf"
50 | brew "gdbm"
51 | brew "gifsicle"
52 | brew "git-filter-repo"
53 | brew "glow"
54 | brew "gnupg"
55 | brew "go"
56 | brew "gpgme"
57 | brew "openjdk"
58 | brew "gradle"
59 | brew "netpbm"
60 | brew "librsvg"
61 | brew "graphviz"
62 | brew "helm"
63 | brew "htop"
64 | brew "hyperfine"
65 | brew "jdtls"
66 | brew "jq"
67 | brew "kotlin"
68 | brew "kubernetes-cli"
69 | brew "ledger"
70 | brew "libffi"
71 | brew "libyaml"
72 | brew "macchina"
73 | brew "mongosh"
74 | brew "neovim"
75 | brew "openssl@1.1"
76 | brew "parquet-cli"
77 | brew "pfetch"
78 | brew "plantuml"
79 | brew "protobuf"
80 | brew "ripgrep"
81 | brew "ruby-install"
82 | brew "tmux"
83 | brew "tree"
84 | brew "vault"
85 | brew "zenith"
86 | brew "derailed/k9s/k9s"
87 | brew "felixkratz/formulae/sketchybar"
88 | brew "nats-io/nats-tools/nats"
89 | brew "oven-sh/bun/bun"
90 | brew "rhysd/git-brws/git-brws"
91 | brew "withgraphite/tap/graphite"
92 | brew "xwmx/taps/airport"
93 | cask "aerospace"
94 | cask "alacritty"
95 | cask "brave-browser"
96 | cask "chromium"
97 | cask "dbeaver-community"
98 | cask "dropbox"
99 | cask "firefox"
100 | cask "font-hack-nerd-font"
101 | cask "font-maple"
102 | cask "font-monaspace"
103 | cask "font-sf-pro"
104 | cask "kitty"
105 | cask "lens"
106 | cask "postman"
107 | cask "slack"
108 | cask "spotify"
109 | cask "stremio"
110 | cask "visual-studio-code"
111 | vscode "adpyke.vscode-sql-formatter"
112 | vscode "andys8.jest-snippets"
113 | vscode "arahata.linter-actionlint"
114 | vscode "bierner.markdown-mermaid"
115 | vscode "bmewburn.vscode-intelephense-client"
116 | vscode "bradlc.vscode-tailwindcss"
117 | vscode "codezombiech.gitignore"
118 | vscode "cweijan.vscode-autohotkey-plus"
119 | vscode "danielgjackson.auto-dark-mode-windows"
120 | vscode "danishsarwar.reverse-search"
121 | vscode "davidanson.vscode-markdownlint"
122 | vscode "davidbwaters.macos-modern-theme"
123 | vscode "dbaeumer.vscode-eslint"
124 | vscode "dsznajder.es7-react-js-snippets"
125 | vscode "eamodio.gitlens"
126 | vscode "endersdev.seti-dark-pro"
127 | vscode "esbenp.prettier-vscode"
128 | vscode "firsttris.vscode-jest-runner"
129 | vscode "fnando.linter"
130 | vscode "formulahendry.auto-close-tag"
131 | vscode "formulahendry.auto-rename-tag"
132 | vscode "github.vscode-github-actions"
133 | vscode "golang.go"
134 | vscode "graphql.vscode-graphql"
135 | vscode "graphql.vscode-graphql-syntax"
136 | vscode "hashicorp.terraform"
137 | vscode "inu1255.easy-snippet"
138 | vscode "jebbs.plantuml"
139 | vscode "mathiasfrohlich.kotlin"
140 | vscode "mhutchie.git-graph"
141 | vscode "ms-azuretools.vscode-docker"
142 | vscode "ms-kubernetes-tools.vscode-kubernetes-tools"
143 | vscode "ms-playwright.playwright"
144 | vscode "ms-vscode-remote.remote-containers"
145 | vscode "ms-vscode.makefile-tools"
146 | vscode "ms-vsliveshare.vsliveshare"
147 | vscode "nrwl.angular-console"
148 | vscode "octref.vetur"
149 | vscode "orta.vscode-jest"
150 | vscode "prisma.prisma"
151 | vscode "qezhu.gitlink"
152 | vscode "rangav.vscode-thunder-client"
153 | vscode "redhat.vscode-yaml"
154 | vscode "streetsidesoftware.code-spell-checker"
155 | vscode "tonybaloney.vscode-pets"
156 | vscode "vscode-icons-team.vscode-icons"
157 | vscode "vscodevim.vim"
158 | vscode "vue.volar"
159 | vscode "wayou.vscode-todo-highlight"
160 | vscode "wix.vscode-import-cost"
161 | vscode "wmaurer.change-case"
162 | vscode "yoavbls.pretty-ts-errors"
163 | vscode "zxh404.vscode-proto3"
164 |
--------------------------------------------------------------------------------
/macos/aerospace/aerospace.toml:
--------------------------------------------------------------------------------
1 | # Place a copy of this config to ~/.aerospace.toml
2 | # After that, you can edit ~/.aerospace.toml to your liking
3 |
4 | # It's not necessary to copy all keys to your config.
5 | # If the key is missing in your config, "default-config.toml" will serve as a fallback
6 |
7 | # You can use it to add commands that run after login to macOS user session.
8 | # 'start-at-login' needs to be 'true' for 'after-login-command' to work
9 | # Available commands: https://nikitabobko.github.io/AeroSpace/commands
10 | after-login-command = []
11 |
12 | # 'after-startup-command' is run after 'after-login-command'
13 | # after-startup-command = ['exec-and-forget sketchybar']
14 | # exec-on-workspace-change = ['/bin/bash', '-c',
15 | # 'sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE'
16 | # ]
17 |
18 | # Start AeroSpace at login
19 | start-at-login = true
20 |
21 | # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
22 | # enable-normalization-flatten-containers = true
23 | # enable-normalization-opposite-orientation-for-nested-containers = true
24 | enable-normalization-flatten-containers = false
25 | enable-normalization-opposite-orientation-for-nested-containers = false
26 |
27 | accordion-padding = 300
28 |
29 | # Possible values: tiles|accordion
30 | default-root-container-layout = 'tiles'
31 |
32 | # Possible values: horizontal|vertical|auto
33 | # 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
34 | # tall monitor (anything higher than wide) gets vertical orientation
35 | default-root-container-orientation = 'auto'
36 |
37 | key-mapping.preset = 'qwerty'
38 |
39 | # Mouse follows focus when focused monitor changes
40 | # Drop it from your config, if you don't like this behavior
41 | on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
42 | on-focus-changed = [
43 | 'move-mouse window-lazy-center',
44 | # 'exec-and-forget /bin/bash -c /opt/homebrew/bin/sketchybar --trigger front_app_switched',
45 | # 'exec-and-forget sketchybar --trigger update_windows'
46 | ]
47 |
48 | [[on-window-detected]]
49 | if.app-name-regex-substring = 'finder'
50 | run = 'layout floating'
51 |
52 | [gaps]
53 | inner.horizontal = 15
54 | inner.vertical = 15
55 | outer.left = 15
56 | outer.bottom = 15
57 | outer.top = 15
58 | outer.right = 15
59 |
60 | ## keymaps
61 | [mode.main.binding]
62 | # All possible keys:
63 | # - Letters. a, b, c, ..., z
64 | # - Numbers. 0, 1, 2, ..., 9
65 | # - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
66 | # - F-keys. f1, f2, ..., f20
67 | # - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
68 | # leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
69 | # - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
70 | # keypadMinus, keypadMultiply, keypadPlus
71 | # - Arrows. left, down, up, right
72 | # All possible modifiers: cmd, alt, ctrl, shift
73 |
74 | ## apps
75 | cmd-enter = 'exec-and-forget open -a /Applications/Ghostty.app'
76 |
77 | ## layouts
78 | # See: https://nikitabobko.github.io/AeroSpace/commands#layout
79 | cmd-slash = 'layout tiles horizontal vertical'
80 | cmd-comma = 'layout accordion horizontal vertical'
81 |
82 | ## windows
83 | alt-shift-f = 'fullscreen'
84 | cmd-shift-f = 'layout floating tiling'
85 |
86 | cmd-h = 'focus --boundaries all-monitors-outer-frame --boundaries-action stop left'
87 | cmd-j = 'focus --boundaries all-monitors-outer-frame --boundaries-action stop down'
88 | cmd-k = 'focus --boundaries all-monitors-outer-frame --boundaries-action stop up'
89 | cmd-l = 'focus --boundaries all-monitors-outer-frame --boundaries-action stop right'
90 |
91 | cmd-shift-h = 'move left'
92 | cmd-shift-j = 'move down'
93 | cmd-shift-k = 'move up'
94 | cmd-shift-l = 'move right'
95 |
96 | cmd-shift-left = ['join-with left']
97 | cmd-shift-down = ['join-with down']
98 | cmd-shift-up = ['join-with up']
99 | cmd-shift-right = ['join-with right']
100 |
101 | cmd-shift-minus = 'resize smart -50'
102 | cmd-shift-equal = 'resize smart +50'
103 |
104 | ## workspaces
105 | cmd-1 = 'workspace --auto-back-and-forth 1'
106 | cmd-2 = 'workspace --auto-back-and-forth 2'
107 | cmd-3 = 'workspace --auto-back-and-forth 3'
108 | cmd-4 = 'workspace --auto-back-and-forth 4'
109 | cmd-5 = 'workspace --auto-back-and-forth 5'
110 |
111 | cmd-shift-1 = 'move-node-to-workspace 1'
112 | cmd-shift-2 = 'move-node-to-workspace 2'
113 | cmd-shift-3 = 'move-node-to-workspace 3'
114 | cmd-shift-4 = 'move-node-to-workspace 4'
115 | cmd-shift-5 = 'move-node-to-workspace 5'
116 |
117 | cmd-left = 'workspace --wrap-around prev'
118 | cmd-right = 'workspace --wrap-around next'
119 |
120 | alt-tab = 'workspace-back-and-forth'
121 | alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
122 |
123 | ## modes
124 | # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
125 |
126 | cmd-shift-semicolon = 'mode service'
127 |
128 | [mode.service.binding]
129 | esc = ['reload-config', 'mode main']
130 | r = ['flatten-workspace-tree', 'mode main'] # reset layout
131 | backspace = ['close-all-windows-but-current', 'mode main']
132 | #s = ['layout sticky tiling', 'mode main'] # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
133 |
--------------------------------------------------------------------------------
/macos/sketchybar/colors.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ### Sonokai
4 | # export BLACK=0xff181819
5 | # export WHITE=0xffe2e2e3
6 | # export RED=0xfffc5d7c
7 | # export GREEN=0xff9ed072
8 | # export BLUE=0xff76cce0
9 | # export YELLOW=0xffe7c664
10 | # export ORANGE=0xfff39660
11 | # export MAGENTA=0xffb39df3
12 | # export GREY=0xff7f8490
13 | # export TRANSPARENT=0x00000000
14 | # export BG0=0xff2c2e34
15 | # export BG1=0xff363944
16 | # export BG2=0xff414550
17 |
18 | ### Catppuccin
19 | export BLACK=0xff181926
20 | export WHITE=0xffcad3f5
21 | export RED=0xffed8796
22 | export GREEN=0xffa6da95
23 | export BLUE=0xff8aadf4
24 | export YELLOW=0xffeed49f
25 | export ORANGE=0xfff5a97f
26 | export MAGENTA=0xffc6a0f6
27 | export GREY=0xff939ab7
28 | export TRANSPARENT=0x00000000
29 | export BG0=0xff1e1e2e
30 | export BG1=0x603c3e4f
31 | export BG2=0x60494d64
32 |
33 | export BATTERY_1=0xffa6da95
34 | export BATTERY_2=0xffeed49f
35 | export BATTERY_3=0xfff5a97f
36 | export BATTERY_4=0xffee99a0
37 | export BATTERY_5=0xffed8796
38 |
39 | # General bar colors
40 | export BAR_COLOR=$BG0
41 | export BAR_BORDER_COLOR=$BG2
42 | export BACKGROUND_1=$BG1
43 | export BACKGROUND_2=$BG2
44 | export ICON_COLOR=$WHITE # Color of all icons
45 | export LABEL_COLOR=$WHITE # Color of all labels
46 | export POPUP_BACKGROUND_COLOR=$BAR_COLOR
47 | export POPUP_BORDER_COLOR=$WHITE
48 | export SHADOW_COLOR=$BLACK
49 |
50 |
--------------------------------------------------------------------------------
/macos/sketchybar/icons.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # General Icons
4 | LOADING=
5 | APPLE=
6 | PREFERENCES=
7 | ACTIVITY=
8 | LOCK=
9 | BELL=
10 | BELL_DOT=
11 |
12 | # Git Icons
13 | GIT_ISSUE=
14 | GIT_DISCUSSION=
15 | GIT_PULL_REQUEST=
16 | GIT_COMMIT=
17 | GIT_INDICATOR=
18 |
19 | # Spotify Icons
20 | SPOTIFY_BACK=
21 | SPOTIFY_PLAY_PAUSE=
22 | SPOTIFY_NEXT=
23 | SPOTIFY_SHUFFLE=
24 | SPOTIFY_REPEAT=
25 |
26 | # Yabai Icons
27 | YABAI_STACK=
28 | YABAI_FULLSCREEN_ZOOM=
29 | YABAI_PARENT_ZOOM=
30 | YABAI_FLOAT=
31 | YABAI_GRID=
32 |
33 | # Battery Icons
34 | BATTERY_100=
35 | BATTERY_75=
36 | BATTERY_50=
37 | BATTERY_25=
38 | BATTERY_0=
39 | BATTERY_CHARGING=
40 |
41 | # Volume Icons
42 | VOLUME_100=
43 | VOLUME_66=
44 | VOLUME_33=
45 | VOLUME_10=
46 | VOLUME_0=
47 |
48 | # WiFi
49 | WIFI_CONNECTED=
50 | WIFI_DISCONNECTED=
51 |
52 | # svim
53 | MODE_NORMAL=
54 | MODE_INSERT=
55 | MODE_VISUAL=
56 | MODE_CMD=
57 | MODE_PENDING=
58 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/aerospace.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # make sure it's executable with:
4 | # chmod +x ~/.config/sketchybar/plugins/aerospace.sh
5 |
6 | if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
7 | sketchybar --set $NAME background.drawing=on
8 | else
9 | sketchybar --set $NAME background.drawing=off
10 | fi
11 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/apple.sh:
--------------------------------------------------------------------------------
1 | #a!/bin/bash
2 |
3 | POPUP_OFF='sketchybar --set apple.logo popup.drawing=off'
4 | POPUP_CLICK_SCRIPT='sketchybar --set $NAME popup.drawing=toggle'
5 |
6 | apple_logo=(
7 | icon=$APPLE
8 | icon.font="$FONT:Black:16.0"
9 | icon.color=$WHITE
10 | padding_right=15
11 | label.drawing=off
12 | click_script="$POPUP_CLICK_SCRIPT"
13 | popup.height=35
14 | )
15 |
16 | apple_prefs=(
17 | icon=$PREFERENCES
18 | label="Preferences"
19 | click_script="open -a 'System Preferences'; $POPUP_OFF"
20 | )
21 |
22 | apple_activity=(
23 | icon=$ACTIVITY
24 | label="Activity"
25 | click_script="open -a 'Activity Monitor'; $POPUP_OFF"
26 | )
27 |
28 | apple_lock=(
29 | icon=$LOCK
30 | label="Lock Screen"
31 | click_script="pmset displaysleepnow; $POPUP_OFF"
32 | )
33 |
34 | sketchybar --add item apple.logo left \
35 | --set apple.logo "${apple_logo[@]}" \
36 | \
37 | --add item apple.prefs popup.apple.logo \
38 | --set apple.prefs "${apple_prefs[@]}" \
39 | \
40 | --add item apple.activity popup.apple.logo \
41 | --set apple.activity "${apple_activity[@]}" \
42 | \
43 | --add item apple.lock popup.apple.logo \
44 | --set apple.lock "${apple_lock[@]}"
45 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/battery.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)"
4 | CHARGING="$(pmset -g batt | grep 'AC Power')"
5 |
6 | if [ "$PERCENTAGE" = "" ]; then
7 | exit 0
8 | fi
9 |
10 | case "${PERCENTAGE}" in
11 | 9[0-9]|100) ICON=""
12 | ;;
13 | [6-8][0-9]) ICON=""
14 | ;;
15 | [3-5][0-9]) ICON=""
16 | ;;
17 | [1-2][0-9]) ICON=""
18 | ;;
19 | *) ICON=""
20 | esac
21 |
22 | if [[ "$CHARGING" != "" ]]; then
23 | ICON=""
24 | fi
25 |
26 | # The item invoking this script (name $NAME) will get its icon and label
27 | # updated with the current battery status
28 | sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}%"
29 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/clock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # The $NAME variable is passed from sketchybar and holds the name of
4 | # the item invoking this script:
5 | # https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
6 |
7 | sketchybar --set "$NAME" label="$(date '+%a %d %b %H:%M')"
8 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/front_app.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Some events send additional information specific to the event in the $INFO
4 | # variable. E.g. the front_app_switched event sends the name of the newly
5 | # focused application in the $INFO variable:
6 | # https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
7 |
8 | if [ "$SENDER" = "front_app_switched" ]; then
9 | sketchybar --set "$NAME" label="$INFO"
10 | fi
11 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/space.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # The $SELECTED variable is available for space components and indicates if
4 | # the space invoking this script (with name: $NAME) is currently selected:
5 | # https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
6 |
7 | sketchybar --set "$NAME" background.drawing="$SELECTED"
8 |
--------------------------------------------------------------------------------
/macos/sketchybar/plugins/volume.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # The volume_change event supplies a $INFO variable in which the current volume
4 | # percentage is passed to the script.
5 |
6 | if [ "$SENDER" = "volume_change" ]; then
7 | VOLUME="$INFO"
8 |
9 | case "$VOLUME" in
10 | [6-9][0-9]|100) ICON=""
11 | ;;
12 | [3-5][0-9]) ICON=""
13 | ;;
14 | [1-9]|[1-2][0-9]) ICON=""
15 | ;;
16 | *) ICON=""
17 | esac
18 |
19 | sketchybar --set "$NAME" icon="$ICON" label="$VOLUME%"
20 | fi
21 |
--------------------------------------------------------------------------------
/macos/sketchybar/sketchybarrc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | # This is a demo config to showcase some of the most important commands.
4 | # It is meant to be changed and configured, as it is intentionally kept sparse.
5 | # For a (much) more advanced configuration example see my dotfiles:
6 | # https://github.com/FelixKratz/dotfiles
7 |
8 | PLUGIN_DIR="$CONFIG_DIR/plugins"
9 |
10 | source "$CONFIG_DIR/colors.sh" # Loads all defined colors
11 | source "$CONFIG_DIR/icons.sh" # Loads all defined icons
12 |
13 | ##### Bar Appearance #####
14 | # Configuring the general appearance of the bar.
15 | # These are only some of the options available. For all options see:
16 | # https://felixkratz.github.io/SketchyBar/config/bar
17 | # If you are looking for other colors, see the color picker:
18 | # https://felixkratz.github.io/SketchyBar/config/tricks#color-picker
19 |
20 | sketchybar --bar position=top height=25 blur_radius=30 color=0x40000000 topmost=off
21 |
22 |
23 | # aerospace setting
24 | AEROSPACE_FOCUSED_MONITOR_NO=$(aerospace list-workspaces --focused)
25 | AEROSPACE_LIST_OF_WINDOWS_IN_FOCUSED_MONITOR=$(aerospace list-windows --workspace $AEROSPACE_FOCUSED_MONITOR_NO | awk -F'|' '{gsub(/^ *| *$/, "", $2); print $2}')
26 |
27 | ##### Changing Defaults #####
28 | # We now change some default values, which are applied to all further items.
29 | # For a full list of all available item properties see:
30 | # https://felixkratz.github.io/SketchyBar/config/items
31 |
32 | default=(
33 | padding_left=5
34 | padding_right=5
35 | icon.font="Hack Nerd Font:Bold:17.0"
36 | label.font="Hack Nerd Font:Bold:14.0"
37 | icon.color=0xffffffff
38 | label.color=0xffffffff
39 | icon.padding_left=4
40 | icon.padding_right=4
41 | label.padding_left=4
42 | label.padding_right=4
43 | )
44 | sketchybar --default "${default[@]}"
45 |
46 | ##### Adding Mission Control Space Indicators #####
47 | # Let's add some mission control spaces:
48 | # https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
49 | # to indicate active and available mission control spaces.
50 | sketchybar --add event aerospace_workspace_change
51 |
52 | for sid in $(aerospace list-workspaces --all); do
53 | sketchybar --add item space.$sid left \
54 | --subscribe space.$sid aerospace_workspace_change \
55 | --set space.$sid \
56 | background.color=0x44ffffff \
57 | background.corner_radius=5 \
58 | icon.padding_left=3 \
59 | icon.padding_right=3 \
60 | background.height=20 \
61 | background.drawing=off \
62 | label="$sid" \
63 | click_script="aerospace workspace $sid" \
64 | script="$CONFIG_DIR/plugins/aerospace.sh $sid"
65 | done
66 |
67 | # SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10")
68 | # for i in "${!SPACE_ICONS[@]}"
69 | # do
70 | # sid="$(($i+1))"
71 | # space=(
72 | # space="$sid"
73 | # icon="${SPACE_ICONS[i]}"
74 | # icon.padding_left=7
75 | # icon.padding_right=7
76 | # background.color=0x40ffffff
77 | # background.corner_radius=5
78 | # background.height=25
79 | # label.drawing=off
80 | # script="$PLUGIN_DIR/space.sh"
81 | # click_script="yabai -m space --focus $sid"
82 | # )
83 | # sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}"
84 | # done
85 |
86 | ##### Adding Left Items #####
87 | # We add some regular items to the left side of the bar, where
88 | # only the properties deviating from the current defaults need to be set
89 |
90 | sketchybar --add item chevron left \
91 | --set chevron icon= label.drawing=off \
92 | --add item front_app left \
93 | --set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \
94 | --subscribe front_app front_app_switched
95 |
96 | ##### Adding Right Items #####
97 | # In the same way as the left items we can add items to the right side.
98 | # Additional position (e.g. center) are available, see:
99 | # https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar
100 |
101 | # Some items refresh on a fixed cycle, e.g. the clock runs its script once
102 | # every 10s. Other items respond to events they subscribe to, e.g. the
103 | # volume.sh script is only executed once an actual change in system audio
104 | # volume is registered. More info about the event system can be found here:
105 | # https://felixkratz.github.io/SketchyBar/config/events
106 |
107 | sketchybar --add item clock right \
108 | --set clock update_freq=10 script="$PLUGIN_DIR/clock.sh" \
109 | --add item volume right \
110 | --set volume script="$PLUGIN_DIR/volume.sh" \
111 | --subscribe volume volume_change \
112 | --add item battery right \
113 | --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
114 | --subscribe battery system_woke power_source_change
115 | source "$PLUGIN_DIR/apple.sh"
116 |
117 | ##### Force all scripts to run the first time (never do this in a script) #####
118 | sketchybar --update
119 |
--------------------------------------------------------------------------------
/macos/skhd/skhdrc:
--------------------------------------------------------------------------------
1 | # Restart skhd:
2 | # brew services reload skhd
3 |
4 | # Error: `cannot focus space due to an error with the scripting-addition`
5 | # sudo yabai --uninstall-sa
6 | # sudo yabai --install-sa
7 | # sudo yabai --load-sa
8 |
9 | alt - t : open -n /Applications/Ghostty.app
10 |
11 | # Restart yabai
12 | ctrl + alt - q : yabai --stop-service
13 | ctrl + alt - s : yabai --start-service
14 | ctrl + alt - r : yabai --restart-service
15 |
16 | ## Windows
17 | #
18 | # Navigation
19 | alt - h : yabai -m window --focus west
20 | alt - j : yabai -m window --focus south
21 | alt - k : yabai -m window --focus north
22 | alt - l : yabai -m window --focus east
23 | # Moving windows
24 | shift + alt - h : yabai -m window --warp west
25 | shift + alt - j : yabai -m window --warp south
26 | shift + alt - k : yabai -m window --warp north
27 | shift + alt - l : yabai -m window --warp east
28 | # Resize windows
29 | lctrl + alt - h : \
30 | yabai -m window --resize left:-20:0 ; \
31 | yabai -m window --resize right:-20:0
32 | lctrl + alt - l : \
33 | yabai -m window --resize left:20:0 ; \
34 | yabai -m window --resize right:-20:0 ; \
35 | lctrl + alt - j : \
36 | yabai -m window --resize bottom:0:20 ; \
37 | yabai -m window --resize top:0:20
38 | lctrl + alt - k : \
39 | yabai -m window --resize top:0:-20 ; \
40 | yabai -m window --resize bottom:0:-20
41 |
42 | # Float
43 | alt - f : yabai -m window --toggle float --grid 4:4:1:1:2:2
44 | # Switch layout to bsp on space
45 | shift + alt + ctrl - b : yabai -m space --layout bsp
46 | # Switch layout to stack on space
47 | shift + alt + ctrl - s : yabai -m space --layout stack
48 |
49 | # Fullscreen
50 | shift + alt - f : yabai -m window --toggle native-fullscreen
51 | # balance out tree of windows (resize to occupy same area)
52 | shift + alt - e : yabai -m space --balance
53 |
54 | # Rotate windows clockwise and anticlockwise
55 | alt - r : yabai -m space --rotate 270
56 | shift + alt - r : yabai -m space --rotate 90 yabai -m window --resize left:20:0
57 |
58 | # Rotate on X and Y Axis
59 | alt - x : yabai -m space --mirror x-axis
60 | alt - y : yabai -m space --mirror y-axis
61 |
62 | # Toggle window split position: left or down
63 | alt - e : yabai -m window --toggle split
64 |
65 | # Set insertion point for focused container
66 | cmd + alt - h : yabai -m window --insert west
67 | cmd + alt - j : yabai -m window --insert south
68 | cmd + alt - k : yabai -m window --insert north
69 | cmd + alt - l : yabai -m window --insert east
70 |
71 | # Toggle window gaps
72 | cmd + alt - p : yabai -m space --toggle gap; yabai -m space --toggle padding
73 |
74 | ## workspaces
75 | #
76 | # Navigation
77 | # Switch to spacific spaces
78 | # lctrl - 1 : yabai -m space --focus 1
79 | # lctrl - 2 : yabai -m space --focus 2
80 | # lctrl - 3 : yabai -m space --focus 3
81 | # lctrl - 4 : yabai -m space --focus 4
82 | # lctrl - 5 : yabai -m space --focus 5
83 | # lctrl - 6 : yabai -m space --focus 6
84 | # lctrl - 7 : yabai -m space --focus 7
85 | # lctrl - 8 : yabai -m space --focus 8
86 |
87 | # Move windows to workspaces
88 | shift + lctrl - left : yabai -m window --space prev && yabai -m space --focus prev
89 | shift + lctrl - right : yabai -m window --space next && yabai -m space --focus next
90 |
91 | shift + lctrl - 1 : yabai -m window --space 1; yabai -m space --focus 1
92 | shift + lctrl - 2 : yabai -m window --space 2; yabai -m space --focus 2
93 | shift + lctrl - 3 : yabai -m window --space 3; yabai -m space --focus 3
94 | shift + lctrl - 4 : yabai -m window --space 4; yabai -m space --focus 4
95 | shift + lctrl - 5 : yabai -m window --space 5; yabai -m space --focus 5
96 | shift + lctrl - 6 : yabai -m window --space 6; yabai -m space --focus 6
97 | shift + lctrl - 7 : yabai -m window --space 7; yabai -m space --focus 7
98 | shift + lctrl - 8 : yabai -m window --space 8; yabai -m space --focus 8
99 |
--------------------------------------------------------------------------------
/macos/yabai/yabairc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | # load scriptting adittion
4 | sudo yabai --load-sa
5 | yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
6 |
7 | # global settings
8 | # focus window that your mouse hovers on (disabled due to right click bugs)
9 | yabai -m config focus_follows_mouse off
10 | yabai -m config window_placement second_child
11 | # floating windows always stay on top
12 | yabai -m config window_topmost off
13 | # enable borders
14 | yabai -m config window_border off
15 | # no clue what this is
16 | yabai -m config insert_feedback_color 0xffd75f5f
17 | yabai -m config split_ratio 0.50
18 | # don't automatically rebalance windows
19 | yabai -m config auto_balance off
20 | # modifier for clicking and dragging with mouse
21 | yabai -m config mouse_modifier alt
22 | # swap windows if moved with mouse
23 | yabai -m config mouse_action1 move
24 | # resize windows if resized with mouse
25 | yabai -m config mouse_action2 resize
26 | yabai -m config mouse_drop_action swap
27 |
28 | # general space settings
29 | yabai -m config layout bsp
30 | yabai -m config top_padding 10
31 | yabai -m config bottom_padding 10
32 | yabai -m config left_padding 10
33 | yabai -m config right_padding 10
34 | yabai -m config window_gap 15
35 |
36 | # SIP Required
37 | # prevent border from being under the active window
38 | yabai -m config active_window_border_topmost on
39 | yabai -m config window_shadow on
40 | yabai -m config window_opacity off
41 | yabai -m config window_border_width 6
42 | yabai -m config active_window_border_color 0xffff3050
43 | yabai -m config normal_window_border_color 0xffaaaaaa
44 |
45 | yabai -m rule --add app="^System Preferences$" manage=off
46 | yabai -m rule --add app="^System Settings$" manage=off
47 | yabai -m rule --add app="Preferences$" manage=off topmost=on
48 | yabai -m rule --add app="Finder" manage=off
49 | yabai -m rule --add app="Calendar" manage=off
50 | yabai -m rule --add app="Spotify" manage=off
51 | yabai -m rule --add app="Obsidian" manage=off
52 | yabai -m rule --add app="Anghami" manage=off
53 | yabai -m rule --add app="Slack" manage=off
54 | yabai -m rule --add app="zoom.us" manage=off
55 | yabai -m rule --add app="^.*VPN.*$" manage=off
56 | yabai -m rule --add app="KeeWeb" manage=off
57 | yabai -m rule --add app="^.*Docker.*$" manage=off
58 | yabai -m rule --add app="^.*VLC.*$" manage=off
59 |
--------------------------------------------------------------------------------
/nnn/plugins/launch:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | # Description: Independent POSIX-compliant GUI application launcher.
4 | # Fuzzy find executables in $PATH and launch an application.
5 | # stdin, stdout, stderr are suppressed so CLI tools exit silently.
6 | #
7 | # To configure launch as an independent app launcher add a keybind
8 | # to open launch in a terminal e.g.,
9 | #
10 | # xfce4-terminal -e "${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/launch
11 | #
12 | # Dependencies: fzf
13 | #
14 | # Usage: launch [delay]
15 | # delay is in seconds, if omitted launch waits for 1 sec
16 | #
17 | # Integration with nnn: launch is installed with other plugins, nnn picks it up.
18 | #
19 | # Shell: POSIX compliant
20 | # Author: Arun Prakash Jana
21 |
22 | # shellcheck disable=SC2086
23 |
24 | IFS=':'
25 |
26 | get_selection() {
27 | if which fzf >/dev/null 2>&1; then
28 | { IFS=':'; ls -H $PATH; } | sort | fzf
29 | else
30 | exit 1
31 | fi
32 | }
33 |
34 | if selection=$( get_selection ); then
35 | setsid "$selection" 2>/dev/null 1>/dev/null &
36 |
37 | if ! [ -z "$1" ]; then
38 | sleep "$1"
39 | else
40 | sleep 1
41 | fi
42 | fi
43 |
--------------------------------------------------------------------------------
/nvim/fnl/colorscheme.fnl:
--------------------------------------------------------------------------------
1 | (local get-system-mode (fn []
2 | (match (io.open (.. (os.getenv "HOME") "/.config/system-theme"))
3 | f (do (local mode (f:read))
4 | (f:close)
5 | mode)
6 | (nil err-msg) (print "Could not open file:" err-msg))))
7 | (local get-editor-mode (fn [] (vim.api.nvim_get_option "background")))
8 | (local toggle-mode (lambda [mode] (if (= mode :dark) :light :dark)))
9 |
10 | (local reset-statusline (fn []
11 | (set package.loaded.statusline nil)
12 | (require "statusline")))
13 |
14 | ;; also config
15 | (local colorschemes {
16 | :dark ["kuroi" "kanagawa-dragon" "night-owl" "oxocarbon-lua"]
17 | :light ["quietlight" "catppuccin-latte"]
18 | })
19 | (local colorscheme-mode-config { :dark 2 :light 2 })
20 |
21 | (lambda set-colorscheme [mode idx]
22 | (local colorscheme (. (. colorschemes mode) (tonumber idx)))
23 | (vim.cmd (.. "set background=" mode))
24 | (vim.cmd (.. "colorscheme " colorscheme))
25 | (reset-statusline))
26 |
27 | (lambda set-colorscheme-by-mode [colorscheme-idx]
28 | (local mode (get-system-mode))
29 | (set-colorscheme mode colorscheme-idx))
30 |
31 | (fn set-colorscheme-mode [?mode]
32 | (local mode (if (or (= ?mode nil) (= (length ?mode) 0)) (toggle-mode (get-editor-mode)) ?mode))
33 | (set-colorscheme mode (. colorscheme-mode-config mode))
34 | )
35 |
36 | ;; commands
37 | (vim.api.nvim_create_user_command "SetColorschemeByMode" (fn [opts] (set-colorscheme-by-mode opts.args)) {:nargs 1})
38 | (vim.api.nvim_create_user_command "SetColorschemeMode" (fn [opts] (set-colorscheme-mode opts.args)) {:nargs "?"})
39 |
40 | ;; config
41 | (set-colorscheme-by-mode 2)
42 |
--------------------------------------------------------------------------------
/nvim/fnl/scratch.fnl:
--------------------------------------------------------------------------------
1 | (lambda scratch [opts]
2 | (local current-buffer 0)
3 | (local prev-buffer-filetype (vim.api.nvim_buf_get_option 0 "filetype"))
4 | (local filetype (if (= (length opts.args) 0) prev-buffer-filetype opts.args))
5 |
6 | (vim.api.nvim_command "enew")
7 |
8 | (vim.api.nvim_buf_set_option current-buffer "buftype" "nofile")
9 | (vim.api.nvim_buf_set_option current-buffer "bufhidden" "hide")
10 | (vim.api.nvim_buf_set_option current-buffer "swapfile" true)
11 | (vim.api.nvim_buf_set_option current-buffer "filetype" filetype))
12 |
13 | (vim.api.nvim_create_user_command "Scratch" scratch {:nargs "?"})
14 |
--------------------------------------------------------------------------------
/nvim/ftplugin/c.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 4
2 | vim.opt.softtabstop = 4
3 | vim.opt.shiftwidth = 4
4 | vim.opt.expandtab = false
5 |
--------------------------------------------------------------------------------
/nvim/ftplugin/css.lua:
--------------------------------------------------------------------------------
1 | vim.opt.iskeyword = vim.opt.iskeyword + '-'
2 |
--------------------------------------------------------------------------------
/nvim/ftplugin/go.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 4
2 | vim.opt.softtabstop = 4
3 | vim.opt.shiftwidth = 4
4 | vim.opt.expandtab = true
5 |
6 | vim.opt.makeprg = "go run %"
7 |
--------------------------------------------------------------------------------
/nvim/ftplugin/java.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 4
2 | vim.opt.softtabstop = 4
3 | vim.opt.shiftwidth = 4
4 | vim.opt.expandtab = true
5 | vim.opt.makeprg = 'javac % && java %'
6 | vim.opt.errorformat = '%E%f:%l: %m,%-Z%p^,%-C%.%#,%-G%.%#'
7 |
8 | local config = {
9 | -- cmd = { vim.fn.expand('$HOME/.local/share/nvim/mason/bin/jdtls') },
10 | cmd = { vim.fn.expand('/opt/homebrew/bin/jdtls') },
11 | root_dir = vim.fs.dirname(
12 | vim.fs.find(
13 | { '.git', '.gradle', '.gradlew', '.gitignore', 'mvnw', 'build.gradle.kts' },
14 | { upward = true }
15 | )[1]
16 | ),
17 | }
18 | require('jdtls').start_or_attach(config)
19 |
--------------------------------------------------------------------------------
/nvim/ftplugin/javascript.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 2
2 | vim.opt.softtabstop = 2
3 | vim.opt.shiftwidth = 2
4 | vim.opt.expandtab = true
5 | vim.opt.makeprg = 'node %'
6 |
--------------------------------------------------------------------------------
/nvim/ftplugin/kt.lua:
--------------------------------------------------------------------------------
1 | vim.opt.makeprg = 'kotlinc % && java %'
2 |
--------------------------------------------------------------------------------
/nvim/ftplugin/make.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 8
2 | vim.opt.softtabstop = 8
3 | vim.opt.shiftwidth = 8
4 | vim.opt.expandtab = false
5 |
--------------------------------------------------------------------------------
/nvim/ftplugin/ruby.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 2
2 | vim.opt.softtabstop = 2
3 | vim.opt.shiftwidth = 2
4 | vim.opt.expandtab = true
5 | vim.opt.makeprg = 'ruby %'
6 |
--------------------------------------------------------------------------------
/nvim/ftplugin/scheme.lua:
--------------------------------------------------------------------------------
1 | vim.opt.makeprg = 'chicken-csi -s %'
2 |
--------------------------------------------------------------------------------
/nvim/ftplugin/typescript.lua:
--------------------------------------------------------------------------------
1 | vim.opt.tabstop = 2
2 | vim.opt.softtabstop = 2
3 | vim.opt.shiftwidth = 2
4 | vim.opt.expandtab = true
5 | vim.opt.makeprg = 'ts-node %'
6 |
--------------------------------------------------------------------------------
/nvim/init.lua:
--------------------------------------------------------------------------------
1 | local options = {
2 | number = true,
3 | relativenumber = true,
4 | hidden = true,
5 | inccommand = 'nosplit',
6 | hlsearch = false,
7 | ignorecase = true,
8 | mouse = 'a',
9 | breakindent = true,
10 | wrap = false,
11 | updatetime = 250,
12 | ttimeout = true,
13 | ttimeoutlen = 50,
14 | signcolumn = 'yes',
15 | cursorline = true,
16 | colorcolumn = '81',
17 | splitbelow = true,
18 | splitright = true,
19 | showtabline = 0,
20 | clipboard = 'unnamedplus',
21 | completeopt = { 'menuone', 'noselect' },
22 | shortmess = vim.opt.shortmess + 'c',
23 |
24 | undofile = true, -- Save undo history
25 | writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
26 | swapfile = false, -- creates a swapfile
27 | backup = false, -- creates a backup file
28 |
29 | scrolloff = 8,
30 | sidescrolloff = 8,
31 |
32 | expandtab = true,
33 | shiftwidth = 2,
34 | tabstop = 2,
35 | softtabstop = 2,
36 | smartcase = true,
37 | -- smartindent = true,
38 | -- autoindent = true,
39 |
40 | termguicolors = true,
41 |
42 | grepprg = 'rg --vimgrep --smart-case',
43 | }
44 |
45 | for k, v in pairs(options) do
46 | vim.opt[k] = v
47 | end
48 |
49 | -- `:Cfilter pattern` to filter entires in copen
50 | -- more ideas https://gosukiwi.github.io/vim/2022/04/19/vim-advanced-search-and-replace.html
51 | vim.cmd([[packadd! cfilter]])
52 |
53 | require('keybindings')
54 | require('plugins')
55 |
56 | require('terminal')
57 | require('statusline')
58 |
59 | -- fennel
60 | require('hotpot')
61 | require('scratch')
62 | require('colorscheme')
63 |
64 | -- Highlight on yank (copy). It will do a nice highlight blink of the thing you just copied.
65 | require('utils').create_augroup({
66 | { 'TextYankPost', '*', 'silent! lua vim.highlight.on_yank()' },
67 | }, 'YankHighlight')
68 |
69 | vim.cmd([[
70 | augroup Markdown
71 | autocmd!
72 | autocmd FileType markdown set wrap linebreak
73 | augroup END
74 | ]])
75 |
--------------------------------------------------------------------------------
/nvim/lazy-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "ChatGPT.nvim": { "branch": "main", "commit": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6" },
3 | "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
4 | "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
5 | "avante.nvim": { "branch": "main", "commit": "5ac934f2283d20ff805467d79ca6b4727eb0101e" },
6 | "better-ts-errors.nvim": { "branch": "main", "commit": "d57a7794b271e1a0010d0328e5d3f18e20f1face" },
7 | "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
8 | "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
9 | "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
10 | "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
11 | "cmp-omni": { "branch": "main", "commit": "4ef610bbd85a5ee4e97e09450c0daecbdc60de86" },
12 | "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
13 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
14 | "conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
15 | "copilot.lua": { "branch": "master", "commit": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9" },
16 | "dressing.nvim": { "branch": "master", "commit": "56ef6a969a4990d938c5fed40c370f65e125fc97" },
17 | "eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
18 | "format-ts-errors.nvim": { "branch": "main", "commit": "9ed21017496f9d380f570e39c7968fecd918535f" },
19 | "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
20 | "git.nvim": { "branch": "main", "commit": "164daed4eff61bd6bee6f1c97cb78144b9374022" },
21 | "gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" },
22 | "go.nvim": { "branch": "master", "commit": "79857f92433d18857167cdc18c417701778185bf" },
23 | "guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" },
24 | "haskell-tools.nvim": { "branch": "master", "commit": "65d6993eba1a56bbd5211ef13a100d26ce3e644a" },
25 | "hotpot.nvim": { "branch": "master", "commit": "5462d3eb5c191ab380ca911e1e931836d27f6a79" },
26 | "img-clip.nvim": { "branch": "main", "commit": "5ded6f468d633ccfb315905fe8901d6c95ae8f29" },
27 | "kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" },
28 | "kuroi.vim": { "branch": "master", "commit": "54ab6f0be98bdde5446a82b24c983b7232798f2f" },
29 | "lazy.nvim": { "branch": "main", "commit": "7527af40ddd4a93a02911be570b32609b9d4ea53" },
30 | "lsp_signature.nvim": { "branch": "master", "commit": "5b64964ed02098c85613ee3d20f96bed1dfb64cc" },
31 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
32 | "markview.nvim": { "branch": "main", "commit": "68902d7cba78a7fe331c13d531376b4be494a05c" },
33 | "mason-lspconfig.nvim": { "branch": "main", "commit": "f75e877f5266e87523eb5a18fcde2081820d087b" },
34 | "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
35 | "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
36 | "night-owl.nvim": { "branch": "main", "commit": "86ed124c2f7e118670649701288e024444bf91e5" },
37 | "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
38 | "nvim": { "branch": "main", "commit": "4965db2d6155c25db4e8417465fc2703fdf4c2b7" },
39 | "nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
40 | "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
41 | "nvim-genghis": { "branch": "main", "commit": "99ca8b9e6e6bae0899cc2902f4103204572ac8ee" },
42 | "nvim-jdtls": { "branch": "master", "commit": "3efcd0700a293efea9dada58f79c32a64850eb24" },
43 | "nvim-lspconfig": { "branch": "master", "commit": "f98fa715acc975c2dd5fb5ba7ceddeb1cc725ad2" },
44 | "nvim-tree.lua": { "branch": "master", "commit": "d05881f65f0a653db8d830ccc4d2e07d6a720628" },
45 | "nvim-treesitter": { "branch": "master", "commit": "2497d9558d12023e058de2782fc25bc4f405f870" },
46 | "nvim-treesitter-context": { "branch": "master", "commit": "bece284c5322ddf6946fa4bdc383a2bc033269d7" },
47 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
48 | "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
49 | "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
50 | "nvim-ufo": { "branch": "main", "commit": "81f5ffa6e8ba27c48403cf681d4b383d924e03e4" },
51 | "nvim-web-devicons": { "branch": "master", "commit": "402377242b04be3f4f0f3720bd952df86e946c30" },
52 | "oxocarbon-lua.nvim": { "branch": "trunk", "commit": "3b8a15a43ee268ee795be6dd9f78f48116ba791e" },
53 | "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
54 | "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
55 | "quietlight.vim": { "branch": "master", "commit": "61b00ed7c9678c2b23a5ceec8b895001f76af56b" },
56 | "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
57 | "telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" },
58 | "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
59 | "true-zen.nvim": { "branch": "main", "commit": "2b9e210e0d1a735e1fa85ec22190115dffd963aa" },
60 | "typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" },
61 | "vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
62 | "vim-fugitive": { "branch": "master", "commit": "d74a7cff4cfcf84f83cc7eccfa365488f3bbabc2" }
63 | }
64 |
--------------------------------------------------------------------------------
/nvim/lua/keybindings.lua:
--------------------------------------------------------------------------------
1 | local keymap = vim.keymap.set
2 |
3 | keymap('', '', '', { noremap = true, silent = true })
4 | vim.g.mapleader = ' '
5 | vim.g.maplocalleader = ' '
6 |
7 | keymap('', '', '', { noremap = true, silent = true })
8 | vim.keymap.set(
9 | 'n',
10 | '*',
11 | ':%s/\\<\\>//g',
12 | { desc = 'keymap: search and replace word under cursor' }
13 | )
14 |
15 | vim.cmd([[
16 | nnoremap ! :!
17 | nnoremap m :make
18 |
19 | "easily move between end of current line
20 | map H ^
21 | map L g_
22 | "toggle showing hidden characters
23 | nnoremap s :set nolist!
24 | "toggle spell checking
25 | nnoremap ss :setlocal spell!
26 | "toggle RTL mode
27 | nnoremap l :set arabic!
28 | "override system files by typing :w!!
29 | cnoremap w!! %!sudo tee > /dev/null %
30 | "remove search highlight
31 | nmap q :nohlsearch
32 | "execute and replace current line in $SHELL with the output
33 | nnoremap Q !!$SHELL
34 | "set cwd to the directory of the current file
35 | nnoremap cd :lcd %:p:h
36 |
37 | "move lines around
38 | nnoremap k :m-2==
39 | nnoremap j :m+==
40 | xnoremap k :m-2gv=gv
41 | xnoremap j :m'>+gv=gv
42 |
43 | "keep text selected after indentation
44 | vnoremap < >gv
46 |
47 | nnoremap B :enew
48 | nnoremap bq :bp bd! #
49 | nnoremap ba :bufdo bd!
50 | "cycle between last two open buffers
51 | nnoremap
52 | ]])
53 |
54 | vim.cmd([[
55 | "autoclose tags
56 | "()
57 | inoremap ( ()
58 | inoremap ( ()O
59 | inoremap (, (),
60 | inoremap (, (),O
61 | inoremap (; ();
62 | inoremap (; ();O
63 | inoremap (. ().
64 | inoremap (. ().O
65 | inoremap ) strpart(getline('.'), col('.')-1, 1) == ")" ? "\" : ")"
66 | "{}
67 | inoremap { {}
68 | inoremap { {}O
69 | inoremap {, {},
70 | inoremap {, {},O
71 | inoremap {; {};
72 | inoremap {; {};O
73 | "[]
74 | inoremap [ []
75 | inoremap [ []O
76 | inoremap [, [],
77 | inoremap [, [],O
78 | inoremap [; [];
79 | inoremap [; [];O
80 | ""
81 | inoremap " strpart(getline('.'), col('.')-1, 1) == "\"" ? "\" : "\"\"\"
82 | ]])
83 |
84 | vim.cmd([[
85 | "move to the split in the direction shown, or create a new split
86 | nnoremap :call WinMove('h')
87 | nnoremap :call WinMove('j')
88 | nnoremap :call WinMove('k')
89 | nnoremap :call WinMove('l')
90 | function! WinMove(key)
91 | let t:curwin = winnr()
92 | exec "wincmd ".a:key
93 | if (t:curwin == winnr())
94 | if (match(a:key,'[jk]'))
95 | wincmd v
96 | else
97 | wincmd s
98 | endif
99 | exec "wincmd ".a:key
100 | endif
101 | endfunction
102 |
103 | "remove current line highlight in unfocused window
104 | autocmd! VimEnter,WinEnter,BufWinEnter,FocusGained,CmdwinEnter * set cul
105 | autocmd! WinLeave,FocusLost,CmdwinLeave * set nocul
106 |
107 | "smooth scroll
108 | nnoremap :call SmoothScroll(1)
109 | nnoremap :call SmoothScroll(0)
110 | function! SmoothScroll(up)
111 | execute "normal " . (a:up ? "\" : "\")
112 | redraw
113 | for l:count in range(3, &scroll, 2)
114 | sleep 7m
115 | execute "normal " . (a:up ? "\" : "\")
116 | redraw
117 | endfor
118 | " bring the cursor in the middle of screen
119 | execute "normal M"
120 | endfunction
121 | ]])
122 |
123 | vim.cmd([[
124 | "netrw
125 | let g:netrw_banner=0
126 | let g:netrw_winsize=20
127 | let g:netrw_liststyle=3 "tree
128 | let g:netrw_localrmdir='rm -r'
129 | nnoremap n :Lexplore
130 | nnoremap - :Lexplore %:h
131 | ]])
132 |
133 | vim.cmd([[
134 | "trailing whitespace
135 | function! StripTrailingWhitespace()
136 | if !&binary && &filetype != 'diff'
137 | let w:winview = winsaveview()
138 | %s/\(\s\+$\)\|\($\n\s*\)\+\%$//e
139 | if exists('w:winview') | call winrestview(w:winview) | endif
140 | endif
141 | endfunction
142 |
143 | function! SaveAuxiliary()
144 | :call StripTrailingWhitespace()
145 | :w
146 | endfunction
147 | nnoremap w :call SaveAuxiliary()
148 | ]])
149 |
150 | vim.api.nvim_set_keymap('n', 'Y', 'y$', { noremap = true }) -- Y yank until the end of line (note: this is now a default on master)
151 |
152 | vim.cmd([[
153 | "keep cursor centered on these ops
154 | nnoremap n nzzzv
155 | nnoremap N Nzzzv
156 | nnoremap J mzJ`z
157 |
158 | "break undo sequences on these chars
159 | inoremap , ,u
160 | inoremap . .u
161 | inoremap ! !u
162 | inoremap ? ?u
163 |
164 | nnoremap k (v:count > 5 ? "m'" . v:count : "") .'k'
165 | nnoremap j (v:count > 5 ? "m'" . v:count : "") .'j'
166 | ]])
167 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/avante.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'yetone/avante.nvim',
3 | event = 'VeryLazy',
4 | lazy = false,
5 | version = false, -- set this to `false` if you want to always pull the latest change
6 | opts = {
7 | -- add any opts here
8 | },
9 | -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
10 | build = 'make',
11 | dependencies = {
12 | 'nvim-treesitter/nvim-treesitter',
13 | 'stevearc/dressing.nvim',
14 | 'nvim-lua/plenary.nvim',
15 | 'MunifTanjim/nui.nvim',
16 | --- The below dependencies are optional,
17 | 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
18 | 'zbirenbaum/copilot.lua', -- for providers='copilot'
19 | {
20 | -- support for image pasting
21 | 'HakonHarnes/img-clip.nvim',
22 | event = 'VeryLazy',
23 | opts = {
24 | -- recommended settings
25 | default = {
26 | embed_image_as_base64 = false,
27 | prompt_for_file_name = false,
28 | drag_and_drop = {
29 | insert_mode = true,
30 | },
31 | },
32 | },
33 | },
34 | {
35 | "OXY2DEV/markview.nvim",
36 | enabled = true,
37 | lazy = false,
38 | },
39 | },
40 | config = function()
41 | require('avante').setup({
42 | provider = 'copilot',
43 | -- copilot = {
44 | -- model = 'claude-3.5-sonnet',
45 | -- },
46 | })
47 | end,
48 | }
49 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/cmp.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'hrsh7th/nvim-cmp',
3 |
4 | dependencies = {
5 | 'hrsh7th/cmp-buffer',
6 | 'hrsh7th/cmp-path',
7 | 'hrsh7th/cmp-cmdline',
8 | 'hrsh7th/cmp-nvim-lsp',
9 | 'saadparwaiz1/cmp_luasnip',
10 | 'L3MON4D3/LuaSnip',
11 | 'rafamadriz/friendly-snippets',
12 | 'hrsh7th/cmp-nvim-lua',
13 | },
14 | config = function()
15 | local require_safe = require('utils').require_safe
16 |
17 | local cmp = require_safe('cmp')
18 | local luasnip = require_safe('luasnip')
19 |
20 | require('luasnip.loaders.from_vscode').lazy_load()
21 |
22 | luasnip.filetype_extend('typescript', { 'javascript' })
23 | luasnip.filetype_extend('ruby', { 'rails' })
24 |
25 | local has_words_before = function()
26 | local line, col = unpack(vim.api.nvim_win_get_cursor(0))
27 | return col ~= 0
28 | and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s')
29 | == nil
30 | end
31 |
32 | local mappings = cmp.mapping.preset.insert({
33 | [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
34 | [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
35 |
36 | [''] = cmp.mapping.scroll_docs(-4),
37 | [''] = cmp.mapping.scroll_docs(4),
38 |
39 | [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
40 | [''] = cmp.mapping.complete(),
41 | [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping.
42 | [''] = cmp.mapping({
43 | i = cmp.mapping.abort(),
44 | c = cmp.mapping.close(),
45 | }),
46 | -- Accept currently selected item. If none selected, `select` first item.
47 | -- Set `select` to `false` to only confirm explicitly selected items.
48 | [''] = cmp.mapping(function(fallback)
49 | if cmp.visible() then
50 | cmp.select_next_item()
51 | elseif luasnip.expandable() then
52 | luasnip.expand()
53 | elseif luasnip.expand_or_jumpable() then
54 | luasnip.expand_or_jump()
55 | elseif has_words_before() then
56 | fallback()
57 | else
58 | fallback()
59 | end
60 | end, {
61 | 'i',
62 | 's',
63 | }),
64 | [''] = cmp.mapping(function(fallback)
65 | if cmp.visible() then
66 | cmp.select_prev_item()
67 | elseif luasnip.jumpable(-1) then
68 | luasnip.jump(-1)
69 | else
70 | fallback()
71 | end
72 | end, {
73 | 'i',
74 | 's',
75 | }),
76 | })
77 |
78 | local border = {
79 | { '┌', 'FloatBorder' },
80 | { '─', 'FloatBorder' },
81 | { '┐', 'FloatBorder' },
82 | { '│', 'FloatBorder' },
83 | { '┘', 'FloatBorder' },
84 | { '─', 'FloatBorder' },
85 | { '└', 'FloatBorder' },
86 | { '│', 'FloatBorder' },
87 | }
88 |
89 | cmp.setup({
90 | completion = { completeopt = 'menu,menuone,noinsert', keyword_length = 2 },
91 | snippet = {
92 | expand = function(args)
93 | luasnip.lsp_expand(args.body) -- For `luasnip` users.
94 | end,
95 | },
96 | mapping = mappings,
97 | formatting = {
98 | fields = { 'abbr', 'menu' },
99 | format = function(entry, vim_item)
100 | vim_item.menu = ({
101 | nvim_lsp = '[LSP]',
102 | luasnip = '[Snippet]',
103 | buffer = '[Buffer]',
104 | path = '[Path]',
105 | })[entry.source.name]
106 | return vim_item
107 | end,
108 | },
109 | sources = {
110 | { name = 'nvim_lsp' },
111 | { name = 'luasnip' },
112 | { name = 'buffer' },
113 | { name = 'nvim_lua' },
114 | { name = 'path' },
115 | },
116 | window = {
117 | completion = {
118 | border = border,
119 | winhighlight = 'NormalFloat:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel',
120 | },
121 | documentation = {
122 | border = border,
123 | winhighlight = 'NormalFloat:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel',
124 | },
125 | },
126 | preselect = cmp.PreselectMode.None,
127 | confirmation = {
128 | get_commit_characters = function()
129 | return {}
130 | end,
131 | },
132 | experimental = {
133 | native_menu = false,
134 | ghost_text = false,
135 | },
136 | })
137 |
138 | cmp.setup.cmdline('/', {
139 | sources = {
140 | { name = 'buffer' },
141 | },
142 | })
143 |
144 | cmp.setup.cmdline(':', {
145 | sources = {
146 | { name = 'cmdline' },
147 | },
148 | })
149 |
150 | cmp.setup.filetype('DressingInput', {
151 | sources = cmp.config.sources({ { name = 'omni' } }),
152 | })
153 | end,
154 | }
155 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/conform.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'stevearc/conform.nvim',
3 | lazy = true,
4 | event = { 'BufReadPre', 'BufNewFile' }, -- to disable, comment this out
5 | config = function()
6 | require('conform').setup({
7 | formatters_by_ft = {
8 | lua = { 'stylua' },
9 | go = { 'goimports', 'gofmt' },
10 | rust = { 'rustfmt', lsp_format = 'fallback' },
11 | ruby = { 'rubocop' },
12 | javascript = { 'prettier' },
13 | typescript = { 'prettier' },
14 | javascriptreact = { 'prettier' },
15 | typescriptreact = { 'prettier' },
16 | yaml = { 'yamlfmt' },
17 | ['*'] = { 'codespell' },
18 | -- Use the "_" filetype to run formatters on filetypes that don't
19 | -- have other formatters configured.
20 | ['_'] = { 'trim_whitespace' },
21 | },
22 | format_on_save = {
23 | lsp_format = 'fallback',
24 | timeout_ms = 500,
25 | async = false,
26 | },
27 | })
28 |
29 | vim.api.nvim_create_user_command('Format', function(args)
30 | local range = nil
31 | if args.count ~= -1 then
32 | local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
33 | range = {
34 | start = { args.line1, 0 },
35 | ['end'] = { args.line2, end_line:len() },
36 | }
37 | end
38 | require('conform').format({ async = true, lsp_format = 'fallback', range = range })
39 | end, { range = true })
40 | end,
41 | }
42 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/copilot.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | 'zbirenbaum/copilot-cmp',
4 | config = function()
5 | require('copilot_cmp').setup()
6 | end,
7 | },
8 | {
9 | 'zbirenbaum/copilot.lua',
10 | cmd = 'Copilot',
11 | event = 'InsertEnter',
12 | config = function()
13 | require('copilot').setup({
14 | suggestion = { enabled = false },
15 | panel = { enabled = false },
16 | })
17 | end,
18 | },
19 | {
20 | 'CopilotC-Nvim/CopilotChat.nvim',
21 | branch = 'canary',
22 | dependencies = {
23 | { 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim
24 | { 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper
25 | },
26 | opts = {
27 | debug = true, -- Enable debugging
28 | -- See Configuration section for rest
29 | },
30 | -- See Commands section for default commands if you want to lazy load on them
31 | },
32 | }
33 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/fold.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'kevinhwang91/nvim-ufo',
3 | dependencies = 'kevinhwang91/promise-async',
4 | config = function()
5 | vim.o.foldcolumn = '0' -- '1' is bad
6 | vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
7 | vim.o.foldlevelstart = 99
8 | vim.o.foldenable = true
9 |
10 | local map_key = require('utils').map_key
11 |
12 | map_key('n', '-', 'foldclose', { desc = 'fold: close fold' })
13 | map_key('n', '+', 'foldopen', { desc = 'fold: open fold' })
14 | map_key('n', 'zR', require('ufo').openAllFolds, { desc = 'fold: open all folds' })
15 | map_key('n', 'zM', require('ufo').closeAllFolds, { desc = 'fold: close all folds' })
16 |
17 | require('ufo').setup({
18 | provider_selector = function(bufnr, filetype, buftype)
19 | return { 'treesitter', 'indent' }
20 | end,
21 | })
22 | end,
23 | }
24 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/git.lua:
--------------------------------------------------------------------------------
1 | vim.api.nvim_create_user_command('ShowGitLogOfSelectedLines', function()
2 | local range = vim.fn.line("'<") .. ',' .. vim.fn.line("'>")
3 | local file_path = vim.fn.expand('%')
4 |
5 | vim.cmd('G log -L ' .. range .. ':' .. file_path)
6 | end, {})
7 |
8 | vim.keymap.set(
9 | 'v',
10 | 'gl',
11 | ':ShowGitLogOfSelectedLines',
12 | { noremap = true, desc = 'Git history of selected lines' }
13 | )
14 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/gitsigns.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'lewis6991/gitsigns.nvim',
3 | dependencies = { 'nvim-lua/plenary.nvim' },
4 | config = function()
5 | require('gitsigns').setup({
6 | on_attach = function(bufnr)
7 | local function map(mode, lhs, rhs, opts)
8 | opts = vim.tbl_extend('force', { noremap = true, silent = true }, opts or {})
9 | vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts)
10 | end
11 |
12 | -- Navigation
13 | map('n', '[c', "&diff ? '[c' : 'Gitsigns prev_hunk'", { expr = true })
14 | map('n', ']c', "&diff ? ']c' : 'Gitsigns next_hunk'", { expr = true })
15 |
16 | -- -- Actions
17 | map('n', 'gs', 'Gitsigns stage_hunk')
18 | map('v', 'gs', 'Gitsigns stage_hunk')
19 | map('n', 'gr', 'Gitsigns reset_hunk')
20 | map('v', 'gr', 'Gitsigns reset_hunk')
21 |
22 | map('n', 'gb', 'lua require"gitsigns".blame_line{full=true}')
23 |
24 | -- Text object
25 | map('o', 'ih', ':Gitsigns select_hunk')
26 | map('x', 'ih', ':Gitsigns select_hunk')
27 | end,
28 | })
29 | end,
30 | }
31 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/guard.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'nvimdev/guard.nvim',
3 | dependencies = {
4 | 'nvimdev/guard-collection',
5 | },
6 | config = function()
7 | local ft = require('guard.filetype')
8 |
9 | ft('typescript,javascript,javascriptreact,typescriptreact,vue'):fmt('prettier')
10 | -- :append({
11 | -- fn = function()
12 | -- vim.cmd("EslintFixAll")
13 | -- end,
14 | -- })
15 | ft('go'):fmt('gofmt')
16 | ft('rust'):fmt('rustfmt')
17 | ft('prisma'):fmt('lsp')
18 | ft('lua'):fmt('stylua')
19 | ft('fnl'):fmt('fnlfmt')
20 |
21 | require('guard').setup({
22 | fmt_on_save = true,
23 |
24 | -- Use lsp if no formatter was defined for this filetype
25 | lsp_as_default_formatter = true,
26 | })
27 | end,
28 | }
29 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/init.lua:
--------------------------------------------------------------------------------
1 | local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
2 | if not vim.loop.fs_stat(lazypath) then
3 | vim.fn.system({
4 | 'git',
5 | 'clone',
6 | '--filter=blob:none',
7 | 'https://github.com/folke/lazy.nvim.git',
8 | '--branch=stable',
9 | lazypath,
10 | })
11 | end
12 | vim.opt.rtp:prepend(lazypath)
13 |
14 | require('lazy').setup({
15 | { import = 'plugins.treesitter' },
16 | { import = 'plugins.cmp' },
17 | { import = 'plugins.lsp' },
18 | { import = 'plugins.telescope' },
19 | { import = 'plugins.conform' },
20 | { import = 'plugins.nvim-tree' },
21 | { import = 'plugins.gitsigns' },
22 | { import = 'plugins.fold' },
23 | { import = 'plugins.avante' },
24 | 'rktjmp/hotpot.nvim',
25 | {
26 | 'nvim-tree/nvim-web-devicons',
27 | config = function()
28 | require('nvim-web-devicons').setup()
29 | end,
30 | },
31 | {
32 | 'tpope/vim-fugitive',
33 | event = 'VeryLazy',
34 | config = function()
35 | require('plugins.git')
36 | end,
37 | },
38 | {
39 | 'dinhhuy258/git.nvim',
40 | config = function()
41 | require('git').setup({
42 | default_mappings = true,
43 | keymaps = {
44 | browse = 'go', -- Open file/folder in git repository
45 | },
46 | })
47 | end,
48 | },
49 | {
50 | 'numToStr/Comment.nvim',
51 | dependencies = {
52 | 'JoosepAlviste/nvim-ts-context-commentstring',
53 | },
54 | config = function()
55 | require('Comment').setup({
56 | pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
57 | })
58 | end,
59 | },
60 | {
61 | 'echasnovski/mini.surround',
62 | version = '*',
63 | config = function()
64 | require('mini.surround').setup()
65 | end,
66 | },
67 | {
68 | 'junegunn/vim-easy-align',
69 | config = function()
70 | vim.cmd([[
71 | nmap a (EasyAlign)
72 | xmap a (EasyAlign)
73 | ]])
74 | end,
75 | },
76 | {
77 | 'jinh0/eyeliner.nvim',
78 | config = function()
79 | require('eyeliner').setup({
80 | -- show highlights only after keypress
81 | highlight_on_key = true,
82 | -- dim all other characters if set to true (recommended!)
83 | dim = false,
84 | -- set the maximum number of characters eyeliner.nvim will check from
85 | -- your current cursor position; this is useful if you are dealing with
86 | -- large files: see https://github.com/jinh0/eyeliner.nvim/issues/41
87 | max_length = 9999,
88 | -- filetypes for which eyeliner should be disabled;
89 | -- e.g., to disable on help files:
90 | -- disabled_filetypes = {"help"}
91 | disabled_filetypes = {},
92 | -- buftypes for which eyeliner should be disabled
93 | -- e.g., disabled_buftypes = {"nofile"}
94 | disabled_buftypes = {},
95 | -- add eyeliner to f/F/t/T keymaps;
96 | -- see section on advanced configuration for more information
97 | default_keymaps = true,
98 | })
99 | end,
100 | },
101 | {
102 | 'norcalli/nvim-colorizer.lua',
103 | config = function()
104 | require('colorizer').setup()
105 | end,
106 | },
107 | {
108 | 'chrisgrieser/nvim-genghis',
109 | dependencies = {
110 | 'stevearc/dressing.nvim',
111 | 'hrsh7th/nvim-cmp',
112 | 'hrsh7th/cmp-omni',
113 | },
114 | },
115 | {
116 | 'Pocco81/true-zen.nvim',
117 | config = function()
118 | require('true-zen').setup()
119 | end,
120 | },
121 | {
122 | 'jackMort/ChatGPT.nvim',
123 | event = 'VeryLazy',
124 | dependencies = {
125 | 'MunifTanjim/nui.nvim',
126 | 'nvim-lua/plenary.nvim',
127 | 'nvim-telescope/telescope.nvim',
128 | },
129 | config = function()
130 | require('chatgpt').setup({
131 | openai_params = {
132 | model = 'gpt-4',
133 | max_tokens = 1000,
134 | },
135 | })
136 | end,
137 | },
138 |
139 | -- LANGUAGE SUPPORT
140 | 'mfussenegger/nvim-jdtls',
141 | {
142 | 'ray-x/go.nvim',
143 | dependencies = {
144 | 'ray-x/guihua.lua',
145 | 'neovim/nvim-lspconfig',
146 | 'nvim-treesitter/nvim-treesitter',
147 | },
148 | config = function()
149 | require('go').setup({
150 | diagnostic = false,
151 | })
152 | end,
153 | event = { 'CmdlineEnter' },
154 | ft = { 'go', 'gomod' },
155 | build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
156 | },
157 | {
158 | 'pmizio/typescript-tools.nvim',
159 | dependencies = {
160 | 'nvim-lua/plenary.nvim',
161 | 'neovim/nvim-lspconfig',
162 | 'davidosomething/format-ts-errors.nvim',
163 | },
164 | },
165 | {
166 | 'OlegGulevskyy/better-ts-errors.nvim',
167 | dependencies = { 'MunifTanjim/nui.nvim' },
168 | config = {
169 | keymaps = {
170 | toggle = 'dd', -- default 'dd'
171 | go_to_definition = 'dx' --[[ default 'dx' ]],
172 | },
173 | },
174 | },
175 | {
176 | 'mrcjkb/haskell-tools.nvim',
177 | version = '^3', -- Recommended
178 | ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
179 | },
180 | {
181 | 'iamcco/markdown-preview.nvim',
182 | cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
183 | ft = { 'markdown' },
184 | build = function()
185 | vim.fn['mkdp#util#install']()
186 | end,
187 | },
188 | {
189 | 'OXY2DEV/markview.nvim',
190 | lazy = false,
191 | ft = { 'md', 'markdown', 'norg', 'rmd', 'org', 'vimwiki', 'typst', 'latex', 'quarto', 'Avante', 'codecompanion' },
192 | opts = {
193 | preview = {
194 | filetypes = { 'md', 'markdown', 'norg', 'rmd', 'org', 'vimwiki', 'typst', 'latex', 'quarto', 'Avante', 'codecompanion' },
195 | icon_provider = "devicons",
196 | ignore_buftypes = {},
197 | max_buf_lines = 9999,
198 | }
199 | },
200 | },
201 |
202 | -- COLORSCHEMES
203 | {
204 | 'rebelot/kanagawa.nvim',
205 | lazy = false, -- make sure we load this during startup if it is your main colorscheme
206 | priority = 1000, -- make sure to load this before all the other start plugins
207 | },
208 | { 'catppuccin/nvim', as = 'catppuccin', lazy = false, priority = 1000 },
209 | { 'aonemd/kuroi.vim', lazy = false },
210 | { 'aonemd/quietlight.vim', lazy = false },
211 | { 'B4mbus/oxocarbon-lua.nvim', lazy = false },
212 | { 'oxfist/night-owl.nvim', lazy = false },
213 | }, {
214 | checker = {
215 | enabled = true,
216 | notify = false,
217 | },
218 | change_detection = {
219 | notify = false,
220 | },
221 | })
222 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/null-ls.lua:
--------------------------------------------------------------------------------
1 | local require_safe = require('utils').require_safe
2 |
3 | local null_ls = require_safe('null-ls')
4 |
5 | local augroup = vim.api.nvim_create_augroup('lsp_format_on_save', { clear = false })
6 | local event = 'BufWritePre' -- or "BufWritePost"
7 | local async = event == 'BufWritePost'
8 |
9 | null_ls.setup({
10 | sources = {
11 | null_ls.builtins.formatting.prettierd.with({
12 | filetypes = {
13 | 'html',
14 | 'json',
15 | 'javascript',
16 | 'typescript',
17 | 'javascriptreact',
18 | 'typescriptreact',
19 | 'vue',
20 | 'scss',
21 | 'css',
22 | },
23 | }),
24 | null_ls.builtins.diagnostics.eslint_d.with({
25 | diagnostics_format = '#{m}',
26 | }),
27 | null_ls.builtins.code_actions.gitsigns,
28 | },
29 | on_attach = function(client, bufnr)
30 | if client.supports_method('textDocument/formatting') then
31 | vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
32 | vim.api.nvim_create_autocmd(event, {
33 | group = augroup,
34 | buffer = bufnr,
35 | callback = function()
36 | vim.lsp.buf.format({ bufnr = bufnr, async = async })
37 | end,
38 | desc = '[LSP] auto format',
39 | })
40 | end
41 |
42 | if client.supports_method('textDocument/rangeFormatting') then
43 | vim.keymap.set('x', 'f', function()
44 | vim.lsp.buf.format({ bufnr = vim.api.nvim_get_current_buf() })
45 | end, { buffer = bufnr, desc = '[LSP] format' })
46 | end
47 | end,
48 | })
49 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/nvim-tree.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'nvim-tree/nvim-tree.lua',
3 | dependencies = { 'nvim-tree/nvim-web-devicons' },
4 | config = function()
5 | -- disable netrw at the very start of your init.lua
6 | vim.g.loaded_netrw = 1
7 | vim.g.loaded_netrwPlugin = 1
8 |
9 | require('nvim-tree').setup({
10 | sort_by = 'case_sensitive',
11 | sync_root_with_cwd = false,
12 | update_focused_file = {
13 | enable = true,
14 | update_cwd = true,
15 | },
16 | view = {
17 | width = 40,
18 | },
19 | renderer = {
20 | group_empty = true,
21 | },
22 | filters = {
23 | dotfiles = true,
24 | },
25 | })
26 |
27 | local map_key = require('utils').map_key
28 |
29 | map_key('n', 'n', ':NvimTreeToggle', { desc = 'nvim-tree: toggle tree' })
30 | map_key(
31 | 'n',
32 | '-',
33 | ':NvimTreeToggle %:h',
34 | { desc = 'nvim-tree: toggle tree in current file directory' }
35 | )
36 | end,
37 | }
38 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/telescope.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'nvim-telescope/telescope.nvim',
3 | branch = '0.1.x',
4 | dependencies = {
5 | { 'nvim-lua/plenary.nvim' },
6 | { 'nvim-telescope/telescope-live-grep-args.nvim' },
7 | { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
8 | },
9 | config = function()
10 | local require_safe = require('utils').require_safe
11 |
12 | local telescope = require_safe('telescope')
13 | local actions = require_safe('telescope.actions')
14 | local builtin = require_safe('telescope.builtin')
15 |
16 | telescope.setup({
17 | defaults = {
18 | path_display = function(opts, path)
19 | local tail = require('telescope.utils').path_tail(path)
20 | return string.format('%s (%s)', tail, path), { { { 1, #tail }, 'Constant' } }
21 | end,
22 | layout_strategy = 'horizontal',
23 | layout_config = {
24 | horizontal = {
25 | prompt_position = 'bottom',
26 | preview_width = 0.42,
27 | },
28 | },
29 | sorting_strategy = 'ascending',
30 |
31 | mappings = {
32 | i = {
33 | [''] = actions.move_selection_previous,
34 | [''] = actions.move_selection_next,
35 | [''] = actions.send_selected_to_qflist + actions.open_qflist,
36 | },
37 | },
38 | },
39 | })
40 |
41 | telescope.load_extension('fzf')
42 | telescope.load_extension('live_grep_args')
43 |
44 | vim.keymap.set(
45 | 'n',
46 | 'p',
47 | ":lua require('telescope.builtin').find_files({ hidden = true })",
48 | {}
49 | )
50 | vim.keymap.set('n', 'o', builtin.current_buffer_fuzzy_find, {})
51 | vim.keymap.set('n', 'r', builtin.buffers, {})
52 | vim.keymap.set('n', ';', builtin.resume, {})
53 | vim.keymap.set('n', '\\', ':Telescope live_grep_args', {})
54 | vim.keymap.set('n', '|', builtin.grep_string, {})
55 | end,
56 | }
57 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/treesitter.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | 'nvim-treesitter/nvim-treesitter',
4 | dependencies = {
5 | 'nvim-treesitter/nvim-treesitter-textobjects',
6 | 'nvim-treesitter/nvim-treesitter-context',
7 | "windwp/nvim-ts-autotag",
8 | },
9 | event = { "BufReadPre", "BufNewFile" },
10 | build = ':TSUpdate',
11 | config = function()
12 | require('nvim-treesitter.configs').setup({
13 | ensure_installed = {
14 | 'lua',
15 | 'fennel',
16 | 'scheme',
17 | 'go',
18 | 'rust',
19 | 'c',
20 | 'java',
21 | 'kotlin',
22 | 'ruby',
23 | 'typescript',
24 | 'javascript',
25 | 'tsx',
26 | 'html',
27 | 'json',
28 | 'yaml',
29 | 'toml',
30 | 'markdown'
31 | },
32 | auto_install = true,
33 |
34 | highlight = {
35 | enable = true, -- false will disable the whole extension.
36 |
37 | additional_vim_regex_highlighting = false,
38 |
39 | disable = { 'ruby' },
40 | },
41 | incremental_selection = {
42 | enable = true,
43 | keymaps = {
44 | init_selection = 'gtt',
45 | node_incremental = 'gtn',
46 | scope_incremental = 'gtc',
47 | node_decremental = 'gtm',
48 | },
49 | },
50 | indent = {
51 | enable = false,
52 | },
53 | autotag = {
54 | enable = true,
55 | },
56 | textobjects = {
57 | select = {
58 | enable = true,
59 | lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim.
60 | keymaps = {
61 | -- You can use the capture groups defined in textobjects.scm.
62 | ['af'] = '@function.outer',
63 | ['if'] = '@function.inner',
64 | ['ac'] = '@class.outer',
65 | ['ic'] = '@class.inner',
66 | },
67 | },
68 | move = {
69 | enable = true,
70 | set_jumps = true, -- whether to set jumps in the jumplist
71 | goto_next_start = {
72 | [']m'] = '@function.outer',
73 | [']]'] = '@class.outer',
74 | },
75 | goto_next_end = {
76 | [']M'] = '@function.outer',
77 | [']['] = '@class.outer',
78 | },
79 | goto_previous_start = {
80 | ['[m'] = '@function.outer',
81 | ['[['] = '@class.outer',
82 | },
83 | goto_previous_end = {
84 | ['[M'] = '@function.outer',
85 | ['[]'] = '@class.outer',
86 | },
87 | },
88 | },
89 | })
90 |
91 | require 'treesitter-context'.setup {
92 | enable = false, -- Enable this plugin (Can be enabled/disabled later via commands)
93 | multiwindow = false, -- Enable multiwindow support.
94 | max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
95 | min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
96 | line_numbers = true,
97 | multiline_threshold = 20, -- Maximum number of lines to show for a single context
98 | trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
99 | mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
100 | -- Separator between context and content. Should be a single character string, like '-'.
101 | -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
102 | separator = '-',
103 | zindex = 20, -- The Z-index of the context window
104 | on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
105 | }
106 | end
107 | },
108 | }
109 |
--------------------------------------------------------------------------------
/nvim/lua/statusline.lua:
--------------------------------------------------------------------------------
1 | vim.api.nvim_exec(
2 | [[
3 | hi StatusLineModeNormalColor guibg=NONE
4 | hi StatusLineModeInsertColor guibg=#7fbfff
5 | hi StatusLineModeVisualColor guibg=#7fbf7f
6 | hi StatusLineModeReplaceColor guibg=#df7f9e
7 | hi StatusLineModeTerminalColor guibg=NONE
8 | hi StatusLineModeDefaultColor guibg=NONE ctermbg=NONE
9 |
10 | "hi FilePathClearColor guifg=#c5c8c6 guibg=#262626 ctermbg=168 ctermfg=168
11 | ]],
12 | false
13 | )
14 |
15 | local mode_color_map = {
16 | ['n'] = '%#StatusLineModeNormalColor# %*',
17 | ['i'] = '%#StatusLineModeInsertColor# %*',
18 | ['v'] = '%#StatusLineModeVisualColor# %*',
19 | ['V'] = '%#StatusLineModeVisualColor# %*',
20 | ['^V'] = '%#StatusLineModeVisualColor# %*',
21 | ['R'] = '%#StatusLineModeReplaceColor# %*',
22 | ['r'] = '%#StatusLineModeTerminalColor# %*',
23 | ['c'] = '%#StatusLineModeTerminalColor# %*',
24 | ['!'] = '%#StatusLineModeTerminalColor# %*',
25 | ['nt'] = '%#StatusLineModeTerminalColor# %*',
26 | }
27 |
28 | local function get_mode()
29 | local m = vim.api.nvim_get_mode().mode
30 | local active_window = vim.api.nvim_get_var('statusline_winid') == vim.fn.win_getid(vim.fn.winnr())
31 |
32 | if active_window then
33 | return mode_color_map[m] or '%#StatusLineModeDefaultColor# %*'
34 | else
35 | return ' '
36 | end
37 | end
38 |
39 | function _G.set_statusline()
40 | local blocks = {
41 | get_mode(),
42 | ' ',
43 | '%#FilePathClearColor#%f%*',
44 | '%=',
45 | '%m',
46 | ' ',
47 | '%c',
48 | ' ',
49 | '%P',
50 | }
51 |
52 | return table.concat(blocks)
53 | end
54 |
55 | vim.o.statusline = '%!v:lua.set_statusline()'
56 |
--------------------------------------------------------------------------------
/nvim/lua/terminal.lua:
--------------------------------------------------------------------------------
1 | vim.cmd([[
2 | " Terminal Function
3 | let g:term_buf = 0
4 | let g:term_win = 0
5 | function! TermToggle(height)
6 | if win_gotoid(g:term_win)
7 | hide
8 | else
9 | botright new
10 | exec "resize " . a:height
11 | try
12 | exec "buffer " . g:term_buf
13 | catch
14 | call termopen($SHELL, {"detach": 0})
15 | let g:term_buf = bufnr("")
16 | set nonumber
17 | set norelativenumber
18 | set signcolumn=no
19 | endtry
20 | startinsert!
21 | let g:term_win = win_getid()
22 | endif
23 | endfunction
24 |
25 | " Toggle terminal on/off (neovim)
26 | nnoremap :call TermToggle(12)
27 | inoremap :call TermToggle(12)
28 | tnoremap :call TermToggle(12)
29 |
30 | " Terminal go back to normal mode
31 | tnoremap
32 | tnoremap :qq :q!
33 | ]])
34 |
35 | vim.g.neoterm_size = tostring(0.3 * vim.o.columns)
36 | vim.g.neoterm_default_mod = 'botright vertical'
37 |
--------------------------------------------------------------------------------
/nvim/lua/utils.lua:
--------------------------------------------------------------------------------
1 | local M = {}
2 |
3 | local cmd = vim.cmd
4 | function M.create_augroup(autocmds, name)
5 | cmd('augroup ' .. name)
6 | cmd('autocmd!')
7 | for _, autocmd in ipairs(autocmds) do
8 | cmd('autocmd ' .. table.concat(autocmd, ' '))
9 | end
10 | cmd('augroup END')
11 | end
12 |
13 | function M.require_safe(name)
14 | local status_ok, module = pcall(require, name)
15 | if not status_ok then
16 | return
17 | end
18 |
19 | return module
20 | end
21 |
22 | function M.map_key(mode, lhs, rhs, opts)
23 | local options = { noremap = true, silent = true }
24 |
25 | if opts then
26 | if opts.desc then
27 | opts.desc = 'keymaps.lua: ' .. opts.desc
28 | end
29 | options = vim.tbl_extend('force', options, opts)
30 | end
31 |
32 | vim.keymap.set(mode, lhs, rhs, options)
33 | end
34 |
35 | function M.map_key_buffer(mode, lhs, rhs, bufnr)
36 | local bufopts = { noremap = true, silent = true, buffer = bufnr }
37 |
38 | M.map_key(mode, lhs, rhs, bufopts)
39 | end
40 |
41 | return M
42 |
--------------------------------------------------------------------------------
/nvim/stylua.toml:
--------------------------------------------------------------------------------
1 | column_width = 100
2 | line_endings = "Unix"
3 | indent_type = "Spaces"
4 | indent_width = 2
5 | quote_style = "AutoPreferSingle"
6 | call_parentheses = "Always"
7 |
--------------------------------------------------------------------------------
/rg/rgignore:
--------------------------------------------------------------------------------
1 | .git/
2 | .hg/
3 | .svn/
4 | tmp/
5 | log/
6 | out/
7 | dist/
8 | node_modules/
9 | bower_components/
10 | public/
11 | .bundle/
12 |
--------------------------------------------------------------------------------
/ruby/irbrc:
--------------------------------------------------------------------------------
1 | require 'irb/completion'
2 | require 'irb/ext/eval_history'
3 | require 'pp'
4 | require 'rubygems'
5 |
6 | IRB.conf[:SAVE_HISTORY] = 1000
7 | IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
8 | IRB.conf[:PROMPT_MODE] = :SIMPLE
9 | IRB.conf[:AUTO_INDENT] = true
10 |
11 | class Object
12 | # print documentation
13 | #
14 | # ri 'Array#pop'
15 | # Array.ri
16 | # Array.ri :pop
17 | # Array.new.ri :pop
18 | def ri(method = nil)
19 | unless method && method =~ /^[A-Z]/ # if class isn't specified
20 | klass = self.kind_of?(Class) ? name : self.class.name
21 | method = [klass, method].compact.join('#')
22 | end
23 | puts `ri '#{method}'`
24 | end
25 | end
26 |
27 | module Kernel
28 | # print object methods
29 | #
30 | # m(Array)
31 | # m(Array.new, 'ma', false)
32 | def m(object=Object.new, pattern=nil, local_only=true)
33 | if object.class.name == "DBus::ProxyObjectInterface"
34 | methods = object.methods.keys.sort
35 | else
36 | methods = object.public_methods(!local_only).sort
37 | end
38 | methods = methods.grep Regexp.new(pattern) unless pattern.nil?
39 | methods
40 | end
41 | end
42 |
43 | def r
44 | reload!
45 | end
46 |
47 | if defined? RUBY_DESCRIPTION
48 | puts RUBY_DESCRIPTION
49 | else
50 | if defined? JRUBY_VERSION
51 | puts "ruby #{RUBY_VERSION} (jruby #{JRUBY_VERSION}) (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]"
52 | else
53 | puts "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]"
54 | end
55 | end
56 |
--------------------------------------------------------------------------------
/scheme/csirc:
--------------------------------------------------------------------------------
1 | (import linenoise)
2 | (current-input-port (make-linenoise-port))
3 |
--------------------------------------------------------------------------------
/tmux/tmux.conf:
--------------------------------------------------------------------------------
1 | #
2 |
3 | set -g default-shell $SHELL
4 | set -g default-terminal "tmux-256color"
5 | set -g terminal-overrides ",xterm-256color:Tc"
6 | set -g terminal-features 'ghostty*:kitty'
7 | set -g escape-time 0 # shorten escape key delay
8 | set -g renumber-windows on # re-number windows when one is closed
9 | set -g base-index 1 # number windows from 1
10 | set -g pane-base-index 1
11 | set -g allow-rename off
12 | set -g history-limit 25000 # scoll history
13 | set -g mouse on
14 | set -g mode-keys vi
15 |
16 | # Key Maps
17 | # set prefix key to ctrl+a and unbind ctrl+b
18 | unbind C-b
19 | set -g prefix C-a
20 |
21 | bind C-a send-prefix # use send-prefix to pass C-a through to application/nested session
22 | unbind r # reload the config file
23 | bind r source-file ~/.tmux.conf
24 | bind b set status # toggle status bar
25 |
26 | # open new window in the current directory
27 | bind c new-window -c "#{pane_current_path}"
28 | # cycle back to the last window
29 | bind a last-window
30 |
31 | # move current window
32 | bind P swap-window -t -1
33 | bind N swap-window -t +1
34 |
35 | # use | and _ to split panes in the current directory
36 | unbind %
37 | bind | split-window -h -c "#{pane_current_path}"
38 | bind _ split-window -v -c "#{pane_current_path}"
39 | # switch panes
40 | bind h select-pane -L
41 | bind j select-pane -D
42 | bind k select-pane -U
43 | bind l select-pane -R
44 | # resize panes
45 | bind J resize-pane -D 10
46 | bind K resize-pane -U 10
47 | bind H resize-pane -L 10
48 | bind L resize-pane -R 10
49 |
50 | # copy mode
51 | bind y copy-mode
52 | bind -T copy-mode-vi 'v' send -X begin-selection
53 | bind -T copy-mode-vi 'V' send -X select-line
54 | bind -T copy-mode-vi 'C-v' send -X rectangle-toggle
55 | bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "xsel --clipboard --input"
56 | bind -T copy-mode-vi Escape send -X clear-selection
57 | bind -T copy-mode-vi 'q' send -X cancel
58 | bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe
59 |
60 | # Status Bar
61 | # Colors
62 | TMUX_WHITE="#ffffff"
63 | TMUX_ROSE_GOLD="#FFB1A8"
64 | TMUX_BLUE="#0067B0"
65 | TMUX_GREY="#514f4f"
66 | TMUX_BLACK="#1B1918"
67 | TMUX_FOREGROUND=$TMUX_GREY
68 | TMUX_BACKGROUND=default
69 |
70 | set -g status on
71 | set -g status-interval 15
72 | set -g monitor-activity on
73 |
74 | set -g status-style fg=$TMUX_FOREGROUND,bg=$TMUX_BACKGROUND
75 |
76 | # Left
77 | set -g status-left ""
78 | set -g status-left-length 50
79 | # Window
80 | set -g window-status-format " #I #W "
81 | set -g window-status-current-format " #I #W "
82 | set -g window-status-current-style fg=$TMUX_BLUE,bg=$TMUX_BACKGROUND,bold
83 | set -g window-status-activity-style fg=$TMUX_ROSE_GOLD
84 | set -g window-status-separator ""
85 | # Right
86 | set -g status-right " #S "
87 |
88 | # Active pane
89 | set -g pane-border-style fg=$TMUX_BLACK
90 | set -g pane-active-border-style fg=$TMUX_BLACK
91 | # Command line
92 | set -g message-style fg=$TMUX_ROSE_GOLD,bg=$TMUX_BACKGROUND
93 | # List screen
94 | set -g mode-style fg=$TMUX_WHITE,bg=$TMUX_BLUE
95 |
--------------------------------------------------------------------------------
/vim/gvimrc:
--------------------------------------------------------------------------------
1 | set guifont=Hack\ Regular\ 12
2 |
3 | " Window size
4 | set lines=50
5 | set columns=90
6 | set guiheadroom=0
7 |
8 | " Menus
9 | set guioptions-=m "remove menu bar
10 | set guioptions-=T "remove toolbar
11 | set guioptions-=r "remove right-hand scroll bar
12 | set guioptions-=L "remove left-hand scroll bar
13 |
14 | " Remove balloon
15 | set noballooneval
16 | let g:netrw_nobeval = 1
17 |
18 | " show console dialogs
19 | set guioptions+=c
20 |
21 | " Silent bell
22 | autocmd GUIEnter * set vb t_vb=
23 |
--------------------------------------------------------------------------------
/vim/vim/spell/de.utf-8.spl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/vim/vim/spell/de.utf-8.spl
--------------------------------------------------------------------------------
/vim/vim/spell/de.utf-8.sug:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/vim/vim/spell/de.utf-8.sug
--------------------------------------------------------------------------------
/vim/vim/spell/en.utf-8.add:
--------------------------------------------------------------------------------
1 | Javascript
2 | TypeScript
3 |
--------------------------------------------------------------------------------
/vim/vim/spell/en.utf-8.add.spl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/vim/vim/spell/en.utf-8.add.spl
--------------------------------------------------------------------------------
/wayland/bin/brightness.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | send_notification() {
4 | val=$(($(brightnessctl g) * 100/$(brightnessctl m)))
5 | notify-send -u low -h int:value:$val -h string:x-canonical-private-synchronous:brightness "Brightness" "$val%" -i notification-display-brightness
6 | }
7 |
8 | case "$1" in
9 | up)
10 | brightnessctl -q set +5%
11 | send_notification
12 | ;;
13 | down)
14 | brightnessctl -q set 5%-
15 | send_notification
16 | ;;
17 | *)
18 | echo "Usage: $0 {up|down}"
19 | exit 2
20 | esac
21 |
22 | exit 0
23 |
--------------------------------------------------------------------------------
/wayland/bin/calc.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # uses fuzzel + qalc to read query input and perform calculations
4 | # uses wl-copy to copy result into clipboard
5 | # keeps history of calculations
6 |
7 | result_file="$HOME/.config/qalculate/qalc.result.history"
8 | if [ ! -f "$result_file" ]; then
9 | touch $result_file
10 | fi
11 |
12 | last_query=""
13 |
14 | while :
15 | do
16 | qalc_hist=`tac $result_file | head -1000`
17 |
18 | query=`echo "" | fuzzel --dmenu --cache=/dev/null --placeholder="" --prompt="🔢 " --lines=10 <<< "$qalc_hist"`
19 |
20 | return_code=$?
21 |
22 | if test "$return_code" = "0"; then
23 | if [[ "$query" =~ .*=.* ]]; then
24 | result=`echo "$query" | awk {'print $NF'}`
25 | wl-copy "$result"
26 | exit 0
27 | else
28 | result=`qalc "$query"`
29 | last_query=$query
30 | echo $result >> $result_file
31 | fi
32 | else
33 | if [ ! -z "$last_query" ]; then
34 | result=`qalc -t "$last_query"`
35 | wl-copy "$result"
36 | fi
37 |
38 | exit 0
39 | fi
40 | done
41 |
--------------------------------------------------------------------------------
/wayland/bin/hypr-monitor.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env sh
2 |
3 | # original: https://gist.github.com/miyl/7c4ebc95c5a02f84f36a769a3690cde6
4 | #
5 | # A hyprland script for a laptop-external-monitor setup, toggling between which is in use
6 |
7 | # Launch at startup to make hyprland disable the internal monitor if an external monitor is detected and enabled
8 | # Additionally it's called with a keybind to switch between a laptop monitor and an external display
9 | # Ideally the conditional monitor behaviour was instead done directly in hyprland.conf, but I'm not sure whether that's possible
10 | #
11 | # Relevant info:
12 | # - hyprctl monitors: identifies currently enabled monitors
13 | # - hyprctl monitors all: identifies ALL connected monitors - including those not in use
14 | #
15 | # Suggested use:
16 | # Add this line somewhere after the regular monitor configuration in hyprland.conf:
17 | # exec = /path/to/hyprland-monitors-toggle.sh
18 | # Add a keybind to run this script on demand:
19 | # bind =,SomeKeyHere, exec, /path/to/hyprland-monitors-toggle.sh
20 |
21 | move_all_workspaces_to_monitor() {
22 | TARGET_MONITOR="$1"
23 |
24 | hyprctl workspaces | grep ^workspace | cut --delimiter ' ' --fields 3 | xargs -I '{}' hyprctl dispatch moveworkspacetomonitor '{}' "$TARGET_MONITOR"
25 |
26 | # Previous approach
27 | #hyprctl swapactiveworkspaces $EXTERNAL_MONITOR $INTERNAL_MONITOR
28 | }
29 |
30 | # TODO: Detect these instead of hardcoding them
31 | INTERNAL_MONITOR="eDP-1"
32 | EXTERNAL_MONITOR="DP-1"
33 |
34 | NUM_MONITORS=$(hyprctl monitors all | grep --count Monitor)
35 | NUM_MONITORS_ACTIVE=$(hyprctl monitors | grep --count Monitor)
36 |
37 | if [ "$NUM_MONITORS" == 1 ]; then
38 | exit
39 | fi
40 |
41 | # For initial startup if you use hyprland's default monitor settings:
42 | # Turn off the laptop monitor if it + another monitor is active
43 | if [ "$NUM_MONITORS_ACTIVE" -ge 2 ] && hyprctl monitors | cut --delimiter ' ' --fields 2 | grep --quiet ^$INTERNAL_MONITOR; then
44 | # Doing this I hopefully end up on workspace 1 on the external monitor rather than 2 at startup
45 | move_all_workspaces_to_monitor $EXTERNAL_MONITOR
46 | hyprctl keyword monitor "$INTERNAL_MONITOR, disable"
47 | # Alternate fix to ensure I start on workspace 1
48 | hyprctl dispatch workspace 1
49 | exit
50 | fi
51 |
52 | # For dynamically toggling which monitor is active later via a keybind
53 | if [ "$NUM_MONITORS" -gt 1 ]; then # Handling multiple monitors
54 | if hyprctl monitors | cut --delimiter ' ' --fields 2 | grep --quiet ^$EXTERNAL_MONITOR; then
55 | hyprctl keyword monitor $INTERNAL_MONITOR,highrr,auto,1
56 | move_all_workspaces_to_monitor $INTERNAL_MONITOR
57 | hyprctl keyword monitor "$EXTERNAL_MONITOR, disable"
58 | else
59 | hyprctl keyword monitor $EXTERNAL_MONITOR,preferred,auto,1.5
60 | move_all_workspaces_to_monitor $EXTERNAL_MONITOR
61 | hyprctl keyword monitor "$INTERNAL_MONITOR, disable"
62 | fi
63 | else # If the external monitor is disconnected without running this script first, it might become the case that no monitor is on - therefore turn on the laptop monitor!
64 | hyprctl keyword monitor $INTERNAL_MONITOR,highrr,auto,1
65 | move_all_workspaces_to_monitor $INTERNAL_MONITOR
66 | fi
67 |
--------------------------------------------------------------------------------
/wayland/bin/import-env.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | [[ -n $HYPRLAND_DEBUG_CONF ]] && exit 0
6 |
7 | _envs=(
8 | # display
9 | WAYLAND_DISPLAY
10 | DISPLAY
11 | # xdg
12 | USERNAME
13 | XDG_BACKEND
14 | XDG_CURRENT_DESKTOP
15 | XDG_SESSION_TYPE
16 | XDG_SESSION_ID
17 | XDG_SESSION_CLASS
18 | XDG_SESSION_DESKTOP
19 | XDG_SEAT
20 | XDG_VTNR
21 | # hyprland
22 | HYPRLAND_CMD
23 | HYPRLAND_INSTANCE_SIGNATURE
24 | # sway
25 | SWAYSOCK
26 | # ssh
27 | SSH_AUTH_SOCK
28 | )
29 |
30 | dbus-update-activation-environment --systemd "${_envs[@]}"
31 |
32 | for v in "${_envs[@]}"; do
33 | if [[ -n ${!v} ]]; then
34 | tmux setenv -g "$v" "${!v}"
35 | fi
36 | done
37 |
--------------------------------------------------------------------------------
/wayland/bin/launcher-drawer.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | nwg-drawer \
3 | -r \
4 | -pbexit "hyprctl dispatch exit 1" \
5 | -pbpoweroff "systemctl poweroff" \
6 | -pbreboot "systemctl reboot" \
7 | -pbsleep "systemctl suspend" \
8 | -pbsize 46 \
9 | -wm "hyprland" \
10 | -term "ghostty"
11 |
--------------------------------------------------------------------------------
/wayland/bin/power-menu.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | lock=~/workspace/aaku/wayland/bin/screen-lock.sh
4 |
5 | case $(fuzzel -d \
6 | --prompt="⏻ " \
7 | --placeholder="" \
8 | << EOF | sed 's/^ *//'
9 | Shutdown
10 | Reboot
11 | Suspend
12 | Hibernate
13 | Logout
14 | Lock
15 | Cancel
16 | EOF
17 | ) in
18 | "Shutdown")
19 | systemctl poweroff
20 | ;;
21 | "Reboot")
22 | systemctl reboot
23 | ;;
24 | "Suspend")
25 | systemctl suspend
26 | ;;
27 | "Hibernate")
28 | systemctl hibernate
29 | ;;
30 | "Logout")
31 | hyprctl dispatch exit 1
32 | ;;
33 | "Lock")
34 | $lock
35 | ;;
36 | esac
37 |
--------------------------------------------------------------------------------
/wayland/bin/prayer.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | parse_prayer_times () {
4 | local api_url="https://api.aladhan.com/v1/timingsByCity/$(date '+%d-%m-%Y')?${PRAYER_API_PARAMS}"
5 |
6 | local response=$(curl -s "${api_url}")
7 | [[ -z $response ]] && exit 0
8 |
9 | local prayers=('Fajr' 'Sunrise' 'Dhuhr' 'Asr' 'Maghrib' 'Isha')
10 | for prayer in "${prayers[@]}"; do
11 | local prayer_parsed_time=$(echo "${response}" \
12 | | grep -o -e "\"${prayer}\":\"[0-9][0-9]:[0-9][0-9]\"" \
13 | | awk -F "\"${prayer}\":" '{print $2}' \
14 | | tr -d '"')
15 |
16 | local prayer_time_in_seconds=$(date -d "${prayer_parsed_time}" +"%s")
17 | local seconds_until_prayer=$(($prayer_time_in_seconds - $(date +'%s')))
18 | if [[ $seconds_until_prayer > 0 ]]; then
19 | (( $seconds_until_prayer < min || min == 0 )) \
20 | && min=$seconds_until_prayer \
21 | && prayer_name=$prayer \
22 | && prayer_time=$prayer_parsed_time \
23 | && seconds_left=$min
24 | fi
25 | done
26 | }
27 |
28 | print_prayer () {
29 | parse_prayer_times
30 | [[ -z $seconds_left ]] && exit 0
31 |
32 | report_mode=${REPORT_MODE:=0}
33 | if [[ $report_mode == 1 ]]; then
34 | time_left=$(date -u -d "@${seconds_left}" +'%H:%M')
35 | prayer="${prayer_name} in ${time_left}"
36 | elif [[ $report_mode == 2 ]]; then
37 | minutes_left=$(($seconds_left / 60))
38 | prayer="${prayer_name} in ${minutes_left} Minutes"
39 | elif [[ $report_mode == 3 ]]; then
40 | hours_left=$(($seconds_left / 3600))
41 | prayer="${prayer_name} in ${hours_left} Hours"
42 | else
43 | prayer="${prayer_name} ${prayer_time}"
44 | fi
45 |
46 | if [ "$seconds_left" -le 600 ]; then
47 | minutes_left=$(($seconds_left / 60))
48 | notify-send -u low "$prayer_name" "In $minutes_left minutes"
49 | fi
50 |
51 | echo "${prayer}"
52 | }
53 |
54 | print_prayer
55 | exit 0
56 |
--------------------------------------------------------------------------------
/wayland/bin/screen-lock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ $1 ]; then
4 | lockbg="$1"
5 | else
6 | lockbg=$(find $HOME/Pictures/wallpapers/. -type f | shuf -n 1)
7 | fi
8 |
9 | swaylock --daemonize -k -l \
10 | --image $lockbg \
11 | --inside-color 37344500 \
12 | --inside-clear-color 00000000 \
13 | --inside-ver-color 407ee7ff \
14 | --inside-wrong-color f22c40ff \
15 | --key-hl-color 407ee7ff \
16 | --bs-hl-color 407ee7ff \
17 | --ring-color ffffffff \
18 | --ring-clear-color ffffffff \
19 | --ring-wrong-color ffffffff \
20 | --ring-ver-color ffffffff \
21 | --line-uses-ring \
22 | --line-color 00000000 \
23 | --text-color 00000000 \
24 | --text-clear-color 00000000 \
25 | --text-wrong-color 00000000 \
26 | --text-ver-color 00000000 \
27 | --separator-color 00000000 \
28 | --font 'NotoSans Nerd Font Mono:style=Thin,Regular 40'
29 |
--------------------------------------------------------------------------------
/wayland/bin/screenshot.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | filename="$HOME/Pictures/screenshots/$(date +"screenshot_%Y-%m-%d_%H-%M-%S.png")"
4 | open_cmd="eog"
5 | edit_cmd="swappy -f"
6 | copy_cmd="wl-copy"
7 |
8 | notify() {
9 | action=$(notify-send -u low -i "$filename" "Screenshot" --action=copy=Copy --action=edit=Edit --action=open=Open)
10 |
11 | if [ $action = 'open' ]; then
12 | $open_cmd $filename
13 | elif [ $action = 'edit' ]; then
14 | $edit_cmd "$filename"
15 | elif [ $action = 'copy' ]; then
16 | $copy_cmd < "$filename"
17 | fi
18 | }
19 |
20 | delay() {
21 | sleep $1
22 | }
23 |
24 | all() {
25 | if [ -n "$2" ]; then
26 | delay "$2"
27 | fi
28 |
29 | grim "$filename"
30 | notify
31 | }
32 |
33 | window() {
34 | area=$(hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
35 |
36 | grim -g "$area" "$filename"
37 | notify
38 | }
39 |
40 | selection() {
41 | grim -g "$(slurp)" "$filename"
42 | notify
43 | }
44 |
45 | case $1 in
46 | all)
47 | all "$@"
48 | ;;
49 | window)
50 | window
51 | ;;
52 | selection)
53 | selection
54 | ;;
55 | *)
56 | echo "Usage: $0 {all \$DELAY|window|selection}"
57 | exit 2
58 | esac
59 |
--------------------------------------------------------------------------------
/wayland/bin/set-gtk-theme.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | GTK_THEME='Colloid-dark'
4 | ICON_THEME='Colloid'
5 | DARK_MODE='prefer-dark'
6 | CURSOR_THEME='Capitaine Cursors' # 'Catppuccin-Mocha-Dark'
7 | XCURSOR_SIZE=24
8 | HYPRCURSOR_SIZE=30
9 | GTK_FONT_NAME='Noto Sans Regular 11'
10 |
11 | config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
12 |
13 | gnome_schema="org.gnome.desktop.interface"
14 | gtk_theme="$(grep -s 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
15 | icon_theme="$(grep -s 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
16 | cursor_theme="$(grep -s 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
17 | font_name="$(grep -s 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
18 | dark_mode="$(grep -s 'gtk-application-prefer-dark-theme' "$config" | sed 's/.*\s*=\s*//')"
19 |
20 | gsettings set "$gnome_schema" gtk-theme "${gtk_theme:=$GTK_THEME}"
21 | gsettings set "$gnome_schema" icon-theme "${icon_theme:=$ICON_THEME}"
22 | gsettings set "$gnome_schema" cursor-theme "${cursor_theme:=$CURSOR_THEME}"
23 | gsettings set "$gnome_schema" font-name "${font_name:=$GTK_FONT_NAME}"
24 | gsettings set "$gnome_schema" color-scheme "${dark_mode:=$DARK_MODE}"
25 | # gsettings set org.gnome.desktop.wm.preferences button-layout '' && # remove window buttons
26 |
27 | # hyprctl setcursor 'Catppuccin-Mocha-Dark' $HYPRCURSOR_SIZE
28 |
29 | # hyprctl setcursor $CURSOR_THEME $HYPRCURSOR_SIZE &&
30 | # export XCURSOR_THEME=$CURSOR_THEME
31 | # export XCURSOR_SIZE=$XCURSOR_SIZE
32 | # export HYPRCURSOR_THEME=$CURSOR_THEME
33 | # export HYPRCURSOR_SIZE=$HYPRCURSOR_SIZE
34 | # export QT_QPA_PLATFORMTHEME=qt5ct # change to qt6ct if you have that
35 |
--------------------------------------------------------------------------------
/wayland/bin/volume.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | case "$1" in
4 | up)
5 | wpctl set-volume @DEFAULT_SINK@ 5%+
6 |
7 | val=$(wpctl get-volume @DEFAULT_SINK@ | grep -oP 'Volume: \K.*' | awk '{print $1 * 100}')
8 | notify-send -u low -h int:value:$val -h string:x-canonical-private-synchronous:volume "Volume" "$val%" -i audio-volume-high
9 | ;;
10 | down)
11 | wpctl set-volume @DEFAULT_SINK@ 5%-
12 |
13 | val=$(wpctl get-volume @DEFAULT_SINK@ | grep -oP 'Volume: \K.*' | awk '{print $1 * 100}')
14 | notify-send -u low -h int:value:$val -h string:x-canonical-private-synchronous:volume "Volume" "$val%" -i audio-volume-high
15 | ;;
16 | mute)
17 | wpctl set-mute @DEFAULT_SINK@ toggle
18 |
19 | if wpctl get-volume @DEFAULT_SINK@ | grep -q "[MUTED]"; then
20 | notify-send -u low -h string:x-canonical-private-synchronous:volume "Volume" "Muted" -i audio-volume-muted
21 | else
22 | val=$(wpctl get-volume @DEFAULT_SINK@ | grep -oP 'Volume: \K.*' | awk '{print $1 * 100}')
23 | notify-send -u low -h string:x-canonical-private-synchronous:volume "Volume" "$val%" -i audio-volume-high
24 | fi
25 | ;;
26 | mute-mic)
27 | wpctl set-mute @DEFAULT_SOURCE@ toggle
28 |
29 | if wpctl get-volume @DEFAULT_SOURCE@ | grep -q "[MUTED]"; then
30 | notify-send -u low -h string:x-canonical-private-synchronous:microphone "Microphone" "Muted" -i microphone-sensitivity-muted
31 | else
32 | notify-send -u low -h string:x-canonical-private-synchronous:microphone "Microphone" "Unmuted" -i audio-input-microphone-high
33 | fi
34 | ;;
35 | *)
36 | echo "Usage: $0 {up|down|mute|mute-mic}"
37 | exit 2
38 | esac
39 |
40 | exit 0
41 |
--------------------------------------------------------------------------------
/wayland/bin/weather.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | parse_weather_details () {
4 | local api_key=$WEATHER_API_KEY
5 | local city_id=$WEATHER_CITY_GEOLOCATION
6 | local api_parameters="exclude=minutely,hourly,daily,alerts,flags&units=si"
7 | local api_url="https://api.darksky.net/forecast/${api_key}/${city_id}?${api_parameters}"
8 |
9 | local response=$(curl -s "${api_url}")
10 | [[ -z $response ]] && exit 0
11 |
12 | forecast=$(echo "${response}" \
13 | | grep -o -e '\"icon\":\"[a-zA-Z-]*\"' \
14 | | awk -F ':' '{print $2}' \
15 | | tr -d '"')
16 |
17 | temperature=$(echo "${response}" \
18 | | grep -o -e '\"temperature\":\-\?[0-9]*' \
19 | | awk -F ':' '{print $2}' \
20 | | tr -d '"')
21 | }
22 |
23 | print_weather () {
24 | local clear_day_icon=''
25 | local clear_night_icon=''
26 | local partly_cloudy_day_icon=''
27 | local partly_cloudy_night_icon=''
28 | local cloudy_icon=''
29 | local rain_icon=''
30 | local sleet_icon=''
31 | local snow_icon=''
32 | local wind_icon=''
33 | local fog_icon=''
34 | local celsius_icon='°C'
35 |
36 | parse_weather_details
37 | case "${forecast}" in
38 | clear-day) current_icon=$clear_day_icon;;
39 | clear-night) current_icon=$clear_night_icon;;
40 | partly-cloudy-day) current_icon=$partly_cloudy_day_icon;;
41 | partly-cloudy-night) current_icon=$partly_cloudy_night_icon;;
42 | cloudy) current_icon=$cloudy_icon;;
43 | rain) current_icon=$rain_icon;;
44 | sleet) current_icon=$sleet_icon;;
45 | snow) current_icon=$snow_icon;;
46 | wind) current_icon=$wind_icon;;
47 | fog) current_icon=$fog_icon;;
48 | esac
49 |
50 | weather="${current_icon} ${temperature}${celsius_icon}"
51 | echo "${weather}"
52 | }
53 |
54 | print_weather
55 | exit 0
56 |
--------------------------------------------------------------------------------
/wayland/fuzzel/fuzzel.ini:
--------------------------------------------------------------------------------
1 | dpi-aware=no
2 | width=30
3 | line-height=25
4 | lines=10
5 | inner-pad=20
6 | font='Noto Sans':weight=regular:size=16
7 | icon-theme=Colloid-dark
8 | fields=name,generic,comment,categories,filename,keywords
9 | prompt="🔍 "
10 | placeholder="search"
11 | show-actions=yes
12 | exit-on-keyboard-focus-loss=no
13 | terminal=ghostty -e
14 | layer=overlay
15 |
16 | [colors]
17 | background=0b0a10f5
18 | text=f8f8f2ff
19 | input=f8f8f2ff
20 | selection=33ccffff
21 | selection-text=f8f8f2ff
22 | match=8be9fdff
23 | selection-match=8be9fdff
24 | border=111019ff
25 |
26 | [border]
27 | radius=15
28 |
29 | [dmenu]
30 | exit-immediately-if-empty=yes
31 |
--------------------------------------------------------------------------------
/wayland/mako/config:
--------------------------------------------------------------------------------
1 | # man 5 mako
2 |
3 | layer=top
4 | markup=1
5 | actions=1
6 | anchor=top-right
7 | width=400
8 | height=100
9 | icons=1
10 | max-icon-size=64
11 | icon-location=right
12 | icon-path=$HOME/.local/share/icons/WhiteSur-dark:/usr/share/icons/Adwaita:/usr/share/icons/hicolor
13 | margin=20,20,0
14 | padding=15,15,15
15 | border-size=2
16 | border-color=#373b41
17 | border-radius=7
18 | progress-color=source #373b41
19 | background-color=#1b1918
20 | text-color=#f1efee
21 | default-timeout=5000
22 | group-by=summary
23 | font=Noto Sans Regular 12
24 | format=%s\n%b
25 | sort=-time
26 |
27 | [grouped]
28 | format=%s\n%b
29 |
30 | [mode=progress]
31 | format=%s\n%b
32 |
33 | [urgency=low actionable]
34 | border-color=#93a1a1
35 |
36 | [urgency=normal actionable]
37 | border-color=#268bd2
38 |
39 | [urgency=high]
40 | ignore-timeout=0
41 | border-color=#e06c75
42 |
43 | [urgency=high actionable]
44 | border-color=#6c71c4
45 |
46 | [hidden]
47 | format=Hidden: %h [%t]
48 |
49 | [mode=away]
50 | default-timeout=0
51 | ignore-timeout=1
52 |
53 | [mode=do-not-disturb]
54 | invisible=1
55 |
56 | [summary~=Volume|Brightness]
57 | format=%s: %b
58 | default-timeout=1000
59 |
--------------------------------------------------------------------------------
/wayland/nwg-drawer/drawer.css:
--------------------------------------------------------------------------------
1 | * {
2 | font-family: 'Noto Sans Regular';
3 | font-size: 16px;
4 | }
5 |
6 | window {
7 | background-color: rgba (40, 40, 40, 0.8);
8 | }
9 |
10 | /* search entry */
11 | entry {
12 | background-color: rgba (0, 0, 0, 0.2);
13 | border-color: #161420;
14 | }
15 |
16 | button {
17 | background: transparent;
18 | border: none;
19 | border-radius: 0px;
20 | box-shadow: none;
21 | }
22 |
23 |
24 | button:hover {
25 | background-color: #161420;
26 | }
27 |
28 | #category-button:hover {
29 | background-color: #161420;
30 | border: 2px solid #111019;
31 | }
32 |
33 | /* in case you wanted to give category buttons a different look */
34 | #category-button {
35 | margin: 0px 8px 0px 8px;
36 | padding: 0 1em;
37 | background: #282828;
38 | border: 2px solid #433e3c;
39 | box-shadow: none;
40 | min-height: 0px;
41 | }
42 |
43 | #pinned-box {
44 | padding-bottom: 5px;
45 | border-bottom: 1px dotted gray
46 | }
47 |
48 | #files-box {
49 | padding: 5px;
50 | border: 1px dotted gray;
51 | border-radius: 0px
52 | }
53 |
--------------------------------------------------------------------------------
/wayland/swaync/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "/etc/xdg/swaync/configSchema.json",
3 | "positionX": "right",
4 | "positionY": "top",
5 | "cssPriority": "user",
6 | "control-center-width": 380,
7 | "control-center-height": 860,
8 | "control-center-margin-top": 2,
9 | "control-center-margin-bottom": 2,
10 | "control-center-margin-right": 1,
11 | "control-center-margin-left": 0,
12 | "notification-window-width": 400,
13 | "notification-icon-size": 48,
14 | "notification-body-image-height": 160,
15 | "notification-body-image-width": 200,
16 | "timeout": 4,
17 | "timeout-low": 2,
18 | "timeout-critical": 6,
19 | "fit-to-screen": false,
20 | "keyboard-shortcuts": true,
21 | "image-visibility": "always",
22 | "transition-time": 200,
23 | "hide-on-clear": false,
24 | "hide-on-action": false,
25 | "script-fail-notify": true,
26 | "scripts": {
27 | "example-script": {
28 | "exec": "echo 'Do something...'",
29 | "urgency": "Normal"
30 | }
31 | },
32 | "notification-visibility": {
33 | "example-name": {
34 | "state": "muted",
35 | "urgency": "Low",
36 | "app-name": "Spotify"
37 | }
38 | },
39 | "widgets": [
40 | "label",
41 | "buttons-grid",
42 | "label",
43 | "volume",
44 | "label",
45 | "mpris",
46 | "dnd",
47 | "title",
48 | "notifications"
49 | ],
50 | "widget-config": {
51 | "title": {
52 | "text": "Notifications",
53 | "clear-all-button": true,
54 | "button-text": " "
55 | },
56 | "dnd": {
57 | "text": "Do not disturb"
58 | },
59 | "label": {
60 | "max-lines": 1,
61 | "text": " "
62 | },
63 | "mpris": {
64 | "image-size": 96,
65 | "image-radius": 12
66 | },
67 | "volume": {
68 | "label": "",
69 | "show-per-app": true,
70 | "show-per-app-label": true,
71 | "show-per-app-icon": true
72 | },
73 | "buttons-grid": {
74 | "actions": [
75 | {
76 | "label": " ",
77 | "command": "wpctl set-mute @DEFAULT_SINK@ toggle"
78 | },
79 | {
80 | "label": "",
81 | "command": "wpctl set-mute @DEFAULT_SOURCE@ toggle"
82 | },
83 | {
84 | "label": " ",
85 | "command": "nm-connection-editor"
86 | },
87 | {
88 | "label": "",
89 | "command": "blueman-manager"
90 | },
91 | {
92 | "label": "",
93 | "command": "nwg-look"
94 | }
95 | ]
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/wayland/swaync/icons/bolt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/bolt.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/gamemode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/gamemode.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/microphone-mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/microphone-mute.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/microphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/microphone.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/music.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/palette.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/picture.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/play.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/timer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/timer.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/volume-high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/volume-high.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/volume-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/volume-low.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/volume-mid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/volume-mid.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/volume-mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/volume-mute.png
--------------------------------------------------------------------------------
/wayland/swaync/icons/wand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aonemd/aaku/7742e80d474afc8a3d042d4ba75bfad69af53608/wayland/swaync/icons/wand.png
--------------------------------------------------------------------------------
/wayland/waybar/config-orig.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "layer": "bottom",
3 | "position": "top",
4 | "reload_style_on_change": true,
5 | "height": 28,
6 | "modules-left": [
7 | "custom/launcher",
8 | "hyprland/workspaces"
9 | ],
10 | "modules-center": [
11 | "hyprland/submap"
12 | ],
13 | "modules-right": [
14 | "tray",
15 | "custom/prayer",
16 | "custom/weather",
17 | "pulseaudio#input",
18 | "pulseaudio",
19 | "battery",
20 | "network",
21 | "custom/notification",
22 | "clock"
23 | ],
24 | "custom/launcher": {
25 | "format": " ",
26 | "on-click": "nwg-drawer",
27 | "tooltip": false
28 | },
29 | "hyprland/workspaces": {
30 | "on-scroll-up": "hyprctl dispatch workspace r-1",
31 | "on-scroll-down": "hyprctl dispatch workspace r+1",
32 | "on-click": "activate",
33 | "active-only": false,
34 | "all-outputs": true,
35 | //"format":"{icon}",
36 | //"format-icons": {
37 | // // "urgent": " ",
38 | // // "active": " ",
39 | // //"default": " "
40 | // "urgent": " ",
41 | // "active": " ",
42 | //},
43 | "persistent-workspaces": {
44 | "*": 3
45 | }
46 | },
47 | "tray": {
48 | "spacing": 20
49 | },
50 | "idle_inhibitor": {
51 | "format": "{icon} ",
52 | "format-icons": {
53 | "activated": "",
54 | "deactivated": ""
55 | }
56 | },
57 | "hyprland/submap": {
58 | "format": "{}",
59 | "tooltip": false
60 | },
61 | "hyprland/language": {
62 | "format": "{}",
63 | "format-en": "EN",
64 | "format-ar": "AR",
65 | "keyboard-name": "keychron-k1-keycool-keyboard"
66 | },
67 | "clock": {
68 | "format": "{:%a %d %b %H:%M}",
69 | "interval": 60,
70 | "tooltip-format": "{:%Y %B}\n{calendar}",
71 | "calendar": {
72 | "mode": "month",
73 | "mode-mon-col": 3,
74 | "weeks-pos": "right",
75 | "on-scroll": 1,
76 | "on-click-right": "mode",
77 | "format": {
78 | "months": "{}",
79 | "days": "{}",
80 | "weeks": "W{}",
81 | "weekdays": "{}",
82 | "today": "{}"
83 | }
84 | },
85 | "actions": {
86 | "on-click-right": "mode",
87 | "on-click-forward": "tz_up",
88 | "on-click-backward": "tz_down",
89 | "on-scroll-up": "shift_up",
90 | "on-scroll-down": "shift_down"
91 | }
92 | },
93 | "network": {
94 | "format-wifi": "",
95 | "tooltip-format-wifi": " {essid} ({signalStrength}%)",
96 | "format-ethernet": "",
97 | "format-disconnected": " Disconnected",
98 | "on-click": "nm-connection-editor"
99 | },
100 | "pulseaudio": {
101 | "format": "{icon} {volume}%",
102 | "tooltip-format": "{icon} {volume}%",
103 | "format-muted": "",
104 | "format-icons": {
105 | "headphone": "",
106 | "hands-free": "",
107 | "headset": "",
108 | "phone": "",
109 | "portable": "",
110 | "car": "",
111 | "default": [
112 | "",
113 | "",
114 | " "
115 | ]
116 | },
117 | "on-click": "pavucontrol"
118 | },
119 | "pulseaudio#input": {
120 | "format-source": "",
121 | "tooltip-format": "{icon} {volume}%",
122 | "format-source-muted": "",
123 | "format": "{format_source}",
124 | "scroll-step": 1,
125 | "smooth-scrolling-threshold": 1,
126 | "max-volume": 100,
127 | "on-click": "pactl set-source-mute @DEFAULT_SOURCE@ toggle",
128 | "on-click-middle": "pavucontrol",
129 | "on-scroll-up": "pactl set-source-volume @DEFAULT_SOURCE@ +1%",
130 | "on-scroll-down": "pactl set-source-volume @DEFAULT_SOURCE@ -1%"
131 | },
132 | "bluetooth": {
133 | "format": "",
134 | "format-disabled": "",
135 | "format-connected": " {device_alias}",
136 | "format-connected-battery": " {device_alias} ({device_battery_percentage}%)",
137 | "tooltip-format": "{controller_alias}\t{controller_address}",
138 | "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
139 | "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
140 | "on-click": "blueman-manager"
141 | },
142 | "custom/prayer": {
143 | "format": " {}",
144 | "exec": "exec ~/workspace/aaku/wayland/bin/prayer.sh",
145 | "interval": 600
146 | },
147 | "custom/spotify": {
148 | "exec": "python3 ~/.config/waybar/scripts/mediaplayer.py --player spotify",
149 | "format": "{} ",
150 | "return-type": "json",
151 | "on-click": "playerctl play-pause",
152 | "on-double-click-right": "playerctl next",
153 | "on-scroll-down": "playerctl previous"
154 | },
155 | "custom/weather": {
156 | "exec": "python3 ~/.config/waybar/scripts/weather.py",
157 | "restart-interval": 600,
158 | "return-type": "json",
159 | "on-click": "xdg-open https://wttr.in/"
160 | },
161 | "custom/power": {
162 | "format": "",
163 | "tooltip": false,
164 | "on-click": "exec ~/workspace/aaku/wayland/bin/power-menu.sh"
165 | },
166 | "custom/notification": {
167 | "tooltip": false,
168 | "format": "{icon}",
169 | "format-icons": {
170 | "notification": "",
171 | "none": "",
172 | "dnd-notification": "",
173 | "dnd-none": "",
174 | "inhibited-notification": "",
175 | "inhibited-none": "",
176 | "dnd-inhibited-notification": "",
177 | "dnd-inhibited-none": ""
178 | },
179 | "return-type": "json",
180 | "exec-if": "which swaync-client",
181 | "exec": "swaync-client -swb",
182 | "on-click": "swaync-client -t -sw",
183 | "on-click-right": "swaync-client -d -sw",
184 | "escape": true
185 | },
186 | "battery": {
187 | "bat": "BAT0",
188 | "states": {
189 | "warning": 30,
190 | "critical": 15
191 | },
192 | "max-length": 20,
193 | "format": "{icon} {capacity}%",
194 | "format-alt": "{icon}",
195 | "tooltip-format": "{capacity}% ({time})",
196 | "format-charging": "",
197 | "format-plugged": "",
198 | "format-icons": [
199 | " ",
200 | " ",
201 | " ",
202 | " ",
203 | " "
204 | ]
205 | },
206 | "backlight": {
207 | "device": "DP-1",
208 | "format": "{icon} {percent}%",
209 | "format-icons": [
210 | "",
211 | "",
212 | "",
213 | "",
214 | "",
215 | "",
216 | "",
217 | "",
218 | ""
219 | ],
220 | "on-click": ""
221 | },
222 | }
223 |
--------------------------------------------------------------------------------
/wayland/waybar/scripts/mediaplayer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | import argparse
3 | import logging
4 | import sys
5 | import signal
6 | import gi
7 | import json
8 | gi.require_version('Playerctl', '2.0')
9 | from gi.repository import Playerctl, GLib
10 |
11 | logger = logging.getLogger(__name__)
12 |
13 |
14 | def write_output(text, player):
15 | logger.info('Writing output')
16 |
17 | output = {'text': text,
18 | 'class': 'custom-' + player.props.player_name,
19 | 'alt': player.props.player_name}
20 |
21 | sys.stdout.write(json.dumps(output) + '\n')
22 | sys.stdout.flush()
23 |
24 |
25 | def on_play(player, status, manager):
26 | logger.info('Received new playback status')
27 | on_metadata(player, player.props.metadata, manager)
28 |
29 |
30 | def on_metadata(player, metadata, manager):
31 | logger.info('Received new metadata')
32 | track_info = ''
33 |
34 | if player.props.player_name == 'spotify' and \
35 | 'mpris:trackid' in metadata.keys() and \
36 | ':ad:' in player.props.metadata['mpris:trackid']:
37 | track_info = 'AD PLAYING'
38 | elif player.get_artist() != '' and player.get_title() != '':
39 | track_info = '{artist} - {title}'.format(artist=player.get_artist(),
40 | title=player.get_title())
41 | else:
42 | track_info = player.get_title()
43 |
44 | if player.props.status != 'Playing' and track_info:
45 | track_info = ' ' + track_info
46 | write_output(track_info, player)
47 |
48 |
49 | def on_player_appeared(manager, player, selected_player=None):
50 | if player is not None and (selected_player is None or player.name == selected_player):
51 | init_player(manager, player)
52 | else:
53 | logger.debug("New player appeared, but it's not the selected player, skipping")
54 |
55 |
56 | def on_player_vanished(manager, player):
57 | logger.info('Player has vanished')
58 | sys.stdout.write('\n')
59 | sys.stdout.flush()
60 |
61 |
62 | def init_player(manager, name):
63 | logger.debug('Initialize player: {player}'.format(player=name.name))
64 | player = Playerctl.Player.new_from_name(name)
65 | player.connect('playback-status', on_play, manager)
66 | player.connect('metadata', on_metadata, manager)
67 | manager.manage_player(player)
68 | on_metadata(player, player.props.metadata, manager)
69 |
70 |
71 | def signal_handler(sig, frame):
72 | logger.debug('Received signal to stop, exiting')
73 | sys.stdout.write('\n')
74 | sys.stdout.flush()
75 | # loop.quit()
76 | sys.exit(0)
77 |
78 |
79 | def parse_arguments():
80 | parser = argparse.ArgumentParser()
81 |
82 | # Increase verbosity with every occurrence of -v
83 | parser.add_argument('-v', '--verbose', action='count', default=0)
84 |
85 | # Define for which player we're listening
86 | parser.add_argument('--player')
87 |
88 | return parser.parse_args()
89 |
90 |
91 | def main():
92 | arguments = parse_arguments()
93 |
94 | # Initialize logging
95 | logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
96 | format='%(name)s %(levelname)s %(message)s')
97 |
98 | # Logging is set by default to WARN and higher.
99 | # With every occurrence of -v it's lowered by one
100 | logger.setLevel(max((3 - arguments.verbose) * 10, 0))
101 |
102 | # Log the sent command line arguments
103 | logger.debug('Arguments received {}'.format(vars(arguments)))
104 |
105 | manager = Playerctl.PlayerManager()
106 | loop = GLib.MainLoop()
107 |
108 | manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
109 | manager.connect('player-vanished', on_player_vanished)
110 |
111 | signal.signal(signal.SIGINT, signal_handler)
112 | signal.signal(signal.SIGTERM, signal_handler)
113 | signal.signal(signal.SIGPIPE, signal.SIG_DFL)
114 |
115 | for player in manager.props.player_names:
116 | if arguments.player is not None and arguments.player != player.name:
117 | logger.debug('{player} is not the filtered player, skipping it'
118 | .format(player=player.name)
119 | )
120 | continue
121 |
122 | init_player(manager, player)
123 |
124 | loop.run()
125 |
126 |
127 | if __name__ == '__main__':
128 | main()
129 |
--------------------------------------------------------------------------------
/wayland/waybar/scripts/weather.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import json
4 | import requests
5 | from datetime import datetime
6 |
7 | WEATHER_CODES = {
8 | '113': '🌞',
9 | '116': '⛅️',
10 | '119': '☁️',
11 | '122': '☁️',
12 | '143': '🌫',
13 | '176': '🌦',
14 | '179': '🌧',
15 | '182': '🌧',
16 | '185': '🌧',
17 | '200': '⛈',
18 | '227': '🌨',
19 | '230': '❄️',
20 | '248': '🌫',
21 | '260': '🌫',
22 | '263': '🌦',
23 | '266': '🌦',
24 | '281': '🌧',
25 | '284': '🌧',
26 | '293': '🌦',
27 | '296': '🌦',
28 | '299': '🌧',
29 | '302': '🌧',
30 | '305': '🌧',
31 | '308': '🌧',
32 | '311': '🌧',
33 | '314': '🌧',
34 | '317': '🌧',
35 | '320': '🌨',
36 | '323': '🌨',
37 | '326': '🌨',
38 | '329': '❄️',
39 | '332': '❄️',
40 | '335': '❄️',
41 | '338': '❄️',
42 | '350': '🌧',
43 | '353': '🌦',
44 | '356': '🌧',
45 | '359': '🌧',
46 | '362': '🌧',
47 | '365': '🌧',
48 | '368': '🌨',
49 | '371': '❄️',
50 | '374': '🌧',
51 | '377': '🌧',
52 | '386': '⛈',
53 | '389': '🌩',
54 | '392': '⛈',
55 | '395': '❄️'
56 | }
57 |
58 | data = {}
59 |
60 |
61 | weather = requests.get("https://wttr.in/?format=j1").json()
62 |
63 |
64 | def format_time(time):
65 | return time.replace("00", "").zfill(2)
66 |
67 |
68 | def format_temp(temp):
69 | return (hour['FeelsLikeC']+"°").ljust(3)
70 |
71 |
72 | def format_chances(hour):
73 | chances = {
74 | "chanceoffog": "Fog",
75 | "chanceoffrost": "Frost",
76 | "chanceofovercast": "Overcast",
77 | "chanceofrain": "Rain",
78 | "chanceofsnow": "Snow",
79 | "chanceofsunshine": "Sunshine",
80 | "chanceofthunder": "Thunder",
81 | "chanceofwindy": "Wind"
82 | }
83 |
84 | conditions = []
85 | for event in chances.keys():
86 | if int(hour[event]) > 0:
87 | conditions.append(chances[event]+" "+hour[event]+"%")
88 | return ", ".join(conditions)
89 |
90 |
91 | data['text'] = WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \
92 | " "+weather['current_condition'][0]['FeelsLikeC']+"°C"
93 |
94 | data['tooltip'] = f"{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°C\n"
95 | data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}°C\n"
96 | data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n"
97 | data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
98 | for i, day in enumerate(weather['weather']):
99 | data['tooltip'] += f"\n"
100 | if i == 0:
101 | data['tooltip'] += "Today, "
102 | if i == 1:
103 | data['tooltip'] += "Tomorrow, "
104 | data['tooltip'] += f"{day['date']}\n"
105 | data['tooltip'] += f"⬆️ {day['maxtempC']}° ⬇️ {day['mintempC']}° "
106 | data['tooltip'] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n"
107 | for hour in day['hourly']:
108 | if i == 0:
109 | if int(format_time(hour['time'])) < datetime.now().hour-2:
110 | continue
111 | data['tooltip'] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeC'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
112 |
113 |
114 | print(json.dumps(data))
115 |
--------------------------------------------------------------------------------
/wayland/waybar/style-orig.css:
--------------------------------------------------------------------------------
1 | * {
2 | font-family: NotoSans Nerd Font, JetBrainsMono Nerd Font, sans-serif;
3 | font-size: 18px;
4 | min-height: 0;
5 | }
6 |
7 | window#waybar {
8 | min-height: 18px;
9 | /* font-size: 18px; */
10 | margin: 16px 16px;
11 | /* background: @theme_base_color; */
12 | /* border-bottom: 1px solid @unfocused_borders; */
13 | /* color: @theme_text_color; */
14 | color: white;
15 | background-color: rgba(27, 25, 24, 0.70);
16 | transition-property: background-color;
17 | transition-duration: 0.5s;
18 | transition-duration: 0.5s;
19 | }
20 |
21 | window#waybar.hidden {
22 | opacity: 0.2;
23 | }
24 |
25 | #tray,
26 | #window,
27 | #mode,
28 | #idle_inhibitor,
29 | #clock,
30 | #battery,
31 | #network,
32 | #language,
33 | #submap,
34 | #pulseaudio,
35 | #pulseaudio-input,
36 | #bluetooth,
37 | #custom-launcher,
38 | #custom-prayer,
39 | #custom-power,
40 | #custom-hyprPicker,
41 | #custom-power-menu,
42 | #custom-spotify,
43 | #custom-notification,
44 | #custom-weather,
45 | #custom-weather.severe,
46 | #custom-weather.sunnyDay,
47 | #custom-weather.clearNight,
48 | #custom-weather.cloudyFoggyDay,
49 | #custom-weather.cloudyFoggyNight,
50 | #custom-weather.rainyDay,
51 | #custom-weather.rainyNight,
52 | #custom-weather.showyIcyDay,
53 | #custom-weather.snowyIcyNight,
54 | #custom-weather.default {
55 | border-radius: 9.5px;
56 | padding: 0 12px;
57 | color: #e5e5e5;
58 | }
59 |
60 | #custom-launcher {
61 | margin-left: 5px;
62 | }
63 |
64 | #window {
65 | color: #64727d;
66 | }
67 |
68 | #workspaces {
69 | background: transparent;
70 | margin-left: 20px;
71 | padding: 0px 0px;
72 | border-radius: 15px;
73 | border: 0px;
74 | opacity: 0.8;
75 | font-style: normal;
76 | font-size: 12px;
77 | }
78 |
79 | #workspaces button {
80 | padding: 0px 7px;
81 | margin: 3px 3px;
82 | border-radius: 15px;
83 | border: 0px;
84 | color: #fff;
85 | background-color: transparent;
86 | transition: all 0.2s ease-in-out;
87 | opacity: 1;
88 | }
89 |
90 | #workspaces button.active {
91 | color: #000;
92 | background: #fff;
93 | border-radius: 15px;
94 | min-width: 40px;
95 | transition: all 0.2s ease-in-out;
96 | opacity: 1;
97 | }
98 |
99 | /* dots workspaces */
100 | /* #workspaces { */
101 | /* margin: 5px 5px 5px 5px; */
102 | /* padding: 4px 1px; */
103 | /* border-radius: 15px; */
104 | /* font-weight: normal; */
105 | /* font-style: normal; */
106 | /* font-size: 12px; */
107 | /* } */
108 | /**/
109 | /* #workspaces button { */
110 | /* padding: 0 5px; */
111 | /* margin: 0px 3px; */
112 | /* border-radius: 15px; */
113 | /* background-color: transparent; */
114 | /* color: white; */
115 | /* } */
116 | /**/
117 | /* #workspaces button.active { */
118 | /* color: white; */
119 | /* transition: all 0.2s ease-in-out; */
120 | /* opacity: 1; */
121 | /* } */
122 |
123 | #workspaces button:hover {
124 | /* default */
125 | }
126 |
127 | #workspaces button.active:hover {
128 | /* background-color: transparent; */
129 | }
130 |
131 | #workspaces button.urgent {
132 | color: #eb4d4b;
133 | }
134 |
135 | #custom-power {
136 | margin-right: 5px;
137 | }
138 |
139 | #mode {
140 | font-style:italic;
141 | }
142 |
143 | #battery.charging {
144 | color: #d5911a;
145 | }
146 |
147 | #battery.warning:not(.charging) {
148 | color: #f22c40;
149 | animation-name: blink;
150 | animation-duration: 0.5s;
151 | animation-timing-function: linear;
152 | animation-iteration-count: infinite;
153 | animation-direction: alternate;
154 | }
155 |
156 | @keyframes blink {
157 | to {
158 | background-color: #ffffff;
159 | color: black;
160 | }
161 | }
162 |
163 | #network.disconnected {
164 | background: #f53c3c;
165 | }
166 |
--------------------------------------------------------------------------------
/wayland/waybar/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | font-family: NotoSans Nerd Font, JetBrainsMono Nerd Font, sans-serif;
3 | font-size: 18px;
4 | min-height: 0;
5 | }
6 |
7 | window#waybar {
8 | min-height: 18px;
9 | /* font-size: 18px; */
10 | margin: 16px 16px;
11 | /* background: @theme_base_color; */
12 | /* border-bottom: 1px solid @unfocused_borders; */
13 | /* color: @theme_text_color; */
14 | color: white;
15 | background-color: rgba(27, 25, 24, 0.70);
16 | transition-property: background-color;
17 | transition-duration: 0.5s;
18 | transition-duration: 0.5s;
19 | }
20 |
21 | window#waybar.hidden {
22 | opacity: 0.2;
23 | }
24 |
25 | #tray,
26 | #window,
27 | #mode,
28 | #idle_inhibitor,
29 | #clock,
30 | #battery,
31 | #network,
32 | #language,
33 | #submap,
34 | #pulseaudio,
35 | #pulseaudio-input,
36 | #bluetooth,
37 | #custom-launcher,
38 | #custom-prayer,
39 | #custom-power,
40 | #custom-hyprPicker,
41 | #custom-power-menu,
42 | #custom-spotify,
43 | #group-trayer,
44 | #custom-notification,
45 | #custom-toggle_light_dark,
46 | #custom-weather,
47 | #custom-weather.severe,
48 | #custom-weather.sunnyDay,
49 | #custom-weather.clearNight,
50 | #custom-weather.cloudyFoggyDay,
51 | #custom-weather.cloudyFoggyNight,
52 | #custom-weather.rainyDay,
53 | #custom-weather.rainyNight,
54 | #custom-weather.showyIcyDay,
55 | #custom-weather.snowyIcyNight,
56 | #custom-weather.default {
57 | border-radius: 7px;
58 | padding: 0 10px;
59 | color: #e5e5e5;
60 | }
61 |
62 | #custom-launcher {
63 | margin-left: 5px;
64 | }
65 |
66 | #window {
67 | color: #64727d;
68 | }
69 |
70 | #workspaces {
71 | background: transparent;
72 | margin-left: 20px;
73 | padding: 0px 0px;
74 | border-radius: 5px;
75 | border: 0px;
76 | opacity: 0.8;
77 | font-style: normal;
78 | font-size: 12px;
79 | }
80 |
81 | #workspaces button {
82 | padding: 0px 7px;
83 | margin: 3px 3px;
84 | border: 0px;
85 | border-radius: 5px;
86 | color: #7ABD91;
87 | background-color: transparent;
88 | opacity: 1;
89 | }
90 | #workspaces button:nth-child(1) {
91 | color: #FF6962;
92 | }
93 | #workspaces button:nth-child(2) {
94 | color: #FF8989;
95 | }
96 | #workspaces button:nth-child(3) {
97 | color: #FFB3A5;
98 | }
99 | #workspaces button:nth-child(4) {
100 | color: #BDDEC8;
101 | }
102 | #workspaces button:nth-child(4) {
103 | color: #7ABD91;
104 | }
105 | #workspaces button:nth-child(4) {
106 | color: #5FA777;
107 | }
108 |
109 | #workspaces button.active {
110 | min-width: 10px;
111 | border-radius: 5px;
112 | /* color: #000; */
113 | /* background: #fff; */
114 | }
115 |
116 | #workspaces button:hover {
117 | /* default */
118 | }
119 |
120 | #workspaces button.active:hover {
121 | /* background-color: transparent; */
122 | }
123 |
124 | #workspaces button.urgent {
125 | }
126 |
127 | #custom-power {
128 | margin-right: 5px;
129 | }
130 |
131 | #mode {
132 | font-style:italic;
133 | }
134 |
135 | #battery.charging {
136 | color: #d5911a;
137 | }
138 |
139 | #battery.warning:not(.charging) {
140 | color: #f22c40;
141 | animation-name: blink;
142 | animation-duration: 0.5s;
143 | animation-timing-function: linear;
144 | animation-iteration-count: infinite;
145 | animation-direction: alternate;
146 | }
147 |
148 | @keyframes blink {
149 | to {
150 | background-color: #ffffff;
151 | color: black;
152 | }
153 | }
154 |
155 | #network.disconnected {
156 | background: #f53c3c;
157 | }
158 |
--------------------------------------------------------------------------------
/wayland/wofi/config:
--------------------------------------------------------------------------------
1 | term=alacritty
2 | location=top
3 | yoffset=180
4 | width=600
5 | lines=10
6 |
7 | prompt=Search
8 | show=drun
9 | insensitive=true
10 | allow_images=true
11 | image_size=28
12 | hide_scroll=false
13 |
14 | aways_parse_args=true
15 | show_all=true
16 |
17 | key_up=Control_L-k
18 | key_down=Control_L-j
19 |
20 | gtk_dark=true
21 | halign=fill
22 | content_halign=fill
23 | orientation=vertical
24 | allow_markup=true
25 | filter_rate=100
26 | no_actions=true
27 |
--------------------------------------------------------------------------------
/wayland/wofi/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | font-family: 'Noto Sans Regular', 'JetBrainsMono Nerd Font;', sans-serif;
3 | font-size: 16px;
4 | }
5 |
6 | window {
7 | margin: 0px;
8 | border: 1px solid #111019;
9 | border-radius: 15px;
10 | background-color: rgba(11, 10, 16, 0.90);
11 | }
12 |
13 | #input {
14 | all: unset;
15 | min-height: 36px;
16 | padding: 10px 10px;
17 | margin: 0px;
18 | border-radius: 0px;
19 | border-bottom: 1px solid #585858;
20 | outline: none;
21 | color: white;
22 | background-color: transparent;
23 | font-size: 16px;
24 | font-weight: normal;
25 | }
26 |
27 | #inner-box {
28 | padding: 2px;
29 | margin: 4px;
30 | font-weight: normal;
31 | }
32 |
33 | #outer-box {
34 | margin: 0px;
35 | padding: 3px;
36 | border: 1px solid #111019;
37 | border-radius: 15px;
38 | }
39 |
40 | #scroll {
41 | margin-top: 5px;
42 | border: none;
43 | margin-bottom: 5px;
44 | }
45 |
46 | #entry {
47 | margin: 1px 0px;
48 | border: none;
49 | border-radius: 8px;
50 | background-color: transparent;
51 | }
52 |
53 | #entry:selected {
54 | color: white;
55 | /* background: linear-gradient(90deg, #33ccff 0%, #f09db5 100%); */
56 | background: #33ccff;
57 | }
58 |
59 | #text {
60 | margin-left: 6px;
61 | }
62 |
--------------------------------------------------------------------------------
/wayland/wpaperd/config.toml:
--------------------------------------------------------------------------------
1 | [default]
2 | duration = "30m"
3 | mode = "center"
4 | sorting = "random"
5 | transition-time = 500
6 |
7 | [any]
8 | path = "/home/aonemd/Pictures/wallpapers/"
9 |
--------------------------------------------------------------------------------
/zsh/zprofile:
--------------------------------------------------------------------------------
1 | # sourced in login shell
2 |
3 | if [[ "$(tty)" == '/dev/tty1' ]]; then
4 | export MOZ_ENABLE_WAYLAND=1
5 | export MOZ_WEBRENDER=1
6 |
7 | # Hyprland Environment Variables
8 | export HYPRLAND_LOG_WLR=1 # Enables more verbose logging of wlroots.
9 | export HYPRLAND_NO_RT=1 # Disables realtime priority setting by Hyprland.
10 | export HYPRLAND_NO_SD_NOTIFY=1 # If systemd, disables the sd_notify calls.
11 |
12 | # Toolkit Backend Variables
13 | export GDK_BACKEND=wayland,x11 # GTK: Use wayland if available, fall back to x11 if not.
14 | export SDL_VIDEODRIVER=wayland # Run SDL2 applications on Wayland. Remove or set to x11 if games that provide older versions of SDL cause compatibility issues
15 | export CLUTTER_BACKEND=wayland # Clutter package already has wayland enabled, this variable will force Clutter applications to try and use the Wayland backend
16 |
17 | # XDG Specifications
18 | # XDG specific environment variables are often detected through portals and
19 | # applications that may set those for you, however it is not a bad idea to
20 | # set them explicitly.
21 | export XDG_CURRENT_DESKTOP=Hyprland
22 | export XDG_SESSION_TYPE=wayland
23 | export XDG_SESSION_DESKTOP=Hyprland
24 |
25 | # Qt Variables
26 | export QT_AUTO_SCREEN_SCALE_FACTOR=1 # (From the Qt documentation) enables automatic scaling, based on the monitor’s pixel density
27 | export QT_QPA_PLATFORM="wayland;xcb" # Qt: Use wayland if available, fall back to x11 if not.
28 | export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 # Disables window decorations on Qt applications
29 | export QT_QPA_PLATFORMTHEME=qt5ct # Tells Qt based applications to pick your theme from qt5ct, use with Kvantum.
30 |
31 | # Theming Related Variables
32 | # GTK_THEME # Set a GTK theme manually, for those who want to avoid appearance tools such as lxappearance or nwg-look
33 | # XCURSOR_THEME # Set your cursor theme. The theme needs to be installed and readable by your user.
34 | export XCURSOR_SIZE=24 # Set cursor size. See here for why you might want this variable set.
35 |
36 | export XMODIFIERS=@im=fcitx
37 | export GTK_IM_MODULE=wayland
38 | export QT_IM_MODULE=wayland
39 |
40 | # exec startx
41 | # exec sway
42 | # exec Hyprland
43 | fi
44 |
--------------------------------------------------------------------------------
/zsh/zsh/aliases.zsh:
--------------------------------------------------------------------------------
1 | alias ls='ls --color=always -CF'
2 | alias l='ls'
3 | alias la='ls -A'
4 | alias ll='ls -lh'
5 | alias lla='ll -A'
6 | alias lll='lla --color=always | less'
7 | alias lld='du -sch'
8 | alias llcap='df -h --total'
9 | alias grep='grep --colour --devices=skip'
10 | alias less='less -r'
11 | alias rm='rm -v'
12 | alias time='/usr/bin/time'
13 | alias tree='tree -C'
14 | alias feh='feh -F'
15 |
16 | alias wk='cd $WK'
17 | alias v='vim'
18 | alias nv='nvim'
19 | alias vv='gvim'
20 | alias brvim='printf "\033[?5h"; vim; printf "\033[?5l"'
21 | alias t='tmux'
22 | alias nnn='nnn -cdEFrx'
23 |
24 | alias myip='nc 4.ifcfg.me 23 | grep IPv4 | cut -d" " -f4'
25 |
26 | # Git
27 | alias g='git'
28 |
29 | # Ruby on Rails
30 | alias rbi='bundle install'
31 | alias rbe='bundle exec'
32 | alias rs='bundle exec rails server'
33 | alias rc='bundle exec rails console'
34 | alias rcop='bundle exec rubocop `git diff --name-only master..HEAD`'
35 |
36 | # Containers
37 | alias d='docker'
38 | alias dps='docker ps'
39 | alias ds='docker start'
40 | alias dst='docker stop'
41 | alias dsta='docker stop $(docker ps -q)'
42 | alias drac='docker rm -f `docker ps --no-trunc -aq`'
43 | alias dc='docker-compose'
44 | alias k='kubectl'
45 |
46 | # Arch Linux
47 | alias journalctl='sudo journalctl'
48 | alias pacman='sudo pacman'
49 | alias paci='trizen --noedit --noconfirm -S'
50 | alias pacr='trizen -Rcsn'
51 | alias pacu='trizen --noedit --noconfirm -Syu'
52 | alias pacs='trizen -Ss'
53 | alias pacinfo='trizen -Qi'
54 | alias pacorphan='trizen -Rns $(pacman -Qtdq)'
55 | alias paccclean="paccache -rk2"
56 |
--------------------------------------------------------------------------------
/zsh/zsh/config.zsh:
--------------------------------------------------------------------------------
1 | # General
2 | autoload -U promptinit && promptinit
3 | autoload -U colors && colors
4 |
5 | setopt prompt_subst
6 | setopt correct
7 | setopt extendedglob
8 | unsetopt nomatch
9 | unsetopt beep
10 | setopt autocd
11 |
12 | # Autocompletion
13 | autoload -U compinit && compinit
14 | zmodload zsh/complist
15 | zstyle ':completion:*' menu select
16 | zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
17 | zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
18 | # use the vi navigation keys in menu completion
19 | bindkey -M menuselect 'h' vi-backward-char
20 | bindkey -M menuselect 'k' vi-up-line-or-history
21 | bindkey -M menuselect 'l' vi-forward-char
22 | bindkey -M menuselect 'j' vi-down-line-or-history
23 |
24 | # History
25 | export HISTSIZE=25000
26 | export SAVEHIST=$HISTSIZE
27 | export HISTFILE="$HOME/.zsh_history"
28 | export HISTORY_IGNORE="(ls|cd|pwd|exit|cd ..|sic|sic *)"
29 | # Ignore duplicate commands
30 | setopt HIST_IGNORE_ALL_DUPS
31 | # Ignore commands that start with a space
32 | setopt HIST_IGNORE_SPACE
33 | # add commands as they are typed, don't wait until shell exit
34 | setopt INC_APPEND_HISTORY
35 | # share hist between sessions
36 | setopt SHARE_HISTORY
37 | # Complete Search history
38 | autoload -U up-line-or-beginning-search
39 | autoload -U down-line-or-beginning-search
40 | zle -N up-line-or-beginning-search
41 | zle -N down-line-or-beginning-search
42 | bindkey "^[[A" up-line-or-beginning-search
43 | bindkey "^[[B" down-line-or-beginning-search
44 | # bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search
45 | # bindkey "${terminfo[kcud1]}" down-line-or-beginning-search
46 |
47 | # Vim Mode
48 | bindkey -v
49 | export KEYTIMEOUT=1
50 | bindkey '^?' backward-delete-char # backspace working afte command mode
51 | bindkey '^r' history-incremental-search-backward # ctrl-r starts searching history backward
52 |
53 | # edit current command in a text editor
54 | autoload -U edit-command-line
55 | zle -N edit-command-line
56 | bindkey -M vicmd '^X' edit-command-line
57 |
--------------------------------------------------------------------------------
/zsh/zsh/constants.zsh:
--------------------------------------------------------------------------------
1 | git_log_normal_format='%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%aD (%ar)%C(reset)%n%+B'
2 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/autoload.zsh:
--------------------------------------------------------------------------------
1 | autoload zmv
2 | autoload zcalc
3 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/enter_to_repeat.zsh:
--------------------------------------------------------------------------------
1 | enter_to_repeat() {
2 | # check if buffer is empty
3 | if [ ${#${(z)BUFFER}} -eq 0 ]; then
4 | # get recent command in history and run it
5 | BUFFER=$history[$((HISTCMD-1))]
6 | fi
7 | # accept-line is the default function
8 | zle accept-line
9 | }
10 |
11 | # bind function to enter
12 | zle -N enter_to_repeat
13 | bindkey '^M' enter_to_repeat
14 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/ffw.zsh:
--------------------------------------------------------------------------------
1 | # Based on: https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer
2 |
3 | ffw() {
4 | if [[ $# -eq 1 ]]; then
5 | selected=$1
6 | else
7 | selected=$(find ~/workspace/ -mindepth 1 -maxdepth 1 -type d | fzf)
8 | fi
9 |
10 | if [[ -z $selected ]]; then
11 | exit 0
12 | fi
13 |
14 | tx $selected
15 | }
16 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/ghpr.zsh:
--------------------------------------------------------------------------------
1 | ghpr() {
2 | GH_FORCE_TTY=100% gh pr list | fzf --ansi --preview 'GH_FORCE_TTY=100% gh pr view {1}' --preview-window down --header-lines 3 | awk '{print $1}' | xargs gh pr checkout
3 | }
4 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/kp.zsh:
--------------------------------------------------------------------------------
1 | kp() {
2 | local pid=$(ps -ef | sed 1d | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[kill:process]'" | awk '{print $2}')
3 |
4 | if [ "x$pid" != "x" ]
5 | then
6 | echo $pid | xargs kill -${1:-9}
7 | kp
8 | fi
9 | }
10 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/man.zsh:
--------------------------------------------------------------------------------
1 | man() {
2 | env \
3 | LESS_TERMCAP_mb=$(tput bold; tput setaf 2) \
4 | LESS_TERMCAP_md=$(tput bold; tput setaf 6) \
5 | LESS_TERMCAP_me=$(tput sgr0) \
6 | LESS_TERMCAP_so=$(tput bold; tput setaf 7; tput setab 4) \
7 | LESS_TERMCAP_se=$(tput rmso; tput sgr0) \
8 | LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) \
9 | LESS_TERMCAP_ue=$(tput rmul; tput sgr0) \
10 | LESS_TERMCAP_mr=$(tput rev) \
11 | LESS_TERMCAP_mh=$(tput dim) \
12 | LESS_TERMCAP_ZN=$(tput ssubm) \
13 | LESS_TERMCAP_ZV=$(tput rsubm) \
14 | LESS_TERMCAP_ZO=$(tput ssupm) \
15 | LESS_TERMCAP_ZW=$(tput rsupm) \
16 | GROFF_NO_SGR=1 \
17 | man "$@"
18 | }
19 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/note.zsh:
--------------------------------------------------------------------------------
1 | note() {
2 | local notes_dir=${NOTES_DIR:="$HOME/Dropbox/notes"}
3 |
4 | case "$1" in
5 | c)
6 | cd "$notes_dir"
7 | ;;
8 | l)
9 | ls "$notes_dir"
10 | ;;
11 | t)
12 | tree --noreport "$notes_dir"
13 | ;;
14 | gpu)
15 | pushd "$notes_dir"
16 | msg="Regenerated at $(date -u '+%Y-%m-%d %H:%M:%S') UTC"
17 | git add .
18 | git commit -m "$msg"
19 | git push origin master
20 | popd
21 | ;;
22 | gpl)
23 | pushd "$notes_dir"
24 | git pull origin master
25 | popd
26 | ;;
27 | *)
28 | pushd "$notes_dir"
29 | if [ $# -eq 0 ]; then
30 | $EDITOR "$1"
31 | else
32 | $EDITOR "$1".md
33 | fi
34 | popd
35 | esac
36 | }
37 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/teye.zsh:
--------------------------------------------------------------------------------
1 | teye() {
2 | local session_name="news"
3 |
4 | if tmux has-session -t "${session_name}" 2> /dev/null; then
5 | tmux attach -t "${session_name}"
6 | return
7 | fi
8 |
9 | tmux new-session -d -s "${session_name}"
10 |
11 | tmux split-window -t "${session_name}":1 -v
12 | tmux split-window -t "${session_name}":1.2 -h
13 |
14 | tmux send-keys -t "${session_name}":1.1 'newsboat ' C-m
15 | tmux send-keys -t "${session_name}":1.2 'sysupdates ' C-m
16 | tmux send-keys -t "${session_name}":1.3 'weather ' C-m
17 |
18 | tmux new-window -t "${session_name}":2 -n 'tasks'
19 | tmux send-keys -t "${session_name}":2 'nin l ' C-m
20 |
21 | tmux new-window -t "${session_name}":3 -n 'web'
22 | tmux send-keys -t "${session_name}":3 'w3m https://duckduckgo.com' C-m
23 |
24 | tmux select-pane -t "${session_name}":1.1
25 | tmux select-window -t "${session_name}":1
26 |
27 | [ -n "$TMUX" ] && tmux switch -t "${session_name}" || tmux attach -t "${session_name}"
28 | }
29 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/tsk.zsh:
--------------------------------------------------------------------------------
1 | tsk() {
2 | args=$@
3 | tmux send-keys -t 2 "$args" C-m
4 | }
5 |
--------------------------------------------------------------------------------
/zsh/zsh/plugins/tx.zsh:
--------------------------------------------------------------------------------
1 | tx() {
2 | [ -z "$1" ] && return
3 |
4 | local session_path=""
5 | case "$1" in
6 | .)
7 | session_path=$(pwd)
8 | ;;
9 | *)
10 | session_path="${1}"
11 | esac
12 |
13 | local raw_session_name="${session_path##*/}"
14 | local session_name="${raw_session_name//[.]/-}"
15 |
16 | if tmux has-session -t="${session_name}" 2> /dev/null; then
17 | tmux attach -t "${session_name}"
18 | return
19 | fi
20 |
21 | pushd "${session_path}" > /dev/null
22 |
23 | tmux new-session -d -s "${session_name}"
24 |
25 | tmux send-keys -t="${session_name}":1 $EDITOR C-m
26 | sleep 0.5
27 | tmux split-window -t="${session_name}":1 -v
28 | tmux resize-pane -t="${session_name}":1 -D 15
29 | tmux select-pane -t="${session_name}":1.1
30 |
31 | tmux new-window -t="${session_name}":2 -n 'log'
32 | tmux new-window -t="${session_name}":3 -n 'misc'
33 |
34 | tmux select-window -t="${session_name}":1
35 | [ -n "$TMUX" ] && tmux switch -t="${session_name}" || tmux attach -t="${session_name}"
36 |
37 | popd > /dev/null
38 | }
39 |
--------------------------------------------------------------------------------
/zsh/zsh/prompt.zsh:
--------------------------------------------------------------------------------
1 | PROMPT_INSERT_SYMBOL="›"
2 | PROMPT_NORMAL_SYMBOL="·"
3 |
4 | function prompt_redraw {
5 | zle reset-prompt
6 | }
7 | zle -N zle-keymap-select prompt_redraw
8 |
9 | function prompt_current_dir {
10 | echo -n "%{$fg[blue]%}%2~"
11 | }
12 |
13 | function remote_hostname {
14 | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
15 | echo -n " %{$fg[white]%}@%M"
16 | fi
17 | }
18 |
19 | function prompt_symbol {
20 | local current_symbol="$PROMPT_INSERT_SYMBOL"
21 | [ "$KEYMAP" = 'vicmd' ] && current_symbol="$PROMPT_NORMAL_SYMBOL"
22 | echo -n "%{$fg[white]%}$current_symbol"
23 | }
24 |
25 | function prompt_git_branch {
26 | git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ %{$reset_color%}:: $(_prompt_git_status)\1/"
27 | }
28 |
29 | function _prompt_git_status {
30 | if [ -n "$(git status --porcelain 2> /dev/null)" ]; then
31 | echo "%{$fg[red]%}"
32 | else
33 | echo "%{$fg[green]%}"
34 | fi
35 | }
36 |
37 | function prompt_hg_branch {
38 | hg branch 2> /dev/null | sed -e "s/\(.*\)/ $(_prompt_hg_status)\1/"
39 | }
40 |
41 | function _prompt_hg_status {
42 | if [[ $( hg status 2> /dev/null ) != "" ]]; then
43 | echo "%{$fg[red]%}"
44 | else
45 | echo "%{$fg[green]%}"
46 | fi
47 | }
48 |
49 | PROMPT='$(prompt_current_dir)$(prompt_git_branch)$(prompt_hg_branch)$(remote_hostname) $(prompt_symbol)%(?..$PROMPT_NORMAL_SYMBOL) %{$reset_color%}'
50 |
--------------------------------------------------------------------------------
/zsh/zsh/secrets.zsh.example:
--------------------------------------------------------------------------------
1 | export WEATHER_API_KEY='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
2 | export WEATHER_CITY_GEOLOCATION='44.44444,55.555555'
3 | export PRAYER_API_PARAMS='city=Jerusalem&country=PS&method=3&latitudeAdjustmentMethod=2'
4 |
5 | export AWS_ACCESS_KEY_ID='VVVVVVVVVVVVVVVVVVVV'
6 | export AWS_SECRET_ACCESS_KEY='WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW'
7 | export AWS_REGION='us-east-2'
8 |
9 | export NIN_INTEGRATION_CLIENT='todoist'
10 | export NIN_INTEGRATION_CLIENT_TOKEN='VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV'
11 | export COD_TODOIST_TOKEN='VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV'
12 |
13 | export OPENAI_API_KEY='VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV'
14 |
15 | # For postgres libpq with homebrew
16 | export PATH="$HOMEBREW_PREFIX/opt/libpq/bin:$PATH"
17 |
18 | # Java & Android
19 | export JAVA_HOME="$(brew --prefix openjdk)/libexec/openjdk.jdk/Contents/Home"
20 | export JAVA_HOME="/Users/ahmedsaleh/.local/share/mise/installs/java/zulu-15.46.17/Contents/Home"
21 | export ANDROID_HOME=/opt/android-sdk
22 | export ANDROID_HOME=$HOME/Library/Android/sdk
23 | export PATH=$PATH:$ANDROID_HOME/emulator
24 | export PATH=$PATH:$ANDROID_HOME/tools
25 | export PATH=$PATH:$ANDROID_HOME/tools/bin
26 | export PATH=$PATH:$ANDROID_HOME/platform-tools
27 |
--------------------------------------------------------------------------------
/zsh/zsh/variables.zsh:
--------------------------------------------------------------------------------
1 | export MEDIA_PLAYER='cmus'
2 | export BATTERY_NUMBER=0
3 | export ETHERNET_INTERFACE='enp0s3'
4 | export WIFI_INTERFACE='wlp4s0'
5 | export VOLUME_DEVICE='master'
6 |
7 | # nnn
8 | export NNN_COLORS='4213'
9 | export NNN_BMS='w:~/workspace;d:~/Documents;v:~/Videos;D:~/Downloads;n:~/Dropbox/notes'
10 | export NNN_PLUG='l:-launch;'
11 |
12 | export FIN_FILE="$HOME/Dropbox/finances.yaml"
13 |
--------------------------------------------------------------------------------
/zsh/zshenv:
--------------------------------------------------------------------------------
1 | # sourced always
2 |
3 | # in case a non-interactive shell is not running
4 | if [[ $- != *i* ]]; then
5 | source "${ZDOTDIR:-$HOME}/.zshrc"
6 | fi
7 |
8 | export LC_ALL='en_US.UTF-8'
9 | export LANG='en_US.UTF-8'
10 |
11 | export EDITOR='nvim'
12 | export VISUAL='nvim'
13 | export PAGER='less'
14 | export MANPAGER='less -s -M +Gg'
15 | export TERMINAL='ghostty'
16 | export BROWSER='firefox'
17 | export TERM='xterm-256color'
18 |
19 | export MOZ_ENABLE_WAYLAND=1
20 |
--------------------------------------------------------------------------------
/zsh/zshrc:
--------------------------------------------------------------------------------
1 | # sourced in interactive shell
2 |
3 | include () {
4 | [[ -f "$1" ]] && source "$1" "${@: 2}"
5 | }
6 |
7 | zprof() {
8 | time zsh -i -c exit
9 | }
10 |
11 | export WK="$HOME/workspace"
12 |
13 | if [ -d $HOME/.zsh ]; then
14 | for file in $HOME/.zsh/**/*.zsh; do
15 | source $file
16 | done
17 | fi
18 |
19 | export AAKU="$WK/aaku"
20 | export PATH="$PATH:$AAKU/bin"
21 | export PATH="$PATH:$WK/bin"
22 | export PATH="$PATH:$WK/onpar/bin"
23 | export PATH="$PATH:$HOME/.cargo/bin"
24 |
25 | # FZF
26 | export FZF_DEFAULT_COMMAND='rg --files --hidden --color never'
27 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
28 |
29 | # K8S
30 | kubectl() {
31 | unset -f kubectl
32 | source <(kubectl completion zsh 2>/dev/null)
33 | kubectl $@
34 | }
35 |
36 | # Homebrew
37 | if command -v /opt/homebrew/bin/brew &> /dev/null; then
38 | eval "$(/opt/homebrew/bin/brew shellenv)"
39 | fi
40 |
41 | # Mise
42 | if command -v $HOME/.local/bin/mise &> /dev/null; then
43 | eval "$($HOME/.local/bin/mise activate zsh)"
44 | fi
45 |
46 | # Rust
47 | include $HOME/.cargo/env
48 |
49 | # Go
50 | export GOPATH="$WK/go"
51 | export PATH=$PATH:$GOPATH/bin
52 |
53 | # NodeJS
54 | export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
55 | export PUPPETEER_EXECUTABLE_PATH=`which chromium`
56 |
--------------------------------------------------------------------------------