clean files

This commit is contained in:
RafayAhmad7548 2025-07-26 20:13:37 +05:00
parent dd8482a6fb
commit 30542228ee
82 changed files with 11285 additions and 0 deletions

View file

@ -0,0 +1 @@
false

7
.config/eww/eww.scss Normal file
View file

@ -0,0 +1,7 @@
.brightnessWin{
border-radius: 20px;
}
.label{
font-size: 20px;
}

21
.config/eww/eww.yuck Normal file
View file

@ -0,0 +1,21 @@
(defpoll brightness
:interval "30ms"
`brightnessctl g | awk -v max=$(brightnessctl m) '{print int($1/max * 100)}'`)
(defwidget brightness []
(box :orientation "h" :halign "center" :valign "center" :space-evenly false :spacing 15
(label :class "label" :text "")
(label :class "label" :text brightness)
(progress :class "progress" :value brightness :valign "center" :width 275)))
(defwindow brightnessWin
:class "brightnessWin"
:monitor 0
:geometry (geometry
:x "0%"
:y "50px"
:width "20%"
:height "50px"
:anchor "bottom center")
:stacking "fg"
(brightness))

View file

@ -0,0 +1,38 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
"title",
"separator",
"os",
"host",
"kernel",
"uptime",
"packages",
"shell",
"display",
"de",
"wm",
"wmtheme",
"theme",
"icons",
"font",
"cursor",
"terminal",
"cpu",
"gpu",
"memory",
// "swap",
"disk",
"localip",
"battery",
"poweradapter",
{
"type": "command",
"key": "Lifetime",
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days"
},
// "locale",
"break",
"colors"
]
}

View file

@ -0,0 +1,73 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Urdu Font config -->
<match target="pattern">
<test name="lang" compare="contains">
<string>ur</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Jameel Noori Nastaleeq</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>ur</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Jameel Noori Nastaleeq</string>
</edit>
</match>
<!-- English font config -->
<match target="pattern">
<test name="lang" compare="contains">
<string>en</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>HackNerdFont</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>en</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>HackNerdFont</string>
</edit>
</match>
<alias>
<family>sans-serif</family>
<prefer>
<family>HackNerdFont</family>
<family>Jameel Noori Nastaleeq</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>HackNerdFont</family>
<family>Jameel Noori Nastaleeq</family>
</prefer>
</alias>
</fontconfig>

153
.config/hypr/hyprbinds.conf Normal file
View file

@ -0,0 +1,153 @@
plugin {
morebinds {
shift_double = hyprctl dispatch submap moveFocus
esc_double = hyprctl dispatch submap reset
}
}
# ----------------Submaps----------------- #
# Empty Map #
submap = disableOtherKeyBinds
bind = SUPER, escape, submap, reset
# Normal #
submap = reset
bind = SUPER, F, submap, disableOtherKeyBinds
# Application Binds
bind = ALT, T, exec, kitty
bind = ALT, E, exec, nautilus
bind = ALT, F, exec, librewolf
bind = ALT, V, exec, code
bind = ALT, Z, exec, zeditor
bind = ALT, M, exec, prismlauncher
bind = ALT, D, exec, discord
bind = ALT, W, exec, flatpak run com.rtosta.zapzap
bind = SUPER, SUPER_L, exec, rofi -show drun -sort -matching fuzzy
# Windows VM
bind = CTRL ALT SHIFT, W, exec, /home/rafayahmad/dotfiles/scripts/startWin11.sh
# Window movement
bind = SUPER, V, togglefloating,
bind = SUPER, H, togglesplit, # dwindle
bind = CTRL, Q, killactive,
bind = ALT, TAB, cyclenext,
bind = SUPER, TAB, swapnext,
bind = SUPER, N, exec, swaync-client -t -sw
# Move focus
bind = CTRL ALT, L, movefocus, r
bind = CTRL ALT, J, movefocus, l
bind = CTRL ALT, I, movefocus, u
bind = CTRL ALT, K, movefocus, d
# Fullscreen
bind = , F11, fullscreen, 0
bind = SUPER, F11, fullscreen, 1
# bind = ALT, F11, fakefullscreen,
# Hyprlock
bind = SUPER CTRL, L, exec, ~/dotfiles/scripts/currentWallpaperHyprlock.sh
# bind = SUPER, M, exec, ~/scripts/killhypr
bind = SUPER, M, exit,
bind = SUPER, F4, exec, ~/dotfiles/scripts/blurWlogout.sh
bind = SUPER, R, exec, ~/dotfiles/scripts/reloadwaybar
bind = SUPER CTRL, R, exec, killall waybar
# Screenshots
bind = , Print, exec, grim -g "$(slurp)" - | wl-copy
bind = SUPER, Print, exec, grim - | wl-copy
bind = CTRL, Print, exec, grim -g "$(slurp)"
bind = CTRL SUPER, Print, exec, grim
# Clipboard
bind = SUPER SHIFT, V, exec, kitty --class clipse -e clipse
# Color Picker
bind = ALT, P, exec, hyprpicker --format=hex -a
# Audio Controls
bindel=, code:123, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel=, code:122, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=, code:121, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# Brightness Controls
bindel = , code:233, exec, brightnessctl s 1%+ && echo true > /home/rafayahmad/dotfiles/.config/eww/brightnessShow
bindel = , code:232, exec, brightnessctl s 1%- && echo true > /home/rafayahmad/dotfiles/.config/eww/brightnessShow
# Resize windows
binde = ALT, L, resizeactive, 50 0
binde = ALT, J, resizeactive, -50 0
binde = ALT, I, resizeactive, 0 -50
binde = ALT, K, resizeactive, 0 50
# Center floating window
bind = SUPER, C, centerwindow,
# Move windows in tile
bind = SUPER, L, movewindow, r
bind = SUPER, J, movewindow, l
bind = SUPER, I, movewindow, u
bind = SUPER, K, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, Q, workspace, 4
bind = SUPER, W, workspace, 5
bind = SUPER, E, workspace, 6
bind = SUPER, A, workspace, 7
bind = SUPER, S, workspace, 8
bind = SUPER, D, workspace, 9
bind = SUPER, 0, workspace, 10
bind = ALT, 1, togglespecialworkspace, whatsapp
bind = ALT, 2, togglespecialworkspace, thunderbird
# Move active window to a workspace and switch with mainMod + SHIFT + [0-9]
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER SHIFT, 2, movetoworkspace, 2
bind = SUPER SHIFT, 3, movetoworkspace, 3
bind = SUPER SHIFT, Q, movetoworkspace, 4
bind = SUPER SHIFT, W, movetoworkspace, 5
bind = SUPER SHIFT, E, movetoworkspace, 6
bind = SUPER SHIFT, A, movetoworkspace, 7
bind = SUPER SHIFT, S, movetoworkspace, 8
bind = SUPER SHIFT, D, movetoworkspace, 9
bind = SUPER SHIFT, 0, movetoworkspace, 10
bind = ALT SHIFT, 1, movetoworkspace, special:whatsapp
bind = ALT SHIFT, 2, movetoworkspace, special:thunderbird
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = SUPER CTRL, 1, movetoworkspacesilent, 1
bind = SUPER CTRL, 2, movetoworkspacesilent, 2
bind = SUPER CTRL, 3, movetoworkspacesilent, 3
bind = SUPER CTRL, Q, movetoworkspacesilent, 4
bind = SUPER CTRL, W, movetoworkspacesilent, 5
bind = SUPER CTRL, E, movetoworkspacesilent, 6
bind = SUPER CTRL, A, movetoworkspacesilent, 7
bind = SUPER CTRL, S, movetoworkspacesilent, 8
bind = SUPER CTRL, D, movetoworkspacesilent, 9
bind = SUPER CTRL, 0, movetoworkspacesilent, 10
bind = ALT CTRL, 1, movetoworkspacesilent, special:whatsapp
bind = ALT CTRL, 2, movetoworkspacesilent, special:thunderbird
# Example special workspace (scratchpad)
# bind = SUPER, S, togglespecialworkspace, magic
# bind = SUPER SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = ALT, mouse:272, resizewindow
# Shutdown/Reboot
bind = CTRL ALT, Z, exec, reboot
bind = CTRL ALT, X, exec, shutdown now

View file

@ -0,0 +1,13 @@
listener {
timeout = 300
on-timeout = ~/dotfiles/scripts/currentWallpaperHyprlock.sh
}
listener {
timeout = 460
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
listener {
timeout = 600
on-timeout = systemctl suspend
}

149
.config/hypr/hyprland.conf Normal file
View file

@ -0,0 +1,149 @@
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
#autogenerated = 1 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,1920x1080@60,0x0,1
monitor=HDMI-A-1,1920x1080@60,0x0,1,mirror,eDP-1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = hypridle
exec-once = waybar
exec-once = clipse -listen
exec-once = swaync
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = /home/rafayahmad/eww/target/release/eww daemon
exec-once = hyprpaper && ~/dotfiles/scripts/currentWallpaperHyprlock.sh
exec-once = /home/rafayahmad/dotfiles/scripts/brightnessWidget.sh
exec-once = ~/dotfiles/scripts/battWarning.sh
exec-once = ~/dotfiles/scripts/youtubeBlocker.py
exec-once = [workspace special:whatsapp silent] flatpak run com.rtosta.zapzap
exec-once = [workspace special:thunderbird silent] thunderbird
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
source = ~/.config/hypr/hyprbinds.conf
# Set programs that you use
$menu = ~/Stuff/scripts/rofiFocus.sh
# Some default env vars.
env = XCURSOR_SIZE,24
env = XCURSOR_THEME,mytheme
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
env = GTK_THEME, Adwaita-dark
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout =
kb_variant =
kb_model =
kb_options =
kb_rules =
kb_file = /home/rafayahmad/.config/hypr/pauseMod3.xkb
numlock_by_default = true
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0.25 # -1.0 - 1.0, 0 means no modification.
repeat_rate = 30
repeat_delay = 200
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 10
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
inactive_opacity = 0.8
blur {
enabled = true
size = 4
passes = 2
ignore_opacity=true
}
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
animation = specialWorkspace, 1, 7, myBezier, slidefadevert
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
}
misc {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
enable_anr_dialog = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# device:epic-mouse-v1 {
# sensitivity = -0.5
# }
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
windowrulev2 = pin, class:(Rofi)
windowrulev2 = float, class:(clipse)
windowrulev2 = size 700 600, class:(clipse)
windowrulev2 = float, class:^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$
windowrulev2 = size 900 600, class:^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$

261
.config/hypr/hyprlandd.conf Normal file
View file

@ -0,0 +1,261 @@
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
#autogenerated = 1 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
monitor=,1920x1080@60,0x0,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Set programs that you use
$terminal = kitty
# $fileManager = GTK_THEME="Adwaita:dark" nautilus
$fileManager = nautilus
$menu = ~/Stuff/scripts/rofiFocus.sh
# Some default env vars.
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
env = GTK_THEME, Adwaita-dark
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us,pk
kb_variant =
kb_model =
kb_options = grp:win_space_toggle , caps:swapescape
kb_rules =
numlock_by_default = true
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
inactive_opacity = 0.8
blur {
enabled = true
size = 4
passes = 2
ignore_opacity=true
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
# master {
# # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true
# }
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
}
misc {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
}
plugin {
morebinds {
shift_single = nautilus
shift_double = kitty
esc_double = hyprctl dispatch killactive
}
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# device:epic-mouse-v1 {
# sensitivity = -0.5
# }
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
windowrule = float, title:nmtui
windowrule = float, title:UltimMC
windowrule = size 800 650, title:UltimMC
# windowrule = size 1320 880, floating
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Application Binds
bind = ALT, T, exec, $terminal
bind = ALT, E, exec, $fileManager
bind = ALT, F, exec, firefox
bind = ALT, V, exec, code
bind = ALT, M, exec, /opt/ultimmc/run.sh
bind = $mainMod, V, togglefloating,
bind = $mainMod, H, togglesplit, # dwindle
bind = CTRL, Q, killactive,
bind = $mainMod, P, pseudo, # dwindle
bind = ALT, TAB, cyclenext,
bind = $mainMod, TAB, swapnext,
bind = , F11, fullscreen, 0
bind = $mainMod, F11, fullscreen, 1
bind = ALT, F11, fakefullscreen,
bind = $mainMod CTRL, L, exec, swaylock
# bind = $mainMod, M, exec, ~/scripts/killhypr
bind = $mainMod, M, exit,
bind = $mainMod, F4, exec, ~/Stuff/scripts/blurWlogout.sh
bind = $mainMod, R, exec, ~/Stuff/scripts/reloadwaybar
# Screenshots
bind = , Print, exec, grim -g "$(slurp)" && mv ~/ *_grim.png ~/Pictures/screenshots
bind = $mainMod, Print, exec, grim && mv ~/*_grim.png ~/Pictures/screenshots
# Color Picker
bind = ALT, P, exec, hyprpicker --format=hex -a
# Audio Controls
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# Brightness Controls
bindel = , XF86MonBrightnessUp, exec, brightnessctl s 5%+ # increase brightness
bindel = , XF86MonBrightnessDown, exec, brightnessctl s 5%- # decrease brightness
# Move focus with mainMod + arrow keys
bind = CTRL, J, movefocus, l
bind = CTRL, L, movefocus, r
bind = CTRL, I, movefocus, u
bind = CTRL, K, movefocus, d
# Resize windows
binde = ALT, L, resizeactive, 50 0
binde = ALT, J, resizeactive, -50 0
binde = ALT, I, resizeactive, 0 -50
binde = ALT, K, resizeactive, 0 50
# Center floating window
bind = $mainMod, C, centerwindow,
# Move windows in tile
bind = $mainMod, L, movewindow, r
bind = $mainMod, J, movewindow, l
bind = $mainMod, I, movewindow, u
bind = $mainMod, K, movewindow, d
# Switch wokspaces next/prev
# bind = $mainMod, J, workspace, e-1
# bind = $mainMod, L, workspace, e+1
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace and switch with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod CTRL, 1, movetoworkspacesilent, 1
bind = $mainMod CTRL, 2, movetoworkspacesilent, 2
bind = $mainMod CTRL, 3, movetoworkspacesilent, 3
bind = $mainMod CTRL, 4, movetoworkspacesilent, 4
bind = $mainMod CTRL, 5, movetoworkspacesilent, 5
bind = $mainMod CTRL, 6, movetoworkspacesilent, 6
bind = $mainMod CTRL, 7, movetoworkspacesilent, 7
bind = $mainMod CTRL, 8, movetoworkspacesilent, 8
bind = $mainMod CTRL, 9, movetoworkspacesilent, 9
bind = $mainMod CTRL, 0, movetoworkspacesilent, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = ALT, mouse:272, resizewindow
# Shutdown/Reboot
bind = CTRL ALT, Z, exec, reboot
bind = CTRL ALT, X, exec, shutdown now

View file

@ -0,0 +1,56 @@
background {
monitor =
path = $currentWallpaper
color = rgba(25, 20, 20, 1.0)
blur_passes = 1 # 0 disables blurring
blur_size = 7
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgba(0, 0, 0, 0)
inner_color = rgba(0, 0, 0, 0)
font_color = rgb(FFFFFF)
fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text =
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text =
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = 1
numlock_color = 1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
swap_font_color = false # see below
position = 0, -20
halign = center
valign = center
}
label {
monitor =
text = cmd[update:1000] printf "$(date +%I)\n$(date +%M)"
# color = rgba(200, 200, 200, 1.0)
color = rgb(F4DA7D)
font_size = 100
font_family = HackNerdFont
position = 0, 200
halign = center
valign = center
shadow_passes = 5
shadow_size = 10
}

View file

@ -0,0 +1,56 @@
background {
monitor =
path = $currentWallpaper
color = rgba(25, 20, 20, 1.0)
blur_passes = 1 # 0 disables blurring
blur_size = 7
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgba(0, 0, 0, 0)
inner_color = rgba(0, 0, 0, 0)
font_color = rgb(FFFFFF)
fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text =
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text =
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = 1
numlock_color = 1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
swap_font_color = false # see below
position = 130, -220
halign = left
valign = center
}
label {
monitor =
text = cmd[update:1000] printf "$(date +%I)\n$(date +%M)"
# color = rgba(200, 200, 200, 1.0)
color = rgb(FFFFFF)
font_size = 100
font_family = HackNerdFont
position = 150, 0
halign = left
valign = center
shadow_passes = 5
shadow_size = 10
}

View file

@ -0,0 +1,4 @@
splash = false
preload = ~/dotfiles/bgs/2.png
preload = ~/dotfiles/bgs/1.png
wallpaper = eDP-1, ~/dotfiles/bgs/1.png

View file

@ -0,0 +1,15 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols {
include "pc+us+pk:2+group(win_space_toggle)"
key <PAUS> { [ Pause ] };
modifier_map Mod3 { <PAUS> };
key <CAPS> { [ Escape ] };
};
xkb_geometry { include "pc(pc105)" };
};

2491
.config/kitty/kitty.conf Normal file

File diff suppressed because it is too large Load diff

2484
.config/kitty/kitty.conf.bak Normal file

File diff suppressed because it is too large Load diff

377
.config/lf/icons Normal file
View file

@ -0,0 +1,377 @@
# vim:ft=conf
# These examples require Nerd Fonts or a compatible font to be used.
# See https://www.nerdfonts.com for more information.
# default values from lf (with matching order)
# ln l # LINK
# or l # ORPHAN
# tw t # STICKY_OTHER_WRITABLE
# ow d # OTHER_WRITABLE
# st t # STICKY
# di d # DIR
# pi p # FIFO
# so s # SOCK
# bd b # BLK
# cd c # CHR
# su u # SETUID
# sg g # SETGID
# ex x # EXEC
# fi - # FILE
# file types (with matching order)
ln  # LINK
or  # ORPHAN
tw t # STICKY_OTHER_WRITABLE
ow  # OTHER_WRITABLE
st t # STICKY
di  # DIR
pi p # FIFO
so s # SOCK
bd b # BLK
cd c # CHR
su u # SETUID
sg g # SETGID
ex  # EXEC
fi  # FILE
# disable some default filetype icons, let them choose icon by filename
# ln  # LINK
# or  # ORPHAN
# tw # STICKY_OTHER_WRITABLE
# ow # OTHER_WRITABLE
# st # STICKY
# di  # DIR
# pi # FIFO
# so # SOCK
# bd # BLK
# cd # CHR
# su # SETUID
# sg # SETGID
# ex # EXEC
# fi  # FILE
# file extensions (vim-devicons)
*.styl 
*.sass 
*.scss 
*.htm 
*.html 
*.slim 
*.haml 
*.ejs 
*.css 
*.less 
*.md 
*.mdx 
*.markdown 
*.rmd 
*.json 
*.webmanifest 
*.js 
*.mjs 
*.jsx 
*.rb 
*.gemspec 
*.rake 
*.php 
*.py 
*.pyc 
*.pyo 
*.pyd 
*.coffee 
*.mustache 
*.hbs 
*.conf 
*.ini 
*.yml 
*.yaml 
*.toml 
*.bat 
*.mk 
*.jpg 
*.jpeg 
*.bmp 
*.png 
*.webp 
*.gif 
*.ico 
*.twig 
*.cpp 
*.c++ 
*.cxx 
*.cc 
*.cp 
*.c 
*.cs 󰌛
*.h 
*.hh 
*.hpp 
*.hxx 
*.hs 
*.lhs 
*.nix 
*.lua 
*.java 
*.sh 
*.fish 
*.bash 
*.zsh 
*.ksh 
*.csh 
*.awk 
*.ps1 
*.ml λ
*.mli λ
*.diff 
*.db 
*.sql 
*.dump 
*.clj 
*.cljc 
*.cljs 
*.edn 
*.scala 
*.go 
*.dart 
*.xul 
*.sln 
*.suo 
*.pl 
*.pm 
*.t 
*.rss 
'*.f#' 
*.fsscript 
*.fsx 
*.fs 
*.fsi 
*.rs 
*.rlib 
*.d 
*.erl 
*.hrl 
*.ex 
*.exs 
*.eex 
*.leex 
*.heex 
*.vim 
*.ai 
*.psd 
*.psb 
*.ts 
*.tsx 
*.jl 
*.pp 
*.vue 
*.elm 
*.swift 
*.xcplayground 
*.tex 󰙩
*.r 󰟔
*.rproj 󰗆
*.sol 󰡪
*.pem 
# file names (vim-devicons) (case-insensitive not supported in lf)
*gruntfile.coffee 
*gruntfile.js 
*gruntfile.ls 
*gulpfile.coffee 
*gulpfile.js 
*gulpfile.ls 
*mix.lock 
*dropbox 
*.ds_store 
*.gitconfig 
*.gitignore 
*.gitattributes 
*.gitlab-ci.yml 
*.bashrc 
*.zshrc 
*.zshenv 
*.zprofile 
*.vimrc 
*.gvimrc 
*_vimrc 
*_gvimrc 
*.bashprofile 
*favicon.ico 
*license 
*node_modules 
*react.jsx 
*procfile 
*dockerfile 
*docker-compose.yml 
*docker-compose.yaml 
*compose.yml 
*compose.yaml 
*rakefile 
*config.ru 
*gemfile 
*makefile 
*cmakelists.txt 
*robots.txt 󰚩
# file names (case-sensitive adaptations)
*Gruntfile.coffee 
*Gruntfile.js 
*Gruntfile.ls 
*Gulpfile.coffee 
*Gulpfile.js 
*Gulpfile.ls 
*Dropbox 
*.DS_Store 
*LICENSE 
*React.jsx 
*Procfile 
*Dockerfile 
*Docker-compose.yml 
*Docker-compose.yaml 
*Rakefile 
*Gemfile 
*Makefile 
*CMakeLists.txt 
# file patterns (vim-devicons) (patterns not supported in lf)
# .*jquery.*\.js$ 
# .*angular.*\.js$ 
# .*backbone.*\.js$ 
# .*require.*\.js$ 
# .*materialize.*\.js$ 
# .*materialize.*\.css$ 
# .*mootools.*\.js$ 
# .*vimrc.* 
# Vagrantfile$ 
# file patterns (file name adaptations)
*jquery.min.js 
*angular.min.js 
*backbone.min.js 
*require.min.js 
*materialize.min.js 
*materialize.min.css 
*mootools.min.js 
*vimrc 
Vagrantfile 
# archives or compressed (extensions from dircolors defaults)
*.tar 
*.tgz 
*.arc 
*.arj 
*.taz 
*.lha 
*.lz4 
*.lzh 
*.lzma 
*.tlz 
*.txz 
*.tzo 
*.t7z 
*.zip 
*.z 
*.dz 
*.gz 
*.lrz 
*.lz 
*.lzo 
*.xz 
*.zst 
*.tzst 
*.bz2 
*.bz 
*.tbz 
*.tbz2 
*.tz 
*.deb 
*.rpm 
*.jar 
*.war 
*.ear 
*.sar 
*.rar 
*.alz 
*.ace 
*.zoo 
*.cpio 
*.7z 
*.rz 
*.cab 
*.wim 
*.swm 
*.dwm 
*.esd 
# image formats (extensions from dircolors defaults)
*.jpg 
*.jpeg 
*.mjpg 
*.mjpeg 
*.gif 
*.bmp 
*.pbm 
*.pgm 
*.ppm 
*.tga 
*.xbm 
*.xpm 
*.tif 
*.tiff 
*.png 
*.svg 
*.svgz 
*.mng 
*.pcx 
*.mov 
*.mpg 
*.mpeg 
*.m2v 
*.mkv 
*.webm 
*.ogm 
*.mp4 
*.m4v 
*.mp4v 
*.vob 
*.qt 
*.nuv 
*.wmv 
*.asf 
*.rm 
*.rmvb 
*.flc 
*.avi 
*.fli 
*.flv 
*.gl 
*.dl 
*.xcf 
*.xwd 
*.yuv 
*.cgm 
*.emf 
*.ogv 
*.ogx 
# audio formats (extensions from dircolors defaults)
*.aac 
*.au 
*.flac 
*.m4a 
*.mid 
*.midi 
*.mka 
*.mp3 
*.mpc 
*.ogg 
*.ra 
*.wav 
*.oga 
*.opus 
*.spx 
*.xspf 
# other formats
*.pdf 

3
.config/lf/lf_kitty_clean Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty

13
.config/lf/lf_kitty_preview Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$( file -Lb --mime-type "$file")" =~ ^image ]]; then
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty
exit 1
fi
pistol "$file"

81
.config/lf/lfrc Normal file
View file

@ -0,0 +1,81 @@
set shell sh
set shellopts '-eu'
set ifs "\n"
set cursorpreviewfmt "\033[7;2m"
map ` !true
cmd open &{{
case $(file --mime-type -Lb $f) in
text/*) lf -remote "send $id \$nvim \$fx";;
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
esac
}}
# define a custom 'delete' command
cmd delete ${{
set -f
printf "$fx\n"
printf "delete?[y/n]"
read ans
[ "$ans" = "y" ] && rm -rf $fx
}}
cmd extract ${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}
# compress current file or selected files with tar and gunzip
cmd tar ${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}
# compress current file or selected files with zip
cmd zip ${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}
# My Config
set icons true
set ignorecase true
set previewer ~/.config/lf/lf_kitty_preview
set cleaner ~/.config/lf/lf_kitty_clean
map d
map space
map i up
map k down
map j updir
map l open
map x cut
map dd delete
map v select
# Integrations
cmd on-cd &{{
export STARSHIP_SHELL=
fmt="$(starship prompt)"
lf -remote "send $id set promptfmt \"$fmt\""
}}

1
.config/nvim/init.lua Normal file
View file

@ -0,0 +1 @@
require('config')

View file

@ -0,0 +1,27 @@
{
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
"auto-session": { "branch": "main", "commit": "ee320d7a59c1dfe83df7c9d58150d9f194690d53" },
"blink.cmp": { "branch": "main", "commit": "586ee87534f5bf65f1c8dea2d1da2a57e8cddd36" },
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"flutter-tools.nvim": { "branch": "main", "commit": "65b7399804315a1160933b64292d3c5330aa4e9f" },
"gitsigns.nvim": { "branch": "main", "commit": "93f882f7041a2e779addbd34943812ca66edef5a" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
"image.nvim": { "branch": "master", "commit": "c40215d7d7d1d8c823ee9a77be1a894d5c8df41b" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"markview.nvim": { "branch": "main", "commit": "ec33f2aa333ca1d76f51847922578434d7aeadf7" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
"molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" },
"nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
}

View file

@ -0,0 +1,22 @@
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
vim.api.nvim_create_autocmd('User', {
pattern = 'MiniFilesActionRename',
callback = function(event)
require('snacks').rename.on_rename_file(event.data.from, event.data.to)
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "man",
callback = function()
vim.keymap.del("n", "k", { buffer = true })
vim.keymap.del("n", "j", { buffer = true })
end,
})

View file

@ -0,0 +1,4 @@
require('config.options')
require('config.plugins')
require('config.autocmds')
require('config.keymaps')

View file

@ -0,0 +1,217 @@
-- INFO: General --
-- hjkl to ijkl remap
vim.keymap.set({ 'n', 'v', 'o' }, 'j', 'h', { desc = 'hjkl to ijkl' })
vim.keymap.set({ 'n', 'v', 'o' }, 'h', 'i', { desc = 'hjkl to ijkl' })
vim.keymap.set({ 'n', 'v', 'o' }, 'i', 'k', { desc = 'hjkl to ijkl' })
vim.keymap.set({ 'n', 'v', 'o' }, 'k', 'j', { desc = 'hjkl to ijkl' })
-- indentation
vim.keymap.set('n', '<Tab>', '>>', { desc = 'tab indent ' })
vim.keymap.set('n', '<S-Tab>', '<<', { desc = 'S-tab unindent ' })
vim.keymap.set({ 'v', 'o' }, '<Tab>', '>', { desc = 'tab indent ' })
vim.keymap.set({ 'v', 'o' }, '<S-Tab>', '<', { desc = 'S-tab unindent ' })
-- scrolling
vim.keymap.set({ 'n', 'v' }, '<C-d>', '<C-d>zz', { desc = 'centered scroll' })
vim.keymap.set({ 'n', 'v' }, '<C-u>', '<C-u>zz', { desc = 'centered scroll' })
vim.keymap.set({ 'n', 'v' }, '<C-o>', '<C-o>zz', { desc = 'centered jump back' })
-- start of line
vim.keymap.set({ 'n', 'v', 'o' }, '#', '_', { desc = '# start of line' })
-- save / quit
vim.keymap.set('n', '<C-s>', ':w<CR>', { desc = 'ctrl-s save' })
vim.keymap.set('n', '<C-w>', ':bd<CR>', { desc = 'save and close', nowait = true })
-- delete word in insert mode
vim.keymap.set('i', '<C-BS>', '<C-w>', { desc = 'delete word in insert mode' })
-- INFO: Right Dock: Terminal & MiniOilFiles
-- INFO: ctrl m
vim.keymap.set('n', '<F27>', '<cmd>Floaterminal<CR>', { desc = 'open terminal', nowait = true })
vim.keymap.set('t', '<F27>', '<cmd>q<CR>', { desc = 'close terminal window' })
vim.keymap.set('t', '<C-n>', '<cmd>Floaterminal next<CR>', { desc = 'next terminal' })
vim.keymap.set('t', '<C-p>', '<cmd>Floaterminal prev<CR>', { desc = 'prev terminal' })
-- vim.keymap.set('t', '<C-l>', '<cmd>Floaterminal 1<CR>', { desc = 'terminal 1' })
-- vim.keymap.set('t', '<C-j>', '<cmd>Floaterminal 2<CR>', { desc = 'terminal 2' })
-- vim.keymap.set('t', '<Down>', '<cmd>Floaterminal 3<CR>', { desc = 'terminal 3' })
-- vim.keymap.set('t', '<Up>', '<cmd>Floaterminal 4<CR>', { desc = 'terminal 4' })
vim.keymap.set('t', '<C-w>', '<C-d>', { desc = 'kill terminal' })
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { desc = 'normal mode in terminal' })
vim.keymap.set('n', '<C-e>', require('mini.files').open, { desc = 'open mini files' })
-- INFO: Windows
-- this is weird because ctrl-i => Up & ctrl-k => Down in Kitty conf
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>ki', ':wincmd k<CR>', { desc = 'move focus between windows', silent = true })
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kk', ':wincmd j<CR>', { desc = 'move focus between windows', silent = true })
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kl', ':wincmd l<CR>', { desc = 'move focus between windows', silent = true })
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kj', ':wincmd h<CR>', { desc = 'move focus between windows', silent = true })
-- INFO: Picker
local Snacks = require('snacks')
vim.keymap.set('n', '<leader>sf', Snacks.picker.files , { desc = 'pick files' })
vim.keymap.set('n', '<leader>sw', Snacks.picker.grep, { desc = 'grep' })
vim.keymap.set('n', '<leader>sd', Snacks.picker.diagnostics_buffer, { desc = 'diagnostics' })
vim.keymap.set('n', '<leader>sD', Snacks.picker.diagnostics, { desc = 'workspace diagnostics' })
vim.keymap.set('n', '<leader>st', function()
Snacks.picker.todo_comments()
end, { desc = 'search todos' })
vim.keymap.set('n', '<leader>sh', Snacks.picker.help, { desc = 'help' })
vim.keymap.set('n', '<leader>/', function()
Snacks.picker.lines({ layout = 'select' })
end, { desc = 'fuzzily search in current buffer' })
vim.keymap.set('n', '<leader>sp', '<cmd>SessionSearch<CR>', { desc = 'search sessions' })
-- INFO: LSP
vim.keymap.set('n', 'L', vim.diagnostic.open_float, { desc = 'open floating diagnostic' })
-- This function gets run when an LSP attaches to a particular buffer.
-- That is to say, every time a new file is opened that is associated with
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
-- function will be executed to configure the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
callback = function(event)
local map = function(keys, func, desc, mode)
mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc, nowait = true })
end
-- Rename the variable under your cursor.
-- Most Language Servers support renaming across files, etc.
map('<F2>', function()
vim.api.nvim_exec_autocmds('User', { pattern = 'SnacksInputRename' })
vim.lsp.buf.rename()
vim.api.nvim_create_autocmd('WinClosed', {
callback = function (args)
vim.api.nvim_exec_autocmds('User', {
pattern = 'SnacksInputReset'
})
vim.api.nvim_del_autocmd(args.id)
end
})
end, '[R]e[n]ame')
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map('ga', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
-- Find references for the word under your cursor.
map('gr', Snacks.picker.lsp_references, '[G]oto [R]eferences')
-- Jump to the implementation of the word under your cursor.
-- Useful when your language has ways of declaring types without an actual implementation.
map('gi', Snacks.picker.lsp_implementations, '[G]oto [I]mplementation')
-- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map('gd', Snacks.picker.lsp_definitions, '[G]oto [D]efinition')
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
-- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc.
map('go', Snacks.picker.lsp_symbols, 'Open Document Symbols')
-- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project.
map('gO', Snacks.picker.lsp_workspace_symbols, 'Open Workspace Symbols')
-- Jump to the type of the word under your cursor.
-- Useful when you're not sure what type a variable is and you want to see
-- the definition of its *type*, not where it was *defined*.
map('gt', Snacks.picker.lsp_type_definitions, '[G]oto [T]ype Definition')
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
---@param client vim.lsp.Client
---@param method vim.lsp.protocol.Method
---@param bufnr? integer some lsp support methods only in specific files
---@return boolean
local function client_supports_method(client, method, bufnr)
if vim.fn.has 'nvim-0.11' == 1 then
return client:supports_method(method, bufnr)
else
return client.supports_method(method, { bufnr = bufnr })
end
end
-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.
-- See `:help CursorHold` for information about when this is executed
--
-- When you move your cursor, the highlights will be cleared (the second autocommand).
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
end,
})
end
-- The following code creates a keymap to toggle inlay hints in your
-- code, if the language server you are using supports them
--
-- This may be unwanted, since they displace some of your code
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
map('<leader>ih', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
end, '[T]oggle Inlay [H]ints')
end
end,
})
-- INFO: Molten
vim.keymap.set('n', '<leader>mi', ':MoltenInit<CR>', { silent = true, desc = 'Initialize the plugin' })
vim.keymap.set('n', '<leader>mo', ':MoltenEvaluateOperator<CR>', { silent = true, desc = 'run operator selection' })
vim.keymap.set('n', '<leader>ml', ':MoltenEvaluateLine<CR>', { silent = true, desc = 'evaluate line' })
vim.keymap.set('v', '<leader>mv', ':<C-u>MoltenEvaluateVisual<CR>gv', { silent = false, desc = 'evaluate visual selection' })
vim.keymap.set('n', '<leader>mc', ':MoltenReevaluateCell<CR>', { silent = false, desc = 'reevaluate cell' })
vim.keymap.set('n', '<leader>me', ':noautocmd MoltenEnterOutput<CR>', { silent = true, desc = 'show/enter output' })
vim.keymap.set('n', '<leader>mh', ':MoltenHideOutput<CR>', { silent = true, desc = 'hide output' })
-- INFO: Flutter
vim.keymap.set('n', '<leader>fd', '<cmd>FlutterDevices<CR>', { desc = 'show flutter devices' })
vim.keymap.set('n', '<leader>fe', '<cmd>FlutterEmulators<CR>', { desc = 'show emulators' })
vim.keymap.set('n', '<leader>fs', '<cmd>FlutterRun<CR>', { desc = 'flutter run' })
vim.keymap.set('n', '<leader>fr', '<cmd>FlutterRestart<CR>', { desc = 'flutter restart' })
vim.keymap.set('n', '<leader>fq', '<cmd>FlutterQuit<CR>', { desc = 'stop flutter' })
vim.keymap.set('n', '<leader>fl', '<cmd>FlutterLogToggle<CR>', { desc = 'flutter log' })
vim.keymap.set('n', '<leader>fc', '<cmd>FlutterLogClear<CR>', { desc = 'clear log' })

View file

@ -0,0 +1,52 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.have_nerd_font = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.mouse = 'a'
vim.opt.showmode = false
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
end)
vim.opt.breakindent = true
-- save undo history
vim.opt.undofile = true
-- Case insensitve search normally
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Configure how new splits should be opened
vim.opt.splitright = true
vim.opt.splitbelow = true
-- highlight current cursor line
vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s)
-- See `:help 'confirm'`
vim.opt.confirm = true
vim.opt.fillchars:append({ eob = ' ' })
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.hlsearch = false
vim.opt.wrap = false
vim.o.sessionoptions='blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions'
-- Example for configring Neovim to load user-installed installed Lua rocks:
package.path = package.path .. ';' .. vim.fn.expand('$HOME') .. '/.luarocks/share/lua/5.1/?/init.lua;'
package.path = package.path .. ';' .. vim.fn.expand('$HOME') .. '/.luarocks/share/lua/5.1/?.lua;'

View file

@ -0,0 +1,38 @@
return {
'rmagatti/auto-session',
lazy = false,
---enables autocomplete for opts
---@module 'auto-session'
---@type AutoSession.Config
opts = {
suppressed_dirs = { '~/', '~/Downloads', '/' },
pre_save_cmds = {
function()
local bufs = vim.api.nvim_list_bufs()
for _, buf in ipairs(bufs) do
if vim.bo[buf].buftype == 'terminal' then
vim.api.nvim_buf_delete(buf, { force = true, unload = false })
end
end
end
},
pre_restore_cmds = {
-- might not be necessary, but save current harpoon data when we're about to restore a session
function() require('harpoon'):sync() end,
},
post_restore_cmds = {
function()
-- vim.notify('calling harpoon sync after restore')
local harpoon = require('harpoon')
local hdata = require('harpoon.data')
-- this is the only way i found to force harpoon to reread data from the disk rather
-- than using what's in memory
require('harpoon').data = hdata.Data:new(harpoon.config)
end,
},
}
}

View file

@ -0,0 +1,72 @@
return {
'saghen/blink.cmp',
event = 'VimEnter',
version = '1.*',
dependencies = {
{
'L3MON4D3/LuaSnip',
version = '2.*',
build = (function()
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
},
opts = {},
},
'folke/lazydev.nvim',
},
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = {
preset = 'default',
['<Tab>'] = { 'select_and_accept', 'snippet_forward', 'fallback'},
['<S-Tab>'] = { 'snippet_backward', 'fallback'},
['I'] = { 'scroll_documentation_up', 'fallback' },
['K'] = { 'scroll_documentation_down', 'fallback' },
},
appearance = { nerd_font_variant = 'mono' },
completion = {
-- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 },
},
sources = {
default = { 'lsp', 'path', 'snippets', 'lazydev' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
},
},
snippets = { preset = 'luasnip' },
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
-- which automatically downloads a prebuilt binary when enabled.
--
-- By default, we use the Lua implementation instead, but you may enable
-- the rust implementation via `'prefer_rust_with_warning'`
--
-- See :h blink-cmp-config-fuzzy for more information
fuzzy = { implementation = 'lua' },
-- Shows a signature help window while you type arguments for a function
signature = { enabled = true },
},
}

View file

@ -0,0 +1,154 @@
return {
{
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged_enable = true,
signcolumn = true,
on_attach = function()
local gitsigns = require('gitsigns')
vim.keymap.set('n', '<leader>gs', gitsigns.stage_hunk, { desc = 'stage hunk' })
vim.keymap.set('n', '<leader>gr', gitsigns.reset_hunk, { desc = 'restore hunk' })
vim.keymap.set('n', '<leader>gS', gitsigns.stage_buffer, { desc = 'stage buffer' })
vim.keymap.set('n', '<leader>gR', gitsigns.stage_hunk, { desc = 'reset buffer' })
vim.keymap.set('n', '<leader>gp', gitsigns.preview_hunk, { desc = 'preview hunk' })
vim.keymap.set('n', '<leader>gb', gitsigns.blame_line, { desc = 'blame line' })
end
},
},
{
'sindrets/diffview.nvim',
config = function ()
local actions = require('diffview.config').actions
require('diffview').setup({
keymaps = {
disable_defaults = true,
file_panel = {
['i'] = '<Up>',
['k'] = '<Down>',
['j'] = false,
['<Space>'] = function () actions.toggle_stage_entry() end
}
}
})
end
},
-- {
-- 'NeogitOrg/neogit',
-- dependencies = {
-- 'nvim-lua/plenary.nvim',
-- 'nvim-telescope/telescope.nvim',
-- },
-- config = function()
-- require('neogit').setup({
--
-- kind = 'floating',
-- graph_style = 'kitty',
-- disable_line_numbers = false,
-- disable_relative_line_numbers = false,
-- commit_editor = {
-- kind = 'floating',
-- },
-- commit_select_view = {
-- kind = 'floating',
-- },
-- commit_view = {
-- kind = 'floating',
-- verify_commit = vim.fn.executable('gpg') == 1, -- Can be set to true or false, otherwise we try to find the binary
-- },
-- log_view = {
-- kind = 'floating',
-- },
-- rebase_editor = {
-- kind = 'floating',
-- },
-- reflog_view = {
-- kind = 'floating',
-- },
-- merge_editor = {
-- kind = 'floating',
-- },
-- description_editor = {
-- kind = 'floating',
-- },
-- tag_editor = {
-- kind = 'floating',
-- },
-- preview_buffer = {
-- kind = 'floating',
-- },
-- popup = {
-- kind = 'floating',
-- },
-- stash = {
-- kind = 'floating',
-- },
-- refs_view = {
-- kind = 'floating',
-- },
-- mappings = {
-- status = {
-- ['i'] = 'MoveUp',
-- ['k'] = 'MoveDown',
-- ['j'] = false,
-- },
-- }
-- })
-- vim.keymap.set('n', '<leader>gg', '<cmd>Neogit<CR>', { desc = 'open neogit '})
-- end
-- }
-- {
-- 'tpope/vim-fugitive',
-- }
-- {
-- 'sindrets/diffview.nvim',
-- dependencies = { 'nvim-tree/nvim-web-devicons' },
-- -- lazy, only load diffview by these commands
-- cmd = {
-- 'DiffviewFileHistory', 'DiffviewOpen', 'DiffviewToggleFiles', 'DiffviewFocusFiles', 'DiffviewRefresh'
-- }
-- },
-- {
-- 'SuperBo/fugit2.nvim',
-- build = false,
-- opts = {
-- width = 100,
-- },
-- dependencies = {
-- 'MunifTanjim/nui.nvim',
-- 'nvim-tree/nvim-web-devicons',
-- 'nvim-lua/plenary.nvim',
-- -- {
-- -- 'chrisgrieser/nvim-tinygit', -- optional: for Github PR view
-- -- dependencies = { 'stevearc/dressing.nvim' }
-- -- },
-- },
-- cmd = { 'Fugit2', 'Fugit2Diff', 'Fugit2Graph' },
-- keys = {
-- { '<leader>F', mode = 'n', '<cmd>Fugit2<cr>' }
-- }
-- },
}

View file

@ -0,0 +1,29 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require('harpoon')
harpoon:setup({
settings = {
save_on_toggle = true,
sync_on_ui_close = true
}
})
vim.keymap.set('n', '<leader>a', function() harpoon:list():add() end)
vim.keymap.set('n', '<C-h>', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set('n', '<C-l>', function() harpoon:list():select(1) end)
vim.keymap.set('n', '<C-j>', function() harpoon:list():select(2) end)
vim.keymap.set('n', '<Down>', function() harpoon:list():select(3) end)
vim.keymap.set('n', '<Up>', function() harpoon:list():select(4) end)
-- -- Toggle previous & next buffers stored within Harpoon list
-- vim.keymap.set('n', '<C-S-P>', function() harpoon:list():prev() end)
-- vim.keymap.set('n', '<C-S-N>', function() harpoon:list():next() end)
end
}

View file

@ -0,0 +1,40 @@
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
if vim.v.shell_error ~= 0 then
error('Error cloning lazy.nvim:\n' .. out)
end
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
-- local keymaps = require('config.pluginmaps')
require('lazy').setup({
-- INFO: General Editing --
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} },
-- { 'stevearc/dressing.nvim', opts = {}, },
-- 'ThePrimeagen/vim-be-good',
-- { 'vuciv/golf' },
require('config.plugins.git'),
require('config.plugins.ui'),
-- require('config.plugins.telescope'),
require('config.plugins.blinkcmp'),
require('config.plugins.languages.lsp'),
require('config.plugins.languages.treesitter'),
require('config.plugins.harpoon'),
require('config.plugins.autosession'),
require('config.plugins.snacks'),
require('config.plugins.mini'),
require('config.plugins.languages.molten'),
require('config.plugins.languages.flutter'),
require('config.plugins.languages.markdown'),
})

View file

@ -0,0 +1,13 @@
return {
'nvim-flutter/flutter-tools.nvim',
lazy = false,
dependencies = { 'nvim-lua/plenary.nvim', },
config = function()
require('flutter-tools').setup({
fvm = true,
dev_log = {
open_cmd = 'FloutterLog',
}
})
end,
}

View file

@ -0,0 +1,124 @@
return {
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
},
},
},
{ 'williamboman/mason.nvim', opts = {} },
{
'neovim/nvim-lspconfig',
dependencies = {
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
'saghen/blink.cmp',
},
config = function()
vim.diagnostic.config {
severity_sort = true,
float = { border = 'rounded', source = 'if_many' },
underline = { severity = vim.diagnostic.severity.ERROR },
signs = vim.g.have_nerd_font and {
text = {
[vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '󰋽 ',
},
} or {},
virtual_text = {
source = 'if_many',
spacing = 2,
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
[vim.diagnostic.severity.WARN] = diagnostic.message,
[vim.diagnostic.severity.INFO] = diagnostic.message,
[vim.diagnostic.severity.HINT] = diagnostic.message,
}
return diagnostic_message[diagnostic.severity]
end,
},
}
local capabilities = require('blink.cmp').get_lsp_capabilities()
local servers = {
bashls = {},
clangd = {},
rust_analyzer = {},
pyright = {},
emmet_language_server = {},
html = { filetypes = { 'html', 'htmldjango' }, },
cssls = {},
vtsls = {},
prismals = {},
-- kotlin_lsp = {},
-- kotlin_language_server = {
-- init_options = {
-- storagePath = vim.fn.stdpath('cache') .. '/kotlin_language_server', -- Explicit storage path
-- },
-- },
-- -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {},
--
lua_ls = {
-- cmd = { ... },
-- filetypes = { ... },
-- capabilities = {},
settings = {
Lua = {
completion = {
callSnippet = 'Replace',
},
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
},
},
}
local ensure_installed = vim.tbl_keys(servers or {})
require('mason-lspconfig').setup {
ensure_installed = ensure_installed,
automatic_installation = false,
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,
}
}
-- WARN: Temoraray workaround because of naming issue i.e. djlsp and django-template-server
require('lspconfig').djlsp.setup({})
end
},
}

View file

@ -0,0 +1,9 @@
return {
"OXY2DEV/markview.nvim",
lazy = false,
opts = {
experimental = {
check_rtp_message = false
}
}
}

View file

@ -0,0 +1,27 @@
return {
{
'3rd/image.nvim',
version = '1.1.0',
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
opts = {
backend = 'kitty', -- whatever backend you would like to use
max_width = 100,
max_height = 20,
max_height_window_percentage = math.huge,
max_width_window_percentage = math.huge,
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', '' },
}
},
{
'benlubas/molten-nvim',
version = '^1.0.0', -- use version <2.0.0 to avoid breaking changes
dependencies = { '3rd/image.nvim' },
build = ':UpdateRemotePlugins',
init = function()
-- these are examples, not defaults. Please see the readme
vim.g.molten_image_provider = 'image.nvim'
end,
}
}

View file

@ -0,0 +1,42 @@
return {
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
opts = {
ensure_installed = {
'bash',
'c',
'cpp',
'diff',
'html',
'css',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'rust',
'python',
'htmldjango',
'r',
'dart',
'javascript',
'typescript',
'tsx',
'prisma',
'regex',
'kotlin'
},
auto_install = false,
highlight = { enable = true, },
indent = { enable = true },
},
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
}

View file

@ -0,0 +1,34 @@
return {
'echasnovski/mini.nvim',
version = '*' ,
config = function()
require('mini.pairs').setup({})
require('mini.ai').setup({
mappings = {
around = 'a',
inside = 'h',
around_next = 'an',
inside_next = 'hn',
around_last = 'al',
inside_last = 'hl',
goto_left = 'g[',
goto_right = 'g]',
},
silent = true,
})
require('mini.surround').setup({
silent = true,
})
require('mini.files').setup({
mappings = {
go_in = 'l',
go_out = 'j',
go_in_plus = 'L',
go_out_plus = 'J',
synchronize = '<C-s>'
}
})
end
}

View file

@ -0,0 +1,135 @@
return {
'folke/snacks.nvim',
priority = 1000,
lazy = false,
init = function()
local Snacks = require('snacks')
vim.api.nvim_create_autocmd('User', {
pattern = 'SnacksInputRename',
callback = function ()
Snacks.config.input.win.relative = 'cursor'
Snacks.config.input.win.col = -1
Snacks.config.input.win.row = -3
Snacks.config.input.win.title_pos = 'left'
end
})
vim.api.nvim_create_autocmd('User', {
pattern = 'SnacksInputReset',
callback = function ()
Snacks.config.input.win.relative = 'editor'
Snacks.config.input.win.col = nil
Snacks.config.input.win.row = 6
Snacks.config.input.win.title_pos = 'center'
end
})
end,
---@type snacks.Config
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
bigfile = { enabled = true },
dashboard = {
enabled = true,
preset = {
header = [[
]],
},
sections = {
{ section = 'header' },
{ section = 'startup' },
}
},
indent = {
enabled = true,
animate = { enabled = false },
},
input = {
enabled = true,
win = {},
},
quickfile = { enabled = true },
rename = { enabled = true },
picker = {
enabled = true,
matcher = { frecency = true, },
layout = {
cycle = true,
preset = 'telescope',
},
ui_select = true,
win = {
input = {
keys = {
['<Esc>'] = { 'close', mode = 'i' },
['<C-s>'] = { 'edit_split', mode = 'i' },
['<C-v>'] = { 'edit_vsplit', mode = 'i' },
['<c-d>'] = { 'preview_scroll_down', mode = 'i' },
['<c-u>'] = { 'preview_scroll_up', mode = 'i' },
['<c-h>'] = { 'toggle_hidden', mode = 'i' },
['<c-l>'] = { 'toggle_ignored', mode = 'i' },
}
}
},
layouts = {
telescope = {
reverse = true,
layout = {
box = 'horizontal',
backdrop = false,
width = 0.8,
height = 0.9,
border = 'none',
{
box = 'vertical',
{ win = 'list', title = ' Results ', title_pos = 'center', border = 'rounded' },
{ win = 'input', height = 1, border = 'rounded', title = '{title} {live} {flags}', title_pos = 'center' },
},
{
win = 'preview',
title = '{preview:Preview}',
width = 0.55,
border = 'rounded',
title_pos = 'center',
},
}
}
}
},
bufdelete = { enabled = false },
debug = { enabled = false },
dim = { enabled = false },
explorer = { enabled = false },
git = { enabled = false },
gitbrowse = { enabled = false },
image = { enabled = false },
layout = { enabled = false },
lazygit = { enabled = false },
notifier = { enabled = false },
notify = { enabled = false },
profiler = { enabled = false },
scope = { enabled = false },
scratch = { enabled = false },
scroll = { enabled = false },
statuscolumn = { enabled = false },
terminal = { enabled = false },
toggle = { enabled = false },
win = { enabled = false },
words = { enabled = false },
zed = { enabled = false },
},
}

View file

@ -0,0 +1,20 @@
return {
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = {}
},
{
'catppuccin/nvim',
name = 'catppuccin',
priority = 1000,
opts = {
flavour = 'mocha',
no_italic = true,
},
config = function()
vim.cmd('colorscheme catppuccin')
end
}
}

777
.config/nvim/old.lua Normal file
View file

@ -0,0 +1,777 @@
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
Kickstart.nvim is *not* a distribution.
Kickstart.nvim is a template for your own configuration.
The goal is that you can read every line of code, top-to-bottom, understand
what your configuration is doing, and modify it to suit your needs.
Once you've done that, you should start exploring, configuring and tinkering to
explore Neovim!
If you don't know anything about Lua, I recommend taking some time to read through
a guide. One possible example:
- https://learnxinyminutes.com/docs/lua/
And then you can explore or search through `:help lua-guide`
- https://neovim.io/doc/user/lua-guide.html
Kickstart Guide:
I have left several `:help X` comments throughout the init.lua
You should run that command and read that help section for more information.
In addition, I have some `NOTE:` items throughout the file.
These are for you, the reader to help understand what is happening. Feel free to delete
them once you know what you're doing, but they should serve as a guide for when you
are first encountering a few different constructs in your nvim config.
I hope you enjoy your Neovim journey,
- TJ
P.S. You can delete this when you're done too. It's your config now :)
--]]
-- Set <space> as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- [[ Install `lazy.nvim` plugin manager ]]
-- https://github.com/folke/lazy.nvim
-- `:help lazy.nvim.txt` for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)
-- [[ Configure plugins ]]
-- NOTE: Here is where you install your plugins.
-- You can configure plugins using the `config` key.
--
-- You can also configure plugins after the setup call,
-- as they will be available in your neovim runtime.
require('lazy').setup({
-- NOTE: First, some plugins that don't require any configuration
-- Git related plugins
'tpope/vim-fugitive',
'tpope/vim-rhubarb',
-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
{
-- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs to stdpath for neovim
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
-- Additional lua configuration, makes nvim stuff amazing!
'folke/neodev.nvim',
},
},
{
-- Autocompletion
'hrsh7th/nvim-cmp',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
-- Adds LSP completion capabilities
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
-- Adds a number of user-friendly snippets
'rafamadriz/friendly-snippets',
},
},
-- Useful plugin to show you pending keybinds.
-- { 'folke/which-key.nvim', opts = {} },
{
-- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
-- See `:help gitsigns.txt`
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map({ 'n', 'v' }, ']c', function()
if vim.wo.diff then
return ']c'
end
vim.schedule(function()
gs.next_hunk()
end)
return '<Ignore>'
end, { expr = true, desc = 'Jump to next hunk' })
map({ 'n', 'v' }, '[c', function()
if vim.wo.diff then
return '[c'
end
vim.schedule(function()
gs.prev_hunk()
end)
return '<Ignore>'
end, { expr = true, desc = 'Jump to previous hunk' })
-- Actions
-- visual mode
map('v', '<leader>hs', function()
gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
end, { desc = 'stage git hunk' })
map('v', '<leader>hr', function()
gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
end, { desc = 'reset git hunk' })
-- normal mode
map('n', '<leader>hs', gs.stage_hunk, { desc = 'git stage hunk' })
map('n', '<leader>hr', gs.reset_hunk, { desc = 'git reset hunk' })
map('n', '<leader>hS', gs.stage_buffer, { desc = 'git Stage buffer' })
map('n', '<leader>hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' })
map('n', '<leader>hR', gs.reset_buffer, { desc = 'git Reset buffer' })
map('n', '<leader>hp', gs.preview_hunk, { desc = 'preview git hunk' })
map('n', '<leader>hb', function()
gs.blame_line { full = false }
end, { desc = 'git blame line' })
map('n', '<leader>hd', gs.diffthis, { desc = 'git diff against index' })
map('n', '<leader>hD', function()
gs.diffthis '~'
end, { desc = 'git diff against last commit' })
-- Toggles
map('n', '<leader>tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' })
map('n', '<leader>td', gs.toggle_deleted, { desc = 'toggle git show deleted' })
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', { desc = 'select git hunk' })
end,
},
},
{
'Mofiqul/vscode.nvim',
priority = 1000,
config = function()
vim.cmd.colorscheme 'vscode'
end,
},
-- auto bracket closing
{
'm4xshen/autoclose.nvim',
},
-- {
-- -- Theme inspired by Atom
-- 'navarasu/onedark.nvim',
-- priority = 100,
-- config = function()
-- vim.cmd.colorscheme 'onedark'
-- end,
-- },
{
-- Set lualine as statusline
'nvim-lualine/lualine.nvim',
-- See `:help lualine.txt`
opts = {
options = {
icons_enabled = false,
theme = 'onedark',
component_separators = '|',
section_separators = '',
},
},
},
{
-- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl`
main = 'ibl',
opts = {},
},
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
-- Fuzzy Finder (files, lsp, etc)
{
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
{
'nvim-telescope/telescope-fzf-native.nvim',
-- NOTE: If you are having trouble with this installation,
-- refer to the README for telescope-fzf-native for more instructions.
build = 'make',
cond = function()
return vim.fn.executable 'make' == 1
end,
},
},
},
{
-- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
build = ':TSUpdate',
},
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them.
-- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
-- up-to-date with whatever is in the kickstart repo.
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
--
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
-- { import = 'custom.plugins' },
}, {})
-- [[ Setting options ]]
-- See `:help vim.o`
-- NOTE: You can change these options as you wish!
-- Set highlight on search
vim.o.hlsearch = false
-- Make line numbers default
vim.wo.number = true
-- Enable mouse mode
vim.o.mouse = 'a'
-- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.o.clipboard = 'unnamedplus'
-- Enable break indent
vim.o.breakindent = true
--tabwitdh
vim.o.tabstop = 4
vim.o.shiftwidth = 4
-- relative line numbers
vim.o.relativenumber = true
-- Save undo history
vim.o.undofile = true
-- Case-insensitive searching UNLESS \C or capital in search
vim.o.ignorecase = true
vim.o.smartcase = true
-- Keep signcolumn on by default
vim.wo.signcolumn = 'yes'
-- Decrease update time
vim.o.updatetime = 250
vim.o.timeoutlen = 300
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
-- [[ Basic Keymaps ]]
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-- Diagnostic keymaps
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
-- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = '*',
})
-- configure autoclose
require("autoclose").setup({
keys = {
["("] = { escape = false, close = true, pair = "()" },
["["] = { escape = false, close = true, pair = "[]" },
["{"] = { escape = false, close = true, pair = "{}" },
[">"] = { escape = true, close = false, pair = "<>" },
[")"] = { escape = true, close = false, pair = "()" },
["]"] = { escape = true, close = false, pair = "[]" },
["}"] = { escape = true, close = false, pair = "{}" },
['"'] = { escape = true, close = true, pair = '""' },
["'"] = { escape = true, close = true, pair = "''" },
["`"] = { escape = true, close = true, pair = "``" },
},
options = {
disabled_filetypes = { "text" },
disable_when_touch = true,
touch_regex = "[%w(%[{]",
pair_spaces = false,
auto_indent = true,
disable_command_mode = false,
},
})
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
defaults = {
mappings = {
i = {
['<C-u>'] = false,
['<C-d>'] = false,
},
},
},
}
-- Enable telescope fzf native, if installed
pcall(require('telescope').load_extension, 'fzf')
-- Telescope live_grep in git root
-- Function to find the git root directory based on the current buffer's path
local function find_git_root()
-- Use the current buffer's path as the starting point for the git search
local current_file = vim.api.nvim_buf_get_name(0)
local current_dir
local cwd = vim.fn.getcwd()
-- If the buffer is not associated with a file, return nil
if current_file == '' then
current_dir = cwd
else
-- Extract the directory from the current file's path
current_dir = vim.fn.fnamemodify(current_file, ':h')
end
-- Find the Git root directory from the current file's path
local git_root = vim.fn.systemlist('git -C ' .. vim.fn.escape(current_dir, ' ') .. ' rev-parse --show-toplevel')[1]
if vim.v.shell_error ~= 0 then
print 'Not a git repository. Searching on current working directory'
return cwd
end
return git_root
end
-- Custom live_grep function to search in git root
local function live_grep_git_root()
local git_root = find_git_root()
if git_root then
require('telescope.builtin').live_grep {
search_dirs = { git_root },
}
end
end
vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {})
-- See `:help telescope.builtin`
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
end, { desc = '[/] Fuzzily search in current buffer' })
local function telescope_live_grep_open_files()
require('telescope.builtin').live_grep {
grep_open_files = true,
prompt_title = 'Live Grep in Open Files',
}
end
vim.keymap.set('n', '<leader>s/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' })
vim.keymap.set('n', '<leader>ss', require('telescope.builtin').builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sG', ':LiveGrepGitRoot<cr>', { desc = '[S]earch by [G]rep on Git Root' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
-- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter`
-- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}'
vim.defer_fn(function()
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<c-space>',
node_incremental = '<c-space>',
scope_incremental = '<c-s>',
node_decremental = '<M-space>',
},
},
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = {
-- You can use the capture groups defined in textobjects.scm
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',
},
goto_next_end = {
[']M'] = '@function.outer',
[']['] = '@class.outer',
},
goto_previous_start = {
['[m'] = '@function.outer',
['[['] = '@class.outer',
},
goto_previous_end = {
['[M'] = '@function.outer',
['[]'] = '@class.outer',
},
},
swap = {
enable = true,
swap_next = {
['<leader>a'] = '@parameter.inner',
},
swap_previous = {
['<leader>A'] = '@parameter.inner',
},
},
},
}
end, 0)
-- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)
-- NOTE: Remember that lua is a real programming language, and as such it is possible
-- to define small helper and utility functions so you don't have to repeat yourself
-- many times.
--
-- In this case, we create a function that lets us more easily define mappings specific
-- for LSP related items. It sets the mode, buffer and description for us each time.
local nmap = function(keys, func, desc)
if desc then
desc = 'LSP: ' .. desc
end
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
nmap('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
-- See `:help K` for why this keymap
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
-- Lesser used LSP functionality
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
nmap('<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, '[W]orkspace [L]ist Folders')
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
vim.lsp.buf.format()
end, { desc = 'Format current buffer with LSP' })
end
-- document existing key chains
-- require('which-key').register {
-- ['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
-- ['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
-- ['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
-- ['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
-- ['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
-- ['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
-- ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
-- ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
-- }
-- -- register which-key VISUAL mode
-- -- required for visual <leader>hs (hunk stage) to work
-- require('which-key').register({
-- ['<leader>'] = { name = 'VISUAL <leader>' },
-- ['<leader>h'] = { 'Git [H]unk' },
-- }, { mode = 'v' })
-- mason-lspconfig requires that these setup functions are called in this order
-- before setting up the servers.
require('mason').setup()
require('mason-lspconfig').setup()
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
-- Add any additional override configuration in the following tables. They will be passed to
-- the `settings` field of the server config. You must look up that documentation yourself.
--
-- If you want to override the default filetypes that your language server will attach to you can
-- define the property 'filetypes' to the map in question.
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- tsserver = {},
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
lua_ls = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
},
}
-- Setup neovim lua configuration
require('neodev').setup()
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- Ensure the servers above are installed
local mason_lspconfig = require 'mason-lspconfig'
mason_lspconfig.setup {
ensure_installed = vim.tbl_keys(servers),
}
mason_lspconfig.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name],
filetypes = (servers[server_name] or {}).filetypes,
}
end,
}
local nvim_lsp = require('lspconfig')
-- Configure JDTLS with completion disabled
nvim_lsp.jdtls.setup {
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = false,
}
}
}
}
}
-- My Keymaps
vim.opt.clipboard = 'unnamedplus'
-- HJKL Remap
-- normal mode
vim.api.nvim_set_keymap('n', 'i', 'k', { noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'k', 'j', { noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'j', 'h', { noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'h', 'i', { noremap = true, silent = true})
-- visual mode
vim.api.nvim_set_keymap('v', 'i', 'k', { noremap = true, silent = true})
vim.api.nvim_set_keymap('v', 'k', 'j', { noremap = true, silent = true})
vim.api.nvim_set_keymap('v', 'j', 'h', { noremap = true, silent = true})
vim.api.nvim_set_keymap('v', 'h', 'i', { noremap = true, silent = true})
-- operator pending mode
vim.api.nvim_set_keymap('o', 'i', 'k', { noremap = true, silent = true})
vim.api.nvim_set_keymap('o', 'k', 'j', { noremap = true, silent = true})
vim.api.nvim_set_keymap('o', 'j', 'h', { noremap = true, silent = true})
vim.api.nvim_set_keymap('o', 'h', 'i', { noremap = true, silent = true})
-- vim.api.nvim_set_keymap('i', '<C-k>', '<down>', { noremap = true, silent = true})
-- Goto start of line
vim.api.nvim_set_keymap('n', '#', '_', { noremap = true, silent = true})
-- Switch buffers
vim.api.nvim_set_keymap('n', '<leader><Tab>', ':bnext<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader><S-Tab>', ':bprev<CR>', { noremap = true, silent = true })
-- [[ Configure nvim-cmp ]]
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
require('luasnip.loaders.from_vscode').lazy_load()
-- Custom function to handle Esc key in insert mode
function close_completion_or_escape()
if cmp.visible() then
cmp.close()
else
return vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<Esc>", true, true, true), "n", true)
end
end
-- Map <Esc> in insert mode to call the custom function
vim.api.nvim_set_keymap('i', '<Esc>', '<Cmd>lua close_completion_or_escape()<CR>', { noremap = true, expr = false, silent = true })
luasnip.config.setup {}
luasnip.config.set_config({
region_check_events = 'InsertEnter',
delete_check_events = 'InsertLeave'
})
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = {
completeopt = 'menu,menuone,noinsert',
},
mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {},
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm { select = true }
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
-- if cmp.visible() then
-- cmp.select_next_item()
-- elseif luasnip.expand_or_locally_jumpable() then
-- luasnip.expand_or_jump()
-- else
-- fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
},
}
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View file

@ -0,0 +1,142 @@
---Opens a floating windo
---@param buf? integer buffer-ID of buffer to put in thw window
---@param w_percent? decimal width of floating window will be this * full width
---@param h_percent? decimal height of floating window will be this * full height
---@param opts any options to pass to nvim_open_win
local function open_floating_win(buf, w_percent, h_percent, opts)
buf = buf or vim.api.nvim_create_buf(true, false)
w_percent = w_percent or 0.8
h_percent = h_percent or 0.8
local default_opts = {
relative = 'editor',
row = (vim.o.lines - vim.o.lines * h_percent)/2,
col = (vim.o.columns - vim.o.columns * w_percent)/2,
width = math.floor(vim.o.columns * w_percent),
height = math.floor(vim.o.lines * h_percent),
style = 'minimal',
border = 'rounded'
}
opts = vim.tbl_deep_extend('force', default_opts, opts or {})
vim.api.nvim_open_win(buf, true, opts)
end
---@class TermState
---@field bufs integer[]
---@field last_used integer[]
---@field curr_buf_index integer
---@field win integer
local term_state = {
bufs = { -1, -1, -1, -1 },
last_used = { 1, 2, 3, 4 },
curr_buf_index = 1,
win = -1,
}
vim.api.nvim_create_user_command('Floaterminal', function(args_table)
local is_new = false
if args_table.args ~= '' then
local operation = args_table.args
if operation == 'next' then
term_state.curr_buf_index = term_state.curr_buf_index + 1
if term_state.curr_buf_index > 4 then
term_state.curr_buf_index = 1
end
elseif operation == 'prev' then
term_state.curr_buf_index = term_state.curr_buf_index - 1
if term_state.curr_buf_index < 1 then
term_state.curr_buf_index = 4
end
else
error('invalid argument, use next or prev')
end
if not vim.api.nvim_buf_is_valid(term_state.bufs[term_state.curr_buf_index]) then
term_state.bufs[term_state.curr_buf_index] = vim.api.nvim_create_buf(true, false)
is_new = true
end
for index, value in ipairs(term_state.last_used) do
if value == term_state.curr_buf_index then
table.remove(term_state.last_used, index)
break
end
end
table.insert(term_state.last_used, 1, term_state.curr_buf_index)
vim.api.nvim_set_current_buf(term_state.bufs[term_state.curr_buf_index])
else
for _ = 1, 4 do
if not vim.api.nvim_buf_is_valid(term_state.bufs[term_state.last_used[1]]) then
local invalid_buf_index = table.remove(term_state.last_used, 1)
table.insert(term_state.last_used, 4, invalid_buf_index)
end
end
if not vim.api.nvim_buf_is_valid(term_state.bufs[term_state.last_used[1]]) then
term_state.bufs[term_state.last_used[1]] = vim.api.nvim_create_buf(true, false)
is_new = true
end
open_floating_win(term_state.bufs[term_state.last_used[1]])
term_state.win = vim.api.nvim_get_current_win()
end
if is_new then
vim.cmd.term()
end
if vim.api.nvim_get_mode().mode == 'nt' then
vim.api.nvim_feedkeys('a', 'n', true)
end
end, { nargs = '?', desc = 'open the floaterminaaal' })
-- local oil_buf = -1
--
-- vim.api.nvim_create_user_command('Floateroil', function()
-- local is_new = false
-- if not vim.api.nvim_buf_is_valid(oil_buf) then
-- oil_buf = vim.api.nvim_create_buf(true, false)
-- is_new = true
-- end
--
-- open_floating_win(oil_buf)
-- if is_new then
-- vim.cmd('Oil')
-- end
--
-- end, { desc = 'open the floateroil' })
local dev_log_buf = -1
vim.api.nvim_create_user_command('FloutterLog', function (args)
local name = args.args
if not vim.api.nvim_buf_is_valid(dev_log_buf) then
dev_log_buf = vim.api.nvim_create_buf(true, false)
vim.api.nvim_buf_set_name(dev_log_buf, name)
end
vim.keymap.set('n', '<F27>', '<cmd>q<CR>', { desc = 'close dev log', buffer = dev_log_buf })
open_floating_win(dev_log_buf)
-- AutoScroll Logic
local lines = vim.api.nvim_buf_line_count(dev_log_buf)
local cursor = vim.api.nvim_win_get_cursor(0)[1]
vim.api.nvim_create_autocmd('TextChanged', {
buffer = dev_log_buf,
callback = function ()
cursor = vim.api.nvim_win_get_cursor(0)[1]
if cursor == lines then
vim.cmd('normal! G')
end
lines = vim.api.nvim_buf_line_count(dev_log_buf)
end
})
end, { desc = 'flutter dev log floating', nargs = 1 })

166
.config/rofi/color.rasi Normal file
View file

@ -0,0 +1,166 @@
* {
//active-background: {color2};
active-foreground: @foreground;
normal-background: @background;
normal-foreground: @foreground;
//urgent-background: {color1};
urgent-foreground: @foreground;
alternate-active-background: @background;
alternate-active-foreground: @foreground;
alternate-normal-background: @background;
alternate-normal-foreground: @foreground;
alternate-urgent-background: @background;
alternate-urgent-foreground: @foreground;
//selected-active-background: {color1};
selected-active-foreground: @foreground;
//selected-normal-background: {color2};
selected-normal-foreground: @foreground;
//selected-urgent-background: {color3};
selected-urgent-foreground: @foreground;
background-color: @background;
background: rgba(0,0,0,0.7);
//foreground: {foreground};
border-color: @background;
spacing: 2;
}
#window {
background-color: @background;
border: 0;
padding: 2.5ch;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 2px 0px 0px;
border-color: @border-color;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em;
text-color: @normal-foreground;
}
#listview {
fixed-height: 0;
border: 2px 0px 0px;
border-color: @border-color;
spacing: 2px;
scrollbar: true;
padding: 2px 0px 0px;
}
#element {
border: 0;
padding: 1px;
}
#element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
#element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
#element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
#element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
#scrollbar {
width: 4px;
border: 0;
handle-width: 8px;
padding: 0;
}
#sidebar {
border: 2px 0px 0px;
border-color: @border-color;
}
#button {
text-color: @normal-foreground;
}
#button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 1px;
}
#case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
#entry {
spacing: 0;
text-color: @normal-foreground;
}
#prompt {
spacing: 0;
text-color: @normal-foreground;
}

107
.config/rofi/config.rasi Normal file
View file

@ -0,0 +1,107 @@
configuration {
kb-remove-to-eol: "";
kb-row-up: "Control+i";
kb-row-down: "Control+k";
}
* {
font: "HackNerdFont 13";
g-spacing: 10px;
g-margin: 0;
b-color: #000000FF;
fg-color: #FFFFFFFF;
fgp-color: #888888FF;
b-radius: 8px;
g-padding: 8px;
hl-color: #FFFFFFFF;
hlt-color: #000000FF;
alt-color: #111111FF;
wbg-color: #000000CC;
w-border: 2px solid;
w-border-color: #FFFFFFFF;
w-padding: 12px;
}
configuration {
modi: "drun";
show-icons: true;
display-drun: "";
}
listview {
columns: 1;
lines: 12;
fixed-height: true;
fixed-columns: true;
cycle: false;
scrollbar: false;
border: 0px solid;
}
window {
transparency: "real";
width: 450px;
border-radius: @b-radius;
background-color: @wbg-color;
border: @w-border;
border-color: #88B1C7;
padding: @w-padding;
}
prompt {
text-color: @fg-color;
}
inputbar {
children: ["prompt", "entry"];
spacing: @g-spacing;
}
entry {
placeholder: "Search Apps";
text-color: @fg-color;
placeholder-color: @fgp-color;
}
mainbox {
spacing: @g-spacing;
margin: @g-margin;
padding: @g-padding;
children: ["inputbar", "listview", "message"];
}
element {
spacing: @g-spacing;
margin: @g-margin;
padding: @g-padding;
border: 0px solid;
border-radius: @b-radius;
border-color: @b-color;
background-color: transparent;
text-color: @fg-color;
}
element normal.normal {
background-color: transparent;
text-color: @fg-color;
}
element alternate.normal {
background-color: @alt-color;
text-color: @fg-color;
}
element selected.active {
background-color: #1793d1;
text-color: @hlt-color;
}
element selected.normal {
background-color: #1793d1;
text-color: @hlt-color;
}
message {
background-color: red;
border: 0px solid;
}

101
.config/rofi/config1.rasi Normal file
View file

@ -0,0 +1,101 @@
* {
font: "HackNerdFont-Regular 13";
g-spacing: 10px;
g-margin: 0;
b-color: #000000FF;
fg-color: #FFFFFFFF;
fgp-color: #888888FF;
b-radius: 8px;
g-padding: 8px;
hl-color: #FFFFFFFF;
hlt-color: #000000FF;
alt-color: #111111FF;
wbg-color: #000000CC;
w-border: 2px solid;
w-border-color: #FFFFFFFF;
w-padding: 12px;
}
configuration {
modi: "drun";
show-icons: true;
display-drun: "";
}
listview {
columns: 1;
lines: 12;
fixed-height: true;
fixed-columns: true;
cycle: false;
scrollbar: false;
border: 0px solid;
}
window {
transparency: "real";
width: 450px;
border-radius: @b-radius;
background-color: @wbg-color;
border: @w-border;
border-color: @w-border-color;
padding: @w-padding;
}
prompt {
text-color: @fg-color;
}
inputbar {
children: ["prompt", "entry"];
spacing: @g-spacing;
}
entry {
placeholder: "Search Apps";
text-color: @fg-color;
placeholder-color: @fgp-color;
}
mainbox {
spacing: @g-spacing;
margin: @g-margin;
padding: @g-padding;
children: ["inputbar", "listview", "message"];
}
element {
spacing: @g-spacing;
margin: @g-margin;
padding: @g-padding;
border: 0px solid;
border-radius: @b-radius;
border-color: @b-color;
background-color: transparent;
text-color: @fg-color;
}
element normal.normal {
background-color: transparent;
text-color: @fg-color;
}
element alternate.normal {
background-color: @alt-color;
text-color: @fg-color;
}
element selected.active {
background-color: @hl-color;
text-color: @hlt-color;
}
element selected.normal {
background-color: @hl-color;
text-color: @hlt-color;
}
message {
background-color: red;
border: 0px solid;
}

76
.config/rofi/config2.rasi Normal file
View file

@ -0,0 +1,76 @@
* {
}
configuration {
/* modes: "window,drun,run,ssh";*/
font: "HackNerdFont 12";
show-icons: true;
hover-select: true;
no-steal-focus: false;
eh: 2;
matching: "prefix";
display-drun: " ";
timeout {
action: "kb-cancel";
delay: 0;
}
filebrowser {
directories-first: true;
sorting-method: "name";
}
}
listview {
lines: 12;
scrollbar: false;
cycle: false;
}
window {
width: 450px;
height: 575px;
border-radius: 10px;
background-color: #000000;
}
prompt {
text-color: #FFFFFF;
}
inputbar {
children: ["prompt", "entry"];
}
entry {
placeholder: "Search Apps";
text-color: #FFFFFF;
}
mainbox {
padding: 5px;
children: ["inputbar", "listview", "message"];
}
element {
margin: 5px;
border-radius: 10px;
}
element normal.normal {
background-color: #1E1E1E;
text-color: #FFFFFF;
}
element alternate.normal {
background-color: #111111;
text-color: #FFFFFF;
}
element selected.active {
background-color: #1793d1;
text-color: #FFFFFF;
}
element selected.normal {
background-color: #1793d1;
text-color: #FFFFFF;
}

246
.config/rofi/werid.rasi Normal file
View file

@ -0,0 +1,246 @@
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
/* Main Config (main) */
/* ---- Configuration ---- */
configuration {
modi: "drun,run,filebrowser";
font: "Fira Code SemiBold 12";
show-icons: true;
display-drun: "";
display-run: "";
display-filebrowser: "";
display-window: "󱂬";
drun-display-format: "{name}";
hover-select: true;
me-select-entry: "MouseSecondary";
me-accept-entry: "MousePrimary";
window-format: "{w} · {c} · {t}";
dpi: 1;
}
/* ---- Load pywal colors (custom wal template) ---- */
@import "~/.config/rofi/color.rasi"
/* ---- Window ---- */
window {
width: 600px;
/*height: 450px;*/
x-offset: 0px;
y-offset: 0px;
spacing: 0px;
padding: 1px;
margin: 0px;
border: 2px;
border-color: @active-background;
cursor: "default";
location: center;
anchor: center;
fullscreen: false;
enabled: true;
border-radius: 12px;
background-image: url("~/.config/rofi/.current_wallpaper", height);
}
/* ---- Mainbox ---- */
mainbox {
enabled: true;
orientation: vertical;
padding: 8px;
background-color: transparent;
children: [ "inputbar", "imagebox" ];
border-radius: 12px;
}
/* ---- Imagebox ---- */
imagebox {
background-color: transparent;
orientation: horizontal;
children: [ "mode-switcher", "listbox"];
}
/* ---- Listbox ---- */
listbox {
spacing: 4px;
orientation: vertical;
children: ["listview" ];
padding: 6px;
border-radius: 12px;
border: 1px;
border-color: @active-background;
background-color: @background;
}
/* ---- Dummy ---- */
dummy {
background-color: transparent;
}
/* ---- Inputbar ---- */
inputbar {
enabled: true;
text-color: @foreground;
spacing: 10px;
border-radius: 12px;
border-color: @foreground;
background-color: @background;
children: [ "textbox-prompt-colon","entry" ];
border: 1px;
border-color: @active-background;
}
textbox-prompt-colon {
enabled: true;
padding: 6px 0px 6px 10px;
expand: false;
str: "🐧";
text-color: inherit;
background-color: transparent;
}
entry {
enabled: true;
padding: 6px 0px 0px 0px;
text-color: inherit;
cursor: text;
placeholder: "Search (ctrl tab to choose mode)";
placeholder-color: inherit;
background-color: transparent;
}
/* ---- Mode Switcher ---- */
mode-switcher{
orientation: vertical;
enabled: true;
spacing: 12px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 0px 12px 0px 8px;
border-radius: 12px;
background-color: @background;
text-color: inherit;
cursor: pointer;
border: 1px;
border-color: @active-background;
}
button selected {
background-color: @selected-normal-background;
text-color: @foreground;
border: 1px;
border-color: @background;
}
/* ---- Listview ---- */
listview {
enabled: true;
columns: 2;
lines: 5;
spacing: 2px;
padding: 6px;
dynamic: true;
cycle: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: false;
background-color: transparent;
border-radius: 12px;
border: 0px;
}
/* ---- Element ---- */
element {
enabled: true;
padding: 5px;
margin: 2px;
cursor: pointer;
background-color: transparent;
border-radius: 12px;
border: 0px;
}
element normal.normal {
background-color: inherit;
text-color: @foreground;
}
element normal.urgent {
background-color: inherit;
text-color: @foreground;
}
element normal.active {
background-color: inherit;
text-color: @foreground;
}
element selected.normal {
background-color: @selected-normal-background;
text-color: @foreground;
}
element selected.urgent {
background-color: inherit;
text-color: @foreground;
}
element selected.active {
background-color: inherit;
text-color: @foreground;
}
element alternate.normal {
background-color: inherit;
text-color: @foreground;
}
element alternate.urgent {
background-color: inherit;
text-color: @foreground;
}
element alternate.active {
background-color: inherit;
text-color: @foreground;
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 32px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0;
}
/*****----- Message -----*****/
message {
background-color: @background;
margin: 20px 0px 0px 0px;
border-radius: 12px;
}
textbox {
padding: 10px;
background-color: @background;
text-color: @foreground;
}
error-message {
padding: 15px;
border-radius: 12px;
background-color: @background;
text-color: @foreground;
}

46
.config/starship.toml Normal file
View file

@ -0,0 +1,46 @@
add_newline = false
format = """
\
[](#3B4252)\
$os\
[ ](bg:#1793d1 fg:#3B4252)\
$username\
[ ](bg:#3B4252 fg:#1793d1)\
$directory\
[ ](bg:#33658A fg:#3B4252)\
$git_branch\
[](fg:#33658A) \
"""
# format = """$os$username$directory$git_branch"""
[character]
success_symbol = ''
error_symbol = ''
[os]
format = '[$symbol]($style)'
style = 'fg:#1793d1 bg:#3B4252'
disabled = false
[os.symbols]
Arch = "󰣇 "
# Shows the username
[username]
style_root = "bg:#1793d1 fg:#800000 bold"
style_user = "bg:#1793d1 fg:#ffffff"
format = '[$user ]($style)'
disabled = false
show_always = true
[directory]
home_symbol = '󰋜 ~'
read_only_style = 'bg:#3B4252 fg:#FB0202'
read_only = ' '
style = '#00B1D4 bg:#3B4252'
format = '[$path ]($style)[$read_only]($read_only_style)'
[git_branch]
format = '[$symbol $branch ]($style)'
symbol = ''
style = 'fg:#00fff2 bg:#33658A bold'

View file

@ -0,0 +1,93 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"layer": "overlay",
"control-center-layer": "top",
"layer-shell": true,
"layer-shell-cover-screen": true,
"cssPriority": "application",
"control-center-margin-top": 20,
"control-center-margin-bottom": 400,
"control-center-margin-right": 20,
"control-center-margin-left": 0,
"notification-2fa-action": true,
"notification-inline-replies": false,
"notification-icon-size": 64,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": true,
"relative-timestamps": true,
"control-center-width": 500,
"control-center-height": 600,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 200,
"hide-on-clear": false,
"hide-on-action": true,
"text-empty": "No Notifications",
"script-fail-notify": true,
"scripts": {
"example-script": {
"exec": "echo 'Do something...'",
"urgency": "Normal"
},
"example-action-script": {
"exec": "echo 'Do something actionable!'",
"urgency": "Normal",
"run-on": "action"
}
},
"notification-visibility": {
"example-name": {
"state": "muted",
"urgency": "Low",
"app-name": "Spotify"
}
},
"widgets": [
"inhibitors",
"title",
"dnd",
"notifications"
],
"widget-config": {
"inhibitors": {
"text": "Inhibitors",
"button-text": "Clear All",
"clear-all-button": true
},
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 5,
"text": "Label Text"
},
"mpris": {
"image-size": 96,
"image-radius": 12,
"blacklist": []
},
"buttons-grid": {
"actions": [
{
"label": "直",
"type": "toggle",
"active": true,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'",
"update-command": "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'"
}
]
}
}
}

View file

@ -0,0 +1,42 @@
// __ __ _
// \ \ / /_ _ _ _| |__ __ _ _ __
// \ \ /\ / / _` | | | | '_ \ / _` | '__|
// \ V V / (_| | |_| | |_) | (_| | |
// \_/\_/ \__,_|\__, |_.__/ \__,_|_|
// |___/
//
//
// -----------------------------------------------------
//
{
// General Settings
// Load Modules
"include": ["~/.config/waybar/modules.jsonc"],
// Modules Left
"modules-left": [
"custom/arch",
"hyprland/workspaces",
"wlr/taskbar",
"hyprland/window"
],
// Modules Center
"modules-center": [
"clock"
],
// Modules Right
"modules-right": [
"hyprland/language",
"custom/notification",
"keyboard-state",
"pulseaudio",
"battery",
"network"
]
}

View file

@ -0,0 +1,148 @@
// __ __ _ _
// | \/ | ___ __| |_ _| | ___ ___
// | |\/| |/ _ \ / _` | | | | |/ _ \/ __|
// | | | | (_) | (_| | |_| | | __/\__ \
// |_| |_|\___/ \__,_|\__,_|_|\___||___/
//
//
//
// -----------------------------------------------------
//
{
// Workspaces
"hyprland/workspaces" : {
"on-click": "activate",
"active-only": false,
"all-outputs": true,
"format": "{}",
"format-icons": {
"urgent": "",
"active": "",
"default": ""
},
"persistent-workspaces": {
"*": 3
}
},
// Taskbar
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 18,
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"thunderbird",
"com.rtosta.zapzap"
]
},
// Hyprland Window
"hyprland/window": {
"separate-outputs": true
},
"custom/arch": {
"format": "󰣇",
"on-click": "~/dotfiles/scripts/changeWallpaper.sh",
"tooltip": false
},
// Keyboard Layout
"hyprland/language": {
"format": "{short}"
},
// Keyboard State
"keyboard-state": {
"numlock": true,
"capslock": false,
"format": {
"numlock": "{icon}"
},
"format-icons": {
"locked": "󰎦",
"unlocked": ""
},
"interval": 0.1
},
// Clock
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
// START CLOCK FORMAT
"format": "{:%d %b - %I:%M %p}"
// END CLOCK FORMAT
},
// Network
"network": {
"format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"],
"format-wifi": "{icon} {signalStrength}%",
"format-ethernet": "󰈁 {ifname}",
"format-disconnected": "󰤭",
"tooltip-format-wifi": "{essid}",
"max-length": 50,
"on-click": "kitty nmtui",
"interval": 5
},
// Battery
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 25
},
"interval": 5,
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% 󰂄",
"format-plugged": "{capacity}% 󰂄",
"format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
// Pulseaudio
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{icon}{volume}%",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": "󰝟 {volume}%",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": " ",
"phone": "",
"portable": "",
"car": "",
"default": ["󰕿 ", "󰖀 ", "󰕾 "]
},
"on-click": "pavucontrol"
},
"custom/notification": {
"tooltip": false,
"format": "{icon}",
"format-icons": {
"notification": "<span foreground='red'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='red'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
}
}

298
.config/waybar/style.css Normal file
View file

@ -0,0 +1,298 @@
/*
* __ __ _ ____ _ _
* \ \ / /_ _ _ _| |__ __ _ _ __ / ___|| |_ _ _| | ___
* \ \ /\ / / _` | | | | '_ \ / _` | '__| \___ \| __| | | | |/ _ \
* \ V V / (_| | |_| | |_) | (_| | | ___) | |_| |_| | | __/
* \_/\_/ \__,_|\__, |_.__/ \__,_|_| |____/ \__|\__, |_|\___|
* |___/ |___/
*
* by Stephan Raabe (2023)
* -----------------------------------------------------
*/
/* -----------------------------------------------------
* Import Pywal colors
* ----------------------------------------------------- */
/* @import 'style-light.css'; */
/* -----------------------------------------------------
* General
* ----------------------------------------------------- */
* {
font-family: HackNerdFont-Regular;
border: none;
}
window#waybar {
background-color: rgba(0,0,0,0.8);
border-bottom: 0px solid #ffffff;
/* color: #FFFFFF; */
background: transparent;
transition-property: background-color;
transition-duration: .5s;
}
#custom-arch{
font-size: 30px;
margin-left: 10px;
margin-right: 5px;
color: #1793d1;
}
/* -----------------------------------------------------
* Workspaces
* ----------------------------------------------------- */
#workspaces {
/* background: white; */
margin: 2px 10px 3px 10px;
padding: 0px 0px;
border-radius: 15px;
border: 0px;
font-size: 10px;
color: white;
font-size: 16px;
}
#workspaces button {
padding: 0px 5px;
margin: 4px 3px;
border-radius: 15px;
border: 0px;
transition: all 0.3s ease-in-out;
}
#workspaces button.active {
background: #1793d1;
border-radius: 15px;
min-width: 40px;
transition: all 0.3s ease-in-out;
}
#workspaces button:hover {
min-width: 40px;
}
/* -----------------------------------------------------
* Tooltips
* ----------------------------------------------------- */
tooltip {
border-radius: 10px;
opacity:0.8;
padding:0px;
margin:0px;
}
tooltip label {
color: white;
}
/* -----------------------------------------------------
* Window
* ----------------------------------------------------- */
#window {
margin: 5px 15px 5px 0px;
padding: 2px 10px 0px 10px;
border-radius: 12px;
font-size:16px;
font-weight:normal;
opacity:0.8;
}
window#waybar.empty #window {
background-color:transparent;
}
/* -----------------------------------------------------
* Taskbar
* ----------------------------------------------------- */
#taskbar {
margin: 3px 15px 3px 0px;
padding:0px;
border-radius: 15px;
font-weight: normal;
font-style: normal;
opacity:0.8;
border:3px solid white;
}
#taskbar button {
margin:0;
border-radius: 15px;
padding: 0px 5px 0px 5px;
}
/* -----------------------------------------------------
* Modules
* ----------------------------------------------------- */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
/* -----------------------------------------------------
* Custom Exit
* ----------------------------------------------------- */
#custom-exit {
margin: 0px 20px 0px 0px;
padding:0px;
font-size:16px;
}
/* -----------------------------------------------------
* Custom Updates
* ----------------------------------------------------- */
#custom-updates {
font-size: 16px;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 5px 15px 5px 0px;
opacity:0.8;
}
#custom-updates.green {
}
#custom-updates.yellow {
background-color: #ff9a3c;
color: #FFFFFF;
}
#custom-updates.red {
background-color: #dc2f2f;
color: #FFFFFF;
}
/* -----------------------------------------------------
* Clock
* ----------------------------------------------------- */
#clock {
font-size: 16px;
border-radius: 15px;
padding: 1px 10px 0px 10px;
margin: 3px 15px 3px 0px;
opacity:0.8;
border:3px solid white;
}
/* -----------------------------------------------------
* Language
* ----------------------------------------------------- */
#language{
margin-right: 15px;
}
/* -----------------------------------------------------
* KeyBoard State
* ----------------------------------------------------- */
#keyboard-state {
margin-right: 10px;
margin-left: 10px;
font-size: 20px;
}
/* -----------------------------------------------------
* Notifications
* ----------------------------------------------------- */
#custom-notification {
padding-right: 10px;
font-size: 16px;
}
/* -----------------------------------------------------
* Pulseaudio
* ----------------------------------------------------- */
#pulseaudio {
font-size: 16px;
border-radius: 15px;
padding: 0px;
margin: 0px 10px 0px 0px;
opacity:0.8;
}
#pulseaudio.muted {
}
/* -----------------------------------------------------
* Network
* ----------------------------------------------------- */
#network {
font-size: 16px;
border-radius: 15px;
padding: 0px;
margin: 0px 10px 0px 0px;
opacity:0.8;
}
#network.ethernet {
}
#network.wifi {
}
/* -----------------------------------------------------
* Bluetooth
* ----------------------------------------------------- */
#bluetooth, #bluetooth.on, #bluetooth.connected {
font-size: 16px;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 5px 10px 5px 0px;
opacity:0.8;
}
#bluetooth.off {
background-color: transparent;
padding: 0px;
margin: 0px;
}
/* -----------------------------------------------------
* Battery
* ----------------------------------------------------- */
#battery {
font-size: 16px;
border-radius: 15px;
padding: 0px;
margin: 0px 10px 0px 0px;
opacity:0.8;
}
#battery.charging, #battery.plugged {
}
@keyframes blink {
to {
background-color: @backgroundlight;
color: @textcolor2;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}

137
.config/zed/keymap.json Normal file
View file

@ -0,0 +1,137 @@
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"bindings": {
"ctrl-o": "file_finder::Toggle",
"ctrl-shift-o": "workspace::Open",
"ctrl-m": "workspace::ToggleRightDock",
"ctrl-l": "terminal_panel::ToggleFocus",
"ctrl-e": "project_panel::ToggleFocus",
"ctrl-g": "assistant::ToggleFocus"
}
},
{
"context": "EmptyPane",
"bindings": {
}
},
{
"context": "FileFinder && menu_open",
"bindings": {
"j": "pane::SplitLeft",
"i": "pane::SplitUp",
"k": "pane::SplitDown"
}
},
{
"context": "Editor",
"bindings": {
"ctrl-i": ["workspace::SendKeystrokes", "up"],
"ctrl-k": ["workspace::SendKeystrokes", "down"],
"ctrl-w": "pane::CloseActiveItem",
"ctrl-shift-i": "editor::AddSelectionAbove",
"ctrl-shift-k": "editor::AddSelectionBelow"
}
},
{
"context": "Terminal",
"bindings": {
"ctrl-w": "pane::CloseActiveItem",
"ctrl-n": "workspace::NewTerminal",
"ctrl-i": ["workspace::SendKeystrokes", "up"],
"ctrl-k": ["workspace::SendKeystrokes", "down"],
"ctrl-l": null,
"ctrl-j": "terminal_panel::ToggleFocus"
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
"i": ["workspace::SendKeystrokes", "up"],
"k": ["workspace::SendKeystrokes", "down"],
"j": ["workspace::SendKeystrokes", "left"],
"l": ["workspace::SendKeystrokes", "right"],
"n": "project_panel::NewFile",
"shift-n": "project_panel::NewDirectory",
"d": "project_panel::Delete",
"o": "project_panel::RevealInFileManager",
"x": "project_panel::Cut",
"c": "project_panel::Copy",
"p": "project_panel::Paste"
}
},
{
"context": "ProjectPanel",
"bindings": {
"ctrl-j": "project_panel::ToggleFocus",
"ctrl-m": "workspace::ToggleRightDock",
"ctrl-e": null
}
},
{
"context": "ContextEditor > Editor", // this is AssistantPanel
"bindings": {
"ctrl-j": "assistant::ToggleFocus",
"ctrl-g": null
}
},
{
"context": "VimControl && !menu",
"bindings": {
"h": ["vim::PushObject", { "around": false }],
"i": "vim::Up",
"j": "vim::Left",
"k": "vim::Down",
"tab": ["workspace::SendKeystrokes", "> >"],
"shift-tab": ["workspace::SendKeystrokes", "< <"],
"ctrl-d": ["workspace::SendKeystrokes", "ctrl-d z z"],
"ctrl-u": ["workspace::SendKeystrokes", "ctrl-u z z"],
"#": "vim::StartOfLineDownward",
"ctrl-k ctrl-l": "workspace::ActivatePaneRight",
"ctrl-k ctrl-j": "workspace::ActivatePaneLeft",
"ctrl-k ctrl-i": "workspace::ActivatePaneUp",
"ctrl-k ctrl-k": "workspace::ActivatePaneDown",
"ctrl-space": "editor::GoToDefinitionSplit"
}
},
{
"context": "vim_mode == normal",
"bindings": {
"h": "vim::InsertBefore"
}
},
{
"context": "vim_mode == visual",
"bindings": {
"h": ["vim::PushObject", { "around": false }]
}
},
{
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
"bindings": {
"h": "vim::IndentObj"
}
},
{
"context": "ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
"bindings": {
"ctrl-w": "pane::CloseActiveItem"
}
}
]

View file

@ -0,0 +1,135 @@
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"context": "",
"bindings": {
"ctrl-o": "file_finder::Toggle",
"ctrl-shift-o": "workspace::Open",
"ctrl-m": "workspace::ToggleRightDock"
}
},
{
"context": "EmptyPane",
"bindings": {
"ctrl-l": "terminal_panel::ToggleFocus",
"ctrl-e": "project_panel::ToggleFocus",
"ctrl-g": "assistant::ToggleFocus"
}
},
{
"context": "FileFinder && menu_open",
"bindings": {
"j": "pane::SplitLeft",
"i": "pane::SplitUp",
"k": "pane::SplitDown"
}
},
{
"context": "Editor",
"bindings": {
"ctrl-i": ["workspace::SendKeystrokes", "up"],
"ctrl-k": ["workspace::SendKeystrokes", "down"],
"ctrl-w": "pane::CloseActiveItem",
"ctrl-shift-i": "editor::AddSelectionAbove",
"ctrl-shift-k": "editor::AddSelectionBelow",
"ctrl-l": "terminal_panel::ToggleFocus",
"ctrl-e": "project_panel::ToggleFocus",
"ctrl-g": "assistant::ToggleFocus"
}
},
{
"context": "Terminal",
"bindings": {
"ctrl-w": "pane::CloseActiveItem",
"ctrl-n": "workspace::NewTerminal",
"ctrl-i": ["workspace::SendKeystrokes", "up"],
"ctrl-k": ["workspace::SendKeystrokes", "down"],
"ctrl-j": "terminal_panel::ToggleFocus",
"ctrl-shift-i": null,
"ctrl-shift-k": "project_panel::ToggleFocus"
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
"i": ["workspace::SendKeystrokes", "up"],
"k": ["workspace::SendKeystrokes", "down"],
"j": ["workspace::SendKeystrokes", "left"],
"l": ["workspace::SendKeystrokes", "right"],
"n": "project_panel::NewFile",
"shift-n": "project_panel::NewDirectory",
"d": "project_panel::Delete",
"o": "project_panel::RevealInFileManager",
"x": "project_panel::Cut",
"c": "project_panel::Copy",
"p": "project_panel::Paste"
}
},
{
"context": "ProjectPanel",
"bindings": {
"ctrl-j": "project_panel::ToggleFocus",
"ctrl-shift-i": "terminal_panel::ToggleFocus",
"ctrl-shift-k": "assistant::ToggleFocus",
"ctrl-w": "workspace::ToggleRightDock"
}
},
{
"context": "VimControl && !menu",
"bindings": {
"h": ["vim::PushObject", { "around": false }],
"i": "vim::Up",
"j": "vim::Left",
"k": "vim::Down",
"tab": ["workspace::SendKeystrokes", "> >"],
"shift-tab": ["workspace::SendKeystrokes", "< <"],
"ctrl-d": ["workspace::SendKeystrokes", "ctrl-d z z"],
"ctrl-u": ["workspace::SendKeystrokes", "ctrl-u z z"],
"#": "vim::StartOfLineDownward",
// "ctrl-shift-l": ["workspace::ActivatePaneInDirection", "Right"],
// "ctrl-shift-j": ["workspace::ActivatePaneInDirection", "Left"],
// "ctrl-shift-i": ["workspace::ActivatePaneInDirection", "Up"],
// "ctrl-shift-k": ["workspace::ActivatePaneInDirection", "Down"]
}
},
{
"context": "vim_mode == normal",
"bindings": {
"h": "vim::InsertBefore"
}
},
{
"context": "vim_mode == visual",
"bindings": {
"h": ["vim::PushOperator", { "Object": { "around": false } }]
}
},
{
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
"bindings": {
"h": "vim::IndentObj"
}
},
{
"context": "ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
"bindings": {
"ctrl-w": "pane::CloseActiveItem"
}
}
]

85
.config/zed/settings.json Normal file
View file

@ -0,0 +1,85 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"use_on_type_format": false,
"git_panel": {
"dock": "right"
},
"chat_panel": {
"dock": "left"
},
"languages": {
"JSONC": {
"show_edit_predictions": false
}
},
"show_edit_predictions": false,
"assistant": {
"default_profile": "minimal",
"default_model": {
"provider": "copilot_chat",
"model": "claude-3.7-sonnet"
},
"version": "2"
},
"terminal": {
"dock": "right",
"default_width": 550
// "detect_venv": {
// "on": {
// "directories": ["venv", "env"],
// "activate_script": "default"
// }
// }
},
"project_panel": {
"dock": "right"
},
"base_keymap": "VSCode",
"telemetry": {
"metrics": false,
"diagnostics": false
},
"vim_mode": true,
"ui_font_size": 16,
"buffer_font_size": 16.0,
"theme": {
"mode": "system",
"light": "VSCode Dark Modern",
"dark": "VSCode Dark Modern"
},
"buffer_font_family": "Hack Nerd Font",
"ui_font_family": "Hack Nerd Font",
"toolbar": {
"breadcrumbs": false
},
"scrollbar": {
"show": "never"
},
"tabs": {
"git_status": true,
"file_icons": true
},
"format_on_save": "off",
"vim": {
"toggle_relative_line_numbers": true
},
"diagnostics": {
"inline": {
"enabled": true
}
}
}

View file

@ -0,0 +1,78 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"git_panel": {
"dock": "right"
},
"chat_panel": {
"dock": "left"
},
"languages": {
"JSONC": {
"show_inline_completions": false
}
},
"show_inline_completions": false,
"assistant": {
"default_model": {
"provider": "copilot_chat",
"model": "o1"
},
"version": "2"
},
"terminal": {
"dock": "right",
"default_width": 550
// "detect_venv": {
// "on": {
// "directories": ["venv", "env"],
// "activate_script": "default"
// }
// }
},
"project_panel": {
"dock": "right"
},
"base_keymap": "VSCode",
"telemetry": {
"metrics": false,
"diagnostics": false
},
"vim_mode": true,
"ui_font_size": 16,
"buffer_font_size": 15.0,
"theme": {
"mode": "system",
"light": "VSCode Dark Modern",
"dark": "VSCode Dark Modern"
},
"buffer_font_family": "Hack Nerd Font",
"ui_font_family": "Hack Nerd Font",
"toolbar": {
"breadcrumbs": false
},
"scrollbar": {
"show": "never"
},
"tabs": {
"git_status": true,
"file_icons": true
},
"format_on_save": "off",
"vim": {
"toggle_relative_line_numbers": true
}
}

37
.gitignore vendored Normal file
View file

@ -0,0 +1,37 @@
.config/**
!.config/nvim
!.config/nvim/**
!.config/fastfetch
!.config/fastfetch/**
!.config/fontconfig
!.config/fontconfig/**
!.config/kitty
!.config/kitty/**
!.config/lf
!.config/lf/**
!.config/rofi
!.config/rofi/**
!.config/starship.toml
!.config/hypr
!.config/hypr/**
!.config/swaync
!.config/swaync/**
!.config/waybar
!.config/waybar/**
!.config/eww
!.config/eww/**
!.config/zed
!.config/zed/**

15
.gitignore1 Normal file
View file

@ -0,0 +1,15 @@
.config/discord/
.config/ZapZap
.config/cef_user_data
.config/eog
.config/libreoffice/4/user
.config/vlc
.config/clipse/tmp_files
.config/clipse/clipboard_history.json
.config/chromium
.config/balenaEtcher
.config/configstore
.config/github-copilot
.config/Code
.config/gh

2
README.md Normal file
View file

@ -0,0 +1,2 @@
# My Dotfiles
my dotfiles for various applications

BIN
bgs/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
bgs/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
bgs/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

37
scripts/battWarning.sh Executable file
View file

@ -0,0 +1,37 @@
#!/bin/bash
while true; do
batteryStatus=$(cat /sys/class/power_supply/BAT0/status)
batteryLevel=$(cat /sys/class/power_supply/BAT0/capacity)
currentPowerSetting=$(powerprofilesctl get)
if [ "$batteryLevel" -le "25" ] && [ "$batteryStatus" == "Discharging" ]; then
notify-send -u critical -i ~/dotfiles/scripts/battery-alert.svg "Low Battery" "25% battery remaining"
fi
if [ "$batteryLevel" -le "40" ]; then
if [ "$currentPowerSetting" != "power-saver" ]; then
powerprofilesctl set power-saver
notify-send -t 3000 "Battery Saver Turned On"
fi
elif [ "$batteryLevel" -ge "40" ] && [ "$batteryLevel" -le "75" ]; then
if [ "$currentPowerSetting" != "balanced" ]; then
powerprofilesctl set balanced
notify-send -t 3000 "Battery Saver Turned Off"
fi
elif [ "$batteryLevel" -ge "75" ] && [ "$batteryStatus" == "Charging" ] || [ "$batteryStatus" == "Full" ]; then
if [ "$currentPowerSetting" != "performance" ]; then
powerprofilesctl set performance
notify-send -t 3000 "Performance Mode Turned On"
fi
elif [ "$batteryLevel" -ge "75" ]; then
if [ "$currentPowerSetting" != "balanced" ]; then
powerprofilesctl set balanced
notify-send -t 3000 "Performance Mode Turned Off"
fi
fi
sleep 60
done

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14H11V8H13M13 18H11V16H13M16.7 4H15V2H9V4H7.3C6.6 4 6 4.6 6 5.3V20.6C6 21.4 6.6 22 7.3 22H16.6C17.3 22 17.9 21.4 17.9 20.7V5.3C18 4.6 17.4 4 16.7 4Z" /></svg>

After

Width:  |  Height:  |  Size: 231 B

22
scripts/brightnessWidget.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
while true; do
while "$(cat /home/rafayahmad/dotfiles/.config/eww/brightnessShow)"; do
activeWindows=$(/home/rafayahmad/eww/target/release/eww active-windows)
if [[ "$activeWindows" != *"brightnessWin"* ]] ; then
echo "opening"
/home/rafayahmad/eww/target/release/eww open brightnessWin
fi
echo false > /home/rafayahmad/.config/eww/brightnessShow
sleep 1
done
activeWindows=$(/home/rafayahmad/eww/target/release/eww active-windows)
if [[ "$activeWindows" == *"brightnessWin"* ]] ; then
echo "closing"
/home/rafayahmad/eww/target/release/eww close brightnessWin
fi
done

28
scripts/changeWallpaper.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
monitor="eDP-1"
currentWallpaper=$(hyprctl hyprpaper listactive)
currentWallpaper=${currentWallpaper:8}
echo "$currentWallpaper"
wallpapers=$(hyprctl hyprpaper listloaded)
set=false
for wallpaper in $wallpapers; do
echo "$wallpaper"
if $set; then
hyprctl hyprpaper wallpaper "${monitor},${wallpaper}"
set=false
fi
if [ "$wallpaper" = "$currentWallpaper" ]; then
set=true
echo yes
fi
done
if $set; then
hyprctl hyprpaper wallpaper "${monitor},/home/rafayahmad/dotfiles/bgs/1.png"
fi

View file

@ -0,0 +1,8 @@
#!/bin/bash
currentWallpaper=$(hyprctl hyprpaper listactive)
currentWallpaper=${currentWallpaper:8}
configFile=${currentWallpaper: -5:1}
configFile="/home/rafayahmad/.config/hypr/hyprlock/${configFile}.conf"
export currentWallpaper
echo "$configFile"
hyprlock -c "$configFile"

3
scripts/reloadwaybar Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/bash
killall waybar
waybar

8
scripts/startWin11.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
systemctl start libvirtd || exit 1
virsh -c qemu:///system start win11
sleep 1
virt-viewer -c qemu:///system -f win11

67
scripts/youtubeBlocker.py Executable file
View file

@ -0,0 +1,67 @@
#!/usr/bin/env python
from datetime import date
from datetime import datetime
import socket
import os
import time
from threading import Thread
import subprocess
date_format = "%Y-%m-%d"
youtube_focused = False
time_remaining = int(0)
def update_file():
with open('/home/rafayahmad/dotfiles/scripts/youtubeData', 'w') as file:
file.write(date.today().strftime(date_format))
file.write('\n')
file.write(time_remaining.__str__())
def read_file():
global time_remaining
with open('/home/rafayahmad/dotfiles/scripts/youtubeData') as file:
date_t = file.readline().strip()
date_t = datetime.strptime(date_t, date_format).date()
time_remaining = int(file.readline())
if date_t != date.today():
print('differnt date, resetting')
time_remaining = 60
update_file()
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
path = os.path.expandvars('$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock')
sock.connect(path)
def time_counter():
while True:
global time_remaining
if youtube_focused:
read_file()
if time_remaining == 0:
subprocess.run(['hyprctl', 'dispatch', 'killactive'])
subprocess.run(['notify-send', 'time\'s up buddy'])
time.sleep(1)
continue
time.sleep(60)
time_remaining -= 1
update_file()
print('Remainng Youtube Time is: ', time_remaining)
Thread(target=time_counter).start()
while True:
data = sock.recv(1024)
lines = data.decode().split('\n')
for line in lines:
if line.startswith('activewindow>>'):
print(line)
if line.__contains__('YouTube'):
youtube_focused = True
print('youtube focused')
else:
youtube_focused = False
print('youtube unfocused')

2
scripts/youtubeData Normal file
View file

@ -0,0 +1,2 @@
2025-07-26
0

10
sddm-theme/AUTHORS Normal file
View file

@ -0,0 +1,10 @@
AUTHOR(S)
Based on the original work by:
Thayer Williams
thayerw@gmail.com
http://cinderwick.ca/
Ported to SDDM by:
Guidobelix
guidobelix@hotmail.it

380
sddm-theme/COPYING Normal file
View file

@ -0,0 +1,380 @@
Creative Commons Legal Code - Attribution-ShareAlike 3.0
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
CONDITIONS.
1. Definitions
1. "Adaptation" means a work based upon the Work, or upon the Work
and other pre-existing works, such as a translation, adaptation,
derivative work, arrangement of music or other alterations of a
literary or artistic work, or phonogram or performance and includes
cinematographic adaptations or any other form in which the Work may
be recast, transformed, or adapted including in any form recognizably
derived from the original, except that a work that constitutes a
Collection will not be considered an Adaptation for the purpose of
this License. For the avoidance of doubt, where the Work is a musical
work, performance or phonogram, the synchronization of the Work in
timed-relation with a moving image ("synching") will be considered an
Adaptation for the purpose of this License.
2. "Collection" means a collection of literary or artistic works,
such as encyclopedias and anthologies, or performances, phonograms or
broadcasts, or other works or subject matter other than works listed
in Section 1(f) below, which, by reason of the selection and
arrangement of their contents, constitute intellectual creations, in
which the Work is included in its entirety in unmodified form along
with one or more other contributions, each constituting separate and
independent works in themselves, which together are assembled into a
collective whole. A work that constitutes a Collection will not be
considered an Adaptation (as defined below) for the purposes of this
License.
3. "Creative Commons Compatible License" means a license that is
listed at http://creativecommons.org/compatiblelicenses that has been
approved by Creative Commons as being essentially equivalent to this
License, including, at a minimum, because that license: (i) contains
terms that have the same purpose, meaning and effect as the License
Elements of this License; and, (ii) explicitly permits the
relicensing of adaptations of works made available under that license
under this License or a Creative Commons jurisdiction license with
the same License Elements as this License.
4. "Distribute" means to make available to the public the original
and copies of the Work or Adaptation, as appropriate, through sale or
other transfer of ownership.
5. "License Elements" means the following high-level license
attributes as selected by Licensor and indicated in the title of this
License: Attribution, ShareAlike.
6. "Licensor" means the individual, individuals, entity or entities
that offer(s) the Work under the terms of this License.
7. "Original Author" means, in the case of a literary or artistic
work, the individual, individuals, entity or entities who created the
Work or if no individual or entity can be identified, the publisher;
and in addition (i) in the case of a performance the actors, singers,
musicians, dancers, and other persons who act, sing, deliver,
declaim, play in, interpret or otherwise perform literary or artistic
works or expressions of folklore; (ii) in the case of a phonogram the
producer being the person or legal entity who first fixes the sounds
of a performance or other sounds; and, (iii) in the case of
broadcasts, the organization that transmits the broadcast.
8. "Work" means the literary and/or artistic work offered under the
terms of this License including without limitation any production in
the literary, scientific and artistic domain, whatever may be the
mode or form of its expression including digital form, such as a
book, pamphlet and other writing; a lecture, address, sermon or other
work of the same nature; a dramatic or dramatico-musical work; a
choreographic work or entertainment in dumb show; a musical
composition with or without words; a cinematographic work to which
are assimilated works expressed by a process analogous to
cinematography; a work of drawing, painting, architecture, sculpture,
engraving or lithography; a photographic work to which are
assimilated works expressed by a process analogous to photography; a
work of applied art; an illustration, map, plan, sketch or
three-dimensional work relative to geography, topography,
architecture or science; a performance; a broadcast; a phonogram; a
compilation of data to the extent it is protected as a copyrightable
work; or a work performed by a variety or circus performer to the
extent it is not otherwise considered a literary or artistic work.
9. "You" means an individual or entity exercising rights under this
License who has not previously violated the terms of this License
with respect to the Work, or who has received express permission from
the Licensor to exercise rights under this License despite a previous
violation.
10. "Publicly Perform" means to perform public recitations of the
Work and to communicate to the public those public recitations, by
any means or process, including by wire or wireless means or public
digital performances; to make available to the public Works in such a
way that members of the public may access these Works from a place
and at a place individually chosen by them; to perform the Work to
the public by any means or process and the communication to the
public of the performances of the Work, including by public digital
performance; to broadcast and rebroadcast the Work by any means
including signs, sounds or images.
11. "Reproduce" means to make copies of the Work by any means
including without limitation by sound or visual recordings and the
right of fixation and reproducing fixations of the Work, including
storage of a protected performance or phonogram in digital form or
other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
limit, or restrict any uses free from copyright or rights arising from
limitations or exceptions that are provided for in connection with the
copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License,
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
perpetual (for the duration of the applicable copyright) license to
exercise the rights in the Work as stated below:
1. to Reproduce the Work, to incorporate the Work into one or more
Collections, and to Reproduce the Work as incorporated in the
Collections;
2. to create and Reproduce Adaptations provided that any such
Adaptation, including any translation in any medium, takes reasonable
steps to clearly label, demarcate or otherwise identify that changes
were made to the original Work. For example, a translation could be
marked "The original work was translated from English to Spanish," or
a modification could indicate "The original work has been modified.";
3. to Distribute and Publicly Perform the Work including as
incorporated in Collections; and,
4. to Distribute and Publicly Perform Adaptations.
5. For the avoidance of doubt:
1. Non-waivable Compulsory License Schemes. In those
jurisdictions in which the right to collect royalties through
any statutory or compulsory licensing scheme cannot be waived,
the Licensor reserves the exclusive right to collect such
royalties for any exercise by You of the rights granted under
this License;
2. Waivable Compulsory License Schemes. In those jurisdictions
in which the right to collect royalties through any statutory
or compulsory licensing scheme can be waived, the Licensor
waives the exclusive right to collect such royalties for any
exercise by You of the rights granted under this License; and,
3. Voluntary License Schemes. The Licensor waives the right to
collect royalties, whether individually or, in the event that
the Licensor is a member of a collecting society that
administers voluntary licensing schemes, via that society, from
any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now
known or hereafter devised. The above rights include the right to make
such modifications as are technically necessary to exercise the rights
in other media and formats. Subject to Section 8(f), all rights not
expressly granted by Licensor are hereby reserved.
4. Restrictions. The license granted in Section 3 above is expressly
made subject to and limited by the following restrictions:
1. You may Distribute or Publicly Perform the Work only under the
terms of this License. You must include a copy of, or the Uniform
Resource Identifier (URI) for, this License with every copy of the
Work You Distribute or Publicly Perform. You may not offer or impose
any terms on the Work that restrict the terms of this License or the
ability of the recipient of the Work to exercise the rights granted
to that recipient under the terms of the License. You may not
sublicense the Work. You must keep intact all notices that refer to
this License and to the disclaimer of warranties with every copy of
the Work You Distribute or Publicly Perform. When You Distribute or
Publicly Perform the Work, You may not impose any effective
technological measures on the Work that restrict the ability of a
recipient of the Work from You to exercise the rights granted to that
recipient under the terms of the License. This Section 4(a) applies
to the Work as incorporated in a Collection, but this does not
require the Collection apart from the Work itself to be made subject
to the terms of this License. If You create a Collection, upon notice
from any Licensor You must, to the extent practicable, remove from
the Collection any credit as required by Section 4(c), as requested.
If You create an Adaptation, upon notice from any Licensor You must,
to the extent practicable, remove from the Adaptation any credit as
required by Section 4(c), as requested.
2. You may Distribute or Publicly Perform an Adaptation only under
the terms of: (i) this License; (ii) a later version of this License
with the same License Elements as this License; (iii) a Creative
Commons jurisdiction license (either this or a later license version)
that contains the same License Elements as this License (e.g.,
Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible
License. If you license the Adaptation under one of the licenses
mentioned in (iv), you must comply with the terms of that license. If
you license the Adaptation under the terms of any of the licenses
mentioned in (i), (ii) or (iii) (the "Applicable License"), you must
comply with the terms of the Applicable License generally and the
following provisions: (I) You must include a copy of, or the URI for,
the Applicable License with every copy of each Adaptation You
Distribute or Publicly Perform; (II) You may not offer or impose any
terms on the Adaptation that restrict the terms of the Applicable
License or the ability of the recipient of the Adaptation to exercise
the rights granted to that recipient under the terms of the
Applicable License; (III) You must keep intact all notices that refer
to the Applicable License and to the disclaimer of warranties with
every copy of the Work as included in the Adaptation You Distribute
or Publicly Perform; (IV) when You Distribute or Publicly Perform the
Adaptation, You may not impose any effective technological measures
on the Adaptation that restrict the ability of a recipient of the
Adaptation from You to exercise the rights granted to that recipient
under the terms of the Applicable License. This Section 4(b) applies
to the Adaptation as incorporated in a Collection, but this does not
require the Collection apart from the Adaptation itself to be made
subject to the terms of the Applicable License.
3. If You Distribute, or Publicly Perform the Work or any Adaptations
or Collections, You must, unless a request has been made pursuant to
Section 4(a), keep intact all copyright notices for the Work and
provide, reasonable to the medium or means You are utilizing: (i) the
name of the Original Author (or pseudonym, if applicable) if
supplied, and/or if the Original Author and/or Licensor designate
another party or parties (e.g., a sponsor institute, publishing
entity, journal) for attribution ("Attribution Parties") in
Licensor's copyright notice, terms of service or by other reasonable
means, the name of such party or parties; (ii) the title of the Work
if supplied; (iii) to the extent reasonably practicable, the URI, if
any, that Licensor specifies to be associated with the Work, unless
such URI does not refer to the copyright notice or licensing
information for the Work; and (iv) , consistent with Ssection 3(b),
in the case of an Adaptation, a credit identifying the use of the
Work in the Adaptation (e.g., "French translation of the Work by
Original Author," or "Screenplay based on original Work by Original
Author"). The credit required by this Section 4(c) may be implemented
in any reasonable manner; provided, however, that in the case of a
Adaptation or Collection, at a minimum such credit will appear, if a
credit for all contributing authors of the Adaptation or Collection
appears, then as part of these credits and in a manner at least as
prominent as the credits for the other contributing authors. For the
avoidance of doubt, You may only use the credit required by this
Section for the purpose of attribution in the manner set out above
and, by exercising Your rights under this License, You may not
implicitly or explicitly assert or imply any connection with,
sponsorship or endorsement by the Original Author, Licensor and/or
Attribution Parties, as appropriate, of You or Your use of the Work,
without the separate, express prior written permission of the
Original Author, Licensor and/or Attribution Parties.
4. Except as otherwise agreed in writing by the Licensor or as may be
otherwise permitted by applicable law, if You Reproduce, Distribute
or Publicly Perform the Work either by itself or as part of any
Adaptations or Collections, You must not distort, mutilate, modify or
take other derogatory action in relation to the Work which would be
prejudicial to the Original Author's honor or reputation. Licensor
agrees that in those jurisdictions (e.g. Japan), in which any
exercise of the right granted in Section 3(b) of this License (the
right to make Adaptations) would be deemed to be a distortion,
mutilation, modification or other derogatory action prejudicial to
the Original Author's honor and reputation, the Licensor will waive
or not assert, as appropriate, this Section, to the fullest extent
permitted by the applicable national law, to enable You to reasonably
exercise Your right under Section 3(b) of this License (right to make
Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
1. This License and the rights granted hereunder will terminate
automatically upon any breach by You of the terms of this License.
Individuals or entities who have received Adaptations or Collections
from You under this License, however, will not have their licenses
terminated provided such individuals or entities remain in full
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
survive any termination of this License.
2. Subject to the above terms and conditions, the license granted
here is perpetual (for the duration of the applicable copyright in
the Work). Notwithstanding the above, Licensor reserves the right to
release the Work under different license terms or to stop
distributing the Work at any time; provided, however that any such
election will not serve to withdraw this License (or any other
license that has been, or is required to be, granted under the terms
of this License), and this License will continue in full force and
effect unless terminated as stated above.
8. Miscellaneous
1. Each time You Distribute or Publicly Perform the Work or a
Collection, the Licensor offers to the recipient a license to the
Work on the same terms and conditions as the license granted to You
under this License.
2. Each time You Distribute or Publicly Perform an Adaptation,
Licensor offers to the recipient a license to the original Work on
the same terms and conditions as the license granted to You under
this License.
3. If any provision of this License is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of
the remainder of the terms of this License, and without further
action by the parties to this agreement, such provision shall be
reformed to the minimum extent necessary to make such provision valid
and enforceable.
4. No term or provision of this License shall be deemed waived and no
breach consented to unless such waiver or consent shall be in writing
and signed by the party to be charged with such waiver or consent.
5. This License constitutes the entire agreement between the parties
with respect to the Work licensed here. There are no understandings,
agreements or representations with respect to the Work not specified
here. Licensor shall not be bound by any additional provisions that
may appear in any communication from You. This License may not be
modified without the mutual written agreement of the Licensor and
You.
6. The rights granted under, and the subject matter referenced, in
this License were drafted utilizing the terminology of the Berne
Convention for the Protection of Literary and Artistic Works (as
amended on September 28, 1979), the Rome Convention of 1961, the WIPO
Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty
of 1996 and the Universal Copyright Convention (as revised on July
24, 1971). These rights and subject matter take effect in the
relevant jurisdiction in which the License terms are sought to be
enforced according to the corresponding provisions of the
implementation of those treaty provisions in the applicable national
law. If the standard suite of rights granted under applicable
copyright law includes additional rights not granted under this
License, such additional rights are deemed to be included in the
License; this License is not intended to restrict the license of any
rights under applicable law.
Creative Commons Notice
Creative Commons is not a party to this License, and makes no
warranty whatsoever in connection with the Work. Creative Commons
will not be liable to You or any party on any legal theory for any
damages whatsoever, including without limitation any general,
special, incidental or consequential damages arising in connection
to this license. Notwithstanding the foregoing two (2) sentences, if
Creative Commons has expressly identified itself as the Licensor
hereunder, it shall have all rights and obligations of Licensor.
Except for the limited purpose of indicating to the public that the
Work is licensed under the CCPL, Creative Commons does not authorize
the use by either party of the trademark "Creative Commons" or any
related trademark or logo of Creative Commons without the prior
written consent of Creative Commons. Any permitted use will be in
compliance with Creative Commons' then-current trademark usage
guidelines, as may be published on its website or otherwise made
available upon request from time to time. For the avoidance of
doubt, this trademark restriction does not form part of the License.
Creative Commons may be contacted at http://creativecommons.org/.

335
sddm-theme/Main.qml Normal file
View file

@ -0,0 +1,335 @@
/***********************************************************************/
import QtQuick 2.0
import SddmComponents 2.0
Rectangle {
color: "black"
TextConstants { id: textConstants }
Connections {
target: sddm
onLoginSucceeded: {
password.borderColor = "green"
password.focusColor = "green"
password.hoverColor = "green"
}
onLoginFailed: {
password.borderColor = "red"
password.focusColor = "red"
password.hoverColor = "red"
}
}
Background {
anchors.fill: parent
source: config.background
fillMode: Image.PreserveAspectCrop
// x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height
onStatusChanged: {
if (status == Image.Error && source != config.defaultBackground) {
source = config.defaultBackground
}
}
}
// BG
// Image {
// source: "/home/rafayahmad/Pictures/bgs/1.png"
// anchors.fill: parent
// }
// Time Label
Rectangle {
width: 400
height: 300
anchors.centerIn: parent
color: "transparent"
anchors.verticalCenterOffset: -150
Text {
id: timeLabel
text: formattedTime
font.pixelSize: 100
anchors.centerIn: parent
color: "#F4DA7D"
}
Timer {
interval: 1000 // Update every second
running: true
repeat: true
onTriggered: {
var date = new Date();
var hours = date.getHours();
var minutes = date.getMinutes();
hours = hours % 12
hours = hours ? hours : 12
// Format the time as HH:MM:SS
timeLabel.text =
(hours < 10 ? "0" : "") + hours + "\n" +
(minutes < 10 ? "0" : "") + minutes
}
}
Component.onCompleted: {
interval: 1000 // Update every second
running: true
repeat: true
onTriggered: {
var date = new Date();
var hours = date.getHours();
var minutes = date.getMinutes();
hours = hours % 12
hours = hours ? hours : 12
// Format the time as HH:MM:SS
timeLabel.text =
(hours < 10 ? "0" : "") + hours + "\n" +
(minutes < 10 ? "0" : "") + minutes
}
}
}
Rectangle {
id: archlinux
anchors.centerIn: parent
height: 200
width: 600
// anchors.verticalCenterOffset: height * 2 / 3
anchors.verticalCenterOffset: 100
color: "transparent"
Column {
id: mainColumn
anchors.centerIn: parent
width: parent.width
spacing: 20
TextBox {
id: name
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width * 0.6; height: archlinux.height / 4
color: "transparent"
font.pixelSize: 16
font.family: "HackNerdFont"
borderColor: "#F4DA7D"
focusColor: "#F4DA7D"
hoverColor: "#F4DA7D"
textColor: "white"
radius: 50
text: userModel.lastUser
KeyNavigation.backtab: session; KeyNavigation.tab: password
Keys.onPressed: {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(name.text, password.text, session.index)
event.accepted = true
}
}
}
PasswordBox {
id: password
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width * 0.6; height: archlinux.height / 4
font.pixelSize: 16
color: "transparent"
borderColor: "#F4DA7D"
focusColor: "#F4DA7D"
hoverColor: "#F4DA7D"
textColor: "white"
radius: 50
focus: true
Timer {
interval: 200
running: true
onTriggered: password.forceActiveFocus()
}
KeyNavigation.backtab: name; KeyNavigation.tab: rebootButton
Keys.onPressed: {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(name.text, password.text, session.index)
event.accepted = true
}
}
}
}
}
// Session
Rectangle {
x: 50
y: 975
width: 225
height: 75
// spacing: 25
color: "transparent"
border.color: "#F4DA7D"
border.width: 3
radius: 50
Text {
id: lblSession
text: textConstants.session
verticalAlignment: Text.AlignVCenter
color: "white"
wrapMode: TextEdit.WordWrap
font.bold: true
font.pixelSize: 18
font.family: "HackNerdFont"
anchors.centerIn: parent
anchors.horizontalCenterOffset: -60
}
ComboBox {
id: session
width: 100
height: 25
font.pixelSize: 14
font.family: "HackNerdFont"
anchors.centerIn: parent
anchors.horizontalCenterOffset: 40
arrowIcon: "angle-down.png"
model: sessionModel
index: sessionModel.lastIndex
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
}
}
// Buttons
Rectangle {
x: 1670
y: 975
width: 200
height: 75
color: "transparent"
border.color: "#F4DA7D"
border.width: 3
radius: 50
FocusScope{
id: focusReboot
width: 40
height: 40
anchors.centerIn: parent
anchors.horizontalCenterOffset: -40
ImageButton {
id: rebootButton
source: "reboot.png"
anchors.fill: parent
onFocusChanged: {
if (rebootButton.focus) {
rebootButton.opacity = 1.0
}
}
onClicked: sddm.reboot()
KeyNavigation.backtab: password; KeyNavigation.tab: shutdownButton
}
}
FocusScope{
id: focusShutdown
width: 40
height: 40
anchors.centerIn: parent
anchors.horizontalCenterOffset: 40
ImageButton {
id: shutdownButton
source: "shutdown.png"
anchors.fill: parent
// opacity: 1.0
onFocusChanged: {
if (shutdownButton.focus) {
shutdownButton.opacity = 1.0
}
}
onClicked: sddm.powerOff()
KeyNavigation.backtab: rebootButton; KeyNavigation.tab: session
}
}
// Button {
// id: shutdownButton
//
// width: 40
// height: 40
// text: ""
// color: "black"
// activeColor: "transparent"
// pressedColor: "transparent"
// borderColor: "transparent"
// anchors.centerIn: parent
// anchors.horizontalCenterOffset: 40
//
// Image {
// source: "shutdown.png"
// fillMode: Image.PreserveAspectFit
// anchors.fill: parent
// }
//
// onClicked: sddm.powerOff()
//
// KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
// }
// Button {
// id: rebootButton
// text: ""
// width: 40
// height: 40
// color: "black"
// activeColor: "transparent"
// pressedColor: "transparent"
// borderColor: "transparent"
// anchors.centerIn: parent
// anchors.horizontalCenterOffset: -40
//
// Image {
// source: "reboot.png"
// fillMode: Image.PreserveAspectFit
// anchors.fill: parent
// }
//
// onClicked: sddm.reboot()
//
// KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
// }
}
Component.onCompleted: {
if (name.text == "")
name.focus = true
else
password.focus = true
}
}

3
sddm-theme/TRADEMARKS Normal file
View file

@ -0,0 +1,3 @@
The ARCHLINUX name and logo are recognized trademarks.
See http://www.archlinux.org/ for acceptable use and restrictions.

BIN
sddm-theme/angle-down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
sddm-theme/archlinux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
sddm-theme/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

View file

@ -0,0 +1,13 @@
[SddmGreeterTheme]
Name=Arch Linux Simply Black
Description=A simple SDDM theme for Arch Linux.
Screenshot=screenshot.png
License=CC-BY-SA
Type=sddm-theme
Version=1.0
Screenshot=screenshot.png
MainScript=Main.qml
ConfigFile=theme.conf
TranslationsDirectory=translations
Theme-Id=archlinux-simplyblack
Theme-API=2.0

BIN
sddm-theme/reboot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
sddm-theme/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

BIN
sddm-theme/shutdown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

279
sddm-theme/test.qml Normal file
View file

@ -0,0 +1,279 @@
/***********************************************************************/
import QtQuick 2.0
import SddmComponents 2.0
Rectangle {
width: 640
height: 480
color: "black"
TextConstants { id: textConstants }
Connections {
target: sddm
onLoginSucceeded: {
errorMessage.color = "steelblue"
errorMessage.text = textConstants.loginSucceeded
}
onLoginFailed: {
errorMessage.color = "red"
errorMessage.text = textConstants.loginFailed
}
}
Repeater {
model: screenModel
Background {
x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height
source: config.background
fillMode: Image.Tile
onStatusChanged: {
if (status == Image.Error && source != config.defaultBackground) {
source = config.defaultBackground
}
}
}
}
Rectangle {
property variant geometry: screenModel.geometry(screenModel.primary)
x: geometry.x; y: geometry.y; width: geometry.width; height: geometry.height
color: "transparent"
transformOrigin: Item.Top
Rectangle {
width: 300
height: 300
radius: 200
anchors.centerIn: parent
anchors.verticalCenterOffset: -300
color: "black"
// border.color: "#1793d1"
border.color: "white"
border.width: 5
Image {
id: archlogo
width: 175
height: 175
anchors.centerIn: parent
anchors.verticalCenterOffset: -10
fillMode: Image.PreserveAspectFit
transformOrigin: Item.Center
source: "archlinux.png"
}
}
Rectangle {
id: archlinux
anchors.centerIn: parent
height: 200
width: 600
// anchors.verticalCenterOffset: height * 2 / 3
anchors.verticalCenterOffset: 100
color: "#0C0C0C"
border.color: "#1793d1"
border.width: 5
radius: 50
Column {
id: mainColumn
anchors.centerIn: parent
width: parent.width * 0.9
spacing: 20
Row {
width: parent.width
spacing: Math.round(archlinux.height / 70)
Text {
id: lblName
width: parent.width * 0.20; height: archlinux.height / 4
color: "white"
text: textConstants.userName
verticalAlignment: Text.AlignVCenter
font.bold: true
font.pixelSize: 18
font.family: "HackNerdFont"
}
TextBox {
id: name
width: parent.width * 0.8; height: archlinux.height / 4
text: userModel.lastUser
font.pixelSize: 16
radius: 50
font.family: "HackNerdFont"
KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password
Keys.onPressed: {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(name.text, password.text, session.index)
event.accepted = true
}
}
}
}
Row {
width: parent.width
spacing : Math.round(archlinux.height / 70)
Text {
id: lblPassword
width: parent.width * 0.2; height: archlinux.height / 4
color: "white"
text: textConstants.password
verticalAlignment: Text.AlignVCenter
font.bold: true
font.pixelSize: 18
font.family: "HackNerdFont"
}
PasswordBox {
id: password
width: parent.width * 0.8; height: archlinux.height / 4
font.pixelSize: 16
radius: 50
tooltipBG: "lightgrey"
focus: true
Timer {
interval: 200
running: true
onTriggered: password.forceActiveFocus()
}
KeyNavigation.backtab: name; KeyNavigation.tab: session
Keys.onPressed: {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(name.text, password.text, session.index)
event.accepted = true
}
}
}
}
}
}
}
// Session
Rectangle {
x: 50
y: 975
width: 225
height: 75
// spacing: 25
color: "black"
border.color: "#1793d1"
border.width: 3
radius: 50
Text {
id: lblSession
text: textConstants.session
verticalAlignment: Text.AlignVCenter
color: "white"
wrapMode: TextEdit.WordWrap
font.bold: true
font.pixelSize: 18
font.family: "HackNerdFont"
anchors.centerIn: parent
anchors.horizontalCenterOffset: -60
}
ComboBox {
id: session
width: 100
height: 25
font.pixelSize: 14
font.family: "HackNerdFont"
anchors.centerIn: parent
anchors.horizontalCenterOffset: 40
arrowIcon: "angle-down.png"
model: sessionModel
index: sessionModel.lastIndex
KeyNavigation.backtab: password; KeyNavigation.tab: layoutBox
}
}
// Buttons
Rectangle {
x: 1670
y: 975
width: 200
height: 75
color: "black"
border.color: "#1793d1"
border.width: 3
radius: 50
Button {
id: shutdownButton
width: 40
height: 40
text: ""
color: "black"
anchors.centerIn: parent
anchors.horizontalCenterOffset: 40
Image {
source: "shutdown.png"
fillMode: Image.PreserveAspectFit
anchors.fill: parent
}
onClicked: sddm.powerOff()
KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
}
Button {
id: rebootButton
text: ""
width: 40
height: 40
color: "black"
anchors.centerIn: parent
anchors.horizontalCenterOffset: -40
Image {
source: "reboot.png"
fillMode: Image.PreserveAspectFit
anchors.fill: parent
}
onClicked: sddm.reboot()
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
}
}
Component.onCompleted: {
if (name.text == "")
name.focus = true
else
password.focus = true
}
}

2
sddm-theme/theme.conf Normal file
View file

@ -0,0 +1,2 @@
[General]
background=background.png