diff options
| author | Mosder <xmosder12@gmail.com> | 2025-11-06 03:35:21 +0100 |
|---|---|---|
| committer | Mosder <xmosder12@gmail.com> | 2025-11-06 03:35:21 +0100 |
| commit | 6abd35ff0705406aabc827ce423d28ade6040c1b (patch) | |
| tree | 555b98ca9c70b4827529fc0a8b372d97fd0d7060 | |
| parent | c6ff7b4d2c91fbc086e573e01f76da3dc3ef3ed3 (diff) | |
laptop - wezterm
| -rw-r--r-- | laptop/.bashrc | 8 | ||||
| -rw-r--r-- | laptop/.config/hypr/hyprland.conf | 4 | ||||
| -rwxr-xr-x | laptop/.config/hypr/scripts/zoom.sh | 9 | ||||
| -rw-r--r-- | laptop/.config/ranger/rc.conf | 52 | ||||
| -rw-r--r-- | laptop/.wezterm.lua | 157 |
5 files changed, 224 insertions, 6 deletions
diff --git a/laptop/.bashrc b/laptop/.bashrc index c93a883..c05713b 100644 --- a/laptop/.bashrc +++ b/laptop/.bashrc @@ -7,14 +7,12 @@ PS1='\[\e[0;35m\][\u@\h \W]\$\[\e[0m\] ' alias bashcfg='vim ~/.bashrc' alias hyprcfg='vim ~/.config/hypr/hyprland.conf' alias die='shutdown -h 0' -alias aghvpn='sudo openvpn ~/Downloads/VPN-AGH.2025.ovpn' alias grepfind='sudo find / | grep' alias rfm='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' restart() { - konsole & - disown - exit + wezterm & + exit } clip() { wl-copy < "$@" @@ -39,3 +37,5 @@ resizeVideo() { rm ffmpeg2pass-0.log ffmpeg2pass-0.log.mbtree fi } + +export PATH="$PATH:/home/mosder/.bin" diff --git a/laptop/.config/hypr/hyprland.conf b/laptop/.config/hypr/hyprland.conf index f530b80..25a6869 100644 --- a/laptop/.config/hypr/hyprland.conf +++ b/laptop/.config/hypr/hyprland.conf @@ -7,7 +7,7 @@ $scriptsDir = $HOME/.config/hypr/scripts $logFile = $HOME/.hypr.log $browser = brave -$terminal = konsole +$terminal = wezterm $fileManager = thunar $menu = wofi @@ -58,6 +58,7 @@ env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 +env = MAX_ZOOM,3 ################### @@ -250,6 +251,7 @@ bind = ALT, Print, exec, $scriptsDir/capture-window.sh bind = $mainMod SHIFT, P, exec, hyprpicker -a bind = $mainMod, L, exec, hyprlock bind = $mainMod, N, exec, dunstctl close-all +bind = $mainMod SHIFT, M, exec, $scriptsDir/zoom.sh # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l diff --git a/laptop/.config/hypr/scripts/zoom.sh b/laptop/.config/hypr/scripts/zoom.sh new file mode 100755 index 0000000..433f899 --- /dev/null +++ b/laptop/.config/hypr/scripts/zoom.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +ZOOM=$(hyprctl getoption cursor:zoom_factor | grep float | awk -F" " '{print $2}') +ZOOM=$(echo "scale=0; ($ZOOM+1)/1" | bc) +if [[ $ZOOM -gt $MAX_ZOOM ]]; then + ZOOM=1 +fi + +hyprctl -q keyword cursor:zoom_factor $ZOOM diff --git a/laptop/.config/ranger/rc.conf b/laptop/.config/ranger/rc.conf index 9d97920..826d170 100644 --- a/laptop/.config/ranger/rc.conf +++ b/laptop/.config/ranger/rc.conf @@ -23,6 +23,57 @@ # Show hidden files? You can toggle this by typing 'zh' set show_hidden true +# 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. +# +# * sixel: +# Previews images using the SIXEL protocol. This requires "imagemagick". +# +# * 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. +# Any terminal supporting the Kitty graphics protocol should work automatically. +# Note that the Kitty graphics protocol does not work from inside a tmux +# session, so 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 iterm2 + # 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. @@ -33,4 +84,3 @@ set confirm_on_delete never # Outline draws a box around all the columns. # Both combines the two. set draw_borders separators - diff --git a/laptop/.wezterm.lua b/laptop/.wezterm.lua new file mode 100644 index 0000000..f2bae0f --- /dev/null +++ b/laptop/.wezterm.lua @@ -0,0 +1,157 @@ +local wezterm = require "wezterm"
+local cfg = wezterm.config_builder()
+
+-- Miscellaneous
+cfg.adjust_window_size_when_changing_font_size = false
+cfg.allow_square_glyphs_to_overflow_width = "Never"
+cfg.allow_win32_input_mode = false
+cfg.anti_alias_custom_block_glyphs = false
+cfg.audible_bell = "Disabled"
+cfg.font_size = 9
+cfg.scrollback_lines = 2137
+cfg.selection_word_boundary = " \t\n{}[]()'\"`.,;:"
+
+-- Unicode select menu
+cfg.char_select_bg_color = "#282c34"
+cfg.char_select_fg_color = "#eff1f5"
+cfg.char_select_font_size = 13
+cfg.warn_about_missing_glyphs = false
+
+-- Colors
+cfg.color_scheme = "Pro"
+cfg.colors = {
+ cursor_bg = "#fff",
+ cursor_fg = "#000",
+ cursor_border = "#999"
+}
+
+-- Tab bar
+cfg.hide_tab_bar_if_only_one_tab = true
+cfg.show_close_tab_button_in_tabs = false
+cfg.show_new_tab_button_in_tab_bar = false
+cfg.show_tab_index_in_tab_bar = false
+wezterm.on(
+ 'format-tab-title',
+ function(tab, tabs, panes, config, hover, max_width)
+ title = tab.active_pane.title
+ part_to_remove = "mosder@archtop:"
+ return string.gsub(title, part_to_remove, "")
+ end
+)
+
+
+-- Window
+cfg.window_background_opacity = 0.9
+cfg.window_frame = {
+ -- Would love to set alpha of both of these to 0.9, but it incorrectly applies
+ -- to the area above the tabs themselves, so it's 1 for now
+ active_titlebar_bg = "rgba(40,44,52,1)",
+ inactive_titlebar_bg = "rgba(40,44,52,1)",
+ font_size = 11
+}
+cfg.window_padding = {
+ left = 5,
+ right = 5,
+ top = 2,
+ bottom = 2,
+}
+
+-- Key bindings
+local act = wezterm.action
+cfg.disable_default_key_bindings = true
+cfg.keys = {
+ -- Delete last word (Remap ALT+Backspace to CTRL+Backspace)
+ {
+ mods = 'CTRL',
+ key = 'Backspace',
+ action = act.SendKey { mods = 'ALT', key = 'Backspace' }
+ },
+ -- Copy mode
+ {
+ mods = 'CTRL|SHIFT',
+ key = 'X',
+ action = act.ActivateCopyMode
+ },
+ -- Change tabs - relative
+ {
+ mods = 'CTRL',
+ key = 'Tab',
+ action = act.ActivateTabRelative(1)
+ },
+ {
+ mods = 'CTRL|SHIFT',
+ key = 'Tab',
+ action = act.ActivateTabRelative(-1)
+ },
+ -- Unicode menu
+ {
+ mods = 'CTRL',
+ key = 'u',
+ action = act.CharSelect
+ },
+ -- Close current tab
+ {
+ mods = 'CTRL',
+ key = 'w',
+ action = act.CloseCurrentTab { confirm = true }
+ },
+ {
+ mods = 'CTRL',
+ key = 'q',
+ action = act.CloseCurrentTab { confirm = true }
+ },
+ -- Copy selection to clipboard
+ {
+ mods = 'CTRL|SHIFT',
+ key = 'c',
+ action = act.CopyTo "Clipboard"
+ },
+ -- Decrease font size
+ {
+ mods = 'CTRL',
+ key = '-',
+ action = act.DecreaseFontSize
+ },
+ -- Increase font size
+ {
+ mods = 'CTRL',
+ key = '=',
+ action = act.IncreaseFontSize
+ },
+ -- Move tabs - relative
+ {
+ mods = 'CTRL|SHIFT',
+ key = 'LeftArrow',
+ action = act.MoveTabRelative(-1)
+ },
+ {
+ mods = 'CTRL|SHIFT',
+ key = 'RightArrow',
+ action = act.MoveTabRelative(1)
+ },
+ -- Pase from clipboard
+ {
+ mods = 'CTRL|SHIFT',
+ key = 'v',
+ action = act.PasteFrom 'Clipboard'
+ },
+ {
+ mods = 'SHIFT',
+ key = 'Insert',
+ action = act.PasteFrom 'Clipboard'
+ },
+ -- Reset font size
+ {
+ mods = 'CTRL',
+ key = 'p',
+ action = act.ResetFontSize
+ },
+ -- Reset terminal
+ {
+ mods = 'CTRL',
+ key = 'r',
+ action = act.ResetTerminal
+ },
+}
+
+return cfg
|
