diff options
44 files changed, 2650 insertions, 0 deletions
diff --git a/.vim/.netrwhist b/.vim/.netrwhist new file mode 100644 index 0000000..b75411d --- /dev/null +++ b/.vim/.netrwhist @@ -0,0 +1,12 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =6 +let g:netrw_dirhist_6='/home/subh/.config' +let g:netrw_dirhist_5='/home/subh/.config/menus' +let g:netrw_dirhist_4='/home/subh/.config' +let g:netrw_dirhist_3='/home/subh/.config/hypr' +let g:netrw_dirhist_2='/home/subh/.config' +let g:netrw_dirhist_1='/home/subh/HTB/browsed' +let g:netrw_dirhist_0='/home/subh' +let g:netrw_dirhist_9='/home/subh/HTB/browsed' +let g:netrw_dirhist_8='/home/subh/.config/hypr' +let g:netrw_dirhist_7='/home/subh/.vim' diff --git a/.vim/colors.vim b/.vim/colors.vim new file mode 100644 index 0000000..263089f --- /dev/null +++ b/.vim/colors.vim @@ -0,0 +1,8 @@ +set termguicolors + +set laststatus=2 +let g:tokyonight_enable_italic = 1 +let g:lightline = {'colorscheme' : 'tokyonight'} + +colorscheme tokyonight + diff --git a/.vim/fzf.vim b/.vim/fzf.vim new file mode 100644 index 0000000..4abdd6c --- /dev/null +++ b/.vim/fzf.vim @@ -0,0 +1,6 @@ +nnoremap <leader>ff :Files<CR> +nnoremap <leader>fh :History<CR> +nnoremap <leader>fb :Buffers<CR> + + +nnoremap <leader>fg :Rg<Space> diff --git a/.vim/icons.vim b/.vim/icons.vim new file mode 100644 index 0000000..46e7c70 --- /dev/null +++ b/.vim/icons.vim @@ -0,0 +1 @@ +let g:airline_powerline_fonts = 1 diff --git a/.vim/keybinds.vim b/.vim/keybinds.vim new file mode 100644 index 0000000..43e86b0 --- /dev/null +++ b/.vim/keybinds.vim @@ -0,0 +1,3 @@ +let mapleader = " " + +nnoremap <leader>cd :Ex<CR> diff --git a/.vim/options.vim b/.vim/options.vim new file mode 100644 index 0000000..7be00bd --- /dev/null +++ b/.vim/options.vim @@ -0,0 +1,17 @@ +set number +set relativenumber + +filetype plugin indent on +set expandtab +set shiftwidth=4 +set softtabstop=4 +set tabstop=4 +set smartindent +set encoding=utf8 +set termencoding=utf8 +set guifont=Iosevka\ Nerd\ Font\ Propo + +set backspace=indent,eol,start + +syntax on + diff --git a/.vim/plugins.vim b/.vim/plugins.vim new file mode 100644 index 0000000..a59933f --- /dev/null +++ b/.vim/plugins.vim @@ -0,0 +1,22 @@ +let s:plugin_dir = expand('~/vim/plugged') + + +function! s:ensure(repo) + let name = split(a:repo, '/')[-1] + let path = s:plugin_dir . '/' . name + + if !isdirectory(path) + if !isdirectory(s:plugin_dir) + call mkdir(s:plugin_dir, 'p') + endif + execute '!git clone --depth=1 https://github.com/' . a:repo . ' ' . shellescape(path) + endif + + execute 'set runtimepath+=' . fnameescape(path) +endfunction + +call s:ensure('ghifarit53/tokyonight-vim') +call s:ensure('junegunn/fzf') +call s:ensure('junegunn/fzf.vim') +call s:ensure('itchyny/lightline.vim') + diff --git a/.vim/vimrc b/.vim/vimrc new file mode 100644 index 0000000..6bd8382 --- /dev/null +++ b/.vim/vimrc @@ -0,0 +1,5 @@ +source ~/.vim/options.vim +source ~/.vim/keybinds.vim +source ~/.vim/plugins.vim +source ~/.vim/colors.vim +source ~/.vim/fzf.vim diff --git a/fastfetch b/fastfetch new file mode 160000 +Subproject 5125578d9ceb787b923a91f4416f4b49f18806f diff --git a/ghostty/config b/ghostty/config new file mode 100644 index 0000000..99d3f2c --- /dev/null +++ b/ghostty/config @@ -0,0 +1,54 @@ +# This is the configuration file for Ghostty. +# +# This template file has been automatically created at the following +# path since Ghostty couldn't find any existing config files on your system: +# +# /home/subh/.config/ghostty/config +theme = catppuccin-mocha.conf +font-family = "Iosevka Nerd Font Propo" +#font-family = "JetBrainsMono Nerd Font" +font-size = 14 +cursor-style = block +shell-integration-features = no-cursor +# The template does not set any default options, since Ghostty ships +# with sensible defaults for all options. Users should only need to set +# options that they want to change from the default. +# +# Run `ghostty +show-config --default --docs` to view a list of +# all available config options and their default values. +# +# Additionally, each config option is also explained in detail +# on Ghostty's website, at https://ghostty.org/docs/config. +# +# Ghostty can reload the configuration while running by using the menu +# options or the bound key (default: Command + Shift + comma on macOS and +# Control + Shift + comma on other platforms). Not all config options can be +# reloaded while running; some only apply to new windows and others may require +# a full restart to take effect. + +# Config syntax crash course +# ========================== +# # The config file consists of simple key-value pairs, +# # separated by equals signs. +# font-family = Iosevka +# window-padding-x = 2 +# +# # Spacing around the equals sign does not matter. +# # All of these are identical: +# key=value +# key= value +# key =value +# key = value +# +# # Any line beginning with a # is a comment. It's not possible to put +# # a comment after a config option, since it would be interpreted as a +# # part of the value. For example, this will have a value of "#123abc": +# background = #123abc +# +# # Empty values are used to reset config keys to default. +# key = +# +# # Some config options have unique syntaxes for their value, +# # which is explained in the docs for that config option. +# # Just for example: +# resize-overlay-duration = 4s 200ms diff --git a/ghostty/themes/catppuccin-mocha.conf b/ghostty/themes/catppuccin-mocha.conf new file mode 100644 index 0000000..e03e26d --- /dev/null +++ b/ghostty/themes/catppuccin-mocha.conf @@ -0,0 +1,23 @@ +palette = 0=#45475a +palette = 1=#f38ba8 +palette = 2=#a6e3a1 +palette = 3=#f9e2af +palette = 4=#89b4fa +palette = 5=#f5c2e7 +palette = 6=#94e2d5 +palette = 7=#a6adc8 +palette = 8=#585b70 +palette = 9=#f38ba8 +palette = 10=#a6e3a1 +palette = 11=#f9e2af +palette = 12=#89b4fa +palette = 13=#f5c2e7 +palette = 14=#94e2d5 +palette = 15=#bac2de +background = 1e1e2e +foreground = cdd6f4 +cursor-color = f5e0dc +cursor-text = 11111b +selection-background = 353749 +selection-foreground = cdd6f4 +split-divider-color = 313244 diff --git a/hyprland/animations.conf b/hyprland/animations.conf new file mode 100644 index 0000000..729b402 --- /dev/null +++ b/hyprland/animations.conf @@ -0,0 +1,35 @@ +animations { + enabled = true + + # Disable non-workspace animations + animation = windows, 0 + animation = windowsIn, 0 + animation = windowsOut, 0 + animation = windowsMove, 0 + animation = layers, 0 + animation = layersIn, 0 + animation = layersOut, 0 + animation = fade, 0 + animation = fadeIn, 0 + animation = fadeOut, 0 + animation = fadeSwitch, 0 + animation = fadeShadow, 0 + animation = fadeDim, 0 + animation = fadeLayers, 0 + animation = fadeLayersIn, 0 + animation = fadeLayersOut, 0 + animation = fadePopups, 0 + animation = fadePopupsIn, 0 + animation = fadePopupsOut, 0 + animation = fadeDpms, 0 + animation = border, 0 + animation = borderangle, 0 + + # Enable workspace animations + animation = workspaces, 1, 3, default, fade + animation = workspacesIn, 1, 3, default, fade + animation = workspacesOut, 1, 3, default, fade + animation = specialWorkspace, 1, 3, default, fade + animation = specialWorkspaceIn, 1, 3, default, fade + animation = specialWorkspaceOut, 1, 3, default, fade +} diff --git a/hyprland/hyprland.conf b/hyprland/hyprland.conf new file mode 100644 index 0000000..5373707 --- /dev/null +++ b/hyprland/hyprland.conf @@ -0,0 +1,194 @@ +monitor=HDMI-A-3,1920x1080@180,auto,1.0 +# monitor=eDP-1,1920x1080@60,0x0,1.0 + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ + +# Set programs that you use +$terminal = ghostty +$fileManager = pcmanfm +$menu = rofi -show drun -drun-reload-desktop-cache +$reload_qs = pkill qs 2>&1; qs & +$snip = hyprshot -m region --clipboard-only +$reload_hypr = hyprctl reload +$browser = librewolf + + +# Environment Variables +$HOME = /home/subh +$CONFIG = /home/subh/.config + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +# exec-once = $terminal +# exec-once = nm-applet & +exec-once = qs & +exec-once = swaync & +exec-once = swww-daemon & swww img $HOME/wallpapers/arch-black-4k.png +exec-once = swayidle -w before-sleep '/opt/scripts/lock.sh' & +exec-once = wl-paste --type text --watch cliphist store & +exec-once = wl-paste --type image --watch cliphist store & +exec-once = xwaylandvideobridge & + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ +env = GTK_THEME,Tokyo-Night-Dark +env = GTK_ICON_THEME,Adwaita + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 5 + border_size = 1 + + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + resize_on_border = false + allow_tearing = false + + layout = dwindle +} + + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 0 + rounding_power = 0 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 1.0 + + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = false + size = 5 + passes = 3 + + vibrancy = 0.1696 + } + + shadow { + enabled = false + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#animations +source = ~/.config/hypr/animations.conf + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master srwitch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + #xset r rate 200 35 + repeat_rate = 35 + repeat_delay = 200 + + + touchpad { + natural_scroll = false + } +} + +cursor { + inactive_timeout = 30 + no_hardware_cursors = true +} + + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +#################### +### KEYBINDINGSS ### +#################### + +source = $CONFIG/hypr/keybinds.conf + + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + +windowrule { + name = xwayland-video-bridge-fixes + match:class = xwaylandvideobridge + + no_initial_focus = true + no_focus = true + no_anim = true + no_blur = true + max_size = 1 1 + opacity = 0.0 +} +# Example windowrule v1 +# windowrule = float, ^(kitty)$ + +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. diff --git a/hyprland/keybinds.conf b/hyprland/keybinds.conf new file mode 100644 index 0000000..0449113 --- /dev/null +++ b/hyprland/keybinds.conf @@ -0,0 +1,68 @@ +$mainMod = SUPER # Sets "Windows" key as main modifier + +bind = $mainMod, Return, exec, $terminal +bind = $mainMod, Q, killactive, +bind = $mainMod|Shift, Q, exit, +bind = $mainMod, F, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, R, exec, $menu +bind = $mainMod|Shift, R, exec, $reload_qs +bind = $mainMod|Ctrl, R, exec, $reload_hypr +bind = $mainMod|Shift, S, exec, $snip +bind = $mainMod|Ctrl,F,fullscreen, 1 +bind = $mainMod, W, exec, $browser +bind = $mainMod, D, exec, discord +bind = $mainMod|Shift, D, exec, kill -9 `pidof discord` +bind = $mainMod|Shift, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy +bind = $mainMod|Shift, L, exec, /opt/scripts/power.sh +bind = $mainMod, B, exec, /opt/scripts/wallpaper-picker.sh +bind = $mainMod, N, exec, /opt/scripts/wifi-connect.sh +bind = $mainMod|Shift, N, exec, /opt/scripts/wifi-disconnect.sh +bind = $mainMod, M, exec, spotify +bind = $mainMod|Shift, K, exec, keepassxc +bind = $mainMod, S, exec, subl +bind = $mainMod, P, exec, /opt/scripts/vpn_connect.sh +bind = $mainMod|Shift, P, exec, /opt/scripts/vpn_disconnect.sh + +# Move focus with mainMod + arrow keys +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +# 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 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 + +# 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 = $mainMod, mouse:273, resizewindow + diff --git a/hyprlock/Fonts/JetBrains/JetBrains Mono Nerd.ttf b/hyprlock/Fonts/JetBrains/JetBrains Mono Nerd.ttf Binary files differnew file mode 100644 index 0000000..f9f0185 --- /dev/null +++ b/hyprlock/Fonts/JetBrains/JetBrains Mono Nerd.ttf diff --git a/hyprlock/Fonts/SF Pro Display/SF Pro Display Bold.otf b/hyprlock/Fonts/SF Pro Display/SF Pro Display Bold.otf Binary files differnew file mode 100755 index 0000000..ee79a7f --- /dev/null +++ b/hyprlock/Fonts/SF Pro Display/SF Pro Display Bold.otf diff --git a/hyprlock/Fonts/SF Pro Display/SF Pro Display Regular.otf b/hyprlock/Fonts/SF Pro Display/SF Pro Display Regular.otf Binary files differnew file mode 100755 index 0000000..120603c --- /dev/null +++ b/hyprlock/Fonts/SF Pro Display/SF Pro Display Regular.otf diff --git a/hyprlock/Scripts/songdetail.sh b/hyprlock/Scripts/songdetail.sh new file mode 100755 index 0000000..51745e6 --- /dev/null +++ b/hyprlock/Scripts/songdetail.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +song_info=$(playerctl metadata --format '{{title}} {{artist}}') + +echo "$song_info" diff --git a/hyprlock/cat.png b/hyprlock/cat.png Binary files differnew file mode 100644 index 0000000..0216f9a --- /dev/null +++ b/hyprlock/cat.png diff --git a/hyprlock/hyprlock.conf b/hyprlock/hyprlock.conf new file mode 100644 index 0000000..86db17c --- /dev/null +++ b/hyprlock/hyprlock.conf @@ -0,0 +1,133 @@ +# BACKGROUND +background { + monitor = + path = ~/.config/hyprlock/hyprlock.png + blur_passes = 0 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +# GENERAL +general { + no_fade_in = false + grace = 0 + disable_loading_bar = false +} + +# GREETINGS +label { + monitor = + text = cmd[update:1000] $(date +%H); if ((h<12)); then echo "Good morning!"; elif ((h<17)); then echo "Good afternoon!"; else echo "Good evening!"; fi + color = rgba(216, 222, 233, .75) + font_size = 55 + font_family = SF Pro Display Bold + position = 150, 320 + halign = left + valign = center +} + +# Time +label { + monitor = + text = cmd[update:1000] echo "<span>$(date +"%I:%M")</span>" + color = rgba(216, 222, 233, .75) + font_size = 40 + font_family = SF Pro Display Bold + position = 150, 240 + halign = left + valign = center +} + +# Day-Month-Date +label { + monitor = + text = cmd[update:1000] echo -e "$(date +"%A, %B %d")" + color = rgba(216, 222, 233, .75) + font_size = 19 + font_family = SF Pro Display Bold + position = 150, 175 + halign = left + valign = center +} + +# Profie-Photo +image { + monitor = + path = ~/.config/hyprlock/cat.png + border_size = 2 + border_color = rgba(255, 255, 255, .75) + size = 95 + rounding = -1 + rotate = 0 + reload_time = -1 + reload_cmd = + position = 270, 25 + halign = left + valign = center +} + +# USER-BOX +shape { + monitor = + size = 320, 55 + color = rgba(255, 255, 255, .1) + rounding = -1 + border_size = 0 + border_color = rgba(255, 255, 255, 1) + rotate = 0 + xray = false # if true, make a "hole" in the background (rectangle of specified size, no rotation) + + position = 160, -140 + halign = left + valign = center +} + +# USER +label { + monitor = + text = $USER + color = rgba(216, 222, 233, 0.80) + outline_thickness = 0 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + font_size = 16 + font_family = SF Pro Display Bold + position = 275, -140 + halign = left + valign = center +} + +# INPUT FIELD +input-field { + monitor = + size = 320, 55 + outline_thickness = 0 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + outer_color = rgba(255, 255, 255, 0) + inner_color = rgba(255, 255, 255, 0.1) + font_color = rgb(200, 200, 200) + fade_on_empty = false + font_family = SF Pro Display Bold + placeholder_text = <i><span foreground="##ffffff99">🔒 Enter Pass</span></i> + hide_input = false + position = 160, -220 + halign = left + valign = center +} + +# CURRENT SONG +label { + monitor = + text = cmd[update:1000] echo "$(~/.config/hypr/Style-1/Scripts/songdetail.sh)" + color = rgba(255, 255, 255, 0.65) + font_size = 14 + font_family = JetBrains Mono Nerd, SF Pro Display Bold + position = 210, 45 + halign = left + valign = bottom +} diff --git a/hyprlock/hyprlock.png b/hyprlock/hyprlock.png Binary files differnew file mode 100644 index 0000000..d97b4bb --- /dev/null +++ b/hyprlock/hyprlock.png diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..a617965 --- /dev/null +++ b/install.sh @@ -0,0 +1,83 @@ +#!/bin/bash + + +sudo pacman -Syu + +echo "[*] Installing core packages" +sudo pacman -S NetworkManager ly firewalld discord libnotify fastfetch ttd-iosevka-nerd quickshell fzf hyprlock hyprshot exa fd ripgrep bat pcmanfm make cmake hyprland wayland pipewire ghostty swww rofi pavucontrol pulseaudio mpv feh swaync maim dbus wl-clipboard tmux docker docker-compose rust go cargo uv python3 doas openvpn net-tools 7zip zip netcat socat wget curl spotify zoxide octopi cuda nvidia-settings nvidia-utils opencl-nvidia bore faker grex protonvpn keepassxc + +echo "[*] Building yay" +git clone https://aur.archlinux.org/yay.git && cd yay && sudo makepkg -si + + +echo "[*] Installing yay packges" +yay -S librewolf-bin xwaylandvideobridge croc ttyd stremio + + +echo "[*] Adding the blackarch repo" +mkdir -p $HOME/Downloads +sudo curl -o $HOME/Downloads/strap.sh https://blackarch.org/strap.sh +sudo chmod +x $HOME/Downloads/strap.sh +sudo $HOME/Downloads/strap.sh +sudo pacman -Syu + + +echo "[*] Downloading Wallpapers" +curl -LJ https://github.com/JaKooLit/Wallpaper-Bank/archive/refs/heads/main.zip -o $HOME/Downloads/main.zip 2>&1 +unzip $HOME/Downloads/main.zip -d $HOME + +echo "[*] Setting up rofi" +mkdir -p ~/.config/rofi +cp rofi/* ~/.config/rofi + +echo "[*] Setting up swaync" +mkdir -p ~/.config/swaync +cp swaync/style.css ~/.config/swaync + +echo "[*] Setting up tmux" +mkdir -p ~/.config/tmux +cp tmux/tmux.conf ~/.config/tmux + +echo "[*] Setting up ghostty" +cp -r ghostty ~/.config/ + +echo "[*] Setting up hyprlock" +cp -r hyprlock ~/.config/ + +echo "[*] Setting up hyprland" +mkdir -p ~/.config/hypr +cp hyprland/* ~/.config/hypr + +echo "[*] Setting up quickshell" +cp -r quickshell ~/.config/ + +echo "[*] Setting up ly" +sudo mkdir -p /etc/ly +sudo cp ly/config.ini /etc/ly/config.ini + + +echo "[*] Setting up desktop manager" +sudo systemctl disable getty@tty2.service +sudo systemctl enable ly@tty2.service + + +echo "[*] Setting up firewall" +sudo systemctl enable firewalld + + +echo "[*] Reboot Required. Reboot Now? [Y/n]" +read -r bool + +case "$bool" in + y|Y) + echo "[*] Rebooting..." + systemctl reboot + ;; + *) + exit 0 + ;; +esac + + + + diff --git a/ly/config.ini b/ly/config.ini new file mode 100644 index 0000000..407d04b --- /dev/null +++ b/ly/config.ini @@ -0,0 +1,367 @@ +# Ly supports 24-bit true color with styling, which means each color is a 32-bit value. +# The format is 0xSSRRGGBB, where SS is the styling, RR is red, GG is green, and BB is blue. +# Here are the possible styling options: +# TB_BOLD 0x01000000 +# TB_UNDERLINE 0x02000000 +# TB_REVERSE 0x04000000 +# TB_ITALIC 0x08000000 +# TB_BLINK 0x10000000 +# TB_HI_BLACK 0x20000000 +# TB_BRIGHT 0x40000000 +# TB_DIM 0x80000000 +# Programmatically, you'd apply them using the bitwise OR operator (|), but because Ly's +# configuration doesn't support using it, you have to manually compute the color value. +# Note that, if you want to use the default color value of the terminal, you can use the +# special value 0x00000000. This means that, if you want to use black, you *must* use +# the styling option TB_HI_BLACK (the RGB values are ignored when using this option). + +# Allow empty password or not when authenticating +allow_empty_password = true + +# The active animation +# none -> Nothing +# doom -> PSX DOOM fire +# matrix -> CMatrix +# colormix -> Color mixing shader +# gameoflife -> John Conway's Game of Life +# dur_file -> .dur file format (https://github.com/cmang/durdraw/tree/master) +animation = matrix + +# Stop the animation after some time +# 0 -> Run forever +# 1..2e12 -> Stop the animation after this many seconds +animation_timeout_sec = 0 + +# The character used to mask the password +# You can either type it directly as a UTF-8 character (like *), or use a UTF-32 +# codepoint (for example 0x2022 for a bullet point) +# If null, the password will be hidden +# Note: you can use a # by escaping it like so: \# +asterisk = * + +# The number of failed authentications before a special animation is played... ;) +# If set to 0, the animation will never be played +auth_fails = 10 + +# Identifier for battery whose charge to display at top left +# Primary battery is usually BAT0 or BAT1 +# If set to null, battery status won't be shown +battery_id = null + +# Automatic login configuration +# This feature allows Ly to automatically log in a user without password prompt. +# IMPORTANT: Both auto_login_user and auto_login_session must be set for this to work. +# Autologin only happens once at startup - it won't re-trigger after logout. + +# PAM service name to use for automatic login +# The default service (ly-autologin) uses pam_permit to allow login without password +# The appropriate platform-specific PAM configuration (ly-autologin) will be used automatically +auto_login_service = ly-autologin + +# Session name to launch automatically +# To find available session names, check the .desktop files in: +# - /usr/share/xsessions/ (for X11 sessions) +# - /usr/share/wayland-sessions/ (for Wayland sessions) +# Use the filename without .desktop extension, or the value of DesktopNames field +# Examples: "i3", "sway", "gnome", "plasma", "xfce" +# If null, automatic login is disabled +auto_login_session = null + +# Username to automatically log in +# Must be a valid user on the system +# If null, automatic login is disabled +auto_login_user = null + +# Background color id +bg = 0x00000000 + +# Change the state and language of the big clock +# none -> Disabled (default) +# en -> English +# fa -> Farsi +bigclock = en + +# Set bigclock to 12-hour notation. +bigclock_12hr = false + +# Set bigclock to show the seconds. +bigclock_seconds = false + +# Blank main box background +# Setting to false will make it transparent +blank_box = true + +# Border foreground color id +border_fg = 0x00FFFFFF + +# Title to show at the top of the main box +# If set to null, none will be shown +box_title = "Welcome, subh!" + +# Brightness decrease command +brightness_down_cmd = /usr/bin/brightnessctl -q -n s 10%- + +# Brightness decrease key, or null to disable +brightness_down_key = F5 + +# Brightness increase command +brightness_up_cmd = /usr/bin/brightnessctl -q -n s +10% + +# Brightness increase key, or null to disable +brightness_up_key = F6 + +# Erase password input on failure +clear_password = false + +# Format string for clock in top right corner (see strftime specification). Example: %c +# If null, the clock won't be shown +clock = null + +# CMatrix animation foreground color id +cmatrix_fg = 0x0000FF00 + +# CMatrix animation character string head color id +cmatrix_head_col = 0x01FFFFFF + +# CMatrix animation minimum codepoint. It uses a 16-bit integer +# For Japanese characters for example, you can use 0x3000 here +cmatrix_min_codepoint = 0x21 + +# CMatrix animation maximum codepoint. It uses a 16-bit integer +# For Japanese characters for example, you can use 0x30FF here +cmatrix_max_codepoint = 0x7B + +# Color mixing animation first color id +colormix_col1 = 0x00FF0000 + +# Color mixing animation second color id +colormix_col2 = 0x000000FF + +# Color mixing animation third color id +colormix_col3 = 0x20000000 + +# Custom sessions directory +# You can specify multiple directories, +# e.g. /etc/ly/custom-sessions:/usr/share/custom-sessions +custom_sessions = /etc/ly/custom-sessions + +# Input box active by default on startup +# Available inputs: info_line, session, login, password +default_input = login + +# DOOM animation fire height (1 thru 9) +doom_fire_height = 6 + +# DOOM animation fire spread (0 thru 4) +doom_fire_spread = 2 + +# DOOM animation custom top color (low intensity flames) +doom_top_color = 0x009F2707 + +# DOOM animation custom middle color (medium intensity flames) +doom_middle_color = 0x00C78F17 + +# DOOM animation custom bottom color (high intensity flames) +doom_bottom_color = 0x00FFFFFF + +# Dur file path +dur_file_path = /etc/ly/example.dur + +# Dur offset x direction +dur_x_offset = 0 + +# Dur offset y direction +dur_y_offset = 0 + +# Set margin to the edges of the DM (useful for curved monitors) +edge_margin = 0 + +# Error background color id +error_bg = 0x00000000 + +# Error foreground color id +# Default is red and bold +error_fg = 0x01FF0000 + +# Foreground color id +fg = 0x00FFFFFF + +# Render true colors (if supported) +# If false, output will be in eight-color mode +# All eight-color mode color codes: +# TB_DEFAULT 0x0000 +# TB_BLACK 0x0001 +# TB_RED 0x0002 +# TB_GREEN 0x0003 +# TB_YELLOW 0x0004 +# TB_BLUE 0x0005 +# TB_MAGENTA 0x0006 +# TB_CYAN 0x0007 +# TB_WHITE 0x0008 +# If full color is off, the styling options still work. The colors are +# always 32-bit values with the styling in the most significant byte. +# Note: If using the dur_file animation option and the dur file's color range +# is saved as 256 with this option disabled, the file will not be drawn. +full_color = true + +# Game of Life entropy interval (0 = disabled, >0 = add entropy every N generations) +# 0 -> Pure Conway's Game of Life (will eventually stabilize) +# 10 -> Add entropy every 10 generations (recommended for continuous activity) +# 50+ -> Less frequent entropy for more natural evolution +gameoflife_entropy_interval = 10 + +# Game of Life animation foreground color id +gameoflife_fg = 0x0000FF00 + +# Game of Life frame delay (lower = faster animation, higher = slower) +# 1-3 -> Very fast animation +# 6 -> Default smooth animation speed +# 10+ -> Slower, more contemplative speed +gameoflife_frame_delay = 6 + +# Game of Life initial cell density (0.0 to 1.0) +# 0.1 -> Sparse, minimal activity +# 0.4 -> Balanced activity (recommended) +# 0.7+ -> Dense, chaotic patterns +gameoflife_initial_density = 0.4 + +# Command executed when pressing hibernate key (can be null) +hibernate_cmd = null + +# Specifies the key used for hibernate (F1-F12) +hibernate_key = F4 + +# Remove main box borders +hide_borders = false + +# Remove power management command hints +hide_key_hints = false + +# Remove keyboard lock states from the top right corner +hide_keyboard_locks = false + +# Remove version number from the top left corner +hide_version_string = false + +# Command executed when no input is detected for a certain time +# If null, no command will be executed +inactivity_cmd = null + +# Executes a command after a certain amount of seconds +inactivity_delay = 0 + +# Initial text to show on the info line +# If set to null, the info line defaults to the hostname +initial_info_text = null + +# Input boxes length +input_len = 34 + +# Active language +# Available languages are found in /etc/ly/lang/ +lang = en + +# Command executed when logging in +# If null, no command will be executed +# Important: the code itself must end with `exec "$@"` in order to launch the session! +# You can also set environment variables in there, they'll persist until logout +login_cmd = null + +# Path for login.defs file (used for listing all local users on the system on +# Linux) +login_defs_path = /etc/login.defs + +# Command executed when logging out +# If null, no command will be executed +# Important: the session will already be terminated when this command is executed, so +# no need to add `exec "$@"` at the end +logout_cmd = null + +# General log file path +ly_log = /var/log/ly.log + +# Main box horizontal margin +margin_box_h = 2 + +# Main box vertical margin +margin_box_v = 1 + +# Event timeout in milliseconds +min_refresh_delta = 5 + +# Set numlock on/off at startup +numlock = false + +# Default path +# If null, ly doesn't set a path +path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +# Command executed when pressing restart_key +restart_cmd = /sbin/shutdown -r now + +# Specifies the key used for restart (F1-F12) +restart_key = F2 + +# Save the current desktop and login as defaults, and load them on startup +save = true + +# Service name (set to ly to use the provided pam config file) +service_name = ly + +# Session log file path +# This will contain stdout and stderr of Wayland sessions +# By default it's saved in the user's home directory +# Important: due to technical limitations, X11 and shell sessions aren't supported, which +# means you won't get any logs from those sessions. +# If null, no session log will be created +session_log = .local/state/ly-session.log + +# Setup command +setup_cmd = /etc/ly/setup.sh + +# Command executed when pressing shutdown_key +shutdown_cmd = /sbin/shutdown -a now + +# Specifies the key used for shutdown (F1-F12) +shutdown_key = F1 + +# Command executed when pressing sleep key (can be null) +sleep_cmd = null + +# Specifies the key used for sleep (F1-F12) +sleep_key = F3 + +# Command executed when starting Ly (before the TTY is taken control of) +# If null, no command will be executed +start_cmd = null + +# Center the session name. +text_in_center = false + +# Default vi mode +# normal -> normal mode +# insert -> insert mode +vi_default_mode = normal + +# Enable vi keybindings +vi_mode = false + +# Wayland desktop environments +# You can specify multiple directories, +# e.g. /usr/share/wayland-sessions:/usr/local/share/wayland-sessions +waylandsessions = /usr/share/wayland-sessions + +# Xorg server command +x_cmd = /usr/bin/X + +# Xorg xauthority edition tool +xauth_cmd = /usr/bin/xauth + +# xinitrc +# If null, the xinitrc session will be hidden +xinitrc = ~/.xinitrc + +# Xorg desktop environments +# You can specify multiple directories, +# e.g. /usr/share/xsessions:/usr/local/share/xsessions +xsessions = /usr/share/xsessions diff --git a/quickshell/icons/arch.png b/quickshell/icons/arch.png Binary files differnew file mode 100644 index 0000000..bea0156 --- /dev/null +++ b/quickshell/icons/arch.png diff --git a/quickshell/shell.qml b/quickshell/shell.qml new file mode 100644 index 0000000..1aa81e5 --- /dev/null +++ b/quickshell/shell.qml @@ -0,0 +1,443 @@ +import Quickshell +import Quickshell.Wayland +import Quickshell.Io +import Quickshell.Hyprland +import QtQuick +import QtQuick.Layouts + +ShellRoot { + id: root + + // Theme colors + property color colBg: "#1a1b26" + property color colFg: "#a9b1d6" + property color colMuted: "#444b6a" + property color colCyan: "#0db9d7" + property color colPurple: "#ad8ee6" + property color colRed: "#f7768e" + property color colYellow: "#e0af68" + property color colBlue: "#7aa2f7" + + // Font + property string fontFamily: "JetBrainsMono Nerd Font" + property int fontSize: 14 + + // System info properties + property string kernelVersion: "Linux" + property int cpuUsage: 0 + property int memUsage: 0 + property int diskUsage: 0 + property int volumeLevel: 0 + property string activeWindow: "Window" + property string currentLayout: "Tile" + property string cpuTemp: "0" + // CPU tracking + property var lastCpuIdle: 0 + property var lastCpuTotal: 0 + + // Kernel version + Process { + id: kernelProc + command: ["uname", "-r"] + stdout: SplitParser { + onRead: data => { + if (data) kernelVersion = data.trim() + } + } + Component.onCompleted: running = true + } + + // CPU usage + Process { + id: cpuProc + command: ["sh", "-c", "head -1 /proc/stat"] + stdout: SplitParser { + onRead: data => { + if (!data) return + var parts = data.trim().split(/\s+/) + var user = parseInt(parts[1]) || 0 + var nice = parseInt(parts[2]) || 0 + var system = parseInt(parts[3]) || 0 + var idle = parseInt(parts[4]) || 0 + var iowait = parseInt(parts[5]) || 0 + var irq = parseInt(parts[6]) || 0 + var softirq = parseInt(parts[7]) || 0 + + var total = user + nice + system + idle + iowait + irq + softirq + var idleTime = idle + iowait + + if (lastCpuTotal > 0) { + var totalDiff = total - lastCpuTotal + var idleDiff = idleTime - lastCpuIdle + if (totalDiff > 0) { + cpuUsage = Math.round(100 * (totalDiff - idleDiff) / totalDiff) + } + } + lastCpuTotal = total + lastCpuIdle = idleTime + } + } + Component.onCompleted: running = true + } + + // Memory usage + Process { + id: memProc + command: ["sh", "-c", "free | grep Mem"] + stdout: SplitParser { + onRead: data => { + if (!data) return + var parts = data.trim().split(/\s+/) + var total = parseInt(parts[1]) || 1 + var used = parseInt(parts[2]) || 0 + memUsage = Math.round(100 * used / total) + } + } + Component.onCompleted: running = true + } + + // Disk usage + Process { + id: diskProc + command: ["sh", "-c", "df / | tail -1"] + stdout: SplitParser { + onRead: data => { + if (!data) return + var parts = data.trim().split(/\s+/) + var percentStr = parts[4] || "0%" + diskUsage = parseInt(percentStr.replace('%', '')) || 0 + } + } + Component.onCompleted: running = true + } + + // Volume level (wpctl for PipeWire) + Process { + id: volProc + command: ["wpctl", "get-volume", "@DEFAULT_AUDIO_SINK@"] + stdout: SplitParser { + onRead: data => { + if (!data) return + var match = data.match(/Volume:\s*([\d.]+)/) + if (match) { + volumeLevel = Math.round(parseFloat(match[1]) * 100) + } + } + } + Component.onCompleted: running = true + } + + // Active window title + Process { + id: windowProc + command: ["sh", "-c", "hyprctl activewindow -j | jq -r '.title // empty'"] + stdout: SplitParser { + onRead: data => { + if (data && data.trim()) { + activeWindow = data.trim() + } + } + } + Component.onCompleted: running = true + } + + // Current layout (Hyprland: dwindle/master/floating) + Process { + id: layoutProc + command: ["sh", "-c", "hyprctl activewindow -j | jq -r 'if .floating then \"Floating\" elif .fullscreen == 1 then \"Fullscreen\" else \"Tiled\" end'"] + stdout: SplitParser { + onRead: data => { + if (data && data.trim()) { + currentLayout = data.trim() + } + } + } + Component.onCompleted: running = true + } + Process { + id: cpuTempProc + command: ["sh", "-c", "sensors | awk '/Tctl:/ {print $2}'"] + stdout: SplitParser { + onRead: data => { + if (data && data.length > 0) { + cpuTemp = data.trim() + } + } + } + } + + + + // Slow timer for system stats + Timer { + interval: 2000 + running: true + repeat: true + onTriggered: { + cpuProc.running = true + memProc.running = true + diskProc.running = true + volProc.running = true + cpuTempProc.running = true + } + } + + // Event-based updates for window/layout (instant) + Connections { + target: Hyprland + function onRawEvent(event) { + windowProc.running = true + layoutProc.running = true + } + } + + // Backup timer for window/layout (catches edge cases) + Timer { + interval: 200 + running: true + repeat: true + onTriggered: { + windowProc.running = true + layoutProc.running = true + } + } + + Variants { + model: Quickshell.screens + + PanelWindow { + property var modelData + screen: modelData + + anchors { + top: true + left: true + right: true + } + + implicitHeight: 30 + color: root.colBg + + margins { + top: 0 + bottom: 0 + left: 0 + right: 0 + } + + Rectangle { + anchors.fill: parent + color: root.colBg + + RowLayout { + anchors.fill: parent + spacing: 0 + + Item { width: 8 } + + Rectangle { + Layout.preferredWidth: 24 + Layout.preferredHeight: 24 + color: "transparent" + + Image { + anchors.fill: parent + source: "file:///home/subh/.config/quickshell/icons/arch.png" + fillMode: Image.PreserveAspectFit + } + } + + Item { width: 8 } + + Repeater { + model: 9 + + Rectangle { + Layout.preferredWidth: 20 + Layout.preferredHeight: parent.height + color: "transparent" + + property var workspace: Hyprland.workspaces.values.find(ws => ws.id === index + 1) ?? null + property bool isActive: Hyprland.focusedWorkspace?.id === (index + 1) + property bool hasWindows: workspace !== null + + Text { + text: index + 1 + color: parent.isActive ? root.colCyan : (parent.hasWindows ? root.colCyan : root.colMuted) + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + anchors.centerIn: parent + } + + Rectangle { + width: 20 + height: 3 + color: parent.isActive ? root.colPurple : root.colBg + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + } + + MouseArea { + anchors.fill: parent + onClicked: Hyprland.dispatch("workspace " + (index + 1)) + } + } + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 8 + Layout.rightMargin: 8 + color: root.colMuted + } + + Text { + text: currentLayout + color: root.colFg + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.leftMargin: 5 + Layout.rightMargin: 5 + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 2 + Layout.rightMargin: 8 + color: root.colMuted + } + + Text { + text: activeWindow + color: root.colPurple + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.fillWidth: true + Layout.leftMargin: 8 + elide: Text.ElideRight + maximumLineCount: 1 + } + + Text { + text: " " + cpuTemp + color: root.colRed + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.rightMargin: 8 + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 0 + Layout.rightMargin: 8 + color: root.colMuted + } + + + + Text { + text: " " + cpuUsage + "%" + color: root.colYellow + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.rightMargin: 8 + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 0 + Layout.rightMargin: 8 + color: root.colMuted + } + + Text { + text: " " + memUsage + "%" + color: root.colCyan + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.rightMargin: 8 + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 0 + Layout.rightMargin: 8 + color: root.colMuted + } + + Text { + text: " " + diskUsage + "%" + color: root.colBlue + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.rightMargin: 8 + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 0 + Layout.rightMargin: 8 + color: root.colMuted + } + + Text { + text: " " + volumeLevel + "%" + color: root.colPurple + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.rightMargin: 8 + } + + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 16 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 0 + Layout.rightMargin: 8 + color: root.colMuted + } + + Text { + id: clockText + text: Qt.formatDateTime(new Date(), "ddd, MMM dd - HH:mm") + color: root.colCyan + font.pixelSize: root.fontSize + font.family: root.fontFamily + font.bold: false + Layout.rightMargin: 8 + + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: clockText.text = Qt.formatDateTime(new Date(), "ddd, MMM dd - HH:mm") + } + } + + Item { width: 8 } + } + } + } + } +} + diff --git a/rofi/catppuccin-lavrent-mocha.rasi b/rofi/catppuccin-lavrent-mocha.rasi new file mode 100644 index 0000000..7c5b99e --- /dev/null +++ b/rofi/catppuccin-lavrent-mocha.rasi @@ -0,0 +1,114 @@ +/** + * Catppuccin Mocha theme + * Color palette copied from https://catppuccin.com/palette + * https://github.com/hiimsergey/rofi-catppuccin + */ + +* { + base: #1e1e2e; + surface0: #313244; + overlay0: #6c7086; + text: #cdd6f4; + + mauve: #cba6f7; + red: #f38ba8; + peach: #fab387; + green: #a6e3a1; + lavender: #b4befe; + + background-color: @base; +} + +window { + height: 600; + width: 600; + + border: 3; + border-radius: 10; + border-color: @lavender; +} + +mainbox { + spacing: 0; + children: [inputbar, message, listview]; +} + +inputbar { + color: @text; + padding: 14; + background-color: @base; +} + +message { + padding: 10; + background-color: @overlay0; +} + +listview { + padding: 8; + border-radius: 0 0 10 10; + border: 2 2 2 2; + border-color: @base; + background-color: @base; + dynamic: false; +} + +textbox { + text-color: @text; + background-color: inherit; +} + +error-message { + border: 20 20 20 20; +} + +entry, prompt, case-indicator { + text-color: inherit; +} + +prompt { + margin: 0 10 0 0; +} + +element { + padding: 5; + vertical-align: 0.5; + border-radius: 10; + background-color: @surface0; +} + +element.selected.normal { + background-color: @overlay0; +} + +element.alternate.normal { + background-color: inherit; +} + +element.normal.active, element.alternate.active { + background-color: @peach; +} + +element.selected.active { + background-color: @green; +} + +element.normal.urgent, element.alternate.urgent { + background-color: @red; +} + +element.selected.urgent { + background-color: @mauve; +} + +element-text, element-icon { + size: 40; + margin: 0 10 0 0; + vertical-align: 0.5; + background-color: inherit; + text-color: @text; +} + +element-text .active, element-text .urgent { + text-color: @base; +} diff --git a/rofi/config.rasi b/rofi/config.rasi new file mode 100644 index 0000000..a8c6cb4 --- /dev/null +++ b/rofi/config.rasi @@ -0,0 +1,13 @@ +configuration { + show-icons: true; + + display-ssh: " ssh:"; + display-run: " run:"; + display-drun: " drun:"; + display-window: " window:"; + display-combi: " combi:"; + display-filebrowser: " filebrowser:"; +} + +@theme "~/.config/rofi/catppuccin-lavrent-mocha.rasi" + diff --git a/scripts/cleanup-update.sh b/scripts/cleanup-update.sh new file mode 100755 index 0000000..519668f --- /dev/null +++ b/scripts/cleanup-update.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Arch Linux Update + Cleanup Script +# Author: ChatGPT +# Usage: ./arch-update-cleanup.sh + +set -euo pipefail + +# --- Colors for nice output --- +GREEN="\e[32m" +YELLOW="\e[33m" +RED="\e[31m" +RESET="\e[0m" + +echo -e "${GREEN}Starting Arch Linux update & cleanup...${RESET}" +echo + +# --- Step 1: Update pacman database and system --- +echo -e "${YELLOW}Updating system packages...${RESET}" +sudo pacman -Syu --noconfirm + +# --- Step 2: Remove unused dependencies --- +echo -e "${YELLOW}Removing unused dependencies...${RESET}" +sudo pacman -Rns $(pacman -Qtdq 2>/dev/null || echo "") || true + +# --- Step 3: Clean pacman cache (keep 3 latest versions) --- +echo -e "${YELLOW}Cleaning package cache...${RESET}" +sudo paccache -r -k3 + +# --- Step 4: Update AUR packages (if yay installed) --- +if command -v yay >/dev/null 2>&1; then + echo -e "${YELLOW}Updating AUR packages...${RESET}" + yay -Syu --noconfirm +fi + +# --- Step 5: Update Flatpak packages (if installed) --- +if command -v flatpak >/dev/null 2>&1; then + echo -e "${YELLOW}Updating Flatpak packages...${RESET}" + flatpak update -y +fi + +# --- Step 6: Update Snap packages (if installed) --- +if command -v snap >/dev/null 2>&1; then + echo -e "${YELLOW}Updating Snap packages...${RESET}" + sudo snap refresh +fi + +# --- Step 7: Optional cleanup: orphaned Flatpak runtimes --- +if command -v flatpak >/dev/null 2>&1; then + echo -e "${YELLOW}Removing unused Flatpak runtimes...${RESET}" + flatpak uninstall --unused -y +fi + +echo +echo -e "${GREEN}System update & cleanup complete!${RESET}" + diff --git a/scripts/fzf.sh b/scripts/fzf.sh new file mode 100755 index 0000000..5ef3dae --- /dev/null +++ b/scripts/fzf.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +set -e + +ZSHRC="$HOME/.zshrc" + +echo "▶ Installing fzf (Arch)…" +sudo pacman -S --needed fzf + +echo "▶ Updating ~/.zshrc…" + +# Remove unsupported Ctrl-R command if present +sed -i '/FZF_CTRL_R_COMMAND/d' "$ZSHRC" + +# Append config only if not already present +if ! grep -q "==== fzf key bindings (Arch Linux) ====" "$ZSHRC"; then +cat <<'EOF' >> "$ZSHRC" + +# ==== fzf key bindings (Arch Linux) ==== + +# Remove unsupported custom Ctrl-R command (prevents warning) +unset FZF_CTRL_R_COMMAND + +# fzf defaults +export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border" +export FZF_CTRL_R_OPTS="--tac --preview 'echo {}' --preview-window down:3:hidden:wrap" + +# Source fzf (Arch path) +if [[ -f /usr/share/fzf/key-bindings.zsh ]]; then + source /usr/share/fzf/key-bindings.zsh +fi + +if [[ -f /usr/share/fzf/completion.zsh ]]; then + source /usr/share/fzf/completion.zsh +fi + +# Ensure Ctrl+R works in vi insert mode +bindkey -M viins '^R' fzf-history-widget + +# ==== end fzf ==== +EOF +fi + +echo "✅ Done." +echo "➡ Open a NEW terminal or run: exec zsh" + diff --git a/scripts/lock.sh b/scripts/lock.sh new file mode 100755 index 0000000..e9e3323 --- /dev/null +++ b/scripts/lock.sh @@ -0,0 +1,2 @@ +hyprlock -c /home/subh/.config/hyprlock/hyprlock.conf + diff --git a/scripts/power.sh b/scripts/power.sh new file mode 100755 index 0000000..ef349fc --- /dev/null +++ b/scripts/power.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +choice=$(printf "⏻ Shutdown\n Reboot\n Suspend\n Logout" | rofi -dmenu -prompt "Power") + +case "$choice" in + "⏻ Shutdown") systemctl poweroff ;; + " Reboot") systemctl reboot ;; + " Suspend") systemctl suspend ;; + " Logout") /opt/scripts/lock.sh ;; +esac diff --git a/scripts/strap.sh b/scripts/strap.sh new file mode 100755 index 0000000..ea84acf --- /dev/null +++ b/scripts/strap.sh @@ -0,0 +1,222 @@ +#!/bin/sh +# strap.sh - setup BlackArch Linux keyring and install initial packages + +VERSION=20251011 +ARCH=$(uname -m) + +# mirror file to fetch and write +MIRROR_F='blackarch-mirrorlist' + +# simple error message wrapper +err() +{ + echo >&2 "$(tput bold; tput setaf 1)[-] ERROR: ${*}$(tput sgr0)" + + exit 1337 +} + +# simple warning message wrapper +warn() +{ + echo >&2 "$(tput bold; tput setaf 1)[!] WARNING: ${*}$(tput sgr0)" +} + +# simple echo wrapper +msg() +{ + echo "$(tput bold; tput setaf 2)[+] ${*}$(tput sgr0)" +} + +# check for root privilege +check_priv() +{ + if [ "$(id -u)" -ne 0 ]; then + err "you must be root" + fi +} + +# make a temporary directory and cd into +make_tmp_dir() +{ + tmp="$(mktemp -d /tmp/blackarch_strap.XXXXXXXX)" + + trap 'rm -rf $tmp' EXIT + + cd "$tmp" || err "Could not enter directory $tmp" +} + +set_umask() +{ + OLD_UMASK=$(umask) + + umask 0022 + + trap 'reset_umask' TERM +} + +reset_umask() +{ + umask $OLD_UMASK +} + +check_internet() +{ + tool='curl' + tool_opts='-s --connect-timeout 8' + + if ! $tool $tool_opts https://blackarch.org/ > /dev/null 2>&1; then + err "You don't have an Internet connection!" + fi + + return $SUCCESS +} + +# retrieve the BlackArch Linux keyring +fetch_keyring() +{ + curl -s -O \ + "https://www.blackarch.org/keyring/blackarch-keyring-$VERSION.tar.gz" + + curl -s -O \ + "https://www.blackarch.org/keyring/blackarch-keyring-$VERSION.tar.gz.sig" +} + +# verify the keyring signature +# note: this is pointless if you do not verify the key fingerprint +verify_keyring() +{ + if ! gpg --keyserver keyserver.ubuntu.com \ + --recv-keys 4345771566D76038C7FEB43863EC0ADBEA87E4E3 > /dev/null 2>&1 + then + if ! gpg --keyserver hkps://keyserver.ubuntu.com:443 \ + --recv-keys 4345771566D76038C7FEB43863EC0ADBEA87E4E3 > /dev/null 2>&1 + then + if ! gpg --keyserver hkp://pgp.mit.edu:80 \ + --recv-keys 4345771566D76038C7FEB43863EC0ADBEA87E4E3 > /dev/null 2>&1 + then + err "could not verify the key. Please check: https://blackarch.org/faq.html" + fi + fi + fi + + if ! gpg --keyserver-options no-auto-key-retrieve \ + --with-fingerprint "blackarch-keyring-$VERSION.tar.gz.sig" \ + > /dev/null 2>&1 + then + err "invalid keyring signature. please stop by https://matrix.to/#/#BlackArch:matrix.org" + fi +} + +# delete the signature files +delete_signature() +{ + if [ -f "blackarch-keyring-$VERSION.tar.gz.sig" ]; then + rm "blackarch-keyring-$VERSION.tar.gz.sig" + fi +} + +# make sure /etc/pacman.d/gnupg is usable +check_pacman_gnupg() +{ + pacman-key --init +} + +# install the keyring +install_keyring() +{ + tar xfz "blackarch-keyring-$VERSION.tar.gz" --strip-components=1 \ + -C /usr/share/pacman/keyrings/ + + # just in case + pacman-key --populate +} + +# ask user for mirror +get_mirror() +{ + mirror_p="/etc/pacman.d" + mirror_r="https://blackarch.org" + + msg "fetching new mirror list..." + if ! curl -s "$mirror_r/$MIRROR_F" -o "$mirror_p/$MIRROR_F" ; then + err "we couldn't fetch the mirror list from: $mirror_r/$MIRROR_F" + fi + + msg "you can change the default mirror under $mirror_p/$MIRROR_F" +} + +# update pacman.conf +update_pacman_conf() +{ + # delete blackarch related entries if existing + sed -i '/blackarch/{N;d}' /etc/pacman.conf + + cat >> "/etc/pacman.conf" << EOF +[blackarch] +Include = /etc/pacman.d/$MIRROR_F +EOF +} + +# synchronize and update +pacman_update() +{ + if pacman -Syy; then + return $SUCCESS + fi + + warn "Synchronizing pacman has failed. Please try manually: pacman -Syy" + + return $FAILURE +} + +pacman_upgrade() +{ + echo 'perform full system upgrade? (pacman -Su) [Yn]:' + read conf < /dev/tty + case "$conf" in + ''|y|Y) pacman -Su ;; + n|N) warn 'some blackarch packages may not work without an up-to-date system.' ;; + esac +} + + +# setup blackarch linux +blackarch_setup() +{ + msg 'installing blackarch keyring...' + check_priv + set_umask + make_tmp_dir + check_internet + fetch_keyring + #verify_keyring + delete_signature + check_pacman_gnupg + install_keyring + + echo + msg 'keyring installed successfully' + # check if pacman.conf has already a mirror + if ! grep -q "\[blackarch\]" /etc/pacman.conf; then + msg 'configuring pacman' + get_mirror + msg 'updating pacman.conf' + update_pacman_conf + fi + msg 'updating package databases' + pacman_update + reset_umask + msg 'installing blackarch-mirrorlist package' + pacman -S --noconfirm blackarch-mirrorlist + if [ -f /etc/pacman.d/blackarch-mirrorlist.pacnew ]; then + mv /etc/pacman.d/blackarch-mirrorlist.pacnew \ + /etc/pacman.d/blackarch-mirrorlist + fi + msg 'BlackArch repository is ready!' + msg 'You can install `blackarch-officials` metapackage with the most popular tools using the command below:' + msg 'sudo pacman -S --needed blackarch-officials' +} + +blackarch_setup + + diff --git a/scripts/vpn_connect.sh b/scripts/vpn_connect.sh new file mode 100755 index 0000000..d08b397 --- /dev/null +++ b/scripts/vpn_connect.sh @@ -0,0 +1,14 @@ +output=$(protonvpn connect) + +if echo "$output" | grep -q "Connection failed"; then + notify-send -u critical -i dialog-error "VPN Connection Status" "Failed to connect to VPN. Please check your network settings." +else + region=$(echo "$output" | awk '{print $3 ":" $12}') + + if [ -z "$region" ]; then + notify-send -u critical -i dialog-error "VPN Connection Status" "Failed to connect to VPN. Please check your connection settings." + else + notify-send -u normal -i network-wireless "VPN Connection Status" "Successfully connected to VPN. Region: $region" + fi +fi + diff --git a/scripts/vpn_disconnect.sh b/scripts/vpn_disconnect.sh new file mode 100755 index 0000000..bf46c20 --- /dev/null +++ b/scripts/vpn_disconnect.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +disc=$(protonvpn disconnect) + +if [ -z "$disc" ]; then + notify-send -u normal -i network-wireless "VPN Connection Status" "VPN successfully disconnected" +fi diff --git a/scripts/wallpaper-picker.sh b/scripts/wallpaper-picker.sh new file mode 100755 index 0000000..266c6dd --- /dev/null +++ b/scripts/wallpaper-picker.sh @@ -0,0 +1,15 @@ + +#!/bin/bash + +WALL_DIR="$HOME/wallpapers" + +choices=$(find "$WALL_DIR" -type f \( -iname "*.jpg" -o -iname "*.png" -o -iname "*.webp" \) \ + | sort \ + | rofi -dmenu -i -p "Pick wallpaper") + +[ -z "$choices" ] && exit +swww img "$choices" \ + --transition-fps 60 \ + --transition-type any + + diff --git a/scripts/wifi-connect.sh b/scripts/wifi-connect.sh new file mode 100755 index 0000000..b34f8f4 --- /dev/null +++ b/scripts/wifi-connect.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +[[ "$(nmcli -g WIFI general)" == "disabled" ]] && nmcli radio wifi on + +NETWORKS=$(nmcli -f SSID,SIGNAL,SECURITY dev wifi list | tail -n +2 | \ +awk -F ' +' ' + $1 != "" { + display = sprintf("%s (%s%%) [%s]", $1, $2, $3) + print display + } +' | sort -u) + +CHOICE=$(echo "$NETWORKS" | rofi -dmenu -i -p "WiFi") +[[ -z "$CHOICE" ]] && exit 0 + +SSID=$(echo "$CHOICE" | sed 's/ (.*//') + +BSSID=$(nmcli -t -f BSSID,SIGNAL dev wifi list | grep "^.*:$SSID$" | \ +awk -F: '{print $1}' | sort -nr | head -n1) + +[[ -z "$BSSID" ]] && BSSID="$SSID" + +if nmcli dev wifi connect "$BSSID" 2>/dev/null; then + notify-send -u normal -i network-wireless "WiFi Status" "$SSID Connected Successfully" +else + PASSWORD=$(rofi -dmenu -password -p "Password for $SSID") + [[ -z "$PASSWORD" ]] && exit 1 + nmcli dev wifi connect "$BSSID" password "$PASSWORD" && \ + notify-send -u normal -i network-wireless "WiFi Status" "$SSID Connected Successfully" +fi + diff --git a/scripts/wifi-disconnect.sh b/scripts/wifi-disconnect.sh new file mode 100755 index 0000000..aeaaa10 --- /dev/null +++ b/scripts/wifi-disconnect.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +output=$(nmcli device disconnect wlp8s0) +status_code=$? + +if [ $status_code -ne 0 ]; then + notify-send -u critical -i dialog-error "WiFi Status" "Failed to disconnect. Device not connected." +else + if echo $output | grep -q "successfully disconnected"; then + notify-send -u normal -i network-wireless "WiFi Status" "Device wlp8s0 disconnected." + fi +fi + diff --git a/swaync/style.css b/swaync/style.css new file mode 100644 index 0000000..19426bc --- /dev/null +++ b/swaync/style.css @@ -0,0 +1,328 @@ +* { + all: unset; + font-size: 14px; + font-family: "Iosevka Nerd Fonti Propo"; + transition: 200ms; +} + +trough highlight { + background: #cdd6f4; +} + +scale { + margin: 0 7px; +} + +scale trough { + margin: 0rem 1rem; + min-height: 8px; + min-width: 70px; + border-radius: 12.6px; +} + +trough slider { + margin: -10px; + border-radius: 12.6px; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.8); + transition: all 0.2s ease; + background-color: #89b4fa; +} + +trough slider:hover { + box-shadow: 0 0 2px rgba(0, 0, 0, 0.8), 0 0 8px #89b4fa; +} + +trough { + background-color: #313244; +} + +/* notifications */ +.notification-background { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #45475a; + border-radius: 12.6px; + margin: 18px; + background: #181825; + color: #cdd6f4; + padding: 0; +} + +.notification-background .notification { + padding: 7px; + border-radius: 12.6px; +} + +.notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #f38ba8; +} + +.notification .notification-content { + margin: 7px; +} + +.notification .notification-content overlay { + /* icons */ + margin: 4px; +} + +.notification-content .summary { + color: #cdd6f4; +} + +.notification-content .time { + color: #a6adc8; +} + +.notification-content .body { + color: #bac2de; +} + +.notification > *:last-child > * { + min-height: 3.4em; +} + +.notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #1e1e2e; + background-color: #f38ba8; +} + +.notification-background .close-button:hover { + background-color: #eba0ac; +} + +.notification-background .close-button:active { + background-color: #f5c2e7; +} + +.notification .notification-action { + border-radius: 7px; + color: #cdd6f4; + box-shadow: inset 0 0 0 1px #45475a; + margin: 4px; + padding: 8px; + font-size: 0.2rem; /* controls the button size not text size*/ +} + +.notification .notification-action { + background-color: #313244; +} + +.notification .notification-action:hover { + background-color: #45475a; +} + +.notification .notification-action:active { + background-color: #585b70; +} + +.notification.critical progress { + background-color: #f38ba8; +} + +.notification.low progress, +.notification.normal progress { + background-color: #89b4fa; +} + +.notification progress, +.notification trough, +.notification progressbar { + border-radius: 12.6px; + padding: 3px 0; +} + +/* control center */ +.control-center { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; + border-radius: 12.6px; + background-color: #1e1e2e; + color: #cdd6f4; + padding: 14px; +} + +.control-center .notification-background { + border-radius: 7px; + box-shadow: inset 0 0 0 1px #45475a; + margin: 4px 10px; +} + +.control-center .notification-background .notification { + border-radius: 7px; +} + +.control-center .notification-background .notification.low { + opacity: 0.8; +} + +.control-center .widget-title > label { + color: #cdd6f4; + font-size: 1.3em; +} + +.control-center .widget-title button { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + padding: 8px; +} + +.control-center .widget-title button:hover { + background-color: #45475a; +} + +.control-center .widget-title button:active { + background-color: #585b70; +} + +.control-center .notification-group { + margin-top: 10px; +} + +.control-center .notification-group:focus .notification-background { + background-color: #313244; +} + +scrollbar slider { + margin: -3px; + opacity: 0.8; +} + +scrollbar trough { + margin: 2px 0; +} + +/* dnd */ +.widget-dnd { + margin-top: 5px; + border-radius: 8px; + font-size: 1.1rem; +} + +.widget-dnd > switch { + font-size: initial; + border-radius: 8px; + background: #313244; + box-shadow: none; +} + +.widget-dnd > switch:checked { + background: #89b4fa; +} + +.widget-dnd > switch slider { + background: #45475a; + border-radius: 8px; +} + +/* mpris */ +.widget-mpris-player { + background: #313244; + border-radius: 12.6px; + color: #cdd6f4; +} + +.mpris-overlay { + background-color: #313244; + opacity: 0.9; + padding: 15px 10px; +} + +.widget-mpris-album-art { + -gtk-icon-size: 100px; + border-radius: 12.6px; + margin: 0 10px; +} + +.widget-mpris-title { + font-size: 1.2rem; + color: #cdd6f4; +} + +.widget-mpris-subtitle { + font-size: 1rem; + color: #bac2de; +} + +.widget-mpris button { + border-radius: 12.6px; + color: #cdd6f4; + margin: 0 5px; + padding: 2px; +} + +.widget-mpris button image { + -gtk-icon-size: 1.8rem; +} + +.widget-mpris button:hover { + background-color: #313244; +} + +.widget-mpris button:active { + background-color: #45475a; +} + +.widget-mpris button:disabled { + opacity: 0.5; +} + +.widget-menubar > box > .menu-button-bar > button > label { + font-size: 3rem; + padding: 0.5rem 2rem; +} + +.widget-menubar > box > .menu-button-bar > :last-child { + color: #f38ba8; +} + +.power-buttons button:hover, +.powermode-buttons button:hover, +.screenshot-buttons button:hover { + background: #313244; +} + +.control-center .widget-label > label { + color: #cdd6f4; + font-size: 2rem; +} + +.widget-buttons-grid { + padding-top: 1rem; +} + +.widget-buttons-grid > flowbox > flowboxchild > button label { + font-size: 2.5rem; +} + +.widget-volume { + padding: 1rem 0; +} + +.widget-volume label { + color: #74c7ec; + padding: 0 1rem; +} + +.widget-volume trough highlight { + background: #74c7ec; +} + +.widget-backlight trough highlight { + background: #f9e2af; +} + +.widget-backlight label { + font-size: 1.5rem; + color: #f9e2af; +} + +.widget-backlight .KB { + padding-bottom: 1rem; +} + +.image { + padding-right: 0.5rem; +} diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..f32667f --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,120 @@ +# Enable 256 color support +set -g default-terminal "tmux-256color" +set -ga terminal-overrides ",*:RGB" + +# Enable clipboard +set -g set-clipboard on + +# Change prefix from Ctrl-b to Ctrl-z +unbind C-b +set -g prefix C-z +bind-key C-z send-prefix + +# Vim-style pane navigation +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Split windows (opens in same directory) +unbind % +bind | split-window -h -c "#{pane_current_path}" + +unbind '"' +bind - split-window -v -c "#{pane_current_path}" + +# Reload config +unbind r +bind r source-file $HOME/.config/tmux/tmux.conf + +# Alt+hjkl to switch panes without prefix +bind -n M-h select-pane -L +bind -n M-j select-pane -D +bind -n M-k select-pane -U +bind -n M-l select-pane -R + +# Alt+number to select window +bind -n M-1 select-window -t 1 +bind -n M-2 select-window -t 2 +bind -n M-3 select-window -t 3 +bind -n M-4 select-window -t 4 +bind -n M-5 select-window -t 5 +bind -n M-6 select-window -t 6 +bind -n M-7 select-window -t 7 +bind -n M-8 select-window -t 8 +bind -n M-9 select-window -t 9 + + + +# Tokyo Night Moon theme colors +thm_bg="#222436" +thm_fg="#c8d3f5" +thm_cyan="#86e1fc" +thm_black="#1b1d2b" +thm_gray="#3a3f5a" +thm_magenta="#c099ff" +thm_pink="#ff757f" +thm_red="#ff757f" +thm_green="#c3e88d" +thm_yellow="#ffc777" +thm_blue="#82aaff" +thm_orange="#ff9e64" +thm_black4="#444a73" + +# Status bar settings +set -g status "on" +set -g status-bg "${thm_bg}" +set -g status-justify "left" +set -g status-left-length "100" +set -g status-right-length "100" + +# Messages +set -g message-style "fg=${thm_cyan},bg=${thm_gray},align=centre" +set -g message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre" + +# Panes +set -g pane-border-style "fg=${thm_gray}" +set -g pane-active-border-style "fg=${thm_blue}" + +# Windows +set -g window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none" +set -g window-status-separator "" +set -g window-status-style "fg=${thm_fg},bg=${thm_bg},none" + + + +# Statusline - current window +set -g window-status-current-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_magenta},bg=${thm_bg}]( ) #[fg=${thm_cyan},bg=${thm_bg}]#(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) #[fg=${thm_magenta},bg=${thm_bg}]" + +# Statusline - other windows +set -g window-status-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_fg},bg=${thm_bg}]#W" + +# Statusline - right side +set -g status-right "#[fg=${thm_blue},bg=${thm_bg},nobold,nounderscore,noitalics]#[fg=${thm_bg},bg=${thm_blue},nobold,nounderscore,noitalics] #[fg=${thm_fg},bg=${thm_gray}] #W #{?client_prefix,#[fg=${thm_magenta}],#[fg=${thm_cyan}]}#[bg=${thm_gray}]#{?client_prefix,#[bg=${thm_magenta}],#[bg=${thm_cyan}]}#[fg=${thm_bg}] #[fg=${thm_fg},bg=${thm_gray}] #S " + +# Statusline - left side (empty) +set -g status-left "" + +# Modes +set -g clock-mode-colour "${thm_blue}" +set -g mode-style "fg=${thm_blue} bg=${thm_black4} bold" + + +# Change from 0 based to 1 based because keyboard layout +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# Vim-like copy/paste +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel +unbind -T copy-mode-vi MouseDragEnd1Pane + + + + + + diff --git a/vim/plugged/fzf b/vim/plugged/fzf new file mode 160000 +Subproject d1f037059ab57aa1c70abe124b2b72a710f4a28 diff --git a/vim/plugged/fzf.vim b/vim/plugged/fzf.vim new file mode 160000 +Subproject ddc14a6a5471147e2a38e6b32a7268282f669b0 diff --git a/vim/plugged/lightline.vim b/vim/plugged/lightline.vim new file mode 160000 +Subproject e358557e1a9f9fc860416c8eb2e34c040407815 diff --git a/vim/plugged/tokyonight-vim b/vim/plugged/tokyonight-vim new file mode 160000 +Subproject 4e82e0f0452a6ce8f387828ec71013015515035 diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..2d85f47 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,182 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH + +source <(fzf --zsh) +# CTRL-Y to copy the command into clipboard using pbcopy +#####Exports###### +################## +export FZF_CTRL_R_OPTS=" + --bind 'ctrl-y:execute-silent(echo -n {2..} | pbcopy)+abort' + --color header:italic + --header 'Press CTRL-Y to copy command into clipboard'" +export ZSH="$HOME/.oh-my-zsh" +export JAVA_HOME=/opt/java/jdk-24.0.2/ +export PATH=$JAVA_HOME/bin:$PATH +export PATH=/home/subh/go:/home/subh/.cargo/bin:$PATH + +eval "$(zoxide init zsh --cmd cd)" +fastfetch --config os +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time Oh My Zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="agnoster" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment th following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='nvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch $(uname -m)" + +# Set personal aliases, overriding those provided by Oh My Zsh libs, +# plugins, and themes. Aliases can be placed here, though Oh My Zsh +# users are encouraged to define aliases within a top-level file in +# the $ZSH_CUSTOM folder, with .zsh extension. Examples: +# - $ZSH_CUSTOM/aliases.zsh +# - $ZSH_CUSTOM/macos.zsh +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" +alias v="vim" +alias open="feh" +alias ls='exa -la' +alias venv='source /home/subh/venv/bin/activate' +alias y='yazi' +alias yi='yay -S' +alias pu='sudo pacman -Syu' +alias pi='sudo pacman -S' +alias grep='rg' +alias find='fd -c always' +alias cat='bat' +bindkey '^H' backward-kill-word +bindkey ' ' magic-space +# ==== fzf key bindings (Arch Linux) ==== + +# Remove unsupported custom Ctrl-R command (zsh warning fix) + +# fzf defaults +# ===== fzf appearance ===== + +export FZF_DEFAULT_OPTS=" + --height=40% + --layout=reverse + --border=rounded + --info=inline + --prompt='❯ ' + --pointer='▶' + --marker='✓' +" +export FZF_CTRL_R_OPTS=" + --tac + --preview 'echo {}' + --preview-window=down:3:hidden:wrap + --header='Ctrl-R: search history | Ctrl-J/K move | Enter select' +" + +export FZF_DEFAULT_OPTS="\ +--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \ +--color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \ +--color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \ +--color=selected-bg:#45475A \ +--color=border:#6C7086,label:#CDD6F4" +#export FZF_CTRL_R_OPTS="--tac --preview 'echo {}' --preview-window down:3:hidden:wrap" + +# Source fzf (Arch path) +if [[ -f /usr/share/fzf/key-bindings.zsh ]]; then + source /usr/share/fzf/key-bindings.zsh +fi + +if [[ -f /usr/share/fzf/completion.zsh ]]; then + source /usr/share/fzf/completion.zsh +fi + +# Ensure Ctrl+R works in vi insert mode too +bindkey -M viins '^R' fzf-history-widget + +# ==== end fzf ==== + +# Created by `pipx` on 2026-01-10 08:53:29 +export PATH="$PATH:/home/subh/.local/bin" + +PATH="/home/subh/perl5/bin${PATH:+:${PATH}}"; export PATH; +PERL5LIB="/home/subh/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="/home/subh/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"/home/subh/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=/home/subh/perl5"; export PERL_MM_OPT; |
