diff options
Diffstat (limited to '')
82 files changed, 2878 insertions, 146 deletions
diff --git a/home/config/alacritty/alacritty.toml b/home/config/alacritty/alacritty.toml new file mode 100644 index 0000000..9e3e925 --- /dev/null +++ b/home/config/alacritty/alacritty.toml @@ -0,0 +1,28 @@ +import = ["/home/freya/.config/alacritty/catppuccin-mocha.toml"] + +[font] +size = 11 + +[font.bold] +style = "Bold" + +[font.bold_italic] +style = "Bold Italic" + +[font.italic] +style = "Italic" + +[font.normal] +family = "monospace" +style = "Regular" + +[font.offset] +x = 0 +y = 0 + +[window] +opacity = 0.85 + +[window.padding] +x = 10 +y = 10 diff --git a/home/config/alacritty/catppuccin-mocha.toml b/home/config/alacritty/catppuccin-mocha.toml new file mode 100644 index 0000000..c75933b --- /dev/null +++ b/home/config/alacritty/catppuccin-mocha.toml @@ -0,0 +1,76 @@ +[colors.primary] +background = "#1E1E2E" +foreground = "#CDD6F4" +dim_foreground = "#CDD6F4" +bright_foreground = "#CDD6F4" + +[colors.cursor] +text = "#1E1E2E" +cursor = "#F5E0DC" + +[colors.vi_mode_cursor] +text = "#1E1E2E" +cursor = "#B4BEFE" + +[colors.search.matches] +foreground = "#1E1E2E" +background = "#A6ADC8" + +[colors.search.focused_match] +foreground = "#1E1E2E" +background = "#A6E3A1" + +[colors.footer_bar] +foreground = "#1E1E2E" +background = "#A6ADC8" + +[colors.hints.start] +foreground = "#1E1E2E" +background = "#F9E2AF" + +[colors.hints.end] +foreground = "#1E1E2E" +background = "#A6ADC8" + +[colors.selection] +text = "#1E1E2E" +background = "#F5E0DC" + +[colors.normal] +black = "#45475A" +red = "#F38BA8" +green = "#A6E3A1" +yellow = "#F9E2AF" +blue = "#89B4FA" +magenta = "#F5C2E7" +cyan = "#94E2D5" +white = "#BAC2DE" + +[colors.bright] +black = "#585B70" +red = "#F38BA8" +green = "#A6E3A1" +yellow = "#F9E2AF" +blue = "#89B4FA" +magenta = "#F5C2E7" +cyan = "#94E2D5" +white = "#A6ADC8" + +[colors.dim] +black = "#45475A" +red = "#F38BA8" +green = "#A6E3A1" +yellow = "#F9E2AF" +blue = "#89B4FA" +magenta = "#F5C2E7" +cyan = "#94E2D5" +white = "#BAC2DE" + +[[colors.indexed_colors]] +index = 16 +color = "#FAB387" + +[[colors.indexed_colors]] +index = 17 +color = "#F5E0DC" + diff --git a/home/config/desktop-common/pfps/freya.png b/home/config/desktop-common/pfps/freya.png Binary files differnew file mode 100644 index 0000000..758ea9f --- /dev/null +++ b/home/config/desktop-common/pfps/freya.png diff --git a/home/config/desktop-common/pfps/karkat.jpg b/home/config/desktop-common/pfps/karkat.jpg Binary files differnew file mode 100644 index 0000000..37af5d2 --- /dev/null +++ b/home/config/desktop-common/pfps/karkat.jpg diff --git a/home/config/desktop-common/pfps/karkat.png b/home/config/desktop-common/pfps/karkat.png Binary files differnew file mode 100644 index 0000000..4734b4e --- /dev/null +++ b/home/config/desktop-common/pfps/karkat.png diff --git a/home/config/desktop-common/pfps/vriska.jpg b/home/config/desktop-common/pfps/vriska.jpg Binary files differnew file mode 100644 index 0000000..347cdca --- /dev/null +++ b/home/config/desktop-common/pfps/vriska.jpg diff --git a/home/config/desktop-common/pfps/vriska.png b/home/config/desktop-common/pfps/vriska.png Binary files differnew file mode 100644 index 0000000..f0ba326 --- /dev/null +++ b/home/config/desktop-common/pfps/vriska.png diff --git a/home-config/sway/wallpapers/blue.jpg b/home/config/desktop-common/wallpapers/blue.jpg Binary files differindex acd376b..acd376b 100755..100644 --- a/home-config/sway/wallpapers/blue.jpg +++ b/home/config/desktop-common/wallpapers/blue.jpg diff --git a/home/config/desktop-common/wallpapers/blue.png b/home/config/desktop-common/wallpapers/blue.png Binary files differnew file mode 100644 index 0000000..ddf56d9 --- /dev/null +++ b/home/config/desktop-common/wallpapers/blue.png diff --git a/home/config/desktop-common/wallpapers/davekat.png b/home/config/desktop-common/wallpapers/davekat.png Binary files differnew file mode 100644 index 0000000..9ab0576 --- /dev/null +++ b/home/config/desktop-common/wallpapers/davekat.png diff --git a/home/config/desktop-common/wallpapers/homestuck.png b/home/config/desktop-common/wallpapers/homestuck.png Binary files differnew file mode 100644 index 0000000..da37855 --- /dev/null +++ b/home/config/desktop-common/wallpapers/homestuck.png diff --git a/home-config/sway/wallpapers/nya0.png b/home/config/desktop-common/wallpapers/nya0.png Binary files differindex e9da5d5..e9da5d5 100644 --- a/home-config/sway/wallpapers/nya0.png +++ b/home/config/desktop-common/wallpapers/nya0.png diff --git a/home-config/git/gitconfig b/home/config/git/gitconfig index 0260067..c7aa4a0 100644 --- a/home-config/git/gitconfig +++ b/home/config/git/gitconfig @@ -3,6 +3,6 @@ email = freya@freyacat.org name = Freya Murphy [commit] - gpgsign = true + gpgsign = false [init] defaultBranch = main diff --git a/home-config/gnupg/gpg-agent.conf b/home/config/gnupg/gpg-agent.conf index 230b310..230b310 100644 --- a/home-config/gnupg/gpg-agent.conf +++ b/home/config/gnupg/gpg-agent.conf diff --git a/home-config/gnupg/sshcontrol b/home/config/gnupg/sshcontrol index c61ee5c..c61ee5c 100644 --- a/home-config/gnupg/sshcontrol +++ b/home/config/gnupg/sshcontrol diff --git a/home/config/gtk/Trolltech.conf b/home/config/gtk/Trolltech.conf new file mode 100644 index 0000000..e148896 --- /dev/null +++ b/home/config/gtk/Trolltech.conf @@ -0,0 +1,2 @@ +[Qt] +style=GTK+ diff --git a/home/config/gtk/gtk-2.0/gtkfilechooser.ini b/home/config/gtk/gtk-2.0/gtkfilechooser.ini new file mode 100644 index 0000000..e1aabf7 --- /dev/null +++ b/home/config/gtk/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=path-bar +ShowHidden=false +ShowSizeColumn=true +GeometryX=805 +GeometryY=486 +GeometryWidth=948 +GeometryHeight=656 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/home/config/gtk/gtk-3.0/bookmarks b/home/config/gtk/gtk-3.0/bookmarks new file mode 100644 index 0000000..e2576aa --- /dev/null +++ b/home/config/gtk/gtk-3.0/bookmarks @@ -0,0 +1,6 @@ +file:///home/freya/.config +file:///home/freya/downloads +file:///home/freya/documents +file:///home/tylerm/code +file:///home/tylerm/sync +file:///home/freya/sync/nextcloud diff --git a/home/config/gtk/gtk-3.0/colors.css b/home/config/gtk/gtk-3.0/colors.css new file mode 100644 index 0000000..821726e --- /dev/null +++ b/home/config/gtk/gtk-3.0/colors.css @@ -0,0 +1,84 @@ +@define-color borders_breeze #5f6265; +@define-color content_view_bg_breeze #1b1e20; +@define-color error_color_backdrop_breeze #da4453; +@define-color error_color_breeze #da4453; +@define-color error_color_insensitive_backdrop_breeze #592930; +@define-color error_color_insensitive_breeze #592930; +@define-color insensitive_base_color_breeze #1a1d1f; +@define-color insensitive_base_fg_color_breeze #656768; +@define-color insensitive_bg_color_breeze #282c30; +@define-color insensitive_borders_breeze #3a3d41; +@define-color insensitive_fg_color_breeze #6e7173; +@define-color insensitive_selected_bg_color_breeze #282c30; +@define-color insensitive_selected_fg_color_breeze #6e7173; +@define-color insensitive_unfocused_bg_color_breeze #282c30; +@define-color insensitive_unfocused_fg_color_breeze #6e7173; +@define-color insensitive_unfocused_selected_bg_color_breeze #282c30; +@define-color insensitive_unfocused_selected_fg_color_breeze #6e7173; +@define-color link_color_breeze #1d99f3; +@define-color link_visited_color_breeze #9b59b6; +@define-color success_color_backdrop_breeze #27ae60; +@define-color success_color_breeze #27ae60; +@define-color success_color_insensitive_backdrop_breeze #1e4d34; +@define-color success_color_insensitive_breeze #1e4d34; +@define-color theme_base_color_breeze #1b1e20; +@define-color theme_bg_color_breeze #2a2e32; +@define-color theme_button_background_backdrop_breeze #31363b; +@define-color theme_button_background_backdrop_insensitive_breeze #2f3338; +@define-color theme_button_background_insensitive_breeze #2f3338; +@define-color theme_button_background_normal_breeze #31363b; +@define-color theme_button_decoration_focus_backdrop_breeze #3daee9; +@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #335c72; +@define-color theme_button_decoration_focus_breeze #3daee9; +@define-color theme_button_decoration_focus_insensitive_breeze #335c72; +@define-color theme_button_decoration_hover_backdrop_breeze #3daee9; +@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #335c72; +@define-color theme_button_decoration_hover_breeze #3daee9; +@define-color theme_button_decoration_hover_insensitive_breeze #335c72; +@define-color theme_button_foreground_active_backdrop_breeze #fcfcfc; +@define-color theme_button_foreground_active_backdrop_insensitive_breeze #6e7173; +@define-color theme_button_foreground_active_breeze #fcfcfc; +@define-color theme_button_foreground_active_insensitive_breeze #6e7173; +@define-color theme_button_foreground_backdrop_breeze #fcfcfc; +@define-color theme_button_foreground_backdrop_insensitive_breeze #727679; +@define-color theme_button_foreground_insensitive_breeze #727679; +@define-color theme_button_foreground_normal_breeze #fcfcfc; +@define-color theme_fg_color_breeze #fcfcfc; +@define-color theme_header_background_backdrop_breeze #2a2e32; +@define-color theme_header_background_breeze #31363b; +@define-color theme_header_background_light_breeze #2a2e32; +@define-color theme_header_foreground_backdrop_breeze #fcfcfc; +@define-color theme_header_foreground_breeze #fcfcfc; +@define-color theme_header_foreground_insensitive_backdrop_breeze #fcfcfc; +@define-color theme_header_foreground_insensitive_breeze #fcfcfc; +@define-color theme_hovering_selected_bg_color_breeze #3daee9; +@define-color theme_selected_bg_color_breeze #3daee9; +@define-color theme_selected_fg_color_breeze #fcfcfc; +@define-color theme_text_color_breeze #fcfcfc; +@define-color theme_titlebar_background_backdrop_breeze #2a2e32; +@define-color theme_titlebar_background_breeze #31363b; +@define-color theme_titlebar_background_light_breeze #2a2e32; +@define-color theme_titlebar_foreground_backdrop_breeze #fcfcfc; +@define-color theme_titlebar_foreground_breeze #fcfcfc; +@define-color theme_titlebar_foreground_insensitive_backdrop_breeze #fcfcfc; +@define-color theme_titlebar_foreground_insensitive_breeze #fcfcfc; +@define-color theme_unfocused_base_color_breeze #1b1e20; +@define-color theme_unfocused_bg_color_breeze #2a2e32; +@define-color theme_unfocused_fg_color_breeze #fcfcfc; +@define-color theme_unfocused_selected_bg_color_alt_breeze #1f485e; +@define-color theme_unfocused_selected_bg_color_breeze #1f485e; +@define-color theme_unfocused_selected_fg_color_breeze #fcfcfc; +@define-color theme_unfocused_text_color_breeze #fcfcfc; +@define-color theme_unfocused_view_bg_color_breeze #1a1d1f; +@define-color theme_unfocused_view_text_color_breeze #656768; +@define-color theme_view_active_decoration_color_breeze #3daee9; +@define-color theme_view_hover_decoration_color_breeze #3daee9; +@define-color tooltip_background_breeze #31363b; +@define-color tooltip_border_breeze #64686b; +@define-color tooltip_text_breeze #fcfcfc; +@define-color unfocused_borders_breeze #5f6265; +@define-color unfocused_insensitive_borders_breeze #3a3d41; +@define-color warning_color_backdrop_breeze #f67400; +@define-color warning_color_breeze #f67400; +@define-color warning_color_insensitive_backdrop_breeze #633914; +@define-color warning_color_insensitive_breeze #633914; diff --git a/home/config/gtk/gtk-3.0/gtk.css b/home/config/gtk/gtk-3.0/gtk.css new file mode 100644 index 0000000..c9763f7 --- /dev/null +++ b/home/config/gtk/gtk-3.0/gtk.css @@ -0,0 +1 @@ +@import 'colors.css';
\ No newline at end of file diff --git a/home/config/gtk/gtk-3.0/settings.ini b/home/config/gtk/gtk-3.0/settings.ini new file mode 100644 index 0000000..a1e7f00 --- /dev/null +++ b/home/config/gtk/gtk-3.0/settings.ini @@ -0,0 +1,23 @@ +[Settings] +gtk-theme-name=Mint-Y-Dark-Pink +gtk-icon-theme-name=Mint-Y-Pink +gtk-font-name=Noto Sans, 10 +gtk-cursor-theme-name=wii +gtk-cursor-theme-size=24 +gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ +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 +gtk-decoration-layout=icon:minimize,maximize,close +gtk-enable-animations=true +#gtk-modules=colorreload-gtk-module +gtk-primary-button-warps-slider=true +gtk-sound-theme-name=ocean +gtk-xft-dpi=122880 diff --git a/home/config/gtk/gtk-4.0/colors.css b/home/config/gtk/gtk-4.0/colors.css new file mode 100644 index 0000000..821726e --- /dev/null +++ b/home/config/gtk/gtk-4.0/colors.css @@ -0,0 +1,84 @@ +@define-color borders_breeze #5f6265; +@define-color content_view_bg_breeze #1b1e20; +@define-color error_color_backdrop_breeze #da4453; +@define-color error_color_breeze #da4453; +@define-color error_color_insensitive_backdrop_breeze #592930; +@define-color error_color_insensitive_breeze #592930; +@define-color insensitive_base_color_breeze #1a1d1f; +@define-color insensitive_base_fg_color_breeze #656768; +@define-color insensitive_bg_color_breeze #282c30; +@define-color insensitive_borders_breeze #3a3d41; +@define-color insensitive_fg_color_breeze #6e7173; +@define-color insensitive_selected_bg_color_breeze #282c30; +@define-color insensitive_selected_fg_color_breeze #6e7173; +@define-color insensitive_unfocused_bg_color_breeze #282c30; +@define-color insensitive_unfocused_fg_color_breeze #6e7173; +@define-color insensitive_unfocused_selected_bg_color_breeze #282c30; +@define-color insensitive_unfocused_selected_fg_color_breeze #6e7173; +@define-color link_color_breeze #1d99f3; +@define-color link_visited_color_breeze #9b59b6; +@define-color success_color_backdrop_breeze #27ae60; +@define-color success_color_breeze #27ae60; +@define-color success_color_insensitive_backdrop_breeze #1e4d34; +@define-color success_color_insensitive_breeze #1e4d34; +@define-color theme_base_color_breeze #1b1e20; +@define-color theme_bg_color_breeze #2a2e32; +@define-color theme_button_background_backdrop_breeze #31363b; +@define-color theme_button_background_backdrop_insensitive_breeze #2f3338; +@define-color theme_button_background_insensitive_breeze #2f3338; +@define-color theme_button_background_normal_breeze #31363b; +@define-color theme_button_decoration_focus_backdrop_breeze #3daee9; +@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #335c72; +@define-color theme_button_decoration_focus_breeze #3daee9; +@define-color theme_button_decoration_focus_insensitive_breeze #335c72; +@define-color theme_button_decoration_hover_backdrop_breeze #3daee9; +@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #335c72; +@define-color theme_button_decoration_hover_breeze #3daee9; +@define-color theme_button_decoration_hover_insensitive_breeze #335c72; +@define-color theme_button_foreground_active_backdrop_breeze #fcfcfc; +@define-color theme_button_foreground_active_backdrop_insensitive_breeze #6e7173; +@define-color theme_button_foreground_active_breeze #fcfcfc; +@define-color theme_button_foreground_active_insensitive_breeze #6e7173; +@define-color theme_button_foreground_backdrop_breeze #fcfcfc; +@define-color theme_button_foreground_backdrop_insensitive_breeze #727679; +@define-color theme_button_foreground_insensitive_breeze #727679; +@define-color theme_button_foreground_normal_breeze #fcfcfc; +@define-color theme_fg_color_breeze #fcfcfc; +@define-color theme_header_background_backdrop_breeze #2a2e32; +@define-color theme_header_background_breeze #31363b; +@define-color theme_header_background_light_breeze #2a2e32; +@define-color theme_header_foreground_backdrop_breeze #fcfcfc; +@define-color theme_header_foreground_breeze #fcfcfc; +@define-color theme_header_foreground_insensitive_backdrop_breeze #fcfcfc; +@define-color theme_header_foreground_insensitive_breeze #fcfcfc; +@define-color theme_hovering_selected_bg_color_breeze #3daee9; +@define-color theme_selected_bg_color_breeze #3daee9; +@define-color theme_selected_fg_color_breeze #fcfcfc; +@define-color theme_text_color_breeze #fcfcfc; +@define-color theme_titlebar_background_backdrop_breeze #2a2e32; +@define-color theme_titlebar_background_breeze #31363b; +@define-color theme_titlebar_background_light_breeze #2a2e32; +@define-color theme_titlebar_foreground_backdrop_breeze #fcfcfc; +@define-color theme_titlebar_foreground_breeze #fcfcfc; +@define-color theme_titlebar_foreground_insensitive_backdrop_breeze #fcfcfc; +@define-color theme_titlebar_foreground_insensitive_breeze #fcfcfc; +@define-color theme_unfocused_base_color_breeze #1b1e20; +@define-color theme_unfocused_bg_color_breeze #2a2e32; +@define-color theme_unfocused_fg_color_breeze #fcfcfc; +@define-color theme_unfocused_selected_bg_color_alt_breeze #1f485e; +@define-color theme_unfocused_selected_bg_color_breeze #1f485e; +@define-color theme_unfocused_selected_fg_color_breeze #fcfcfc; +@define-color theme_unfocused_text_color_breeze #fcfcfc; +@define-color theme_unfocused_view_bg_color_breeze #1a1d1f; +@define-color theme_unfocused_view_text_color_breeze #656768; +@define-color theme_view_active_decoration_color_breeze #3daee9; +@define-color theme_view_hover_decoration_color_breeze #3daee9; +@define-color tooltip_background_breeze #31363b; +@define-color tooltip_border_breeze #64686b; +@define-color tooltip_text_breeze #fcfcfc; +@define-color unfocused_borders_breeze #5f6265; +@define-color unfocused_insensitive_borders_breeze #3a3d41; +@define-color warning_color_backdrop_breeze #f67400; +@define-color warning_color_breeze #f67400; +@define-color warning_color_insensitive_backdrop_breeze #633914; +@define-color warning_color_insensitive_breeze #633914; diff --git a/home/config/gtk/gtk-4.0/gtk.css b/home/config/gtk/gtk-4.0/gtk.css new file mode 100644 index 0000000..c9763f7 --- /dev/null +++ b/home/config/gtk/gtk-4.0/gtk.css @@ -0,0 +1 @@ +@import 'colors.css';
\ No newline at end of file diff --git a/home/config/gtk/gtk-4.0/settings.ini b/home/config/gtk/gtk-4.0/settings.ini new file mode 100644 index 0000000..93d32b2 --- /dev/null +++ b/home/config/gtk/gtk-4.0/settings.ini @@ -0,0 +1,12 @@ +[Settings] +gtk-application-prefer-dark-theme=true +gtk-cursor-theme-name=breeze_cursors +gtk-cursor-theme-size=24 +gtk-decoration-layout=icon:minimize,maximize,close +gtk-enable-animations=true +gtk-font-name=Noto Sans, 10 +gtk-icon-theme-name=breeze-dark +gtk-modules=colorreload-gtk-module +gtk-primary-button-warps-slider=true +gtk-sound-theme-name=ocean +gtk-xft-dpi=122880 diff --git a/home/config/hypr/config.d/colors.conf b/home/config/hypr/config.d/colors.conf new file mode 100644 index 0000000..9d31302 --- /dev/null +++ b/home/config/hypr/config.d/colors.conf @@ -0,0 +1,5 @@ + + +$active_color = rgb(4d4754) +$base_color = rgb(14171d) +$text_color = rgb(ffffff) diff --git a/home-config/hypr/config.d/input.conf b/home/config/hypr/config.d/input.conf index 947ae3d..363c473 100644 --- a/home-config/hypr/config.d/input.conf +++ b/home/config/hypr/config.d/input.conf @@ -1,13 +1,12 @@ +monitor= eDP-1, highres, auto, $scale -monitor= eDP-1, 3072x1920, 0x0, $scale - -env = XCURSOR_SIZE, 24 +env = GDK_SCALE,1.25 input { kb_layout = us kb_variant = kb_model = - kb_options = gtp:alt_shit_toggle, compose:rctrl + kb_options = gtp:alt_shit_toggle, compose:ralt kb_rules = follow_mouse = 1 @@ -18,7 +17,3 @@ input { sensitivity = 0 } - -device:epic-mouse-v1 { - sensitivity = -0.5 -} diff --git a/home-config/hypr/config.d/keybinds.conf b/home/config/hypr/config.d/keybinds.conf index 3351e85..4c24083 100644 --- a/home-config/hypr/config.d/keybinds.conf +++ b/home/config/hypr/config.d/keybinds.conf @@ -1,34 +1,30 @@ +bind = $mod SHIFT, SPACE, togglefloating bind = $mod, Return, exec, $term bind = $mod, W, exec, $browser -bind = $mod SHIFT, SPACE, togglefloating -bind = $mod, D, exec, $menu +bind = $mod, D, exec, $menu bind = $mod, J, togglesplit bind = $mod, F, fullscreen -bind = $mod, L, exec, killall wlogout || wlogout --css ~/scripts/power/style.css -l ~/scripts/power/layout -bind = $mod, P, exec, killall wlogout || wlogout --css ~/scripts/monitor/style.css -l ~/scripts/monitor/layout -b 2 -L 400 -R 400 -bind = $mod SHIFT, B, exec, killall waybar && waybar -bind = $mod SHIFT, Q, killactive -bind = $mod SHIFT, W, exec, hyprpaper -$monitor_sh = ~/scripts/monitor -bind = $mod ALT, right, exec, $monitor_sh right -bind = $mod ALT, left, exec, $monitor_sh left -bind = $mod ALT, up, exec, $monitor_sh mirror -bind = $mod ALT, down, exec, $monitor_sh disable +bind = $mod, L, exec, hyprlock +bind = $mod SHIFT, L, exec, killall Hyprland + +bind = $mod SHIFT, Q, killactive +bind = $mod, F5, exec, sh -c 'killall waybar; waybar --config ~/.config/waybar/config.hypr' binde =, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ binde =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- binde =, XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle binde =, XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle -binde =, XF86MonBrightnessDown, exec, brightnessctl set 5%- -binde =, XF86MonBrightnessUp, exec, brightnessctl set 5%+ - binde =, XF86AudioPlay, exec, playerctl play-pause binde =, XF86AudioNext, exec, playerctl next binde =, XF86AudioPrev, exec, playerctl previous -bind = ,Print, exec, grim -g "$(slurp)" - | wl-copy +binde =, XF86MonBrightnessDown, exec, brightnessctl set 5%- +binde =, XF86MonBrightnessUp, exec, brightnessctl set 5%+ + +bind = $mod SHIFT, s, exec, grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -t 3000 "Hyprland" "Screenshot copied to clipboard" +bind = , Print, exec, grim - | wl-copy -t iamge/png && notify-send -t 3000 "Hyprland" "Full screen copied to clipboard" bind = SHIFT, Print, exec, slurp -p | grim -g - - | convert - txt:- | tail -n 1 | awk '{print $3}' | wl-copy -bind = CONTROL, Print, exec, + diff --git a/home/config/hypr/config.d/plugins.conf b/home/config/hypr/config.d/plugins.conf new file mode 100644 index 0000000..16da0e4 --- /dev/null +++ b/home/config/hypr/config.d/plugins.conf @@ -0,0 +1,2 @@ +exec-once = hyprctl plugin load /run/current-system/profile/lib/libhy3.so +exec-once = hyprctl plugin load /run/current-system/profile/lib/libhyprbars.so diff --git a/home/config/hypr/config.d/theme.conf b/home/config/hypr/config.d/theme.conf new file mode 100644 index 0000000..8917bd6 --- /dev/null +++ b/home/config/hypr/config.d/theme.conf @@ -0,0 +1,103 @@ +general { + gaps_in = 5 + gaps_out = 10 + layout = hy3 + + resize_on_border = yes + extend_border_grab_area = 20 + + border_size = $border + col.active_border = $active_color + col.inactive_border = $base_color +} + +plugin { + hy3 { + tabs { + height = 24 + text_height = 9 + text_padding = 10 + padding = 2 + render_text = true + text_font = JetBrains Mono Nerd Font Mono Bold + rounding = $radius + + col.active = $active_color + col.inactive = $base_color + col.text.active = $text_color + col.text.inactive = $text_color + } + + autotile { + enable = true + } + } + + hyprbars { + bar_height = 24 + bar_color = $base_color + col.text = $text_color + bar_text_size = 9 + bar_text_font = JetBrains Mono Nerd Font Mono Bold + bar_button_padding = 12 + bar_padding = 10 + bar_precedence_over_border = true + hyprbars-button = rgb(000000), 16, , hyprctl dispatch killactive + hyprbars-button = rgb(000000), 16, , hyprctl dispatch fullscreen 2 + hyprbars-button = rgb(000000), 16, , hyprctl dispatch togglefloating + } +} + +decoration { + rounding = $radius + drop_shadow = no + + blur { + enabled = true + size = 4 + passes = 2 + noise = 0.008 + contrast = 0.8916 + brightness = 0.8 + } +} + +animations { + enabled = yes + + bezier = windowIn, 0.06, 0.71, 0.25, 1 + bezier = windowResize, 0.04, 0.67, 0.38, 1 + + animation = windowsIn, 1, 3, windowIn, slide #popin 20% + animation = windowsOut, 1, 3, windowIn, slide #popin 70% + animation = windowsMove, 1, 2.5, windowResize + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 3, default + animation = workspaces, 1, 6, default + animation = layers, 1, 5, windowIn, slide +} + +gestures { + workspace_swipe = true + workspace_swipe_fingers = 3 + workspace_swipe_forever = true + workspace_swipe_cancel_ratio = 0.15 +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = true + no_direct_scanout = false + key_press_enables_dpms = true + mouse_move_enables_dpms = true + vrr = 1 +} + +xwayland { + force_zero_scaling = true + use_nearest_neighbor = false +} + +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland diff --git a/home-config/hypr/config.d/workspaces.conf b/home/config/hypr/config.d/workspaces.conf index 2f3e81c..408b05f 100644 --- a/home-config/hypr/config.d/workspaces.conf +++ b/home/config/hypr/config.d/workspaces.conf @@ -1,6 +1,6 @@ dwindle { - pseudotile = yes + pseudotile = yes preserve_split = yes } @@ -17,10 +17,10 @@ bind = $mod, down, movefocus, d # Move window across workspace with mod + arrow keys -bind = $mod SHIFT, left, movewindow, l -bind = $mod SHIFT, right, movewindow, r -bind = $mod SHIFT, up, movewindow, u -bind = $mod SHIFT, down, movewindow, d +bind = $mod SHIFT, left, hy3:movewindow, l +bind = $mod SHIFT, right, hy3:movewindow, r +bind = $mod SHIFT, up, hy3:movewindow, u +bind = $mod SHIFT, down, hy3:movewindow, d # Switch workspaces with mod + [0-9] @@ -47,6 +47,27 @@ bind = $mod SHIFT, 8, movetoworkspacesilent, 8 bind = $mod SHIFT, 9, movetoworkspacesilent, 9 bind = $mod SHIFT, 0, movetoworkspacesilent, 10 +# Move to tab + +bind = $mod CONTROL, 1, hy3:focustab, index, 01 +bind = $mod CONTROL, 2, hy3:focustab, index, 02 +bind = $mod CONTROL, 3, hy3:focustab, index, 03 +bind = $mod CONTROL, 4, hy3:focustab, index, 04 +bind = $mod CONTROL, 5, hy3:focustab, index, 05 +bind = $mod CONTROL, 6, hy3:focustab, index, 06 +bind = $mod CONTROL, 7, hy3:focustab, index, 07 +bind = $mod CONTROL, 8, hy3:focustab, index, 08 +bind = $mod CONTROL, 9, hy3:focustab, index, 09 +bind = $mod CONTROL, 0, hy3:focustab, index, 10 + +bindn = , mouse:272, hy3:focustab, mouse +bindn = , mouse_down, hy3:focustab, l, require_hovered +bindn = , mouse_up, hy3:focustab, r, require_hovered + +bind = $mod SHIFT, B, hy3:makegroup, h +bind = $mod SHIFT, V, hy3:makegroup, v +bind = $mod SHIFT, C, hy3:changegroup, toggletab + # Scroll through existing workspaces with mod + scroll bind = $mod, mouse_down, workspace, e+1 diff --git a/home/config/hypr/hypridle.conf b/home/config/hypr/hypridle.conf new file mode 100644 index 0000000..d0a977a --- /dev/null +++ b/home/config/hypr/hypridle.conf @@ -0,0 +1,35 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # dbus/sysd lock command (loginctl lock-session) + before_sleep_cmd = loginctl lock-session # command ran before sleep + after_sleep_cmd = hyprctl dispatch dpms on # command ran after sleep + ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) +} + +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = brightnessctl -r # monitor backlight restore. +} + +# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. + on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. +} + +listener { + timeout = 300 # 5min + on-timeout = loginctl lock-session # lock screen when timeout has passed +} + +listener { + timeout = 330 # 5.5min + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. +} + +listener { + timeout = 1800 # 30min + on-timeout = systemctl suspend # suspend pc +} diff --git a/home-config/hypr/hyprland.conf b/home/config/hypr/hyprland.conf index 743fa37..ccea461 100644 --- a/home-config/hypr/hyprland.conf +++ b/home/config/hypr/hyprland.conf @@ -1,22 +1,22 @@ -exec-once = dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=Hyprland - $mod = SUPER -$term = alacritty +$term = kitty $menu = wofi --allow-images --show drun --prompt "Search Program" -$scale = 1.5 +$scale = 1.25 $radius = 5 -$gaps = 10 -$border = 3 +$border = 2 -$browser = firefox +$browser = librewolf -source = ~/.config/hypr/config.d/theme.conf +source = ~/.config/hypr/config.d/plugins.conf +source = ~/.config/hypr/config.d/colors.conf source = ~/.config/hypr/config.d/keybinds.conf +source = ~/.config/hypr/config.d/theme.conf source = ~/.config/hypr/config.d/input.conf source = ~/.config/hypr/config.d/workspaces.conf +source = ~/.config/hypr/monitors.conf -exec-once = ~/.config/hypr/config.d/autostart.sh +exec-once = ~/.config/hypr/scripts.d/autostart.sh diff --git a/home/config/hypr/hyprlock.conf b/home/config/hypr/hyprlock.conf new file mode 100644 index 0000000..c511be5 --- /dev/null +++ b/home/config/hypr/hyprlock.conf @@ -0,0 +1,72 @@ +# BACKGROUND +background { + monitor = + path = ~/.config/desktop-common/wallpapers/davekat.png + blur_passes = 3 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +# GENERAL +general { + no_fade_in = false + grace = 0 + disable_loading_bar = true +} + +# INPUT FIELD +input-field { + monitor = + size = 250, 60 + outline_thickness = 2 + 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(0, 0, 0, 0) + inner_color = rgba(0, 0, 0, 0.5) + font_color = rgb(200, 200, 200) + fade_on_empty = false + placeholder_text = <i><span foreground="##cdd6f4">Input Password...</span></i> + hide_input = false + position = 0, -120 + halign = center + valign = center +} + +# TIME +label { + monitor = + text = cmd[update:1000] echo "$(date +"%-H:%M:%S")" + #color = rgba(255, 255, 255, 0.6) + font_size = 80 + font_family = JetBrains Mono Nerd Font Mono ExtraBold + position = 0, 500 + halign = center + valign = center +} + +# PRFOLE IMAGE +image { + monitor = + path = ~/.config/desktop-common/pfps/karkat.png + size = 300 + rounding = -1 + border_size = 0 + position = 0, 250 + halign = center + valign = center +} + +# USER +label { + monitor = + text = Freya Murphy + font_family = JetBrains Mono Nerd Font Mono ExtraBold + font_size = 25 + position = 0, 50 + halign = center + valign = center +} + diff --git a/home/config/hypr/hyprpaper.conf b/home/config/hypr/hyprpaper.conf new file mode 100644 index 0000000..1e2fedb --- /dev/null +++ b/home/config/hypr/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = ~/.config/desktop-common/wallpapers/davekat.png +wallpaper = ,~/.config/desktop-common/wallpapers/davekat.png +splash = false diff --git a/home/config/hypr/monitors.conf b/home/config/hypr/monitors.conf new file mode 100644 index 0000000..5448cc3 --- /dev/null +++ b/home/config/hypr/monitors.conf @@ -0,0 +1,4 @@ +# Generated by nwg-displays on 2024-06-18 at 20:22:23. Do not edit manually. + +monitor=eDP-1,2560x1600@90.0,0x0,1.25 +monitor=DP-2,2560x1440@59.95,2048x0,1.0 diff --git a/home/config/hypr/scripts.d/autostart.sh b/home/config/hypr/scripts.d/autostart.sh new file mode 100755 index 0000000..0b782b7 --- /dev/null +++ b/home/config/hypr/scripts.d/autostart.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +waybar --config $HOME/.config/waybar/config.hypr --style $HOME/.config/waybar/style.hypr.css & + +nm-applet --indicator & + +/usr/bin/gnome-keyring-daemon --foreground & +wl-clip-persist --clipboard both & + +gtk-launch discord & +gtk-launch io.element.Element & +gtk-launch org.gajim.Gajim & +gtk-launch org.mozilla.Thunderbird & + +hyprpaper & +hypridle & diff --git a/home/config/hypr/scripts.d/systemd.sh b/home/config/hypr/scripts.d/systemd.sh new file mode 100755 index 0000000..32b5528 --- /dev/null +++ b/home/config/hypr/scripts.d/systemd.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +systemctl --user set-environment XDG_CURRENT_DESKTOP=Hyprland +systemctl --user import-environment DISPLAY \ + WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP \ + GTK_THEME \ + QT_QPA_PLATFORMTHEME + + +hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY \ + XDG_CURRENT_DESKTOP=Hyprland \ + WAYLAND_DISPLAY \ + GTK_THEME \ + QT_QPA_PLATFORMTHEME diff --git a/home/config/hypr/workspaces.conf b/home/config/hypr/workspaces.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/home/config/hypr/workspaces.conf diff --git a/home/config/kitty/kitty.conf b/home/config/kitty/kitty.conf new file mode 100644 index 0000000..299d17d --- /dev/null +++ b/home/config/kitty/kitty.conf @@ -0,0 +1,28 @@ +include mocha.conf + +font_family monospace +bold_font auto +italic_font auto +bold_italic_font auto + +font_size 11.0 + +scrollback_lines 2000 + +detect_urls yes +show_hyperlink_targets yes + +show_hyperlink_targets no + +background_opacity 0.85 + +window_padding_width 10 + +window_border_width 0.0pt +draw_minimal_borders yes + +confirm_os_window_close 0 + +enable_audio_bell no + +paste_actions no-op diff --git a/home/config/kitty/mocha.conf b/home/config/kitty/mocha.conf new file mode 100644 index 0000000..1a20d54 --- /dev/null +++ b/home/config/kitty/mocha.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Mocha +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/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 #1E1E2E + +# 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 + diff --git a/home-config/lvim/config.lua b/home/config/lvim/config.lua index 09776ff..09776ff 100644 --- a/home-config/lvim/config.lua +++ b/home/config/lvim/config.lua diff --git a/home-config/lvim/lazy-lock.json b/home/config/lvim/lazy-lock.json index c604568..c604568 100644 --- a/home-config/lvim/lazy-lock.json +++ b/home/config/lvim/lazy-lock.json diff --git a/home/config/mako/config b/home/config/mako/config new file mode 100644 index 0000000..dfcc067 --- /dev/null +++ b/home/config/mako/config @@ -0,0 +1,17 @@ +font=monospace 11 +background-color=#14171d +border-color=#4d4754 +border-size=2 +text-color=#c7c6c3 +border-radius=2 +margin=5 +padding=5,8 +progress-color=#373c47 +default-timeout=5000 +layer=overlay +icons=1 + +[urgency=critical] +text-color=#e06c75 +border-color=#e06c75 +default-timeout=0 diff --git a/home/config/nvim/init.lua b/home/config/nvim/init.lua new file mode 100644 index 0000000..fd623bf --- /dev/null +++ b/home/config/nvim/init.lua @@ -0,0 +1,7 @@ +require('plugin') +require('theme') +require('vimopt') +require('tree') +require('keybinds') +require('treesitter') +require('lsp') diff --git a/home/config/nvim/lua/keybinds.lua b/home/config/nvim/lua/keybinds.lua new file mode 100644 index 0000000..c5732b5 --- /dev/null +++ b/home/config/nvim/lua/keybinds.lua @@ -0,0 +1,22 @@ +local opts = { noremap = true, silent = true } +local keymap = vim.keymap.set +local builtin = require('telescope.builtin') +local Terminal = require('toggleterm.terminal').Terminal +local term_float = Terminal:new({ direction = 'float', hidden = 'true' }) + +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +keymap('', '<leader>', '<Nop>', opts) +keymap('n', '<leader>e', vim.cmd.NvimTreeToggle) +keymap('n', '<leader>m', vim.cmd.Mason) +keymap('n', '<leader>h', vim.cmd.noh) +keymap('n', '<leader>p', vim.cmd.PlugUpdate) +keymap('n', '<leader>ff', builtin.find_files, {}) +keymap('n', '<leader>fg', builtin.live_grep, {}) +keymap('n', '<leader>fb', builtin.buffers, {}) +keymap('n', '<leader>fh', builtin.help_tags, {}) +keymap('n', '<leader>u', vim.cmd.UndotreeToggle) +keymap('n', '<leader>gs', vim.cmd.Git) +keymap('n', '<leader>t', function() require('trouble').toggle() end) +keymap('', '<A-s>', function() term_float:toggle() end) diff --git a/home/config/nvim/lua/lsp.lua b/home/config/nvim/lua/lsp.lua new file mode 100644 index 0000000..a548518 --- /dev/null +++ b/home/config/nvim/lua/lsp.lua @@ -0,0 +1,94 @@ +local lsp = require('lsp-zero').preset('recommended') + +require('mason').setup({}) +require('mason-lspconfig').setup({ + ensure_installed = { + 'tsserver', + 'eslint', + 'rust_analyzer', + 'clangd', + 'html', + 'cssls', + 'pyright', + 'vimls', + 'yamlls', + 'jdtls', + 'bashls', + 'lua_ls', + }, + handlers = { + lsp.default_setup, + }, +}) + +local cmp = require('cmp') + +local cmp_select = {behavior = cmp.SelectBehavior.Select} +local cmp_mappings = cmp.mapping.preset.insert({ + ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), + ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), + ['<CR>'] = cmp.mapping.confirm({ select = true }), + ["<C-Space>"] = cmp.mapping.complete(), +}) + +cmp_mappings['<Tab>'] = nil +cmp_mappings['<S-Tab>'] = nil + +cmp.setup({ + mapping = cmp_mappings +}) + +lsp.set_preferences({ + suggest_lsp_servers = false, + sign_icons = { + error = 'E', + warn = 'W', + hint = 'H', + info = 'I' + } +}) + +lsp.on_attach(function(client, bufnr) + local opts = {buffer = bufnr, remap = false} + local keymap = vim.keymap.set + + keymap("n", "gd", function() vim.lsp.buf.definition() end, opts) + keymap("n", "K", function() vim.lsp.buf.hover() end, opts) + keymap("n", "<leader>ls", function() vim.lsp.buf.workspace_symbol() end, opts) + keymap("n", "<leader>lf", function() vim.diagnostic.open_float() end, opts) + keymap("n", "[d", function() vim.diagnostic.goto_next() end, opts) + keymap("n", "]d", function() vim.diagnostic.goto_prev() end, opts) + keymap("n", "<leader>la", function() vim.lsp.buf.code_action() end, opts) + keymap("n", "<leader>lr", function() vim.lsp.buf.references() end, opts) + keymap("n", "<leader>ln", function() vim.lsp.buf.rename() end, opts) + keymap("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts) +end) + +require('lspconfig/prolog_lsp') + +require('lspconfig').gleam.setup {} + +lsp.configure('prolog_lsp', {force_setup = true}) +lsp.setup() + +require('phpactor').setup { + install = { + branch = "master", + bin = "/usr/bin/phpactor", + php_bin = "php", + composer_bin = "composer", + git_bin = "git", + check_on_startup = "none", + }, + lspconfig = { + enabled = true, + options = {}, + }, +} + +vim.diagnostic.config({ + virtual_text = true +}) + +require("neodev").setup() +require("nvim-surround").setup() diff --git a/home/config/nvim/lua/lspconfig/prolog_lsp.lua b/home/config/nvim/lua/lspconfig/prolog_lsp.lua new file mode 100644 index 0000000..85ea353 --- /dev/null +++ b/home/config/nvim/lua/lspconfig/prolog_lsp.lua @@ -0,0 +1,21 @@ +local configs = require 'lspconfig.configs' +local util = require 'lspconfig/util' + +configs.prolog_lsp = { + default_config = { + cmd = {"swipl", + "-g", "use_module(library(lsp_server)).", + "-g", "lsp_server:main", + "-t", "halt", + "--", "stdio"}; + filetypes = {"prolog"}; + root_dir = util.root_pattern("pack.pl"); + }; + docs = { + description = [[ + https://github.com/jamesnvc/prolog_lsp + + Prolog Language Server + ]]; + } +} diff --git a/home/config/nvim/lua/menu.lua b/home/config/nvim/lua/menu.lua new file mode 100644 index 0000000..e3e74bd --- /dev/null +++ b/home/config/nvim/lua/menu.lua @@ -0,0 +1,233 @@ +local path_ok, plenary_path = pcall(require, "plenary.path") +if not path_ok then + return +end + +local dashboard = require("alpha.themes.dashboard") +local cdir = vim.fn.getcwd() +local if_nil = vim.F.if_nil + +local nvim_web_devicons = { + enabled = true, + highlight = true, +} + +local function get_extension(fn) + local match = fn:match("^.+(%..+)$") + local ext = "" + if match ~= nil then + ext = match:sub(2) + end + return ext +end + +local function icon(fn) + local nwd = require("nvim-web-devicons") + local ext = get_extension(fn) + return nwd.get_icon(fn, ext, { default = true }) +end + +local function file_button(fn, sc, short_fn,autocd) + short_fn = short_fn or fn + local ico_txt + local fb_hl = {} + + if nvim_web_devicons.enabled then + local ico, hl = icon(fn) + local hl_option_type = type(nvim_web_devicons.highlight) + if hl_option_type == "boolean" then + if hl and nvim_web_devicons.highlight then + table.insert(fb_hl, { hl, 0, #ico }) + end + end + if hl_option_type == "string" then + table.insert(fb_hl, { nvim_web_devicons.highlight, 0, #ico }) + end + ico_txt = ico .. " " + else + ico_txt = "" + end + local cd_cmd = (autocd and " | cd %:p:h" or "") + local file_button_el = dashboard.button(sc, ico_txt .. short_fn, "<cmd>e " .. vim.fn.fnameescape(fn) .. cd_cmd .." <CR>") + local fn_start = short_fn:match(".*[/\\]") + if fn_start ~= nil then + table.insert(fb_hl, { "Comment", #ico_txt - 2, #fn_start + #ico_txt }) + end + file_button_el.opts.hl = fb_hl + return file_button_el +end + +local default_mru_ignore = { "gitcommit" } + +local mru_opts = { + ignore = function(path, ext) + return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext)) + end, + autocd = false +} + +--- @param start number +--- @param cwd string? optional +--- @param items_number number? optional number of items to generate, default = 10 +local function mru(start, cwd, items_number, opts) + opts = opts or mru_opts + items_number = if_nil(items_number, 10) + + local oldfiles = {} + for _, v in pairs(vim.v.oldfiles) do + if #oldfiles == items_number then + break + end + local cwd_cond + if not cwd then + cwd_cond = true + else + cwd_cond = vim.startswith(v, cwd) + end + local ignore = (opts.ignore and opts.ignore(v, get_extension(v))) or false + if (vim.fn.filereadable(v) == 1) and cwd_cond and not ignore then + oldfiles[#oldfiles + 1] = v + end + end + local target_width = 35 + + local tbl = {} + for i, fn in ipairs(oldfiles) do + local short_fn + if cwd then + short_fn = vim.fn.fnamemodify(fn, ":.") + else + short_fn = vim.fn.fnamemodify(fn, ":~") + end + + if #short_fn > target_width then + short_fn = plenary_path.new(short_fn):shorten(1, { -2, -1 }) + if #short_fn > target_width then + short_fn = plenary_path.new(short_fn):shorten(1, { -1 }) + end + end + + local shortcut = tostring(i + start - 1) + + local file_button_el = file_button(fn, shortcut, short_fn,opts.autocd) + tbl[i] = file_button_el + end + return { + type = "group", + val = tbl, + opts = {}, + } +end + +local cats = { + { + [[ ,-. _,---._ __ / \]], + [[ / ) .-' `./ / \]], + [[( ( ,' `/ /|]], + [[ \ `-" \'\ / |]], + [[ `. , \ \ / |]], + [[ /`. ,'-`----Y |]], + [[ ( ; | ']], + [[ | ,-. ,-' | /]], + [[ | | ( | hjw | /]], + [[ ) | \ `.___________|/]], + [[ `--' `--']], + }, + { + [[ _]], + [[ \`*-. ]], + [[ ) _`-. ]], + [[ . : `. . ]], + [[ : _ ' \ ]], + [[ ; *` _. `*-._ ]], + [[ `-.-' `-. ]], + [[ ; ` `. ]], + [[ :. . \ ]], + [[ . \ . : .-' . ]], + [[ ' `+.; ; ' : ]], + [[ : ' | ; ;-. ]], + [[ ; ' : :`-: _.`* ;]], + [[[bug] .*' / .*' ; .*`- +' `*' ]], + [[ `*-* `*-* `*-*']], + }, +} + +math.randomseed(os.time()) +local header = { + type = "text", + val = cats[math.random(1, #cats)], + opts = { + position = "center", + hl = "Type", + }, +} + +local section_mru = { + type = "group", + val = { + { + type = "text", + val = "Recent files", + opts = { + hl = "SpecialComment", + shrink_margin = false, + position = "center", + }, + }, + { type = "padding", val = 1 }, + { + type = "group", + val = function() + return { mru(0, cdir) } + end, + opts = { shrink_margin = false }, + }, + }, +} + +local buttons = { + type = "group", + val = { + { type = "text", val = "Quick links", opts = { hl = "SpecialComment", position = "center" } }, + { type = "padding", val = 1 }, + dashboard.button("e", " New file", "<cmd>ene<CR>"), + dashboard.button("SPC f f", " Find file"), + dashboard.button("SPC f g", " Live grep"), + dashboard.button("SPC p", " Update plugins", "<cmd>PlugUpdate<CR>"), + dashboard.button("c", " Configuration", "<cmd>cd ~/.config/nvim/ <CR>"), + dashboard.button("q", " Quit", "<cmd>qa<CR>"), + }, + position = "center", +} + +local config = { + layout = { + { type = "padding", val = 2 }, + header, + { type = "padding", val = 2 }, + section_mru, + { type = "padding", val = 2 }, + buttons, + }, + opts = { + margin = 5, + setup = function() + vim.api.nvim_create_autocmd('DirChanged', { + pattern = '*', + group = "alpha_temp", + callback = function () require('alpha').redraw() end, + }) + end, + }, +} + +return { + header = header, + buttons = buttons, + mru = mru, + config = config, + -- theme specific config + mru_opts = mru_opts, + leader = dashboard.leader, + nvim_web_devicons = nvim_web_devicons, +} diff --git a/home/config/nvim/lua/plugin.lua b/home/config/nvim/lua/plugin.lua new file mode 100644 index 0000000..2ad8cdc --- /dev/null +++ b/home/config/nvim/lua/plugin.lua @@ -0,0 +1,45 @@ +local Plug = vim.fn['plug#'] + +vim.call('plug#begin') + +Plug('nvim-tree/nvim-web-devicons') +Plug('nvim-tree/nvim-tree.lua') +Plug('nvim-lualine/lualine.nvim') +Plug('ryanoasis/vim-devicons') +Plug('SirVer/ultisnips') +Plug('honza/vim-snippets') +Plug('preservim/nerdcommenter') +Plug('neoclide/coc.nvim', { branch = 'release' }) +Plug('nvim-telescope/telescope.nvim', { tag = '0.1.3' }) +Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) +Plug('nvim-lua/plenary.nvim') +Plug('mbbill/undotree') +Plug('catppuccin/nvim', { as = 'catppuccin' }) +Plug('tpope/vim-fugitive') +Plug('neovim/nvim-lspconfig') +Plug('hrsh7th/nvim-cmp') +Plug('hrsh7th/cmp-nvim-lsp') +Plug('L3MON4D3/LuaSnip') +Plug('williamboman/mason.nvim') +Plug('williamboman/mason-lspconfig.nvim') +Plug('VonHeikemen/lsp-zero.nvim', { branch = 'v3.x' }) +Plug('akinsho/bufferline.nvim', { tag = '*' }) +Plug('folke/neodev.nvim') +Plug('RRethy/vim-illuminate') +Plug('SmiteshP/nvim-navic') +Plug('utilyre/barbecue.nvim') +Plug('j-hui/fidget.nvim', { tag = 'legacy' }) +Plug('rcarriga/nvim-notify') +Plug('folke/trouble.nvim') +Plug('kylechui/nvim-surround') +Plug('akinsho/toggleterm.nvim', {tag = '*'}) +Plug('goolord/alpha-nvim') +Plug('Darazaki/indent-o-matic') +Plug('iamcco/markdown-preview.nvim', {["do"] = "cd app && npx --yes yarn install"}) +Plug('skywind3000/asyncrun.vim') +Plug('folke/todo-comments.nvim') +Plug('gbprod/phpactor.nvim') +Plug('gleam-lang/gleam.vim') +Plug('edluffy/hologram.nvim') + +vim.call('plug#end') diff --git a/home/config/nvim/lua/theme.lua b/home/config/nvim/lua/theme.lua new file mode 100644 index 0000000..79631c1 --- /dev/null +++ b/home/config/nvim/lua/theme.lua @@ -0,0 +1,68 @@ +local catppuccin = require('catppuccin') + +catppuccin.setup({ + transparent_background = true, + integrations = { + cmp = true, + nvimtree = true, + treesitter = true, + illuminate = { + enabled = true, + lsp = false + }, + barbecue = { + dim_dirname = true, -- directory name is dimmed by default + bold_basename = true, + dim_context = false, + alt_background = false, + }, + coc_nvim = true, + fidget = true, + markdown = true, + notify = true, + lsp_trouble = true, + }, +}) + +local colorscheme = "catppuccin" +local ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +vim.o.background = "dark" -- or "light" for light mode +if not ok then + vim.notify("colorscheme " .. colorscheme .. " not found!") + return +end + +require('lualine').setup { + options = { + theme = colorscheme, + icons_enabled = true, + globalstatus = true, + }, +} + +require('todo-comments').setup() + +require('indent-o-matic').setup { + max_lines = 2048, + standard_widths = { 2, 4, 8 }, + skip_multiline = true, +} + +vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) +vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" }) + +vim.opt.termguicolors = true +require("bufferline").setup {} +require("fidget").setup { + window = { + blend = 0, + }, +} + +local theme = require('menu') +require('alpha').setup(theme.config) + +require('hologram').setup { + auto_display = true +} diff --git a/home/config/nvim/lua/tree.lua b/home/config/nvim/lua/tree.lua new file mode 100644 index 0000000..aef5023 --- /dev/null +++ b/home/config/nvim/lua/tree.lua @@ -0,0 +1,120 @@ +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +local function on_attach(bufnr) + local api = require("nvim-tree.api") + + local function opts(desc) + return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } + end + + local function edit_or_open() + local node = api.tree.get_node_under_cursor() + + if node.nodes ~= nil then + -- expand or collapse folder + api.node.open.edit() + else + -- open file + api.node.open.edit() + -- Close the tree if file was opened + api.tree.close() + end + end + + api.config.mappings.default_on_attach(bufnr) + vim.keymap.set("n", "<CR>", edit_or_open, opts("Open")) +end + +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + adaptive_size = false, + centralize_selection = true, + width = 30, + side = "left", + preserve_window_proportions = false, + number = false, + relativenumber = false, + signcolumn = "yes", + float = { + enable = false, + quit_on_focus_loss = true, + open_win_config = { + relative = "editor", + border = "rounded", + width = 30, + height = 30, + row = 1, + col = 1, + }, + }, + }, + renderer = { + group_empty = true, + }, + actions = { + use_system_clipboard = true, + change_dir = { + enable = true, + global = false, + restrict_above_cwd = false, + }, + expand_all = { + max_folder_discovery = 300, + exclude = {}, + }, + file_popup = { + open_win_config = { + col = 1, + row = 1, + relative = "cursor", + border = "shadow", + style = "minimal", + }, + }, + open_file = { + window_picker = { + enable = false, + picker = "default", + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, + } + }, + remove_file = { + close_window = true, + }, + + }, + tab = { + sync = { + open = false, + close = false, + ignore = {}, + }, + }, + git = { + enable = true, + ignore = false, + show_on_dirs = true, + show_on_open_dirs = true, + timeout = 200, + }, + filters = { + dotfiles = false, + git_clean = false, + no_buffer = false, + custom = { "node_modules", "\\.cache" }, + exclude = {}, + }, + update_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, + update_cwd = true + }, + on_attach = on_attach +}) diff --git a/home/config/nvim/lua/treesitter.lua b/home/config/nvim/lua/treesitter.lua new file mode 100644 index 0000000..7b578d6 --- /dev/null +++ b/home/config/nvim/lua/treesitter.lua @@ -0,0 +1,32 @@ +local lsps = { + "c", + "lua", + "rust", + "typescript", + "javascript", + "python", + "vim", + "vimdoc", + "query" +}; + +require('nvim-treesitter.configs').setup { + ensure_installed = lsps, + sync_install = false, + auto_install = true, + ignore_install = { "javascript" }, + highlight = { + enable = true, + disable = function(lang, buf) + local max_filesize = 1000 * 1024 -- 1 MiB + local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + if ok and stats and stats.size > max_filesize then + return true + end + end, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true + } +} diff --git a/home/config/nvim/lua/vimopt.lua b/home/config/nvim/lua/vimopt.lua new file mode 100644 index 0000000..d205926 --- /dev/null +++ b/home/config/nvim/lua/vimopt.lua @@ -0,0 +1,32 @@ +local set = vim.opt +set.tabstop = 4 +set.softtabstop = 4 +set.shiftwidth = 4 +--set.noexpandtab = true +set.mouse = "a" +set.clipboard = "unnamedplus" +set.hlsearch = true +set.autoindent = true +set.ttyfast = true +set.number = true +set.relativenumber = true +set.rnu = true +set.swapfile = false + +vim.filetype.add({ + pattern = { + ['.*%.pl'] = 'prolog', + ['.*%.prolog'] = 'prolog', + ['.*%.php.m4'] = 'php', + } +}) + +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = { "*" }, + command = [[%s/\s\+$//e]], +}) + +vim.api.nvim_create_autocmd({ "BufWritePost" }, { + pattern = { "*.md" }, + command = 'silent !pandoc % --output=/home/freya/.temp.pdf' +}) diff --git a/home/config/ranger/rc.conf b/home/config/ranger/rc.conf new file mode 100644 index 0000000..7acc757 --- /dev/null +++ b/home/config/ranger/rc.conf @@ -0,0 +1,763 @@ +# =================================================================== +# This file contains the default startup commands for ranger. +# To change them, it is recommended to create either /etc/ranger/rc.conf +# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom +# commands there. +# +# If you copy this whole file there, you may want to set the environment +# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. +# +# The purpose of this file is mainly to define keybindings and settings. +# For running more complex python code, please create a plugin in "plugins/" or +# a command in "commands.py". +# +# Each line is a command that will be run before the user interface +# is initialized. As a result, you can not use commands which rely +# on the UI such as :delete or :mark. +# =================================================================== + +# =================================================================== +# == Options +# =================================================================== + +# Which viewmode should be used? Possible values are: +# miller: Use miller columns which show multiple levels of the hierarchy +# multipane: Midnight-commander like multipane view showing all tabs next +# to each other +set viewmode miller +#set viewmode multipane + +# How many columns are there, and what are their relative widths? +set column_ratios 1,3,4 + +# Which files should be hidden? (regular expression) +set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ + +# Show hidden files? You can toggle this by typing 'zh' +set show_hidden false + +# Ask for a confirmation when running the "delete" command? +# Valid values are "always", "never", "multiple" (default) +# With "multiple", ranger will ask only if you delete multiple files at once. +set confirm_on_delete multiple + +# Use non-default path for file preview script? +# ranger ships with scope.sh, a script that calls external programs (see +# README.md for dependencies) to preview images, archives, etc. +#set preview_script ~/.config/ranger/scope.sh + +# Use the external preview script or display simple plain text or image previews? +set use_preview_script true + +# Automatically count files in the directory, even before entering them? +set automatically_count_files true + +# Open all images in this directory when running certain image viewers +# like feh or sxiv? You can still open selected files by marking them. +set open_all_images true + +# Be aware of version control systems and display information. +set vcs_aware false + +# State of the four backends git, hg, bzr, svn. The possible states are +# disabled, local (only show local info), enabled (show local and remote +# information). +set vcs_backend_git enabled +set vcs_backend_hg disabled +set vcs_backend_bzr disabled +set vcs_backend_svn disabled + +# Truncate the long commit messages to this length when shown in the statusbar. +set vcs_msg_length 50 + +# Use one of the supported image preview protocols +set preview_images true + +# Set the preview image method. Supported methods: +# +# * w3m (default): +# Preview images in full color with the external command "w3mimgpreview"? +# This requires the console web browser "w3m" and a supported terminal. +# It has been successfully tested with "xterm" and "urxvt" without tmux. +# +# * iterm2: +# Preview images in full color using iTerm2 image previews +# (http://iterm2.com/images.html). This requires using iTerm2 compiled +# with image preview support. +# +# This feature relies on the dimensions of the terminal's font. By default, a +# width of 8 and height of 11 are used. To use other values, set the options +# iterm2_font_width and iterm2_font_height to the desired values. +# +# * terminology: +# Previews images in full color in the terminology terminal emulator. +# Supports a wide variety of formats, even vector graphics like svg. +# +# * urxvt: +# Preview images in full color using urxvt image backgrounds. This +# requires using urxvt compiled with pixbuf support. +# +# * urxvt-full: +# The same as urxvt but utilizing not only the preview pane but the +# whole terminal window. +# +# * kitty: +# Preview images in full color using kitty image protocol. +# Requires python PIL or pillow library. +# If ranger does not share the local filesystem with kitty +# the transfer method is changed to encode the whole image; +# while slower, this allows remote previews, +# for example during an ssh session. +# Tmux is unsupported. +# +# * ueberzug: +# Preview images in full color with the external command "ueberzug". +# Images are shown by using a child window. +# Only for users who run X11 in GNU/Linux. +set preview_images_method kitty + +# Delay in seconds before displaying an image with the w3m method. +# Increase it in case of experiencing display corruption. +set w3m_delay 0.02 + +# Manually adjust the w3mimg offset when using a terminal which needs this +set w3m_offset 0 + +# Default iTerm2 font size (see: preview_images_method: iterm2) +set iterm2_font_width 8 +set iterm2_font_height 11 + +# Use a unicode "..." character to mark cut-off filenames? +set unicode_ellipsis false + +# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic). +# Requires the python-bidi pip package +set bidi_support false + +# Show dotfiles in the bookmark preview box? +set show_hidden_bookmarks true + +# Which colorscheme to use? These colorschemes are available by default: +# default, jungle, snow, solarized +set colorscheme default + +# Preview files on the rightmost column? +# And collapse (shrink) the last column if there is nothing to preview? +set preview_files true +set preview_directories true +set collapse_preview true + +# Wrap long lines in plain text previews? +set wrap_plaintext_previews false + +# Save the console history on exit? +set save_console_history true + +# Draw the status bar on top of the browser window (default: bottom) +set status_bar_on_top false + +# Draw a progress bar in the status bar which displays the average state of all +# currently running tasks which support progress bars? +set draw_progress_bar_in_status_bar true + +# Draw borders around columns? (separators, outline, both, or none) +# Separators are vertical lines between columns. +# Outline draws a box around all the columns. +# Both combines the two. +set draw_borders none + +# Display the directory name in tabs? +set dirname_in_tabs false + +# Enable the mouse support? +set mouse_enabled true + +# Display the file size in the main column or status bar? +set display_size_in_main_column true +set display_size_in_status_bar true + +# Display the free disk space in the status bar? +set display_free_space_in_status_bar true + +# Display files tags in all columns or only in main column? +set display_tags_in_all_columns true + +# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME` +set update_title false + +# Set the tmux/screen window-name to "ranger"? +set update_tmux_title true + +# Shorten the title if it gets long? The number defines how many +# directories are displayed at once, 0 turns off this feature. +set shorten_title 3 + +# Show hostname in titlebar? +set hostname_in_titlebar true + +# Abbreviate $HOME with ~ in the titlebar (first line) of ranger? +set tilde_in_titlebar false + +# How many directory-changes or console-commands should be kept in history? +set max_history_size 20 +set max_console_history_size 50 + +# Try to keep so much space between the top/bottom border when scrolling: +set scroll_offset 8 + +# Flush the input after each key hit? (Noticeable when ranger lags) +set flushinput true + +# Padding on the right when there's no preview? +# This allows you to click into the space to run the file. +set padding_right true + +# Save bookmarks (used with mX and `X) instantly? +# This helps to synchronize bookmarks between multiple ranger +# instances but leads to *slight* performance loss. +# When false, bookmarks are saved when ranger is exited. +set autosave_bookmarks true + +# Save the "`" bookmark to disk. This can be used to switch to the last +# directory by typing "``". +set save_backtick_bookmark true + +# You can display the "real" cumulative size of directories by using the +# command :get_cumulative_size or typing "dc". The size is expensive to +# calculate and will not be updated automatically. You can choose +# to update it automatically though by turning on this option: +set autoupdate_cumulative_size false + +# Turning this on makes sense for screen readers: +set show_cursor false + +# One of: size, natural, basename, atime, ctime, mtime, type, random +set sort natural + +# Additional sorting options +set sort_reverse false +set sort_case_insensitive true +set sort_directories_first true +set sort_unicode false + +# Enable this if key combinations with the Alt Key don't work for you. +# (Especially on xterm) +set xterm_alt_key false + +# Whether to include bookmarks in cd command +set cd_bookmarks true + +# Changes case sensitivity for the cd command tab completion +set cd_tab_case sensitive + +# Use fuzzy tab completion with the "cd" command. For example, +# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin". +set cd_tab_fuzzy false + +# Avoid previewing files larger than this size, in bytes. Use a value of 0 to +# disable this feature. +set preview_max_size 0 + +# The key hint lists up to this size have their sublists expanded. +# Otherwise the submaps are replaced with "...". +set hint_collapse_threshold 10 + +# Add the highlighted file to the path in the titlebar +set show_selection_in_titlebar true + +# The delay that ranger idly waits for user input, in milliseconds, with a +# resolution of 100ms. Lower delay reduces lag between directory updates but +# increases CPU load. +set idle_delay 2000 + +# When the metadata manager module looks for metadata, should it only look for +# a ".metadata.json" file in the current directory, or do a deep search and +# check all directories above the current one as well? +set metadata_deep_search false + +# Clear all existing filters when leaving a directory +set clear_filters_on_dir_change false + +# Disable displaying line numbers in main column. +# Possible values: false, absolute, relative. +set line_numbers false + +# When line_numbers=relative show the absolute line number in the +# current line. +set relative_current_zero false + +# Start line numbers from 1 instead of 0 +set one_indexed false + +# Save tabs on exit +set save_tabs_on_exit false + +# Enable scroll wrapping - moving down while on the last item will wrap around to +# the top and vice versa. +set wrap_scroll false + +# Set the global_inode_type_filter to nothing. Possible options: d, f and l for +# directories, files and symlinks respectively. +set global_inode_type_filter + +# This setting allows to freeze the list of files to save I/O bandwidth. It +# should be 'false' during start-up, but you can toggle it by pressing F. +set freeze_files false + +# Print file sizes in bytes instead of the default human-readable format. +set size_in_bytes false + +# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words +# give a warning when you nest ranger in a subshell started by ranger. +# Special value "error" makes the warning more visible. +set nested_ranger_warning true + +# =================================================================== +# == Local Options +# =================================================================== +# You can set local options that only affect a single directory. + +# Examples: +# setlocal path=~/downloads sort mtime + +# =================================================================== +# == Command Aliases in the Console +# =================================================================== + +alias e edit +alias q quit +alias q! quit! +alias qa quitall +alias qa! quitall! +alias qall quitall +alias qall! quitall! +alias setl setlocal + +alias filter scout -prts +alias find scout -aets +alias mark scout -mr +alias unmark scout -Mr +alias search scout -rs +alias search_inc scout -rts +alias travel scout -aefklst + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +map Q quitall +map q quit +copymap q ZZ ZQ + +map R reload_cwd +map F set freeze_files! +map <C-r> reset +map <C-l> redraw_window +map <C-c> abort +map <esc> change_mode normal +map ~ set viewmode! + +map i display_file +map <A-j> scroll_preview 1 +map <A-k> scroll_preview -1 +map ? help +map W display_log +map w taskview_open +map S shell $SHELL + +map : console +map ; console +map ! console shell%space +map @ console -p6 shell %%s +map # console shell -p%space +map s console shell%space +map r chain draw_possible_programs; console open_with%space +map f console find%space +map cd console cd%space + +map <C-p> chain console; eval fm.ui.console.history_move(-1) + +# Change the line mode +map Mf linemode filename +map Mi linemode fileinfo +map Mm linemode mtime +map Mh linemode humanreadablemtime +map Mp linemode permissions +map Ms linemode sizemtime +map MH linemode sizehumanreadablemtime +map Mt linemode metatitle + +# Tagging / Marking +map t tag_toggle +map ut tag_remove +map "<any> tag_toggle tag=%any +map <Space> mark_files toggle=True +map v mark_files all=True toggle=True +map uv mark_files all=True val=False +map V toggle_visual_mode +map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +map <F1> help +map <F2> rename_append +map <F3> display_file +map <F4> edit +map <F5> copy +map <F6> cut +map <F7> console mkdir%space +map <F8> console delete +#map <F8> console trash +map <F10> exit + +# In case you work on a keyboard with dvorak layout +map <UP> move up=1 +map <DOWN> move down=1 +map <LEFT> move left=1 +map <RIGHT> move right=1 +map <HOME> move to=0 +map <END> move to=-1 +map <PAGEDOWN> move down=1 pages=True +map <PAGEUP> move up=1 pages=True +map <CR> move right=1 +#map <DELETE> console delete +map <INSERT> console touch%space + +# VIM-like +copymap <UP> k +copymap <DOWN> j +copymap <LEFT> h +copymap <RIGHT> l +copymap <HOME> gg +copymap <END> G +copymap <PAGEDOWN> <C-F> +copymap <PAGEUP> <C-B> + +map J move down=0.5 pages=True +map K move up=0.5 pages=True +copymap J <C-D> +copymap K <C-U> + +# Jumping around +map H history_go -1 +map L history_go 1 +map ] move_parent 1 +map [ move_parent -1 +map } traverse +map { traverse_backwards +map ) jump_non + +map gh cd ~ +map ge cd /etc +map gu cd /usr +map gd cd /dev +map gl cd -r . +map gL cd -r %f +map go cd /opt +map gv cd /var +map gm cd /media +map gi eval fm.cd('/run/media/' + os.getenv('USER')) +map gM cd /mnt +map gs cd /srv +map gp cd /tmp +map gr cd / +map gR eval fm.cd(ranger.RANGERDIR) +map g/ cd / +map g? cd /usr/share/doc/ranger + +# External Programs +map E edit +map du shell -p du --max-depth=1 -h --apparent-size +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map yp yank path +map yd yank dir +map yn yank name +map y. yank name_without_extension + +# Filesystem Operations +map = chmod + +map cw console rename%space +map a rename_append +map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) +map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) + +map pp paste +map po paste overwrite=True +map pP paste append=True +map pO paste overwrite=True append=True +map pl paste_symlink relative=False +map pL paste_symlink relative=True +map phl paste_hardlink +map pht paste_hardlinked_subtree +map pd console paste dest= +map p`<any> paste dest=%any_path +map p'<any> paste dest=%any_path + +map dD console delete +map dT console trash + +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove +map dt cut mode=toggle + +map yy copy +map uy uncut +map ya copy mode=add +map yr copy mode=remove +map yt copy mode=toggle + +# Temporary workarounds +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + +# Searching +map / console search%space +map n search_next +map N search_next forward=False +map ct search_next order=tag +map cs search_next order=size +map ci search_next order=mimetype +map cc search_next order=ctime +map cm search_next order=mtime +map ca search_next order=atime + +# Tabs +map <C-n> tab_new +map <C-w> tab_close +map <TAB> tab_move 1 +map <S-TAB> tab_move -1 +map <A-Right> tab_move 1 +map <A-Left> tab_move -1 +map gt tab_move 1 +map gT tab_move -1 +map gn tab_new +map gc tab_close +map uq tab_restore +map <a-1> tab_open 1 +map <a-2> tab_open 2 +map <a-3> tab_open 3 +map <a-4> tab_open 4 +map <a-5> tab_open 5 +map <a-6> tab_open 6 +map <a-7> tab_open 7 +map <a-8> tab_open 8 +map <a-9> tab_open 9 +map <a-r> tab_shift 1 +map <a-l> tab_shift -1 + +# Sorting +map or set sort_reverse! +map oz set sort=random +map os chain set sort=size; set sort_reverse=False +map ob chain set sort=basename; set sort_reverse=False +map on chain set sort=natural; set sort_reverse=False +map om chain set sort=mtime; set sort_reverse=False +map oc chain set sort=ctime; set sort_reverse=False +map oa chain set sort=atime; set sort_reverse=False +map ot chain set sort=type; set sort_reverse=False +map oe chain set sort=extension; set sort_reverse=False + +map oS chain set sort=size; set sort_reverse=True +map oB chain set sort=basename; set sort_reverse=True +map oN chain set sort=natural; set sort_reverse=True +map oM chain set sort=mtime; set sort_reverse=True +map oC chain set sort=ctime; set sort_reverse=True +map oA chain set sort=atime; set sort_reverse=True +map oT chain set sort=type; set sort_reverse=True +map oE chain set sort=extension; set sort_reverse=True + +map dc get_cumulative_size + +# Settings +map zc set collapse_preview! +map zd set sort_directories_first! +map zh set show_hidden! +map <C-h> set show_hidden! +copymap <C-h> <backspace> +copymap <backspace> <backspace2> +map zI set flushinput! +map zi set preview_images! +map zm set mouse_enabled! +map zp set preview_files! +map zP set preview_directories! +map zs set sort_case_insensitive! +map zu set autoupdate_cumulative_size! +map zv set use_preview_script! +map zf console filter%space +copymap zf zz + +# Filter stack +map .d filter_stack add type d +map .f filter_stack add type f +map .l filter_stack add type l +map .m console filter_stack add mime%space +map .n console filter_stack add name%space +map .# console filter_stack add hash%space +map ." filter_stack add duplicate +map .' filter_stack add unique +map .| filter_stack add or +map .& filter_stack add and +map .! filter_stack add not +map .r filter_stack rotate +map .c filter_stack clear +map .* filter_stack decompose +map .p filter_stack pop +map .. filter_stack show + +# Bookmarks +map `<any> enter_bookmark %any +map '<any> enter_bookmark %any +map m<any> set_bookmark %any +map um<any> unset_bookmark %any + +map m<bg> draw_bookmarks +copymap m<bg> um<bg> `<bg> '<bg> + +# Generate all the chmod bindings with some python help: +eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) + +# =================================================================== +# == Define keys for the console +# =================================================================== +# Note: Unmapped keys are passed directly to the console. + +# Basic +cmap <tab> eval fm.ui.console.tab() +cmap <s-tab> eval fm.ui.console.tab(-1) +cmap <ESC> eval fm.ui.console.close() +cmap <CR> eval fm.ui.console.execute() +cmap <C-l> redraw_window + +copycmap <ESC> <C-c> +copycmap <CR> <C-j> + +# Move around +cmap <up> eval fm.ui.console.history_move(-1) +cmap <down> eval fm.ui.console.history_move(1) +cmap <left> eval fm.ui.console.move(left=1) +cmap <right> eval fm.ui.console.move(right=1) +cmap <home> eval fm.ui.console.move(right=0, absolute=True) +cmap <end> eval fm.ui.console.move(right=-1, absolute=True) +cmap <a-b> eval fm.ui.console.move_word(left=1) +cmap <a-f> eval fm.ui.console.move_word(right=1) + +copycmap <a-b> <a-left> +copycmap <a-f> <a-right> + +# Line Editing +cmap <backspace> eval fm.ui.console.delete(-1) +cmap <delete> eval fm.ui.console.delete(0) +cmap <C-w> eval fm.ui.console.delete_word() +cmap <A-d> eval fm.ui.console.delete_word(backward=False) +cmap <C-k> eval fm.ui.console.delete_rest(1) +cmap <C-u> eval fm.ui.console.delete_rest(-1) +cmap <C-y> eval fm.ui.console.paste() + +# And of course the emacs way +copycmap <ESC> <C-g> +copycmap <up> <C-p> +copycmap <down> <C-n> +copycmap <left> <C-b> +copycmap <right> <C-f> +copycmap <home> <C-a> +copycmap <end> <C-e> +copycmap <delete> <C-d> +copycmap <backspace> <C-h> + +# Note: There are multiple ways to express backspaces. <backspace> (code 263) +# and <backspace2> (code 127). To be sure, use both. +copycmap <backspace> <backspace2> + +# This special expression allows typing in numerals: +cmap <allow_quantifiers> false + +# =================================================================== +# == Pager Keybindings +# =================================================================== + +# Movement +pmap <down> pager_move down=1 +pmap <up> pager_move up=1 +pmap <left> pager_move left=4 +pmap <right> pager_move right=4 +pmap <home> pager_move to=0 +pmap <end> pager_move to=-1 +pmap <pagedown> pager_move down=1.0 pages=True +pmap <pageup> pager_move up=1.0 pages=True +pmap <C-d> pager_move down=0.5 pages=True +pmap <C-u> pager_move up=0.5 pages=True + +copypmap <UP> k <C-p> +copypmap <DOWN> j <C-n> <CR> +copypmap <LEFT> h +copypmap <RIGHT> l +copypmap <HOME> g +copypmap <END> G +copypmap <C-d> d +copypmap <C-u> u +copypmap <PAGEDOWN> n f <C-F> <Space> +copypmap <PAGEUP> p b <C-B> + +# Basic +pmap <C-l> redraw_window +pmap <ESC> pager_close +copypmap <ESC> q Q i <F3> +pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +tmap <up> taskview_move up=1 +tmap <down> taskview_move down=1 +tmap <home> taskview_move to=0 +tmap <end> taskview_move to=-1 +tmap <pagedown> taskview_move down=1.0 pages=True +tmap <pageup> taskview_move up=1.0 pages=True +tmap <C-d> taskview_move down=0.5 pages=True +tmap <C-u> taskview_move up=0.5 pages=True + +copytmap <UP> k <C-p> +copytmap <DOWN> j <C-n> <CR> +copytmap <HOME> g +copytmap <END> G +copytmap <C-u> u +copytmap <PAGEDOWN> n f <C-F> <Space> +copytmap <PAGEUP> p b <C-B> + +# Changing priority and deleting tasks +tmap J eval -q fm.ui.taskview.task_move(-1) +tmap K eval -q fm.ui.taskview.task_move(0) +tmap dd eval -q fm.ui.taskview.task_remove() +tmap <pagedown> eval -q fm.ui.taskview.task_move(-1) +tmap <pageup> eval -q fm.ui.taskview.task_move(0) +tmap <delete> eval -q fm.ui.taskview.task_remove() + +# Basic +tmap <C-l> redraw_window +tmap <ESC> taskview_close +copytmap <ESC> q Q w <C-c> + +# exit to current dir +map x quit_cd_wd +map X quitall_cd_wd diff --git a/home/config/ranger/rifle.conf b/home/config/ranger/rifle.conf new file mode 100644 index 0000000..ab9a0e9 --- /dev/null +++ b/home/config/ranger/rifle.conf @@ -0,0 +1,44 @@ +# vim: ft=cfg + +# web +ext x?html?, has librewolf, X, flag f = librewolf -- "$@" +ext x?html?, has firefox, X, flag f = firefox -- "$@" + +# editor +mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" +!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" + +# misc +ext 1 = man "$1" +ext exe = wine "$1" + +# scripts +ext py = python3 -- "$1" +ext pl = perl -- "$1" +ext rb = ruby -- "$1" +ext js = node -- "$1" +ext sh = sh -- "$1" +ext php = php -- "$1" + +# media +mime ^audio|ogg$, terminal, has mpv = mpv -- "$@" +mime ^video, has mpv, X, flag f = mpv -- "$@" + +# documents +ext pdf, has zathura, X, flag f = zathura -- "$@" +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@" + +# images +mime ^image, has imv, X, flag f = imv -- "$@" +ext xcf, X, flag f = gimp -- "$@" + +# fallbacks +mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@" +mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@" + +# xdg-open +label open, has xdg-open = xdg-open -- "$@" +label open, has open = open -- "$@" + +# execute +mime application/x-executable = "$1" diff --git a/home/config/ranger/scope.sh b/home/config/ranger/scope.sh new file mode 100755 index 0000000..8843578 --- /dev/null +++ b/home/config/ranger/scope.sh @@ -0,0 +1,154 @@ +#!/usr/bin/env bash + +set -o noclobber -o noglob -o nounset -o pipefail +IFS=$'\n' + +## If the option `use_preview_script` is set to `true`, +## then this script will be called and its output will be displayed in ranger. +## ANSI color codes are supported. +## STDIN is disabled, so interactive scripts won't work properly + +## This script is considered a configuration file and must be updated manually. +## It will be left untouched if you upgrade ranger. + +## Because of some automated testing we do on the script #'s for comments need +## to be doubled up. Code that is commented out, because it's an alternative for +## example, gets only one #. + +## Meanings of exit codes: +## code | meaning | action of ranger +## -----+------------+------------------------------------------- +## 0 | success | Display stdout as preview +## 1 | no preview | Display no preview at all +## 2 | plain text | Display the plain content of the file +## 3 | fix width | Don't reload when width changes +## 4 | fix height | Don't reload when height changes +## 5 | fix both | Don't ever reload +## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview +## 7 | image | Display the file directly as an image + +## Script arguments +FILE_PATH="${1}" # Full path of the highlighted file +PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters) +## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused +PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters) +IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview +PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise. + +FILE_EXTENSION="${FILE_PATH##*.}" +FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')" + +## Settings +HIGHLIGHT_SIZE_MAX=262143 # 256KiB +HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8} +HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo} +HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}" +PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn} +OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000} +OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night} + +handle_extension() { + case "${FILE_EXTENSION_LOWER}" in + + ## OpenDocument + odt|ods|odp|sxw) + ## Preview as markdown conversion + pandoc -s -t markdown -- "${FILE_PATH}" && exit 5 + exit 1;; + + ## HTML + htm|html|xhtml) + ## Preview as text conversion + lynx -dump -- "${FILE_PATH}" && exit 5 + exit 1;; + + ## JSON + json) + jq --color-output . "${FILE_PATH}" && exit 5 + exit 1;; + + esac +} + +handle_image() { + local DEFAULT_SIZE="1920x1080" + + local mimetype="${1}" + case "${mimetype}" in + + ## Image + image/*) + local orientation + orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )" + if [[ -n "$orientation" && "$orientation" != 1 ]]; then + convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6 + fi + exit 7;; + + ## Video + video/*) + # Thumbnail + ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 + exit 1;; + + ## PDF + application/pdf) + pdftoppm -f 1 -l 1 \ + -scale-to-x "${DEFAULT_SIZE%x*}" \ + -scale-to-y -1 \ + -singlefile \ + -jpeg -tiffcompression jpeg \ + -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ + && exit 6 || exit 1;; + + esac +} + +handle_mime() { + local mimetype="${1}" + case "${mimetype}" in + + ## Text + text/* | */xml) + ## Syntax highlight + if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then + exit 2 + fi + if [[ "$( tput colors )" -ge 256 ]]; then + local pygmentize_format='terminal256' + local highlight_format='xterm256' + else + local pygmentize_format='terminal' + local highlight_format='ansi' + fi + env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \ + --out-format="${highlight_format}" \ + --force -- "${FILE_PATH}" && exit 5 + env COLORTERM=8bit bat --color=always --style="plain" \ + -- "${FILE_PATH}" && exit 5 + pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\ + -- "${FILE_PATH}" && exit 5 + exit 2;; + + ## Media + image/* | video/* | audio/*) + exiftool "${FILE_PATH}" && exit 5 + exit 1;; + + esac +} + +handle_fallback() { + echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5 + exit 1 +} + +MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )" +if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then + handle_image "${MIMETYPE}" +fi +handle_extension +handle_mime "${MIMETYPE}" +handle_fallback + +exit 1 diff --git a/home-config/ssh/config b/home/config/ssh/config index 88b89c3..3377b18 100644 --- a/home-config/ssh/config +++ b/home/config/ssh/config @@ -26,6 +26,6 @@ Host github.com User tam2214 IdentityFile /home/freya/.ssh/id_rit -#Host * -# KexAlgorithms -sntrup761x25519-sha512@openssh.com +Host * + KexAlgorithms -sntrup761x25519-sha512@openssh.com diff --git a/home-config/starship/starship.toml b/home/config/starship/starship.toml index b3e3af7..ad76d5f 100644 --- a/home-config/starship/starship.toml +++ b/home/config/starship/starship.toml @@ -9,15 +9,15 @@ $line_break\ """ [username] -style_user = 'bold blue' -style_root = 'bold red' +style_user = 'bold purple' +style_root = 'bold purple' format = '[$user]($style) ' disabled = false show_always = true [hostname] ssh_only = false -format = 'on [$hostname](bold red) ' +format = 'on [$hostname](bold blue) ' disabled = false [directory] diff --git a/home-config/sway/config b/home/config/sway/config index 497b549..d8526ad 100755..100644 --- a/home-config/sway/config +++ b/home/config/sway/config @@ -1,20 +1,20 @@ -# xdg desktop portal fix -exec dbus-update-activation-environment DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway - # Set super key set $mod Mod4 # Set terminal -set $term alacritty +set $term kitty # Set app launcher set $menu wofi --allow-images --show=drun --prompt "Search Program" # Set scale -set $scale 1.5 +set $scale 1.25 # Set background -set $bg ~/.config/sway/wallpapers/blue.jpg +set $bg ~/.config/desktop-common/wallpapers/davekat.png + +# Set lockscreen +set $lock hyprlock # Set Efects set $gaps 10 @@ -22,14 +22,20 @@ set $radius 0 set $shadows on set $shadow_blur 15 set $blur enable -set $blur_radius 4 -set $blur_passes 2 +set $blur_radius 10 +set $blur_passes 3 # Set browser -set $browser firefox +set $browser librewolf -# Autostart apps -exec $HOME/.config/sway/scripts.d/auto.sh +# System configs +include /etc/sway/config.d/* # Local configs include $HOME/.config/sway/config.d/* + +# Nwg +include $HOME/.config/sway/outputs + +# Autostart apps +exec $HOME/.config/sway/scripts.d/auto.sh diff --git a/home-config/sway/config.d/gestures b/home/config/sway/config.d/gestures index 4bdb136..4bdb136 100644 --- a/home-config/sway/config.d/gestures +++ b/home/config/sway/config.d/gestures diff --git a/home-config/sway/config.d/input b/home/config/sway/config.d/input index a02f6d6..9cb7156 100644 --- a/home-config/sway/config.d/input +++ b/home/config/sway/config.d/input @@ -6,6 +6,7 @@ input * xkb_numlock enable # Keyboard layout, change as you wish input * { xkb_layout "us" + xkb_options compose:ralt } # Touchpad input settings @@ -16,5 +17,4 @@ input type:touchpad { } # Screen settings -#exec swaymsg output $screen resolution $resolution scale $scale -output eDP-1 resolution 3072x1920 scale $scale +# output eDP-1 resolution 3072x1920 scale $scale diff --git a/home-config/sway/config.d/keybinds b/home/config/sway/config.d/keybinds index bfc6f56..214be98 100644 --- a/home-config/sway/config.d/keybinds +++ b/home/config/sway/config.d/keybinds @@ -13,13 +13,10 @@ bindsym $mod+d exec $menu bindsym $mod+w exec $browser # Lock screen -bindsym $mod+Shift+l exec $lock +bindsym $mod+l exec $lock # Exit sway -bindsym Ctrl+Alt+Delete exec killall sway - -# Power menu -bindsym $mod+L exec killall wlogout || wlogout --css ~/.config/sway/logout.d/power/style.css -l ~/.config/sway/logout.d/power/layout +bindsym $mod+Shift+l exit # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -34,12 +31,10 @@ bindsym $mod+F5 reload # Audio keybinds bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym Shift+XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ 10000% +bindsym Shift+XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ 0% bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle -bindsym F3 exec pactl set-sink-volume @DEFAULT_SINK@ +5% -bindsym F2 exec pactl set-sink-volume @DEFAULT_SINK@ -5% -bindsym F1 exec pactl set-sink-mute @DEFAULT_SINK@ toggle -bindsym F4 exec pactl set-source-mute @DEFAULT_SOURCE@ toggle # Brightness keybinds bindsym XF86MonBrightnessDown exec brightnessctl set 5%- @@ -51,6 +46,12 @@ bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous # Screenshot -bindsym Print exec grim -g "$(slurp)" - | wl-copy -bindsym Alt+Print exec grim - | wl-copy +bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -t 3000 "Sway" "Screenshot copied to clipboard" +bindsym Print exec grim - | wl-copy -t iamge/png && notify-send -t 3000 "Sway" "Full screen copied to clipboard" bindsym Shift+Print exec slurp -p | grim -g - - | convert - txt:- | tail -n 1 | awk '{print $3}' | wl-copy + +# Michelsoft Binbows +bindsym Ctrl+$mod+Shift+L exec $browser "https://linkedin.com" +bindsym Ctrl+$mod+Shift+S exec $term -e sl +bindsym Ctrl+$mod+Shift+T exec electron28 "https://twitter.com" +bindsym Ctrl+$mod+Shift+M exec electron28 "https://www.tumblr.com" diff --git a/home-config/sway/config.d/project b/home/config/sway/config.d/project index 3cb1049..5f74a43 100644 --- a/home-config/sway/config.d/project +++ b/home/config/sway/config.d/project @@ -1,6 +1,6 @@ ### Project -bindsym $mod+Alt+Left exec ~/.config/sway/scripts.d/project.sh LEFT -bindsym $mod+Alt+Right exec ~/.config/sway/scripts.d/project.sh RIGHT -bindsym $mod+Alt+Up exec ~/.config/sway/scripts.d/project.sh EXTERNAL_ONLY -bindsym $mod+Alt+Down exec ~/.config/sway/scripts.d/project.sh PRIMARY_ONLY +bindsym $mod+Alt+Left exec ~/.config/sway/scripts.d/project.sh LEFT $scale +bindsym $mod+Alt+Right exec ~/.config/sway/scripts.d/project.sh RIGHT $scale +bindsym $mod+Alt+Up exec ~/.config/sway/scripts.d/project.sh EXTERNAL_ONLY $scale +bindsym $mod+Alt+Down exec ~/.config/sway/scripts.d/project.sh PRIMARY_ONLY $scale diff --git a/home-config/sway/config.d/scratch b/home/config/sway/config.d/scratch index 0337319..bdafcf6 100644 --- a/home-config/sway/config.d/scratch +++ b/home/config/sway/config.d/scratch @@ -7,8 +7,12 @@ bindsym $mod+Shift+minus move scratchpad # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+minus scratchpad show +exec ~/.config/sway/scripts.d/scratchpads.sh + for_window [app_id="scratch_term"] move scratchpad, resize set 960 640 for_window [app_id="scratch_htop"] move scratchpad, resize set 960 640 +for_window [app_id="scratch_calc"] move scratchpad, resize set 960 640 bindsym $mod+y exec ~/.config/sway/scripts.d/scratchpads.sh scratch_term zsh bindsym $mod+h exec ~/.config/sway/scripts.d/scratchpads.sh scratch_htop htop +bindsym $mod+c exec ~/.config/sway/scripts.d/scratchpads.sh scratch_calc matrix diff --git a/home-config/sway/config.d/theme b/home/config/sway/config.d/theme index e8d2822..3d93752 100644 --- a/home-config/sway/config.d/theme +++ b/home/config/sway/config.d/theme @@ -1,8 +1,8 @@ ### Set borders gaps inner $gaps -for_window [class="^.*"] border pixel 2 -default_border pixel 2 -default_floating_border pixel 2 +for_window [class="^.*"] border pixel 0 +default_border pixel 0 +default_floating_border pixel 0 ### Colors @@ -25,8 +25,11 @@ shadow_color #14171dff blur $blur blur_radius $blur_radius blur_passes $blur_passes -layer_effects "waybar" blur enable; shadows enable +layer_effects "waybar" blur disable; shadows disable layer_effects "wofi" blur enable; shadows enable ### Output configuration output * bg $bg fill + +### Bar +bar swaybar_command waybar diff --git a/home-config/sway/config.d/workspaces b/home/config/sway/config.d/workspaces index fe87bc1..5fac86b 100644 --- a/home-config/sway/config.d/workspaces +++ b/home/config/sway/config.d/workspaces @@ -21,7 +21,6 @@ bindsym $mod+6 workspace number 6 bindsym $mod+7 workspace number 7 bindsym $mod+8 workspace number 8 bindsym $mod+9 workspace number 9 -bindsym $mod+0 workspace number 10 # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 @@ -33,11 +32,11 @@ bindsym $mod+Shift+6 move container to workspace number 6 bindsym $mod+Shift+7 move container to workspace number 7 bindsym $mod+Shift+8 move container to workspace number 8 bindsym $mod+Shift+9 move container to workspace number 9 -bindsym $mod+Shift+0 move container to workspace number 10 # Layout stuff: # Set the new window positioning mode +bindsym $mod+Shift+d layout default bindsym $mod+Shift+b layout splith bindsym $mod+Shift+v layout splitv bindsym $mod+Shift+c layout tabbed diff --git a/home/config/sway/outputs b/home/config/sway/outputs new file mode 100644 index 0000000..08b8c77 --- /dev/null +++ b/home/config/sway/outputs @@ -0,0 +1,20 @@ +# Generated by nwg-displays on 2024-06-15 at 16:21:56. Do not edit manually. + +output "eDP-1" { + mode 2560x1600@90.003Hz + pos 2560 160 + transform normal + scale 1.25 + scale_filter linear + adaptive_sync off + dpms on +} +output "DP-2" { + mode 2560x1440@59.951Hz + pos 0 0 + transform normal + scale 1.0 + scale_filter linear + adaptive_sync off + dpms on +} diff --git a/home/config/sway/scripts.d/auto.sh b/home/config/sway/scripts.d/auto.sh new file mode 100755 index 0000000..07a61fd --- /dev/null +++ b/home/config/sway/scripts.d/auto.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +nm-applet --indicator & +autotiling-rs & + +/usr/bin/gnome-keyring-daemon --foreground & +wl-clip-persist --clipboard both & + +#gtk-launch discord & +#gtk-launch io.element.Element & +#gtk-launch org.gajim.Gajim & +#gtk-launch org.mozilla.Thunderbird & + +hypridle & diff --git a/home-config/sway/scripts.d/project.sh b/home/config/sway/scripts.d/project.sh index afb8507..84e1a8d 100755 --- a/home-config/sway/scripts.d/project.sh +++ b/home/config/sway/scripts.d/project.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +PID=$$ + get_mode() { swaymsg -t get_outputs -r | jq ".[$1].modes[0]" } @@ -56,24 +58,25 @@ get_id() { i=0 while true; do NAME="$(get_name $i)" - if [ "$NAME" == "$1" ]; then + if [ $(echo "$NAME" | grep "^$1") ]; then echo "$i" - exit 0 + return 0 elif [ "$NAME" == "null" ]; then - exit 1 + return 1 fi ((i=i+1)) done } die() { - notify-send -u critical -t 3000 "Sway" "Failed to get display" + notify-send -u critical -t 3000 "Sway" "$1" + kill $PID } -PRIMARY=$(get_id "eDP-1") -EXTERNAL=$(get_id "DP-1" || get_id "HDMI-1") +PRIMARY=$(get_id "eDP-1" || die "Failed to get primary display") +EXTERNAL=$(get_id "DP" || get_id "HDMI" || die "Failed to get external display") -PRIMARY_SCALE=1.5 +PRIMARY_SCALE=$2 EXTERNAL_SCALE=1 set_monitors() { diff --git a/home-config/sway/scripts.d/scratchpads.sh b/home/config/sway/scripts.d/scratchpads.sh index bb8e361..bb8e361 100755 --- a/home-config/sway/scripts.d/scratchpads.sh +++ b/home/config/sway/scripts.d/scratchpads.sh diff --git a/home/config/sway/workspaces b/home/config/sway/workspaces new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/home/config/sway/workspaces diff --git a/home/config/swaylock/config b/home/config/swaylock/config new file mode 100644 index 0000000..9dd0202 --- /dev/null +++ b/home/config/swaylock/config @@ -0,0 +1,41 @@ +screenshots +effect-blur=7x5 +indicator +clock +timestr=%H:%M +datestr=%Y-%m-%d +font=monospace +font-size=40 + +indicator-radius=75 +indicator-thickness=7 + +inside-color=14171dd8 +inside-clear-color=ada0a8d8 +inside-caps-lock-color=14171dd8 +inside-ver-color=97bd5ed8 +inside-wrong-color=cc5c5cd8 + +line-color=14171dff +line-clear-color=14171dff +line-caps-lock-color=14171dff +line-ver-color=14171dff +line-wrong-color=14171dff +separator-color=14171dff + +ring-color=4d4754d8 +ring-clear-color=4d4754d8 +ring-caps-lock-color=4d4754d8 +ring-ver-color=4d4754d8 +ring-wrong-color=4d4754d8 + +key-hl-color=82bfb3d8 +bs-hl-color=f0c767d8 +caps-lock-key-hl-color=82bfb3d8 +caps-lock-bs-hl-color=a97fb3d8 + +text-color=c7c6c3ff +text-clear-color=14171dff +text-caps-lock-color=14171dff +text-ver-color=14171dff +text-wrong-color=14171dff diff --git a/home-config/waybar/config b/home/config/waybar/config index 68b2adc..34cf25e 100644 --- a/home-config/waybar/config +++ b/home/config/waybar/config @@ -1,5 +1,7 @@ { "height": 24, + "position": "top", + "layer": "bottom", "spacing": 4, "modules-left": [ "sway/workspaces", @@ -12,7 +14,7 @@ "temperature", "battery", "backlight", - "pulseaudio", + "wireplumber", "network", "clock", "tray" @@ -41,7 +43,7 @@ }, "temperature": { "interval": 1, - "thermal-zone": 1, + "thermal-zone": 0, "critical-threshold": 80, "format": " {temperatureC}°" }, @@ -61,7 +63,7 @@ "backlight": { "format": " {percent}%" }, - "pulseaudio": { + "wireplumber": { "format": " {volume}%", "format-bluetooth": " {volume}%", "format-muted": " muted", diff --git a/home/config/waybar/config.hypr b/home/config/waybar/config.hypr new file mode 100644 index 0000000..7d9cabb --- /dev/null +++ b/home/config/waybar/config.hypr @@ -0,0 +1,82 @@ +{ + "height": 24, + "position": "top", + "layer": "top", + "spacing": 4, + "modules-left": [ + "hyprland/workspaces", + "hyprland/window" + ], + "modules-center": [], + "modules-right": [ + "cpu", + "memory", + "temperature", + "battery", + "backlight", + "wireplumber", + "network", + "clock", + "tray" + ], + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}" + }, + "tray": { + "spacing": 10 + }, + "clock": { + "interval": 1, + "format": "{:%Y-%m-%d %a %H:%M:%S}" + }, + "cpu": { + "interval": 1, + "format": " {usage}%", + "tooltip": false + }, + "memory": { + "interval": 1, + "format": " {}%", + "tooltip": false + }, + "temperature": { + "interval": 1, + "thermal-zone": 0, + "critical-threshold": 80, + "format": " {temperatureC}°" + }, + "battery": { + "interval": 1, + "states": { + "warning": 30, + "critical": 15 + }, + "format": " {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-full": " {capacity}%", + "format-warning": " {capacity}%", + "format-critical": " {capacity}%" + }, + "backlight": { + "format": " {percent}%" + }, + "wireplumber": { + "format": " {volume}%", + "format-bluetooth": " {volume}%", + "format-muted": " muted", + "scroll-step": 1, + "on-click": "pavucontrol", + "ignored-sinks": ["Easy Effects Sink"] + }, + "network": { + "format": " disconnected", + "format-wifi": " {essid}", + "format-ethernet": " {ipaddr}/{cidr}", + "format-disconnected": " disconnected", + "max-length": 50, + "on-click": "nm-connection-editor", + } +} diff --git a/home-config/waybar/style.css b/home/config/waybar/style.css index 2452a0b..0d159fd 100644 --- a/home-config/waybar/style.css +++ b/home/config/waybar/style.css @@ -1,57 +1,61 @@ * { - font-family: "Fira Mono", "Font Awesome 6 Pro", monospace; + font-family: "JetBrains Mono", "Font Awesome 6 Pro", monospace; font-size: 13.5px; transition: none; margin: 0; padding: 0; } -/* -#waybar { - background-color: rgba(20, 23, 29, 0.85); - color: #c7c6c3; -} -*/ - window#waybar { - background-color: rgba(20, 23, 29, 0.85); - color: #c7c6c3; + background-color: transparent; } -/* window#waybar > box { - margin-bottom: 8px; + margin: 10px; + margin-bottom: 0px; + padding: 0; color: #c7c6c3; - box-shadow: 0px 0px 3px 2px rgba(20, 23, 29, 0.70); } -*/ button { border: none; border-radius: 0; } +.modules-left, +.modules-right { + margin: 0; + padding: 2px 0px; + background-color: #14171d; + border-radius: 4px; +} + +#workspaces { + padding: 0px 0px; +} + #workspaces button { + all: initial; + box-shadow: inherit; + text-shadow: inherit; color: #c7c6c3; - background-color: rgba(0, 0, 0, 0); + background-color: transparent; + border-radius: 4px; + padding: 2px 8px; } #workspaces button:hover { - box-shadow: inherit; - text-shadow: inherit; + background-color: #1a2a3a; } -#workspaces button.focused { +#workspaces button.focused, +#workspaces button.active { background-color: #789ebf; color: #14171d; - box-shadow: inherit; - text-shadow: inherit; } #workspaces button.urgent { background-color: #cc5c5c; - box-shadow: inherit; - text-shadow: inherit; } #clock, @@ -62,7 +66,7 @@ button { #temperature, #backlight, #network, -#pulseaudio, +#wireplumber, #custom-media, #tray, #mode, @@ -91,7 +95,6 @@ button { margin: 0 4px; } - #battery { color: #97bd5e; } @@ -104,15 +107,17 @@ button { color: #cc5c5c; } -#network.disconnected, #pulseaudio.muted { +#network.disconnected, +#wireplumber.muted { color: #cc5c5c; } -#network.wifi, #network.ethernet { +#network.wifi, +#network.ethernet { color: #789ebf; } -#pulseaudio { +#wireplumber { color: #E0DB5F; } @@ -136,10 +141,6 @@ button { color: #cc5c5c; } -#custom-newsboat { - color: #de7e54; -} - #tray > .passive { -gtk-icon-effect: dim; } diff --git a/home-config/wofi/config b/home/config/wofi/config index 6b28876..51ad2ed 100644 --- a/home-config/wofi/config +++ b/home/config/wofi/config @@ -1,5 +1,5 @@ key_expand=Tab -term=alacritty +term=kitty matching=multi-contains insensitive=true gtk_dark=true diff --git a/home-config/wofi/style.css b/home/config/wofi/style.css index 2ef5f5a..2ef5f5a 100644 --- a/home-config/wofi/style.css +++ b/home/config/wofi/style.css diff --git a/home-config/xdg/mimeapps.list b/home/config/xdg/mimeapps.list index f91778a..6096d4c 100644 --- a/home-config/xdg/mimeapps.list +++ b/home/config/xdg/mimeapps.list @@ -1,9 +1,9 @@ [Default Applications] -text/html=firefox.desktop -x-scheme-handler/http=firefox.desktop -x-scheme-handler/https=firefox.desktop -x-scheme-handler/about=firefox.desktop -x-scheme-handler/unknown=firefox.desktop +text/html=librewolf.desktop +x-scheme-handler/http=librewolf.desktop +x-scheme-handler/https=librewolf.desktop +x-scheme-handler/about=librewolf.desktop +x-scheme-handler/unknown=librewolf.desktop image/png=imv.desktop image/jpeg=imv.desktop image/webp=imv.desktop @@ -29,25 +29,13 @@ text/x-moc=nvim.desktop text/x-pascal=nvim.desktop text/x-tcl=nvim.desktop text/x-tex=nvim.desktop -application/x-shellscript=nvim.desktop text/x-c=nvim.desktop text/x-c++=nvim.desktop -application/gzip=org.gnome.Nautilus.desktop -application/zip=org.gnome.Nautilus.desktop -application/x-bzip2=org.gnome.Nautilus.desktop -application/vnd.ms-opentype=org.gnome.Nautilus.desktop -font/sfnt=org.gnome.Nautilus.desktop -application/java-archive=org.gnome.Nautilus.desktop -application/x-iso9660-image=org.gnome.Nautilus.desktop -application/x-xz=org.gnome.Nautilus.desktop application/x-zerosize=nvim.desktop -x-scheme-handler/mailto=userapp-Thunderbird-4IZTA2.desktop -message/rfc822=userapp-Thunderbird-4IZTA2.desktop -x-scheme-handler/mid=userapp-Thunderbird-4IZTA2.desktop -x-scheme-handler/webcal=userapp-Thunderbird-9WQSA2.desktop -text/calendar=userapp-Thunderbird-9WQSA2.desktop -application/x-extension-ics=userapp-Thunderbird-9WQSA2.desktop -x-scheme-handler/webcals=userapp-Thunderbird-9WQSA2.desktop +application/x-shellscript=nvim.desktop +x-scheme-handler/msteams=teams.desktop +x-scheme-handler/mspa=unofficial-homestuck-collection.desktop +hoppscotch=hoppscotch-handler.desktop [Added Associations] application/x-zerosize=nvim.desktop; @@ -55,9 +43,8 @@ x-scheme-handler/mailto=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-4 x-scheme-handler/mid=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-4IZTA2.desktop; x-scheme-handler/webcal=userapp-Thunderbird-9WQSA2.desktop; x-scheme-handler/webcals=userapp-Thunderbird-9WQSA2.desktop; -x-scheme-handler/mailto=userapp-Thunderbird-E9G491.desktop -message/rfc822=userapp-Thunderbird-E9G491.desktop -x-scheme-handler/mid=userapp-Thunderbird-E9G491.desktop +x-scheme-handler/mailto=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-Y667E2.desktop;userapp-Thunderbird-2QYKF2.desktop; +message/rfc822=userapp-Thunderbird-E9G491.desktop; +x-scheme-handler/mid=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-Y667E2.desktop;userapp-Thunderbird-2QYKF2.desktop; x-scheme-handler/discord=discord.desktop; x-scheme-handler/slack=slack.desktop; - diff --git a/home/config/xdg/user-dirs.dirs b/home/config/xdg/user-dirs.dirs new file mode 100644 index 0000000..894aa91 --- /dev/null +++ b/home/config/xdg/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/documents" +XDG_DOWNLOAD_DIR="$HOME/downloads/" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_TEMPLATES_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/" diff --git a/home/config/zsh/pfetch_logos b/home/config/zsh/pfetch_logos new file mode 100644 index 0000000..65c8488 --- /dev/null +++ b/home/config/zsh/pfetch_logos @@ -0,0 +1,10 @@ +[Aa]rch*) + read_ascii 4 <<- EOF + ${c6} /\\ + ${c6} / \\ + ${c6} /\\ \\ + ${c4} / ^ w ^\\ + ${c4} / ,, \\ + ${c4} / | | \\ + ${c4} /_-'' ''-_\\ + EOF diff --git a/home/config/zsh/zprofile b/home/config/zsh/zprofile new file mode 100644 index 0000000..aa2c2ef --- /dev/null +++ b/home/config/zsh/zprofile @@ -0,0 +1,93 @@ +# locale +export LANG=en_US.UTF-8 +export LC_COLLATE=C + +# wayland +export _JAVA_AWT_WM_NONREPARENTING=1 +export MOZ_ENABLE_WAYLAND=1 +export MOZ_USE_XINPUT2=1 +export WLR_NO_HARDWARE_CURSORS=0 +export GDK_BACKEND=wayland,x11 +export SDL_VIDEODRIVER=wayland +export CLUTTER_BACKEND=wayland +export ELM_DISPLAY=wl +export QT_AUTO_SCREEN_SCALE_FACTOR=1 +export QT_QPA_PLATFORM=wayland;xcb +export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 + +# xdg +export XDG_RUNTIME_DIR=/run/user/$(id -u) +export XDG_SESSION_TYPE=wayland +export XDG_CURRENT_DESKTOP=sway +export LIBSEAT_BACKEND=logind + +# programs +export TERMINAL=kitty +export EDITOR=nvim +export CC=$(which gcc) +export LD=$(which gcc) + +# theming + +# ricing +export QT_QPA_PLATFORM_THEME=gtk2 +export GTK_THEME=Lavanda-Sea-Dark +export XCURSOR_THEME=Adwaita +export XCURSOR_SIZE=24 + +# guix +export GUIX_PROFILE=$HOME/.guix-profile +$HOME/.guix-home/on-first-login +. $HOME/.guix-home/setup-environment + +# nix +export NIX_PROFILE=$HOME/.nix-profile +export XDG_DATA_DIRS=$XDG_DATA_DIRS:$NIX_PROFILE/share +export PATH=$PATH:$NIX_PROFILE/bin +export LIBRARY_PATH=$LIBRARY_PATH:$NIX_PROFILE/lib + +# local +export LOCAL_PROFILE=$HOME/.local +export XDG_DATA_DIRS=$XDG_DATA_DIRS:$LOCAL_PROFILE/share +export PATH=$PATH:$LOCAL_PROFILE/bin + +# certs +export SSL_CERT_FILE=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt +export SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs + +if [ -n "$TMUX" ]; then + return +fi + +clear +printf "\t\n\t\n\t\n\t\n" +printf "\tPlease select an environment...\n" +printf "\t[S]way [H]yprland [T]erminal [E]xit\n" +printf "\t\n\t\n\t" + +while true; do + stty raw -echo + choice=$(dd bs=1 count=1 2> /dev/null) + stty -raw echo + case "$choice" in + "s") + echo "Launching sway..." + export XDG_CURRENT_DESKTOP=sway + exec dbus-run-session sway &> $HOME/.log/sway + ;; + "h") + echo "Launching Hyprland..." + export XDG_CURRENT_DESKTOP=Hyprland + exec dbus-run-session Hyprland &> $HOME/.log/Hyprland + ;; + "t") + exec cage -s kitty -- -o font_size=14 &> $HOME/.log/kitty + ;; + "e") + exit + ;; + "d") + break + ;; + esac +done diff --git a/home/config/zsh/zshrc b/home/config/zsh/zshrc new file mode 100644 index 0000000..29917c9 --- /dev/null +++ b/home/config/zsh/zshrc @@ -0,0 +1,95 @@ +# Zsh shell initalization file + +# Export 'SHELL' to child processes +export SHELL + +if [[ $- != *i* ]] +then + # We are being invoked from a non-interactive shell. If this + # is an SSH session (as in "ssh host command"), source + # /etc/profile so we get PATH and other essential variables. + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + # Don't do anything else. + return +fi + +PATH=$PATH:$HOME/.cargo/bin + +# vim mode >:) +# no ryan i am not copying you +set -o vi +set show-mode-in-prompt on + +# Set shell prompt using starship +eval "$(starship init zsh)" + +# Set guix reconfigure aliases +alias reconfigure-system="sudo -E guix system -L $HOME/.config/guix/modules reconfigure $HOME/.config/guix/systems/$(hostname).scm" +alias reconfigure-user="guix home -L $HOME/.config/guix/modules reconfigure $HOME/.config/guix/home/home.scm && home-manager switch" + +# Set other usefull aliases +alias neo="pfetch" +alias rf="rm -fr" # remove le french hon hon hon +alias ls="ls --color=auto" +alias ip="ip --color=auto" +alias grep="grep --color=auto" +alias diff="diff --color=auto" +alias ccat="highlight --out-format=ansi" +alias vim="nvim" +alias show="kitten icat --align=left" +alias ssh="kitten ssh" + +# Have manpages use colors +export LESS_TERMCAP_md=$'\e[1;36m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[1;92m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;35m' +export GROFF_NO_SGR=1 + +.reload() { + # Enable zsh auto suggestions + autoload compinit && compinit + source $GUIX_PROFILE/share/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + source $GUIX_PROFILE/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#696e8a" + ZSH_AUTOSUGGEST_STRATEGY=(completion history) +} + +.reload + +# Enable zsh keybinds for home, end, and other movement keybinds +bindkey "\e[1;5D" backward-word +bindkey "\e[1;5C" forward-word +bindkey "\e[3;5~" kill-word +bindkey "\C-_" backward-kill-word +bindkey "\e[3~" delete-char +bindkey "\e[H" beginning-of-line +bindkey "\e[F" end-of-line +bindkey "\e\d" undo + +.ranger() { + ranger --choosedir=$HOME/.rangerdir < $TTY + LASTDIR=$(cat $HOME/.rangerdir) + cd "$LASTDIR" + zle reset-prompt +} + +zle -N reload .reload +bindkey "^R" reload +zle -N ranger .ranger +bindkey "^F" range + +# GPG SETUP FOR SSH +export GPG_TTY=$(tty) +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + +# ricing +export PF_CUSTOM_LOGOS="/home/freya/.config/zsh/pfetch_logos" + +export WINEARCH=win32 +export WINEPREFIX=/home/freya/.wine + +pfetch |