switching to chezmoi

This commit is contained in:
Anthony Rodriguez 2023-09-20 18:16:15 +02:00
parent f752f3dd59
commit f919a72b38
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
45 changed files with 7862 additions and 0 deletions

6
dot_bash_profile Normal file
View file

@ -0,0 +1,6 @@
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
. "$HOME/.cargo/env"

13
dot_bashrc Normal file
View file

@ -0,0 +1,13 @@
#
# ~/.bashrc
#
# make sure ssh related variables are available in non-interactive sessions (useful for emacs' exec-path-from-shell)
[[ -f "$HOME/.keychain/$HOSTNAME-sh" ]] && source "$HOME/.keychain/$HOSTNAME-sh"
# if running interactively, run fish
if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
exec fish $LOGIN_OPTION
fi

0
dot_config/dunst/.keep Normal file
View file

18
dot_config/dunst/dunstrc Normal file
View file

@ -0,0 +1,18 @@
[global]
frame_color = "#89B4FA"
separator_color= frame
font = "monospace 11"
[urgency_low]
background = "#1E1E2E"
foreground = "#CDD6F4"
[urgency_normal]
background = "#1E1E2E"
foreground = "#CDD6F4"
[urgency_critical]
background = "#1E1E2E"
foreground = "#CDD6F4"
frame_color = "#FAB387"

0
dot_config/fish/.keep Normal file
View file

View file

@ -0,0 +1,16 @@
if status is-interactive
keychain --quiet -Q id_ed25519
end
if test -f ~/.keychain/$hostname-fish
source ~/.keychain/$hostname-fish
end
set -g fish_greeting
# Created by `pipx` on 2023-08-28 08:41:19
set PATH $PATH /home/nezia/.local/bin
# bun
set --export BUN_INSTALL "$HOME/.bun"
set --export PATH $BUN_INSTALL/bin $PATH

View file

@ -0,0 +1,4 @@
catppuccin/fish
pure-fish/pure
patrickf1/fzf.fish
jorgebucaran/nvm.fish

View file

@ -0,0 +1,96 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export SSH_AGENT_PID:445
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXtIcjkp/agent\x2e444
SETUVAR __fish_initialized:3400
SETUVAR _fisher_catppuccin_2F_fish_files:\x7e/\x2econfig/fish/themes/Catppuccin\x20Frappe\x2etheme\x1e\x7e/\x2econfig/fish/themes/Catppuccin\x20Latte\x2etheme\x1e\x7e/\x2econfig/fish/themes/Catppuccin\x20Macchiato\x2etheme\x1e\x7e/\x2econfig/fish/themes/Catppuccin\x20Mocha\x2etheme
SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:\x7e/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_list\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e\x7e/\x2econfig/fish/functions/nvm\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e\x7e/\x2econfig/fish/completions/nvm\x2efish
SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish
SETUVAR _fisher_plugins:catppuccin/fish\x1epure\x2dfish/pure\x1epatrickf1/fzf\x2efish\x1ejorgebucaran/nvm\x2efish
SETUVAR _fisher_pure_2D_fish_2F_pure_files:\x7e/\x2econfig/fish/functions/_pure_check_availability\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_check_for_new_release\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_cgroup_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_pid_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_format_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_get_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_inside_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_single_line_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_k8s_context\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_k8s_namespace\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_place_iterm2_prompt_mark\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prefix_root_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt_rows\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_beginning\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_command_duration\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_current_folder\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ending\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_first_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_dirty\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_pending_commits\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_stash\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_jobs\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_k8s\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_new_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ssh\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_system_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_vimode\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_virtualenv\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_color\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_default\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_string_width\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_user_at_host\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_greeting\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_mode_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_title\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/_pure_init\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/pure\x2efish
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:00afff
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
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:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
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
SETUVAR fish_user_paths:/home/nezia/bin
SETUVAR pure_begin_prompt_with_current_directory:true
SETUVAR pure_check_for_new_release:false
SETUVAR pure_color_at_sign:pure_color_mute
SETUVAR pure_color_command_duration:pure_color_warning
SETUVAR pure_color_current_directory:pure_color_primary
SETUVAR pure_color_danger:red
SETUVAR pure_color_dark:black
SETUVAR pure_color_git_branch:pure_color_mute
SETUVAR pure_color_git_dirty:pure_color_mute
SETUVAR pure_color_git_stash:pure_color_info
SETUVAR pure_color_git_unpulled_commits:pure_color_info
SETUVAR pure_color_git_unpushed_commits:pure_color_info
SETUVAR pure_color_hostname:pure_color_mute
SETUVAR pure_color_info:cyan
SETUVAR pure_color_jobs:pure_color_normal
SETUVAR pure_color_k8s_context:pure_color_success
SETUVAR pure_color_k8s_namespace:pure_color_primary
SETUVAR pure_color_light:white
SETUVAR pure_color_mute:brblack
SETUVAR pure_color_normal:normal
SETUVAR pure_color_prefix_root_prompt:pure_color_danger
SETUVAR pure_color_primary:blue
SETUVAR pure_color_prompt_on_error:pure_color_danger
SETUVAR pure_color_prompt_on_success:pure_color_success
SETUVAR pure_color_success:magenta
SETUVAR pure_color_system_time:pure_color_mute
SETUVAR pure_color_username_normal:pure_color_mute
SETUVAR pure_color_username_root:pure_color_light
SETUVAR pure_color_virtualenv:pure_color_mute
SETUVAR pure_color_warning:yellow
SETUVAR pure_enable_container_detection:true
SETUVAR pure_enable_git:true
SETUVAR pure_enable_k8s:false
SETUVAR pure_enable_single_line_prompt:false
SETUVAR pure_enable_virtualenv:true
SETUVAR pure_reverse_prompt_symbol_in_vimode:true
SETUVAR pure_separate_prompt_on_error:false
SETUVAR pure_shorten_prompt_current_directory_length:0
SETUVAR pure_shorten_window_title_current_directory_length:0
SETUVAR pure_show_jobs:false
SETUVAR pure_show_prefix_root_prompt:false
SETUVAR pure_show_subsecond_command_duration:false
SETUVAR pure_show_system_time:false
SETUVAR pure_symbol_container_prefix:
SETUVAR pure_symbol_git_dirty:\x2a
SETUVAR pure_symbol_git_stash:\u2261
SETUVAR pure_symbol_git_unpulled_commits:\u21e3
SETUVAR pure_symbol_git_unpushed_commits:\u21e1
SETUVAR pure_symbol_k8s_prefix:\u2638
SETUVAR pure_symbol_prefix_root_prompt:\x23
SETUVAR pure_symbol_prompt:\u276f
SETUVAR pure_symbol_reverse_prompt:\u276e
SETUVAR pure_symbol_ssh_prefix:
SETUVAR pure_symbol_title_bar_separator:\x2d
SETUVAR pure_symbol_virtualenv_prefix:
SETUVAR pure_threshold_command_duration:5

View file

11
dot_config/fontconfig/\ Normal file
View file

@ -0,0 +1,11 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>Fira Code Retina</family>
</prefer>
</alias>
</fontconfig>

View file

@ -0,0 +1,31 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Sans</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Serif</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Mono</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>Fira Code Retina</family>
</prefer>
</alias>
</fontconfig>

0
dot_config/gtk-3.0/.keep Normal file
View file

View file

@ -0,0 +1,17 @@
[Settings]
gtk-theme-name=Catppuccin-Mocha-Standard-Lavender-dark
gtk-icon-theme-name=Papirus-Dark
gtk-font-name=Cantarell 11
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=1

0
dot_config/hypr/.keep Normal file
View file

View file

@ -0,0 +1,61 @@
$rosewaterAlpha = fff5e0dc
$flamingoAlpha = fff2cdcd
$pinkAlpha = fff5c2e7
$mauveAlpha = ffcba6f7
$redAlpha = fff38ba8
$maroonAlpha = ffeba0ac
$peachAlpha = fffab387
$yellowAlpha = fff9e2af
$greenAlpha = ffa6e3a1
$tealAlpha = ff94e2d5
$skyAlpha = ff89dceb
$sapphireAlpha = ff74c7ec
$blueAlpha = ff89b4fa
$lavenderAlpha = ffb4befe
$textAlpha = ffcdd6f4
$subtext1Alpha = ffbac2de
$subtext0Alpha = ffa6adc8
$overlay2Alpha = ff9399b2
$overlay1Alpha = ff7f849c
$overlay0Alpha = ff6c7086
$surface2Alpha = ff585b70
$surface1Alpha = ff45475a
$surface0Alpha = ff313244
$baseAlpha = ff1e1e2e
$mantleAlpha = ff181825
$crustAlpha = ff11111b
$rosewater = 0xfff5e0dc
$flamingo = 0xfff2cdcd
$pink = 0xfff5c2e7
$mauve = 0xffcba6f7
$red = 0xfff38ba8
$maroon = 0xffeba0ac
$peach = 0xfffab387
$yellow = 0xfff9e2af
$green = 0xffa6e3a1
$teal = 0xff94e2d5
$sky = 0xff89dceb
$sapphire = 0xff74c7ec
$blue = 0xff89b4fa
$lavender = 0xffb4befe
$text = 0xffcdd6f4
$subtext1 = 0xffbac2de
$subtext0 = 0xffa6adc8
$overlay2 = 0xff9399b2
$overlay1 = 0xff7f849c
$overlay0 = 0xff6c7086
$surface2 = 0xff585b70
$surface1 = 0xff45475a
$surface0 = 0xff313244
$base = 0xff1e1e2e
$mantle = 0xff181825
$crust = 0xff11111b

View file

@ -0,0 +1,197 @@
# This is an example Hyprland config file.
#
# Refer to the wiki for more information.
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,24
source=~/.config/hypr/mocha.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options = compose:ralt, caps:ctrl_modifier
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = true
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 20
border_size = 3
col.active_border = $lavender
col.inactive_border = $overlay0
layout = dwindle
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 5
blur = false
blur_size = 3
blur_passes = 1
blur_new_optimizations = true
drop_shadow = false
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $VISUAL
bind = $mainMod, W, exec, firefox
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun -I
bind = $mainMod, P, exec, $HOME/.scripts/passwmenu
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, F, fullscreen
bind = $mainMod_SHIFT, W, exec, ~/.scripts/wwifi.sh
bind = $mainMod_SHIFT, Q, exit
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, 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
# 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
# Media / brightness
bind=,XF86MonBrightnessUp,exec,brightnessctl set +5%
bind=,XF86MonBrightnessDown,exec,brightnessctl set 5%-
bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5%
bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5%
bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle
# Screenshot
bind=,Print,exec,grim -o "eDP-1" && notify-send "screenshot taken"
bind=CTRL,Print,exec,grim -g "$(slurp)" - | wl-copy && notify-send "screenshot taken and sent to clipboard"
# lock computer
bind = $mainMod, l, exec,swaylock
bind = ,switch:Lid Switch,exec,systemctl suspend
# emoji picker
bind = $mainMod, period, exec, $HOME/.scripts/wemoji.sh
# hyprland related
exec-once=sh ~/.scripts/start-waybar.sh
exec-once=/usr/lib/polkit-kde-authentication-agent-1
exec-once=dunst
exec-once= ~/.scripts/hyprpaper-generate-config.sh && hyprpaper
# window rules
windowrule=workspace 1 silent,kitty
windowrule=workspace 2 silent,firefox
windowrule=workspace 3 silent,Emacs
windowrule=workspace 4 silent,Spotify
windowrulev2 = workspace 5, title:^(.*(Disc|WebC)ord.*)$
windowrule=float,^(.*)(KeePassXC)$
windowrulev2 = idleinhibit always,title:^(.*YouTube.*)$
# personal apps
exec-once=discord
exec-once=spotify-launcher
exec-once=swayidle -w timeout 180 'swaylock' timeout 600 '[[ $(cat /sys/class/power_supply/AC/online) -eq 0 ]] && systemctl suspend-then-hibernate' before-sleep 'swaylock'
env=MOZ_ENABLE_WAYLAND

View file

@ -0,0 +1,62 @@
$rosewaterAlpha = fff5e0dc
$flamingoAlpha = fff2cdcd
$pinkAlpha = fff5c2e7
$mauveAlpha = ffcba6f7
$redAlpha = fff38ba8
$maroonAlpha = ffeba0ac
$peachAlpha = fffab387
$yellowAlpha = fff9e2af
$greenAlpha = ffa6e3a1
$tealAlpha = ff94e2d5
$skyAlpha = ff89dceb
$sapphireAlpha = ff74c7ec
$blueAlpha = ff89b4fa
$lavenderAlpha = ffb4befe
$textAlpha = ffcdd6f4
$subtext1Alpha = ffbac2de
$subtext0Alpha = ffa6adc8
$overlay2Alpha = ff9399b2
$overlay1Alpha = ff7f849c
$overlay0Alpha = ff6c7086
$surface2Alpha = ff585b70
$surface1Alpha = ff45475a
$surface0Alpha = ff313244
$baseAlpha = ff1e1e2e
$mantleAlpha = ff181825
$crustAlpha = ff11111b
$rosewater = 0xfff5e0dc
$flamingo = 0xfff2cdcd
$pink = 0xfff5c2e7
$mauve = 0xffcba6f7
$red = 0xfff38ba8
$maroon = 0xffeba0ac
$peach = 0xfffab387
$yellow = 0xfff9e2af
$green = 0xffa6e3a1
$teal = 0xff94e2d5
$sky = 0xff89dceb
$sapphire = 0xff74c7ec
$blue = 0xff89b4fa
$lavender = 0xffb4befe
$text = 0xffcdd6f4
$subtext1 = 0xffbac2de
$subtext0 = 0xffa6adc8
$overlay2 = 0xff9399b2
$overlay1 = 0xff7f849c
$overlay0 = 0xff6c7086
$surface2 = 0xff585b70
$surface1 = 0xff45475a
$surface0 = 0xff313244
$base = 0xff1e1e2e
$mantle = 0xff181825
$crust = 0xff11111b

0
dot_config/kitty/.keep Normal file
View file

View file

@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin-Mocha
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #45475A
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8

2295
dot_config/kitty/kitty.conf Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

3
dot_config/mimeapps.list Normal file
View file

@ -0,0 +1,3 @@
[Default Applications]
application/x-directory=emacs-dired.desktop
inode/directory=emacs-dired.desktop

0
dot_config/qt5ct/.keep Normal file
View file

View file

@ -0,0 +1,4 @@
[ColorScheme]
active_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ff1e1e2e, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
disabled_colors=#ffa6adc8, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffa6adc8, #ffa6adc8, #ffa6adc8, #ff1e1e2e, #ff11111b, #ff7f849c, #ff89b4fa, #ff45475a, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
inactive_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ffa6adc8, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c

View file

@ -0,0 +1,35 @@
[Appearance]
color_scheme_path=/home/nezia/.config/qt5ct/colors/Catppuccin-Mocha.conf
custom_palette=true
icon_theme=Papirus-Dark
standard_dialogs=default
style=Lightly
[Fonts]
fixed="Monospace,12,-1,5,50,0,0,0,0,0"
general="Sans Serif,12,-1,5,50,0,0,0,0,0"
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[PaletteEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0[\0\0\0\xc6\0\0\x2\xd1\0\0\x2\xd6\0\0\0[\0\0\0\xc6\0\0\x2\xd1\0\0\x2\xd6\0\0\0\0\x2\0\0\0\x6\xc0\0\0\0[\0\0\0\xc6\0\0\x2\xd1\0\0\x2\xd6)
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3@\0\0\x3\xeb\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x3Y\0\0\0\0\x2\0\0\0\x6\xc0\0\0\0\0\0\0\0\0\0\0\x3@\0\0\x3\xeb)
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

View file

View file

@ -0,0 +1,36 @@
daemonize
show-failed-attempts
clock
screenshots
effect-blur=7x5
color=1f1d2e80
font="Fira Code Retina"
indicator
indicator-radius=200
indicator-thickness=20
line-color=1f1d2e
ring-color=191724
inside-color=1f1d2e
key-hl-color=eb6f92
separator-color=00000000
text-color=e0def4
text-caps-lock-color=""
line-ver-color=eb6f92
ring-ver-color=eb6f92
inside-ver-color=1f1d2e
text-ver-color=e0def4
ring-wrong-color=31748f
text-wrong-color=31748f
inside-wrong-color=1f1d2e
inside-clear-color=1f1d2e
text-clear-color=e0def4
ring-clear-color=9ccfd8
line-clear-color=1f1d2e
line-wrong-color=1f1d2e
bs-hl-color=31748f
grace=2
grace-no-mouse
grace-no-touch
datestr=%d.%m.%Y
timestr=%H:%M
fade-in="0.1"

0
dot_config/systemd/.keep Normal file
View file

View file

@ -0,0 +1,8 @@
[Unit]
Description=Sync personal files with a remote called drive
[Service]
ExecStart=%h/.scripts/sync.sh
[Install]
WantedBy=default.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Sync a remote called drive every 5 minutes using rclone
[Timer]
OnBootSec=5min
OnUnitActiveSec=5min
[Install]
WantedBy=timers.target

0
dot_config/waybar/.keep Normal file
View file

View file

@ -0,0 +1,158 @@
{
"layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["wlr/workspaces", "custom/media"],
"modules-center": ["clock"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "battery#bat2", "tray"],
// Modules configuration
"wlr/workspaces": {
"on-click": "activate",
"disable-scroll": true,
"all-outputs": true,
"format": "{icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
"icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%d-%m-%Y}"
},
"cpu": {
"format": " {usage}%",
"tooltip": false
},
"memory": {
"format": " {}%"
},
"temperature": {
// "thermal-zone": 2,
"hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": " {percent}%",
},
"battery": {
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ipaddr}/{cidr}",
"tooltip-format": " {ifname} via {gwaddr}",
"format-linked": " {ifname} (No IP) ",
"format-disconnected": "⚠ Disconnected",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{icon} {volume}%",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {volume}%",
"format-source": "{volume}%",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
}
}

View file

@ -0,0 +1,37 @@
/*
*
* Catppuccin Mocha palette
* Maintainer: rubyowo
*
*/
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@define-color text #cdd6f4;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244;
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;

262
dot_config/waybar/style.css Normal file
View file

@ -0,0 +1,262 @@
@import "mocha.css";
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Fira Code Retina", FontAwesome6FreeSolid, FontAwesome6Free;
font-size: 15px;
}
window#waybar {
background-color: @base;
color: @text;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: @fg;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.active {
background-color: @lavender;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
}
#battery {
}
#battery.charging, #battery.plugged {
}
@keyframes blink {
to {
background-color: @base;
color: @text;
}
}
#battery.critical:not(.charging) {
background-color: @red;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#cpu {
}
#memory {
}
#disk {
}
#backlight {
}
#network {
}
#network.disconnected {
}
#pulseaudio {
}
#pulseaudio.muted {
}
#wireplumber {
}
#wireplumber.muted {
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
}
#temperature.critical {
}
#tray {
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}

0
dot_config/wofi/.keep Normal file
View file

94
dot_config/wofi/style.css Normal file
View file

@ -0,0 +1,94 @@
/* Mocha Lavender */
@define-color accent #babbf1;
@define-color txt #cad3f5;
@define-color bg #24273a;
@define-color bg2 #494d64;
* {
font-family: 'JetBrains Mono Nerd Font', monospace;
font-size: 14px;
}
/* Window */
window {
margin: 0px;
padding: 10px;
border: 3px solid @accent;
border-radius: 7px;
background-color: @bg;
animation: slideIn 0.5s ease-in-out both;
}
/* Slide In */
@keyframes slideIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
/* Inner Box */
#inner-box {
margin: 5px;
padding: 10px;
border: none;
background-color: @bg;
animation: fadeIn 0.5s ease-in-out both;
}
/* Fade In */
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
/* Outer Box */
#outer-box {
margin: 5px;
padding: 10px;
border: none;
background-color: @bg;
}
/* Scroll */
#scroll {
margin: 0px;
padding: 10px;
border: none;
}
/* Input */
#input {
margin: 5px;
padding: 10px;
border: none;
color: @accent;
background-color: @bg2;
animation: fadeIn 0.5s ease-in-out both;
}
/* Text */
#text {
margin: 5px;
padding: 10px;
border: none;
color: @txt;
animation: fadeIn 0.5s ease-in-out both;
}
/* Selected Entry */
#entry:selected {
background-color: @accent;
}
#entry:selected #text {
color: @bg;
}

19
dot_gtkrc-2.0 Normal file
View file

@ -0,0 +1,19 @@
# DO NOT EDIT! This file will be overwritten by nwg-look.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/tony/.gtkrc-2.0.mine"
gtk-theme-name="Catppuccin-Mocha-Standard-Lavender-Dark"
gtk-icon-theme-name="Adwaita"
gtk-font-name="Cantarell 11"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintslight"
gtk-xft-rgba="rgb"

5
dot_profile Normal file
View file

@ -0,0 +1,5 @@
export PATH="$HOME/.yarn/bin:$HOME/.local/bin:$PATH"
export EDITOR=nvim
export VISUAL=emacs
export QT_QPA_PLATFORMTHEME=qt5ct
. "$HOME/.cargo/env"

0
dot_scripts/.keep Normal file
View file

View file

@ -0,0 +1,7 @@
#!/bin/sh
wallpaper=$(ls "$HOME/".wallpapers/** | shuf -n 1)
cat << EOF > ~/.config/hypr/hyprpaper.conf
preload = $wallpaper
wallpaper = eDP-1, $wallpaper
EOF

View file

@ -0,0 +1,15 @@
#!/bin/bash
shopt -s nullglob globstar
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | wofi --dmenu "$@")
[[ -n $password ]] || exit
pass show "$password" -c

View file

@ -0,0 +1,11 @@
#!/bin/sh
CONFIG_FILES="$HOME/.config/waybar/config.jsonc $HOME/.config/waybar/style.css"
trap "killall waybar" EXIT
while true; do
waybar &
inotifywait -e create,modify $CONFIG_FILES
killall waybar
done

View file

@ -0,0 +1,5 @@
#!/bin/sh
[ ! -d $HOME/org ] && rclone copy drive:org $HOME/org
rclone sync $HOME/org --include "**.{org,png,jpeg}" drive:org

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,98 @@
#!/bin/sh
# Starts a scan of available broadcasting SSIDs
# nmcli dev wifi rescan
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
FIELDS=SSID,SECURITY
POSITION=0
YOFF=0
XOFF=0
if [ -r "$DIR/config" ]; then
source "$DIR/config"
elif [ -r "$HOME/.config/wofi/wifi" ]; then
source "$HOME/.config/wofi/wifi"
else
echo "WARNING: config file not found! Using default values."
fi
LIST=$(nmcli --fields "$FIELDS" device wifi list | sed '/^--/d')
# For some reason wofi always approximates character width 2 short... hmmm
RWIDTH=$(($(echo "$LIST" | head -n 1 | awk '{print length($0); }')*10))
# Dynamically change the height of the wofi menu
LINENUM=$(echo "$LIST" | wc -l)
# Gives a list of known connections so we can parse it later
KNOWNCON=$(nmcli connection show)
# Really janky way of telling if there is currently a connection
CONSTATE=$(nmcli -fields WIFI g)
CURRSSID=$(LANGUAGE=C nmcli -t -f active,ssid dev wifi | awk -F: '$1 ~ /^yes/ {print $2}')
if [[ ! -z $CURRSSID ]]; then
HIGHLINE=$(echo "$(echo "$LIST" | awk -F "[ ]{2,}" '{print $1}' | grep -Fxn -m 1 "$CURRSSID" | awk -F ":" '{print $1}') + 1" | bc )
fi
# HOPEFULLY you won't need this as often as I do
# If there are more than 8 SSIDs, the menu will still only have 8 lines
if [ "$LINENUM" -gt 8 ] && [[ "$CONSTATE" =~ "enabled" ]]; then
LINENUM=8
elif [[ "$CONSTATE" =~ "disabled" ]]; then
LINENUM=1
fi
if [[ "$CONSTATE" =~ "enabled" ]]; then
TOGGLE="toggle off"
elif [[ "$CONSTATE" =~ "disabled" ]]; then
TOGGLE="toggle on"
fi
CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | wofi -i -d --prompt "Wi-Fi SSID: " --lines "$LINENUM" --location "$POSITION" --yoffset "$YOFF" --xoffset "$XOFF" --width $RWIDTH)
#echo "$CHENTRY"
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}')
#echo "$CHSSID"
# If the user inputs "manual" as their SSID in the start window, it will bring them to this screen
if [ "$CHENTRY" = "manual" ] ; then
# Manual entry of the SSID and password (if appplicable)
MSSID=$(echo "enter the SSID of the network (SSID,password)" | wofi -d "Manual Entry: " --lines 1)
# Separating the password from the entered string
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}')
#echo "$MSSID"
#echo "$MPASS"
# If the user entered a manual password, then use the password nmcli command
if [ "$MPASS" = "" ]; then
nmcli dev wifi con "$MSSID"
else
nmcli dev wifi con "$MSSID" password "$MPASS"
fi
elif [ "$CHENTRY" = "toggle on" ]; then
nmcli radio wifi on
elif [ "$CHENTRY" = "toggle off" ]; then
nmcli radio wifi off
else
# If the connection is already in use, then this will still be able to get the SSID
if [ "$CHSSID" = "*" ]; then
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}')
fi
# Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process
if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then
nmcli con up "$CHSSID"
else
if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then
WIFIPASS=$(echo "if connection is stored, hit enter" | wofi -P -d --prompt "password" --lines 1 --location "$POSITION" --yoffset "$YOFF" --xoffset "$XOFF" --width $RWIDTH)
fi
nmcli dev wifi con "$CHSSID" password "$WIFIPASS"
fi
fi