diff --git a/Librewolf/chrome/userContent.css b/Librewolf/chrome/userContent.css index 985c3c9..22ee9bd 100644 --- a/Librewolf/chrome/userContent.css +++ b/Librewolf/chrome/userContent.css @@ -420,4 +420,12 @@ url-prefix("about:home") { display: block !important; } + +@-moz-document url(about:privatebrowsing){ + html.private{ background-color: #2B2A33 !important; } /* back color */ + html.private div.showSearch button.search-handoff-button { + background-color: #42414D !important; } /* search box back color */ + html.private div.showPrivate div.info { display: none !important; } /* hide bottom panel */ +} + /* devtools.debugger.remote-enabled */ \ No newline at end of file diff --git a/hyprland/waybar/hyprland.conf b/hyprland/waybar/hyprland.conf deleted file mode 100644 index 06692a0..0000000 --- a/hyprland/waybar/hyprland.conf +++ /dev/null @@ -1,281 +0,0 @@ - -# ####################################################################################### -# AUTOGENERATED HYPR CONFIG. -# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, -# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. -# ####################################################################################### - -autogenerated = 0 # remove this line to remove the warning - -# This is an example Hyprland config file. -# Refer to the wiki for more information. -# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ - -# Please note not all available settings / options are set here. -# For a full list, see the wiki - -# You can split this configuration into multiple files -# Create your files separately and then link them to this file like this: -# source = ~/.config/hypr/myColors.conf - - -################ -### MONITORS ### -################ - -# See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,preferred,auto,auto - -exec-once = swaybg --image "$(find /home/ion606/Pictures/astolfo/ -type f | shuf -n 1)" --mode fill -# bindsym $mod+b exec swaymsg output "*" bg "$(find /home/ion606/Pictures/bk/ -type f | shuf -n 1)" fill - -################### -### MY PROGRAMS ### -################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ - -# Set programs that you use -$terminal = alacritty -$fileManager = nautilus -$menu = wofi --show drun - - -################# -### AUTOSTART ### -################# - -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -# exec-once = $terminal -exec-once = waybar -exec-once = nm-applet --indicator -exec-once = blueman-applet -exec = mako -exec-once = bash /home/ion606/getargs.sh -# exec-once = nm-applet & -# exec-once = waybar & hyprpaper & firefox - - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -# See https://wiki.hyprland.org/Configuring/Environment-variables/ - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - - -##################### -### LOOK AND FEEL ### -##################### - -# Refer to https://wiki.hyprland.org/Configuring/Variables/ - -# https://wiki.hyprland.org/Configuring/Variables/#general -general { - gaps_in = 0 - gaps_out = 0 - - border_size = 2 - - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = hy3 -} - -# https://wiki.hyprland.org/Configuring/Variables/#decoration -decoration { - rounding = 10 - - # Change transparency of focused and unfocused windows - active_opacity = 1.0 - inactive_opacity = 1.0 - - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) - - # https://wiki.hyprland.org/Configuring/Variables/#blur - blur { - enabled = true - size = 3 - passes = 1 - - vibrancy = 0.1696 - } -} - -# https://wiki.hyprland.org/Configuring/Variables/#animations -animations { - enabled = true - - # 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 -} - -# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more -dwindle { - pseudotile = true # Master switch 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 = -1 # 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 = 0 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = true - } -} - -# https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = 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 -} - - -################### -### KEYBINDINGS ### -################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ -$mainMod = SUPER # Sets "Windows" key as main modifier - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Return, exec, $terminal -bind = Super_Shift, Q, killactive, -bind = Super_Shift, E, exit, -bind = $mainMod, L, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, D, exec, $menu -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, # dwindle -bind = $mainMod, S, hy3:makegroup, tab - -# Move focus with mainMod + arrow keys -bind = $mainMod, left, hy3:movefocus, l -bind = $mainMod, right, hy3:movefocus, r -bind = $mainMod, up, hy3:movefocus, u -bind = $mainMod, down, hy3:movefocus, d -bind = Super_Shift, left, hy3:movewindow, l -bind = Super_Shift, right, hy3:movewindow, r -bind = Super_Shift, up, hy3:movewindow, u -bind = Super_Shift, down, hy3:movewindow, d -bind = $mainMod, F, fullscreen - -bind = $mainMod, Print, exec, grim -g "$(slurp)" - | wl-copy -bind = Super_Shift, C, exec, swaybg --image "$(find /home/ion606/Pictures/astolfo/ -type f | shuf -n 1)" --mode fill -bind = $mainMod, C, exec, swaylock --image "/home/ion606/Pictures/ohnocringe.jpg" - -# 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 - -# Laptop multimedia keys for volume and LCD brightness -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ -bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules - -# Example windowrule v1 -# windowrule = float, ^(kitty)$ - -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - -plugin = /usr/lib/libhy3.so -source = /home/ion606/.config/hypr/hy3.conf - -windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. diff --git a/lockscreen.sh b/lockscreen.sh deleted file mode 100644 index 8d3ad15..0000000 --- a/lockscreen.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Define the image paths -IMAGE1="/home/ion606/Pictures/windowsanime2.jpg" -IMAGE2="/home/ion606/Pictures/windowsanime.jpg" - -# Randomly select one of the images -if [ $((RANDOM % 2)) -eq 0 ]; then - SELECTED_IMAGE="$IMAGE1" -else - SELECTED_IMAGE="$IMAGE2" -fi - -# Run swaylock with the selected image -swaylock --image "$SELECTED_IMAGE" diff --git a/packages.txt b/packages.txt new file mode 100644 index 0000000..4a290d0 --- /dev/null +++ b/packages.txt @@ -0,0 +1,227 @@ +adwaita-qt5-git +adwaita-qt6-git +alacritty +alacritty-themes +ani-cli +asciiquarium +audacity +base +base-devel +batsignal +bind +blueman +bluez-utils +brightnessctl +btrfs-progs +cloudflare-warp-bin +cloudflared +cmake +cmatrix +coppwr-bin +corectrl +cpio +debugedit +dive +dkms +dmenu +dnslookup-bin +dnsmasq +docker +docker-buildx +dog +dunst +efibootmgr +erlang +etcher-cli-bin +eww +feh +fish +fisher +fprintd +fzf +gcc-d +gdb +ghostscript +gimp +git +github-cli +glibc-debug +gnome-themes-extra +gnome-tweaks +gnu-free-fonts +gnu-netcat +go +go-task +gparted +gradience +graphviz +grim +gsfonts +htop +i3-wm +i3lock-color +i8kutils +imagemagick +inetutils +jmtpfs +jq +jre-openjdk +jre21-openjdk +jre8-openjdk +krita +less +libreoffice-fresh +librewolf-bin +linux +linux-firmware +lshw +maim +mako +man-db +man-pages +mc +megasync +min +minikube +mpv +mtpfs +neovim +network-manager-applet +networkmanager +networkmanager-openvpn +nmap +notify-osd +noto-fonts-emoji +npm +ntfs-3g +nvidia +nvidia-prime +nvidia-settings +nvtop +obs-studio +obsidian +openresolv +openvpn +openvpn3 +osu-lazer-bin +otf-ipafont +pavucontrol +picom +pipewire-alsa +pipewire-pulse +playwright +plocate +polkit-gnome +polybar +postgis +postgresql +powertop-git +prismlauncher +pulseaudio-alsa +python-black +python-certifi +python-pip +qbittorrent +qpwgraph +qt5-wayland +qt6-wayland +redis +rinetd +rofi +rpmextract +screen +scrot +slack-desktop +slurp +sof-firmware +starship +sudo +swaks +sway +swaybg +swayidle +swaylock +tailscale +texlive-basic +texlive-bibtexextra +texlive-binextra +texlive-context +texlive-fontsextra +texlive-fontsrecommended +texlive-fontutils +texlive-formatsextra +texlive-games +texlive-humanities +texlive-latex +texlive-latexextra +texlive-latexrecommended +texlive-luatex +texlive-mathscience +texlive-metapost +texlive-music +texlive-pictures +texlive-plaingeneric +texlive-pstricks +texlive-publishers +texlive-xetex +thunar-devel +thunar-media-tags-plugin +thunderbird +tk +tmux +toilet +torbrowser-launcher +tree +ttf-bitstream-vera +ttf-croscore +ttf-dejavu +ttf-droid +ttf-fira-code +ttf-fira-mono +ttf-fira-sans +ttf-font-awesome +ttf-jetbrains-mono-nerd +ttf-liberation +ttf-nerd-fonts-symbols +ttf-opensans +ttf-roboto +ttf-ubuntu-font-family +ufw +unzip +usbmuxd +usbutils +vagrant +valgrind +ventoy-bin +vesktop-bin +vim +virt-viewer +virtualbox6.1-bin +visual-studio-code-bin +vlc +warp +waybar +wev +wg-client +wget +wine +wireguard-go-git +wireguard-tools +wireshark-qt +wl-clipboard +wl-mirror +wmctrl +woeusb-ng +wofi +xclip +xdg-desktop-portal +xdg-desktop-portal-hyprland +xdg-desktop-portal-wlr +xdotool +xorg-server +xorg-server-devel +xorg-xev +xorg-xhost +xorg-xinit +xorg-xlsclients +zip diff --git a/setup.sh b/setup.sh index 5a5cf37..2fc1e72 100644 --- a/setup.sh +++ b/setup.sh @@ -10,35 +10,37 @@ sudo pacman -Sy --needed --noconfirm --noconfirm fzf git yay USERTEMP=$(who | awk '{print $1}' | sort -u | fzf) # Explain what the script will do and ask for confirmation -echo "This script will install and do the following: +echo "This script will install and configure the following: - Configuration files from https://github.com/ION606/swaybackup.git - Librewolf browser - Visual Studio Code -- Various fonts -- The latest version of Java +- Various modern and nerd fonts +- The latest versions of Java (multiple versions) - Alacritty terminal - Nautilus file manager -- Node.js +- Node.js and NPM packages - Git and GitHub CLI - Neovim - Gparted - VLC media player -- GCC and G++ -- Asciiquarium -- Thunderbird +- GCC and G++ (development tools) +- Asciiquarium (fun ASCII aquarium) +- Thunderbird (email client) - Grim and Slurp (screenshot tools) -- Xclip -- Qbittorrent -- Gimp -- Audacity -- Python3-pip -- NPM packages (Bitwarden CLI, Alacritty themes, Typescript) -- Vesktop -- Docker -- Minikube -- Gnome Tweaks -- Remove Thunar and Foot -- Clean up and update system +- Xclip (clipboard management) +- Qbittorrent (torrent client) +- GIMP (image editing) +- Audacity (audio editing) +- Python3-pip (Python package manager) +- Docker and Minikube (containerization and Kubernetes) +- Gnome Tweaks (desktop customization) +- TexLive (LaTeX tools and fonts) +- Obsidian (note-taking app) +- Starship (customizable shell prompt) +- Tailscale (VPN) +- Warp (Cloudflare's VPN) +- Remove Thunar and Foot (if present) +- Clean up and update the system Do you want to proceed? (Y/N, default Y): " read answer @@ -54,16 +56,31 @@ mkdir $USERTEMP/Downloads/tempinstall || "" cd $USERTEMP/Downloads/tempinstall # Configuration Files -git clone https://github.com/ION606/swaybackup.git -cd swaybackup +git clone https://github.com/ION606/config-backup.git +cd config-backup + +# sway mv -f waybar/config /etc/xdg/waybar/ -mv -f waybar/style.css /etc/xdg/waybar +mv -f waybar/style.css /etc/xdg/waybar/ mv -f config $USERTEMP/.config/sway/config -mf -f lockscreen.sh $USERTEMP/lockscreen.sh # replace "ion606" with the selected user sed -i "s/ion606/$USERTEMP/g" config +# hyprland +mv -f hyprland/hy3.conf /home/$USERTEMP/config/hypr/hy3.conf +mv -f hyprland/hyprland.conf /home/$USERTEMP/config/hypr/hyprland.conf + +# i3 +mv -f i3/config /home/$USERTEMP/config/i3/config +mv -f i3/lockscreen.sh /home/$USERTEMP/config/i3/lockscreen.sh + +# terminal +mv -f terminal/fish /home/$USERTEMP/.config/ +mkdir -p /home/$USERTEMP/.config/alacritty/ +mv -f terminal/alacritty.toml /home/$USERTEMP/.config/alacritty/ +mv -f terminal/starship.toml /home/$USERTEMP/.config/ + # set up automations in child process mkdir -p $USERTEMP/.automations && cp -r -f auto/* $USERTEMP/.automations/ && $(sudo pacman -Sy --needed --noconfirm dunst && sudo bash $USERTEMP/.automations/setupauto.sh $USERTEMP &> $USERTEMP/setuplogs.log) & @@ -84,13 +101,9 @@ LATEST_JDK=$(sudo dnf list available | grep -E 'java-[0-9]+-openjdk' | awk '{pri # General Package Install -yay -Sy --needed --noconfirm alacritty nautilus nodejs librewolf vscodium-bin \ - git gh proton-vpn-gnome-desktop neovim gparted liberation-fonts \ - vlc gcc gcc-c++ asciiquarium thunderbird grim slurp xclip \ - qbittorrent gimp audacity python3-pip htop obs-studio gnome-tweaks \ - torbrowser-launcher lm_sensors fancontrol blueman blueman-applet docker minikube \ - min-browser-bin libreoffice-fresh npm wofi nm-applet nm-connection-editor mako\ - || echo "failed to install some packages!" +yay -Sy --needed --noconfirm - < packages.txt || echo "failed to install some packages!" + +mv -f Librewolf/chrome /home/$USERTEMP/.librewolf/ npm install -g @bitwarden/cli alacritty-themes typescript || echo "failed to install Typescript!" diff --git a/terminal/alacritty.toml b/terminal/alacritty.toml new file mode 100644 index 0000000..f56acf4 --- /dev/null +++ b/terminal/alacritty.toml @@ -0,0 +1,48 @@ +[colors.bright] +black = "#686868" +blue = "#57C7FF" +cyan = "#A4FFFF" +green = "#5AF78E" +magenta = "#FF92D0" +red = "#FF6E67" +white = "#FFFFFF" +yellow = "#F3F99D" + +[colors.normal] +black = "#282A36" +blue = "#57C7FF" +cyan = "#9AEDFE" +green = "#5AF78E" +magenta = "#FF6AC1" +red = "#FF5C57" +white = "#F1F1F0" +yellow = "#F3F99D" + +[colors.primary] +background = "#000000" +foreground = "#BF00FF" + +[font] +size = 8 + +[font.bold] +family = "Fira Code" +style = "Bold" + +[font.italic] +family = "Fira Code" +style = "Italic" + +[font.normal] +family = "Fira Code" +style = "Regular" + +[window] +opacity = 0.8 + +[cursor] +blink_interval = 500 + +[cursor.style] +shape = "Block" +blinking = "Always" diff --git a/terminal/fish/completions/glow.fish b/terminal/fish/completions/glow.fish new file mode 100644 index 0000000..f96b62e --- /dev/null +++ b/terminal/fish/completions/glow.fish @@ -0,0 +1,235 @@ +# fish completion for glow -*- shell-script -*- + +function __glow_debug + set -l file "$BASH_COMP_DEBUG_FILE" + if test -n "$file" + echo "$argv" >> $file + end +end + +function __glow_perform_completion + __glow_debug "Starting __glow_perform_completion" + + # Extract all args except the last one + set -l args (commandline -opc) + # Extract the last arg and escape it in case it is a space + set -l lastArg (string escape -- (commandline -ct)) + + __glow_debug "args: $args" + __glow_debug "last arg: $lastArg" + + # Disable ActiveHelp which is not supported for fish shell + set -l requestComp "GLOW_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" + + __glow_debug "Calling $requestComp" + set -l results (eval $requestComp 2> /dev/null) + + # Some programs may output extra empty lines after the directive. + # Let's ignore them or else it will break completion. + # Ref: https://github.com/spf13/cobra/issues/1279 + for line in $results[-1..1] + if test (string trim -- $line) = "" + # Found an empty line, remove it + set results $results[1..-2] + else + # Found non-empty line, we have our proper output + break + end + end + + set -l comps $results[1..-2] + set -l directiveLine $results[-1] + + # For Fish, when completing a flag with an = (e.g., -n=) + # completions must be prefixed with the flag + set -l flagPrefix (string match -r -- '-.*=' "$lastArg") + + __glow_debug "Comps: $comps" + __glow_debug "DirectiveLine: $directiveLine" + __glow_debug "flagPrefix: $flagPrefix" + + for comp in $comps + printf "%s%s\n" "$flagPrefix" "$comp" + end + + printf "%s\n" "$directiveLine" +end + +# this function limits calls to __glow_perform_completion, by caching the result behind $__glow_perform_completion_once_result +function __glow_perform_completion_once + __glow_debug "Starting __glow_perform_completion_once" + + if test -n "$__glow_perform_completion_once_result" + __glow_debug "Seems like a valid result already exists, skipping __glow_perform_completion" + return 0 + end + + set --global __glow_perform_completion_once_result (__glow_perform_completion) + if test -z "$__glow_perform_completion_once_result" + __glow_debug "No completions, probably due to a failure" + return 1 + end + + __glow_debug "Performed completions and set __glow_perform_completion_once_result" + return 0 +end + +# this function is used to clear the $__glow_perform_completion_once_result variable after completions are run +function __glow_clear_perform_completion_once_result + __glow_debug "" + __glow_debug "========= clearing previously set __glow_perform_completion_once_result variable ==========" + set --erase __glow_perform_completion_once_result + __glow_debug "Succesfully erased the variable __glow_perform_completion_once_result" +end + +function __glow_requires_order_preservation + __glow_debug "" + __glow_debug "========= checking if order preservation is required ==========" + + __glow_perform_completion_once + if test -z "$__glow_perform_completion_once_result" + __glow_debug "Error determining if order preservation is required" + return 1 + end + + set -l directive (string sub --start 2 $__glow_perform_completion_once_result[-1]) + __glow_debug "Directive is: $directive" + + set -l shellCompDirectiveKeepOrder 32 + set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) + __glow_debug "Keeporder is: $keeporder" + + if test $keeporder -ne 0 + __glow_debug "This does require order preservation" + return 0 + end + + __glow_debug "This doesn't require order preservation" + return 1 +end + + +# This function does two things: +# - Obtain the completions and store them in the global __glow_comp_results +# - Return false if file completion should be performed +function __glow_prepare_completions + __glow_debug "" + __glow_debug "========= starting completion logic ==========" + + # Start fresh + set --erase __glow_comp_results + + __glow_perform_completion_once + __glow_debug "Completion results: $__glow_perform_completion_once_result" + + if test -z "$__glow_perform_completion_once_result" + __glow_debug "No completion, probably due to a failure" + # Might as well do file completion, in case it helps + return 1 + end + + set -l directive (string sub --start 2 $__glow_perform_completion_once_result[-1]) + set --global __glow_comp_results $__glow_perform_completion_once_result[1..-2] + + __glow_debug "Completions are: $__glow_comp_results" + __glow_debug "Directive is: $directive" + + set -l shellCompDirectiveError 1 + set -l shellCompDirectiveNoSpace 2 + set -l shellCompDirectiveNoFileComp 4 + set -l shellCompDirectiveFilterFileExt 8 + set -l shellCompDirectiveFilterDirs 16 + + if test -z "$directive" + set directive 0 + end + + set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) + if test $compErr -eq 1 + __glow_debug "Received error directive: aborting." + # Might as well do file completion, in case it helps + return 1 + end + + set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) + set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) + if test $filefilter -eq 1; or test $dirfilter -eq 1 + __glow_debug "File extension filtering or directory filtering not supported" + # Do full file completion instead + return 1 + end + + set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) + set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) + + __glow_debug "nospace: $nospace, nofiles: $nofiles" + + # If we want to prevent a space, or if file completion is NOT disabled, + # we need to count the number of valid completions. + # To do so, we will filter on prefix as the completions we have received + # may not already be filtered so as to allow fish to match on different + # criteria than the prefix. + if test $nospace -ne 0; or test $nofiles -eq 0 + set -l prefix (commandline -t | string escape --style=regex) + __glow_debug "prefix: $prefix" + + set -l completions (string match -r -- "^$prefix.*" $__glow_comp_results) + set --global __glow_comp_results $completions + __glow_debug "Filtered completions are: $__glow_comp_results" + + # Important not to quote the variable for count to work + set -l numComps (count $__glow_comp_results) + __glow_debug "numComps: $numComps" + + if test $numComps -eq 1; and test $nospace -ne 0 + # We must first split on \t to get rid of the descriptions to be + # able to check what the actual completion will be. + # We don't need descriptions anyway since there is only a single + # real completion which the shell will expand immediately. + set -l split (string split --max 1 \t $__glow_comp_results[1]) + + # Fish won't add a space if the completion ends with any + # of the following characters: @=/:., + set -l lastChar (string sub -s -1 -- $split) + if not string match -r -q "[@=/:.,]" -- "$lastChar" + # In other cases, to support the "nospace" directive we trick the shell + # by outputting an extra, longer completion. + __glow_debug "Adding second completion to perform nospace directive" + set --global __glow_comp_results $split[1] $split[1]. + __glow_debug "Completions are now: $__glow_comp_results" + end + end + + if test $numComps -eq 0; and test $nofiles -eq 0 + # To be consistent with bash and zsh, we only trigger file + # completion when there are no other completions + __glow_debug "Requesting file completion" + return 1 + end + end + + return 0 +end + +# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves +# so we can properly delete any completions provided by another script. +# Only do this if the program can be found, or else fish may print some errors; besides, +# the existing completions will only be loaded if the program can be found. +if type -q "glow" + # The space after the program name is essential to trigger completion for the program + # and not completion of the program name itself. + # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. + complete --do-complete "glow " > /dev/null 2>&1 +end + +# Remove any pre-existing completions for the program since we will be handling all of them. +complete -c glow -e + +# this will get called after the two calls below and clear the $__glow_perform_completion_once_result global +complete -c glow -n '__glow_clear_perform_completion_once_result' +# The call to __glow_prepare_completions will setup __glow_comp_results +# which provides the program's completion choices. +# If this doesn't require order preservation, we don't use the -k flag +complete -c glow -n 'not __glow_requires_order_preservation && __glow_prepare_completions' -f -a '$__glow_comp_results' +# otherwise we use the -k flag +complete -k -c glow -n '__glow_requires_order_preservation && __glow_prepare_completions' -f -a '$__glow_comp_results' diff --git a/terminal/fish/conf.d/colors.fish b/terminal/fish/conf.d/colors.fish new file mode 100644 index 0000000..cde6089 --- /dev/null +++ b/terminal/fish/conf.d/colors.fish @@ -0,0 +1,14 @@ +# Cute and pastel Fish shell colors +set -g fish_color_normal '#7DF9FF' # Pink +set -g fish_color_command '#FB48C4' # Neon pink +set -g fish_color_quote '#6c71c4' # Lavender +set -g fish_color_redirection '#b58900' # Warm gold +set -g fish_color_comment '#93a1a1' # Pale aqua +set -g fish_color_match --bold '#2aa198' # Aqua +set -g fish_color_error --background=#dc322f --foreground=#ffffff # Red error with white text +set -g fish_color_selection --background=#fdf6e3 --foreground=#073642 # Cream selection +set -g fish_color_search_match --background=#268bd2 --foreground=#ffffff # Blue search highlight +set -g fish_color_operator '#859900' # Lime green +set -g fish_color_escape '#d33682' # Pink +set -g fish_color_autosuggestion '#7DF9FF' # Pale aqua +set -g fish_color_end '#859900' # Lime green diff --git a/terminal/fish/config.fish b/terminal/fish/config.fish new file mode 100644 index 0000000..b3c969e --- /dev/null +++ b/terminal/fish/config.fish @@ -0,0 +1,198 @@ +# Source global definitions (if necessary in fish) +if test -f /etc/bashrc + source /etc/bashrc +end + +if test -f /home/ion606/.config/fish/completions/glow.fish + source /home/ion606/.config/fish/completions/glow.fish +end + +# Source global definitions (if necessary in fish) +if test -f /etc/bashrc + source /etc/bashrc +end + +if test -f /home/ion606/.config/fish/completions/glow.fish + source /home/ion606/.config/fish/completions/glow.fish +end + + +# User specific aliases and functions + +# Function to update Discord +function updateDiscord + # The directory where the contents will be copied to + set target_dir /home/ion606/Discord + + # Find the tar.gz file following the naming pattern + set tar_file (find . -type f -name "discord-*.tar.gz" | head -n 1) + + # Check if the file was found + if test -z "$tar_file" + echo "No matching tar.gz file found." + return 1 + end + + # Extract the tar.gz file + tar -xzf "$tar_file" + + # Assuming the extracted content is a directory with a predictable name + set extracted_dir (string replace ".tar.gz" "" $tar_file) + + # Copy the extracted contents to the target directory, overwriting existing files + cp -rT "$extracted_dir" "$target_dir" + + rm "$tar_file" + + echo "Contents copied to $target_dir" +end + +# Aliases +function submitty + bash /home/ion606/runsubmitty.sh +end + +function showinfo + bash /home/ion606/.customscripts/swaybackup/auto/shownotif.sh info $argv +end + +function sway + sway --unsupported-gpu +end + +function minecraft + portablemc start forge:1.20.1-recommended -l itamar137@outlook.com +end + +# Export paths and variables +set -x PATH /home/ion606/Downloads/flutter/bin $PATH +set -x PATH_TO_FX "/home/ion606/javafx-sdk-22.0.1/lib" +set -x HISTCONTROL "shutdown *:ignoredups:erasedups" + +set -x CC /usr/bin/gcc +set -x CXX "/usr/bin/g++" +set -x EDITOR nvim + +# Clear history alias +function clearhist + builtin history clear +end + +function killvesktop + kill -9 $(ps aux | grep vesktop | grep -v grep | awk '{print $2}' | head -n 1) + ps aux | grep vesktop +end + +# GTK and theme-related exports +set -x GTK_THEME "Adwaita:dark" +set -x GTK2_RC_FILES "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc" +set -x QT_STYLE_OVERRIDE Adwaita-Dark + +# SDKMAN +set -x SDKMAN_DIR "$HOME/.sdkman" +if test -s "$HOME/.sdkman/bin/sdkman-init.sh" + source "$HOME/.sdkman/bin/sdkman-init.sh" +end + +# PNPM +set -x PNPM_HOME "/home/ion606/.local/share/pnpm" +if not contains "$PNPM_HOME" $PATH + set -x PATH $PNPM_HOME $PATH +end + +alias postgres="pg_ctl -D /var/lib/postgres/data -l logfile start" +alias temperature="sensors" + + +# User specific functions + +# Function to update Discord +function updateDiscord + # The directory where the contents will be copied to + set target_dir /home/ion606/Discord + + # Find the tar.gz file following the naming pattern + set tar_file (find . -type f -name "discord-*.tar.gz" | head -n 1) + + # Check if the file was found + if test -z "$tar_file" + echo "No matching tar.gz file found." + return 1 + end + + # Extract the tar.gz file + tar -xzf "$tar_file" + + # Assuming the extracted content is a directory with a predictable name + set extracted_dir (string replace ".tar.gz" "" $tar_file) + + # Copy the extracted contents to the target directory, overwriting existing files + cp -rT "$extracted_dir" "$target_dir" + + rm "$tar_file" + + echo "Contents copied to $target_dir" +end + +# Aliases +function submitty + bash /home/ion606/runsubmitty.sh +end + +function showinfo + bash /home/ion606/.customscripts/swaybackup/auto/shownotif.sh info $argv +end + +function sway + sway --unsupported-gpu +end + +function minecraft + portablemc start forge:1.20.1-recommended -l itamar137@outlook.com +end + +# Export paths and variables +set -x PATH /home/ion606/Downloads/flutter/bin $PATH +set -x PATH_TO_FX "/home/ion606/javafx-sdk-22.0.1/lib" +set -x HISTCONTROL "shutdown *:ignoredups:erasedups" + +set -x CC /usr/bin/gcc +set -x CXX "/usr/bin/g++" +set -x EDITOR nvim + +# Clear history alias +function clearhist + builtin history clear +end + +function killvesktop + kill -9 $(ps aux | grep vesktop | grep -v grep | awk '{print $2}' | head -n 1) + ps aux | grep vesktop +end + +# GTK and theme-related exports +set -x GTK_THEME "Adwaita:dark" +set -x GTK2_RC_FILES "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc" +set -x QT_STYLE_OVERRIDE Adwaita-Dark + +# SDKMAN +set -x SDKMAN_DIR "$HOME/.sdkman" +if test -s "$HOME/.sdkman/bin/sdkman-init.sh" + source "$HOME/.sdkman/bin/sdkman-init.sh" +end + +# PNPM +set -x PNPM_HOME "/home/ion606/.local/share/pnpm" +if not contains "$PNPM_HOME" $PATH + set -x PATH $PNPM_HOME $PATH +end + +alias postgres="pg_ctl -D /var/lib/postgres/data -l logfile start" +alias temperature="sensors" + +# colors +starship init fish | source + +if test -f /home/ion606/.config/fish/conf.d/colors.fish + source /home/ion606/.config/fish/conf.d/colors.fish +end diff --git a/terminal/fish/fish_variables b/terminal/fish/fish_variables new file mode 100644 index 0000000..ef168e6 --- /dev/null +++ b/terminal/fish/fish_variables @@ -0,0 +1,34 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR VIRTUAL_ENV_DISABLE_PROMPT:true +SETUVAR __fish_initialized:3400 +SETUVAR _fisher_upgraded_to_4_4:\x1d +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:pink +SETUVAR fish_color_comment:lightblue +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:lightred +SETUVAR fish_color_escape:cyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_keyword:lightcyan +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:lightmagenta +SETUVAR fish_color_param:lightyellow +SETUVAR fish_color_quote:lightgreen +SETUVAR fish_color_redirection:bold\x1epink +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:lightcyan +SETUVAR fish_color_valid_path:magenta +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/terminal/starship.toml b/terminal/starship.toml new file mode 100644 index 0000000..f5de743 --- /dev/null +++ b/terminal/starship.toml @@ -0,0 +1,74 @@ +# Character module (prompt symbol) +[character] +success_symbol = "[β₯ ](#FFB6C1)" # Cute heart or floral symbol +error_symbol = "[βœ— ](bold red)" # Error symbol + +# Directory module +[directory] +truncation_length = 3 +style = "italic bold #FFDDE5" # Pastel pink +truncation_symbol = "…" # Ellipsis with a flower +read_only = "πŸ”’" # Lock icon for read-only directories + +# Git branch module +[git_branch] +symbol = "ξ‚  " +style = "bold #FFB6C1" # Pink for Git branches +format = "on [$symbol$branch(:$remote_branch)]($style) " + +# Git status module +[git_status] +style = "bold #FFDDEE" # Lighter pink +stashed = "πŸ“¦ " +untracked = "✨ " +modified = "πŸ›  " +ahead = "πŸš€ " + +# Time module +[time] +disabled = true +time_range = "01:00:00-00:00:00" +format = 'πŸ•™[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "+1" +use_12hr = false +style = "bold yellow" + +# Battery module +[battery] +disabled = false +full_symbol = "πŸ”‹" +charging_symbol = "⚑" +discharging_symbol = "πŸ’”" +# style = "bold #FF69B4" # Hot pink + +# Line break module +[line_break] +disabled = true + +# Jobs module +[jobs] +symbol = "πŸ”§ " +style = "bold #FFD700" # Gold +threshold = 1 + +# Package version module +[package] +disabled = false +symbol = "πŸ“¦ " +style = "bold #FFB6C1" # Soft pink + +# Kubernetes context module +[kubernetes] +symbol = "☸️ " +style = "bold #FFDDEE" + +# Python version module +[python] +symbol = "🐍 " +style = "bold #FFB6C1" + +# Node.js version module +[nodejs] +symbol = "🌿 " +style = "bold #87CEEB" # Light blue