update 23.04.2023

This commit is contained in:
Kristofers Solo 2023-04-23 19:34:51 +03:00
parent 741a0d0ad2
commit 49c7b19348
27 changed files with 3333 additions and 160 deletions

View File

@ -1,11 +1,12 @@
#!/bin/sh #!/bin/sh
autostart="nextcloud telegram-desktop headset-charge-indicator spotify ferdium discord transmission-daemon" autostart="nextcloud telegram-desktop headset-charge-indicator spotify ferdium discord transmission-daemon librewolf"
for program in $autostart; do for program in $autostart; do
pidof -s "$program" || "$program" & pidof -s "$program" || "$program" &
done >/dev/null 2>&1 done >/dev/null 2>&1
setxkbmap lv & setxkbmap lv &
remaps &
xrandr --output DisplayPort-0 --mode 1920x1080 --rate 75 --output HDMI-A-0 --mode 1920x1080 --rate 60 --left-of DisplayPort-0 & xrandr --output DisplayPort-0 --mode 1920x1080 --rate 75 --output HDMI-A-0 --mode 1920x1080 --rate 60 --left-of DisplayPort-0 &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

View File

@ -14,6 +14,4 @@ else
. "$HOME/.xprofile" . "$HOME/.xprofile"
fi fi
ssh-agent "$WM" ssh-agent awesome
# exec ssh-agent dbus-launch --sh-syntex --exit-with-session awesome

View File

@ -22,13 +22,11 @@ env:
# check the local terminfo database and use `alacritty` if it is # check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used. # available, otherwise `xterm-256color` is used.
TERM: alacritty TERM: alacritty
# Background opacity # Background opacity
# #
# Window opacity as a floating point number from `0.0` to `1.0`. # Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque. # The value `0.0` is completely transparent and `1.0` is opaque.
# background_opacity: 0.9 # background_opacity: 0.9
window: window:
# Window dimensions (changes require restart) # Window dimensions (changes require restart)
# #
@ -38,7 +36,6 @@ window:
dimensions: dimensions:
columns: 0 columns: 0
lines: 0 lines: 0
opacity: 0.9 opacity: 0.9
# Window position (changes require restart) # Window position (changes require restart)
# #
@ -55,10 +52,8 @@ window:
padding: padding:
x: 0 x: 0
y: 0 y: 0
# Spread additional padding evenly around the terminal content. # Spread additional padding evenly around the terminal content.
dynamic_padding: true dynamic_padding: true
# Window decorations # Window decorations
# #
# Values for `decorations`: # Values for `decorations`:
@ -69,7 +64,6 @@ window:
# - transparent: Title bar, transparent background and title bar buttons # - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons # - buttonless: Title bar, transparent background and no title bar buttons
decorations: none decorations: none
# Startup Mode (changes require restart) # Startup Mode (changes require restart)
# #
# Values for `startup_mode`: # Values for `startup_mode`:
@ -80,13 +74,10 @@ window:
# Values for `startup_mode` (macOS only): # Values for `startup_mode` (macOS only):
# - SimpleFullscreen # - SimpleFullscreen
startup_mode: Windowed startup_mode: Windowed
# Window title # Window title
title: Alacritty title: Alacritty
# Allow terminal applications to change Alacritty's window title. # Allow terminal applications to change Alacritty's window title.
dynamic_title: true dynamic_title: true
# Window class (Linux/BSD only): # Window class (Linux/BSD only):
# class: # class:
# Application instance name # Application instance name
@ -98,16 +89,13 @@ window:
# #
# Override the variant of the GTK theme. Commonly supported values are `dark` # Override the variant of the GTK theme. Commonly supported values are `dark`
# and `light`. Set this to `None` to use the default theme variant. # and `light`. Set this to `None` to use the default theme variant.
decorations_theme_variant: dark decorations_theme_variant: Dark
scrolling: scrolling:
# Maximum number of lines in the scrollback buffer. # Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling. # Specifying '0' will disable scrolling.
history: 10000 history: 10000
# Scrolling distance multiplier. # Scrolling distance multiplier.
multiplier: 3 multiplier: 3
# Font configuration # Font configuration
font: font:
# Normal (roman) font face # Normal (roman) font face
@ -119,10 +107,8 @@ font:
# - (Linux/BSD) monospace # - (Linux/BSD) monospace
# - (Windows) Consolas # - (Windows) Consolas
family: JetBrainsMono NF family: JetBrainsMono NF
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Regular style: Regular
# Bold font face # Bold font face
bold: bold:
# Font family # Font family
@ -130,10 +116,8 @@ font:
# If the bold family is not specified, it will fall back to the # If the bold family is not specified, it will fall back to the
# value specified for the normal font. # value specified for the normal font.
family: JetBrainsMono NF family: JetBrainsMono NF
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Bold style: Bold
# Italic font face # Italic font face
italic: italic:
# Font family # Font family
@ -141,10 +125,8 @@ font:
# If the italic family is not specified, it will fall back to the # If the italic family is not specified, it will fall back to the
# value specified for the normal font. # value specified for the normal font.
family: JetBrainsMono NF family: JetBrainsMono NF
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Italic style: Italic
# Bold italic font face # Bold italic font face
bold_italic: bold_italic:
# Font family # Font family
@ -152,52 +134,43 @@ font:
# If the bold italic family is not specified, it will fall back to the # If the bold italic family is not specified, it will fall back to the
# value specified for the normal font. # value specified for the normal font.
family: JetBrainsMono NF family: JetBrainsMono NF
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Bold Italic style: Bold Italic
# Point size # Point size
size: 11.0 size: 11.0
# Offset is the extra space around each character. `offset.y` can be thought # Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter # of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing. # spacing.
offset: offset:
x: 0 x: 0
y: -1 y: -1
# Glyph offset determines the locations of the glyphs within their cells with # Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the # the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward. # right, increasing `y` moves the glyph upward.
glyph_offset: glyph_offset:
x: 0 x: 0
y: 0 y: 0
# Thin stroke font rendering (macOS only) # Thin stroke font rendering (macOS only)
# #
# Thin strokes are suitable for retina displays, but for non-retina screens # Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`. # it is recommended to set `use_thin_strokes` to `false`.
# use_thin_strokes: false # use_thin_strokes: false
# If `true`, bold text is drawn using the bright color variants. # If `true`, bold text is drawn using the bright color variants.
draw_bold_text_with_bright_colors: true draw_bold_text_with_bright_colors: true
# Colors (Tomorrow Night) # Colors (Tomorrow Night)
colors: colors:
# Default colors # Default colors
primary: primary:
background: '#282a36' background: "#282a36"
foreground: '#f8f8f2' foreground: "#f8f8f2"
# Bright and dim foreground colors # Bright and dim foreground colors
# #
# The dimmed foreground color is calculated automatically if it is not # The dimmed foreground color is calculated automatically if it is not
# present. If the bright foreground color is not set, or # present. If the bright foreground color is not set, or
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground # `draw_bold_text_with_bright_colors` is `false`, the normal foreground
# color will be used. # color will be used.
dim_foreground: '#828482' dim_foreground: "#828482"
bright_foreground: '#ffffff' bright_foreground: "#ffffff"
# Cursor colors # Cursor colors
# #
# Colors which should be used to draw the terminal cursor. # Colors which should be used to draw the terminal cursor.
@ -207,7 +180,6 @@ colors:
cursor: cursor:
text: CellBackground text: CellBackground
cursor: CellForeground cursor: CellForeground
# Vi mode cursor colors # Vi mode cursor colors
# #
# Colors for the cursor when the vi mode is active. # Colors for the cursor when the vi mode is active.
@ -217,7 +189,6 @@ colors:
vi_mode_cursor: vi_mode_cursor:
text: CellBackground text: CellBackground
cursor: CellForeground cursor: CellForeground
# Search colors # Search colors
# #
# Colors used for the search bar and match highlighting. # Colors used for the search bar and match highlighting.
@ -225,16 +196,14 @@ colors:
# Allowed values are CellForeground/CellBackground, whichq reference the # Allowed values are CellForeground/CellBackground, whichq reference the
# affected cell, or hexadecimal colors like #ff00ff. # affected cell, or hexadecimal colors like #ff00ff.
matches: matches:
foreground: '#44475a' foreground: "#44475a"
background: '#50fa7b' background: "#50fa7b"
focused_match: focused_match:
foreground: '#44475a' foreground: "#44475a"
background: '#ffb86c' background: "#ffb86c"
footer_bar: footer_bar:
background: '#282a36' background: "#282a36"
foreground: '#f8f8f2' foreground: "#f8f8f2"
# Keyboard regex hints # Keyboard regex hints
hints: hints:
# First character in the hint label # First character in the hint label
@ -242,17 +211,15 @@ colors:
# Allowed values are CellForeground/CellBackground, which reference the # Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff. # affected cell, or hexadecimal colors like #ff00ff.
start: start:
foreground: '#282a36' foreground: "#282a36"
background: '#f1fa8c' background: "#f1fa8c"
# All characters after the first one in the hint label # All characters after the first one in the hint label
# #
# Allowed values are CellForeground/CellBackground, which reference the # Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff. # affected cell, or hexadecimal colors like #ff00ff.
end: end:
foreground: '#f1fa8c' foreground: "#f1fa8c"
background: '#282a36' background: "#282a36"
# Line indicator # Line indicator
# #
# Color used for the indicator displaying the position in history during # Color used for the indicator displaying the position in history during
@ -272,29 +239,26 @@ colors:
selection: selection:
text: CellBackground text: CellBackground
background: CellForeground background: CellForeground
# Normal colors # Normal colors
normal: normal:
black: '#21222c' black: "#21222c"
red: '#ff5555' red: "#ff5555"
green: '#50fa7b' green: "#50fa7b"
yellow: '#f1fa8c' yellow: "#f1fa8c"
blue: '#bd93f9' blue: "#bd93f9"
magenta: '#ff79c6' magenta: "#ff79c6"
cyan: '#8be9fd' cyan: "#8be9fd"
white: '#f8f8f2' white: "#f8f8f2"
# Bright colors # Bright colors
bright: bright:
black: '#6272a4' black: "#6272a4"
red: '#ff6e6e' red: "#ff6e6e"
green: '#69ff94' green: "#69ff94"
yellow: '#ffffa5' yellow: "#ffffa5"
blue: '#d6acff' blue: "#d6acff"
magenta: '#ff92df' magenta: "#ff92df"
cyan: '#a4ffff' cyan: "#a4ffff"
white: '#ffffff' white: "#ffffff"
# Dim colors # Dim colors
# #
# If the dim colors are not set, they will be calculated automatically based # If the dim colors are not set, they will be calculated automatically based
@ -325,7 +289,6 @@ colors:
# the default background. When set to `true` all cells will be transparent # the default background. When set to `true` all cells will be transparent
# regardless of their background color. # regardless of their background color.
transparent_background_colors: false transparent_background_colors: false
# Bell # Bell
# #
# The bell is rung every time the BEL control character is received. # The bell is rung every time the BEL control character is received.
@ -366,15 +329,12 @@ colors:
# args: ["Hello, World!"] # args: ["Hello, World!"]
# #
#command: None #command: None
selection: selection:
# This string contains all characters that are used as separators for # This string contains all characters that are used as separators for
# "semantic words" in Alacritty. # "semantic words" in Alacritty.
semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard. # When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: true save_to_clipboard: true
cursor: cursor:
# Cursor style # Cursor style
style: style:
@ -385,7 +345,6 @@ cursor:
# - _ Underline # - _ Underline
# - | Beam # - | Beam
shape: Beam shape: Beam
# Cursor blinking state # Cursor blinking state
# #
# Values for `blinking`: # Values for `blinking`:
@ -394,7 +353,6 @@ cursor:
# - On: Enable blinking by default # - On: Enable blinking by default
# - Always: Force the cursor to always blink # - Always: Force the cursor to always blink
#blinking: Off #blinking: Off
# Vi mode cursor style # Vi mode cursor style
# #
# If the vi mode cursor style is `None` or not specified, it will fall back to # If the vi mode cursor style is `None` or not specified, it will fall back to
@ -402,18 +360,15 @@ cursor:
# #
# See `cursor.style` for available options. # See `cursor.style` for available options.
vi_mode_style: Block vi_mode_style: Block
# Cursor blinking interval in milliseconds. # Cursor blinking interval in milliseconds.
#blink_interval: 750 #blink_interval: 750
# If this is `true`, the cursor will be rendered as a hollow box when the # If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused. # window is not focused.
unfocused_hollow: false unfocused_hollow: false
# Thickness of the cursor relative to the cell width as floating point number # Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`. # from `0.0` to `1.0`.
#thickness: 0.15 #thickness: 0.15
# Live config reload (changes require restart) # Live config reload (changes require restart)
#live_config_reload: true #live_config_reload: true
@ -531,7 +486,6 @@ shell:
mouse_bindings: mouse_bindings:
# - { mouse: Right, action: ExpandSelection } # - { mouse: Right, action: ExpandSelection }
- {mouse: Middle, mode: ~Vi, action: PasteSelection} - {mouse: Middle, mode: ~Vi, action: PasteSelection}
# Key bindings # Key bindings
# #
# Key bindings are specified as a list of objects. For example, this is the # Key bindings are specified as a list of objects. For example, this is the
@ -746,7 +700,7 @@ key_bindings:
- {key: Up, mods: Shift, mode: ~Alt, action: ScrollPageUp} - {key: Up, mods: Shift, mode: ~Alt, action: ScrollPageUp}
- {key: Down, mods: Shift, mode: ~Alt, action: ScrollPageDown} - {key: Down, mods: Shift, mode: ~Alt, action: ScrollPageDown}
- {key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop} - {key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop}
- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } - {key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom,}
# - { key: Delete, actions: Del } # - { key: Delete, actions: Del }
# - { key: Key9, mods: Control|Shift, action: CreateNewWindow, } # - { key: Key9, mods: Control|Shift, action: CreateNewWindow, }
@ -828,8 +782,7 @@ key_bindings:
- {key: NumpadSubtract, mods: Control, action: DecreaseFontSize} - {key: NumpadSubtract, mods: Control, action: DecreaseFontSize}
- {key: Q, mods: Control|Shift, action: Quit} - {key: Q, mods: Control|Shift, action: Quit}
# (Windows only) # (Windows only)
- { key: F11, action: ToggleFullscreen } - {key: F11, action: ToggleFullscreen,}
# (macOS only) # (macOS only)
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }

View File

@ -802,5 +802,5 @@ client.connect_signal("unfocus", function(c)
c.border_color = beautiful.border_normal c.border_color = beautiful.border_normal
end) end)
awful.spawn.with_shell("spotify") -- awful.spawn.with_shell("spotify")
awful.spawn.with_shell("discord") awful.spawn.with_shell("discord")

View File

@ -54,7 +54,7 @@ update_ms = 1000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "memory" proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False. #* Reverse sorting order, True or False.
proc_reversed = False proc_reversed = False

View File

@ -15,7 +15,8 @@ monitor=,preferred,auto,1
# Execute your favorite apps at launch # Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
exec-once = pipewire & pipewire-pulse & wireplumber & waybar & hyprpaper & tuxedo-control-center & flameshot & librewolf & nextcloud & xrdb -load "$XDG_CONFIG_HOME"/X11/xresources & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = pipewire & pipewire-pulse & wireplumber & waybar & hyprpaper & tuxedo-control-center & flameshot & librewolf & nextcloud & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY & xrdb "$XDG_CONFIG_HOME/X11/xresources"
# Source a file (multi-file configs) # Source a file (multi-file configs)
@ -29,11 +30,14 @@ input {
kb_options = kb_options =
kb_rules = kb_rules =
numlock_by_default = true numlock_by_default = true
repeat_rate = 50
repeat_delay = 300
follow_mouse = 1 follow_mouse = 1
touchpad { touchpad {
natural_scroll = yes natural_scroll = yes
disable_while_typing = false
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
@ -205,6 +209,9 @@ bind = $mainMod SHIFT, H, movewindow, l
# bind = $mainMod CTRL, P, exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')" -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy # bind = $mainMod CTRL, P, exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')" -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy
# bind = $mainMod CTRL, P, exec, wayshot -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy # bind = $mainMod CTRL, P, exec, wayshot -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy
# bind = $mainMod, , exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')" # bind = $mainMod, , exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')"
bind = CTRL, PRINT, exec, hyprshot -m region
bind = , PRINT, exec, hyprshot -m output
bind = SHIFT, PRINT, exec, hyprshot -m window
bind = $mainMod ALT, P, exec, hyprpicker -a # colorpicker bind = $mainMod ALT, P, exec, hyprpicker -a # colorpicker

View File

@ -1,16 +1,16 @@
#!/bin/sh #!/bin/sh
# Basic Settings # Basic Settings
set autoquit on set autoquit on
set cleaner ~/.config/lf/cleaner set cleaner "~/.config/lf/cleaner"
set drawbox true set drawbox true
set hidden true set hidden true
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
set icons true set icons true
set ifs "\n" set ifs "\n"
set ifs "\n"
set ignorecase true set ignorecase true
set info size set info size
set period 1 set period 1
set previewer ~/.config/lf/preview set previewer "~/.config/lf/preview"
set ratios 1:2:3 set ratios 1:2:3
set scrolloff 10 set scrolloff 10
set shellopts '-eu' set shellopts '-eu'
@ -21,7 +21,7 @@ cmd moveto ${{
clear; tput cup $(($(tput lines)/3)); tput bold clear; tput cup $(($(tput lines)/3)); tput bold
set -f set -f
clear; echo "Move to where?" clear; echo "Move to where?"
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | sk | sed 's|~|$HOME|')" && dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' $XDG_CONFIG_HOME/shell/bm-dirs | sk | sed 's|~|$HOME|')" &&
for x in $fx; do for x in $fx; do
eval mv -iv \"$x\" \"$dest\" eval mv -iv \"$x\" \"$dest\"
done && done &&
@ -33,7 +33,7 @@ cmd copyto ${{
clear; tput cup $(($(tput lines)/3)); tput bold clear; tput cup $(($(tput lines)/3)); tput bold
set -f set -f
clear; echo "Copy to where?" clear; echo "Copy to where?"
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | sk | sed 's|~|$HOME|')" && dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' $XDG_CONFIG_HOME/shell/bm-dirs | sk | sed 's|~|$HOME|')" &&
for x in $fx; do for x in $fx; do
eval cp -ivr \"$x\" \"$dest\" eval cp -ivr \"$x\" \"$dest\"
done && done &&
@ -56,15 +56,15 @@ cmd open ${{
done & done &
;; ;;
audio/*|video/x-ms-asf) mpv --audio-display=no $f ;; audio/*|video/x-ms-asf) mpv --audio-display=no $f ;;
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;; video/*) setsid -f mpv --speed=2 $f -quiet >/dev/null 2>&1 ;;
application/pdf|application/vnd.djvu|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;; application/pdf|application/vnd.djvu|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
application/pgp-encrypted) $EDITOR $fx ;; application/pgp-encrypted) $EDITOR $fx ;;
application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text) setsid -f lowriter $fx >/dev/null 2>&1 ;; # application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text) setsid -f lowriter $fx >/dev/null 2>&1 ;;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template) setsid -f localc $fx >/dev/null 2>&1 ;; # application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template) setsid -f localc $fx >/dev/null 2>&1 ;;
application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint) setsid -f loimpress $fx >/dev/null 2>&1 ;; # application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint) setsid -f loimpress $fx >/dev/null 2>&1 ;;
application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template) setsid -f lodraw $fx >/dev/null 2>&1 ;; # application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template) setsid -f lodraw $fx >/dev/null 2>&1 ;;
application/vnd.oasis.opendocument.formula) setsid -f lomath $fx >/dev/null 2>&1 ;; # application/vnd.oasis.opendocument.formula) setsid -f lomath $fx >/dev/null 2>&1 ;;
application/vnd.oasis.opendocument.database) setsid -f lobase $fx >/dev/null 2>&1 ;; # application/vnd.oasis.opendocument.database) setsid -f lobase $fx >/dev/null 2>&1 ;;
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done ;; *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done ;;
esac esac
}} }}
@ -75,8 +75,8 @@ cmd extract ${{
set -f set -f
printf "%s\n\t" "$fx" printf "%s\n\t" "$fx"
printf "extract?[y/N]" printf "extract?[y/N]"
read ans read answer
[ $ans = "y" ] && aunpack $fx [ $answer = "y" ] && aunpack $fx
}} }}
@ -95,6 +95,11 @@ cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
cmd mkfile $touch "$(echo $* | tr ' ' '\ ')" cmd mkfile $touch "$(echo $* | tr ' ' '\ ')"
cmd setbg "$1" cmd setbg "$1"
cmd dragon %dragon-drop -a -x $fx
cmd dragon-stay %dragon-drop -a %fx
cmd dragon-individual %dragon-drop $fx
# Bindings # Bindings
# Remove some defaults # Remove some defaults
map "'" map "'"
@ -119,7 +124,7 @@ map <f-2> rename
map B $vidir # bulk rename map B $vidir # bulk rename
map D delete map D delete
map E extract map E extract
map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | sk)" map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' $XDG_CONFIG_HOME/shell/bm-dirs | sk)"
map O $mimeopen --ask "$f" map O $mimeopen --ask "$f"
map P paste map P paste
map Y $printf "%s" "$fx" | xclip -selection clipboard map Y $printf "%s" "$fx" | xclip -selection clipboard
@ -134,5 +139,11 @@ map nN $spacefm -t "${PWD}" & disown >/dev/null 2>&1
map nn $setsid -f $TERMINAL >/dev/null 2>&1 map nn $setsid -f $TERMINAL >/dev/null 2>&1
map o &mimeopen "$f" map o &mimeopen "$f"
# Dragon Mapping
map dr dragon
map ds dragon-stay
map di dragon-individual
# Source Bookmarks # Source Bookmarks
source "~/.config/lf/shortcutrc" source "~/.config/lf/shortcutrc"

View File

@ -6,16 +6,23 @@ set -C -f
IFS="$(printf '%b_' '\n')" IFS="$(printf '%b_' '\n')"
IFS="${IFS%_}" IFS="${IFS%_}"
image() { # image() {
if [ -f "$1" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then # if [ -f "$1" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2 - 1))" "$(($3 - 1))" "$1" >"$FIFO_UEBERZUG" # printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2 - 1))" "$(($3 - 1))" "$1" >"$FIFO_UEBERZUG"
else # echo "TRUE"
mediainfo "$6" # else
fi # mediainfo "$6"
} # echo "FALSE"
# fi
# }
ifub() { image() {
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1 if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2 - 1))" "$(($3 - 1))" "$1" >"$FIFO_UEBERZUG"
exit 1
else
chafa "$1" -s "$4x"
fi
} }
# Note that the cache file name is a function of file information, meaning if # Note that the cache file name is a function of file information, meaning if
@ -24,7 +31,7 @@ ifub() {
case "$(file --dereference --brief --mime-type -- "$1")" in case "$(file --dereference --brief --mime-type -- "$1")" in
image/svg* | application/illustrator) image/svg* | application/illustrator)
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" CACHE="$XDG_CACHE_HOME/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
[ ! -f "$CACHE.jpg" ] && [ ! -f "$CACHE.jpg" ] &&
convert "$1" "$CACHE.jpg" convert "$1" "$CACHE.jpg"
image "$CACHE.jpg" "$2" "$3" "$4" "$5" image "$CACHE.jpg" "$2" "$3" "$4" "$5"
@ -33,20 +40,20 @@ image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
text/troff) man ./ "$1" | col -b ;; text/troff) man ./ "$1" | col -b ;;
text/markdown) glow -s dark "$1" ;; text/markdown) glow -s dark "$1" ;;
text/* | */xml | application/json) bat --style=plain "$(($4 - 2))" -f "$1" ;; text/* | */xml | application/json) bat --style=plain --terminal-width "$(($4 - 2))" -f "$1" ;;
audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;;
video/*) video/*)
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" CACHE="$XDG_CACHE_HOME/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
[ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
image "$CACHE" "$2" "$3" "$4" "$5" "$1" image "$CACHE" "$2" "$3" "$4" "$5" "$1"
;; ;;
*/pdf) */pdf)
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" CACHE="$XDG_CACHE_HOME/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
[ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE" [ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
;; ;;
*/epub+zip | */mobi*) */epub+zip | */mobi*)
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" CACHE="$XDG_CACHE_HOME/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
[ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg" [ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg"
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
;; ;;
@ -58,7 +65,7 @@ application/x-iso*) iso-info "$1" ;;
*openxmlformats-officedocument.wordprocessingml.document) docx2txt "$1" - ;; *openxmlformats-officedocument.wordprocessingml.document) docx2txt "$1" - ;;
*opendocument*) odt2txt "$1" ;; *opendocument*) odt2txt "$1" ;;
*ms-excel | *openxmlformats-officedocument.spreadsheetml.sheet) *ms-excel | *openxmlformats-officedocument.spreadsheetml.sheet)
ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | bat --language=csv
;; ;;
esac esac
exit 1 exit 1

View File

@ -12,7 +12,7 @@ alias \
mv="mv -iv" \ mv="mv -iv" \
nsxiv="nsxiv -a" \ nsxiv="nsxiv -a" \
rm="rm -vI" \ rm="rm -vI" \
keychain="keychain --dir "$XDG_RUNTIME_DIR"/keychain" keychain="keychain --dir $XDG_RUNTIME_DIR/keychain"
# Colorize commands when possible # Colorize commands when possible
alias \ alias \
@ -41,14 +41,16 @@ alias \
matrix="unimatrix -s 95" \ matrix="unimatrix -s 95" \
night="redshift -PO 4500" \ night="redshift -PO 4500" \
py="python" \ py="python" \
sv="rsv" \
v="$EDITOR" \ v="$EDITOR" \
vpn-down="wg-quick down wg0" \ vpn-down="wg-quick down wg0" \
vpn-restart="wg-quick down wg0 && wg-quick up wg0" \ vpn-restart="wg-quick down wg0 && wg-quick up wg0" \
vpn-up="wg-quick up wg0" \ vpn-up="wg-quick up wg0" \
weather="curl wttr.in/" \ weather="curl wttr.in/" \
ww="$EDITOR ~/vimwiki/index.md" \ ww="$EDITOR ~/vimwiki/index.md" \
z="zathura" \ x="xplr -C ~/.config/xplr/hack.lua" \
sv="rsv" j="joshutoub" \
z="zathura"
# doas not required for some system commands # doas not required for some system commands
for command in mount umount rsv sv pacman updatedb su shutdown poweroff reboot zzz systemctl wg wg-quick; do for command in mount umount rsv sv pacman updatedb su shutdown poweroff reboot zzz systemctl wg wg-quick; do

View File

@ -12,6 +12,7 @@ export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
# Disable files # Disable files
export LESSHISTFILE=- export LESSHISTFILE=-
export $(dbus-launch)
unsetopt PROMPT_SP unsetopt PROMPT_SP
@ -33,9 +34,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share" export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/share"
# export XDG_CURRENT_DESKTOP=Hyprland export HYPRSHOT_DIR="$HOME/Pictures/screenshots"
# export XDG_SESSION_TYPE=wayland
# export XDG_SESSION_DESKTOP=Hyprland
export ANDROID_SDK_HOME="$XDG_CONFIG_HOME/android" export ANDROID_SDK_HOME="$XDG_CONFIG_HOME/android"
export ANDROID_HOME="$XDG_CONFIG_HOME/android" export ANDROID_HOME="$XDG_CONFIG_HOME/android"
@ -71,7 +70,7 @@ export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java" export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
export MYSQL_HISTFILE="$XDG_DATA_HOME/mysql_history"
# Other program settings # Other program settings
export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname

View File

@ -6,6 +6,10 @@
"alt-speed-time-enabled": false, "alt-speed-time-enabled": false,
"alt-speed-time-end": 1020, "alt-speed-time-end": 1020,
"alt-speed-up": 50, "alt-speed-up": 50,
"announce-ip": "",
"announce-ip-enabled": false,
"anti-brute-force-enabled": false,
"anti-brute-force-threshold": 100,
"bind-address-ipv4": "0.0.0.0", "bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::", "bind-address-ipv6": "::",
"blocklist-date": 1676459465, "blocklist-date": 1676459465,
@ -14,16 +18,17 @@
"blocklist-url": "http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz", "blocklist-url": "http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz",
"cache-size-mb": 4, "cache-size-mb": 4,
"compact-view": false, "compact-view": false,
"default-trackers": "",
"details-window-height": 571, "details-window-height": 571,
"details-window-width": 700, "details-window-width": 700,
"dht-enabled": true, "dht-enabled": true,
"download-dir": "/home/kristofers/ISOs", "download-dir": "/home/kristofers/Torrents",
"download-queue-enabled": true, "download-queue-enabled": true,
"download-queue-size": 5, "download-queue-size": 5,
"encryption": 1, "encryption": 1,
"idle-seeding-limit": 30, "idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false, "idle-seeding-limit-enabled": false,
"incomplete-dir": "/home/kristofers/Downloads", "incomplete-dir": "/home/kristofers/Torrents/Incomplete-Torrents",
"incomplete-dir-enabled": true, "incomplete-dir-enabled": true,
"inhibit-desktop-hibernation": false, "inhibit-desktop-hibernation": false,
"lpd-enabled": false, "lpd-enabled": false,
@ -32,7 +37,7 @@
"main-window-width": 1900, "main-window-width": 1900,
"main-window-x": 1928, "main-window-x": 1928,
"main-window-y": 29, "main-window-y": 29,
"message-level": 1, "message-level": 2,
"peer-congestion-algorithm": "", "peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6, "peer-id-ttl-hours": 6,
"peer-limit-global": 200, "peer-limit-global": 200,
@ -41,7 +46,7 @@
"peer-port-random-high": 65535, "peer-port-random-high": 65535,
"peer-port-random-low": 49152, "peer-port-random-low": 49152,
"peer-port-random-on-start": false, "peer-port-random-on-start": false,
"peer-socket-tos": "default", "peer-socket-tos": "le",
"pex-enabled": true, "pex-enabled": true,
"port-forwarding-enabled": true, "port-forwarding-enabled": true,
"preallocation": 1, "preallocation": 1,
@ -58,13 +63,18 @@
"rpc-host-whitelist-enabled": true, "rpc-host-whitelist-enabled": true,
"rpc-password": "{7fc260c68dfba7c7f3fbed9c837945f36b835d28XmkvfKXx", "rpc-password": "{7fc260c68dfba7c7f3fbed9c837945f36b835d28XmkvfKXx",
"rpc-port": 9091, "rpc-port": 9091,
"rpc-socket-mode": "0750",
"rpc-url": "/transmission/", "rpc-url": "/transmission/",
"rpc-username": "", "rpc-username": "",
"rpc-whitelist": "127.0.0.1,::1", "rpc-whitelist": "127.0.0.1,::1",
"rpc-whitelist-enabled": true, "rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true, "scrape-paused-torrents-enabled": true,
"script-torrent-added-enabled": false,
"script-torrent-added-filename": "",
"script-torrent-done-enabled": false, "script-torrent-done-enabled": false,
"script-torrent-done-filename": "/home/kristofers/.local/bin/tordone", "script-torrent-done-filename": "/home/kristofers/.local/bin/tordone",
"script-torrent-done-seeding-enabled": false,
"script-torrent-done-seeding-filename": "",
"seed-queue-enabled": false, "seed-queue-enabled": false,
"seed-queue-size": 10, "seed-queue-size": 10,
"show-backup-trackers": false, "show-backup-trackers": false,
@ -83,13 +93,15 @@
"speed-limit-up-enabled": false, "speed-limit-up-enabled": false,
"start-added-torrents": true, "start-added-torrents": true,
"statusbar-stats": "total-ratio", "statusbar-stats": "total-ratio",
"tcp-enabled": true,
"torrent-added-notification-enabled": true, "torrent-added-notification-enabled": true,
"torrent-added-verify-mode": "fast",
"torrent-complete-notification-enabled": true, "torrent-complete-notification-enabled": true,
"torrent-complete-sound-command": "canberra-gtk-play -i complete-download -d 'transmission torrent downloaded'", "torrent-complete-sound-command": "canberra-gtk-play -i complete-download -d 'transmission torrent downloaded'",
"torrent-complete-sound-enabled": true, "torrent-complete-sound-enabled": true,
"trash-can-enabled": true, "trash-can-enabled": true,
"trash-original-torrent-files": false, "trash-original-torrent-files": false,
"umask": 18, "umask": "022",
"upload-slots-per-torrent": 14, "upload-slots-per-torrent": 14,
"user-has-given-informed-consent": true, "user-has-given-informed-consent": true,
"utp-enabled": true "utp-enabled": true

59
.config/xplr/hack.lua Normal file
View File

@ -0,0 +1,59 @@
---@diagnostic disable
local xplr = xplr -- The globally exposed configuration to be overridden.
---@diagnostic enable
-- -- Preview images using imv.
-- xplr.config.modes.builtin.default.key_bindings.on_key.P = {
-- help = "preview",
-- messages = {
-- {
-- BashExecSilently0 = [===[
-- FIFO_PATH="/tmp/xplr.fifo"
--
-- if [ -e "$FIFO_PATH" ]; then
-- "$XPLR" -m StopFifo
-- rm -f -- "$FIFO_PATH"
-- else
-- mkfifo "$FIFO_PATH"
-- "$HOME/.local/bin/imv-open" "$FIFO_PATH" "$XPLR_FOCUS_PATH" &
-- "$XPLR" -m 'StartFifo: %q' "$FIFO_PATH"
-- fi
-- ]===],
-- },
-- },
-- }
--
-- -- Batch rename the selected or visible files and directories in `$PWD`.
-- xplr.config.modes.builtin.default.key_bindings.on_key.R = {
-- help = "batch rename",
-- messages = {
-- {
-- BashExec = [===[
-- SELECTION=$(cat "${XPLR_PIPE_SELECTION_OUT:?}")
-- NODES=${SELECTION:-$(cat "${XPLR_PIPE_DIRECTORY_NODES_OUT:?}")}
-- if [ "$NODES" ]; then
-- echo -e "$NODES" | renamer
-- "$XPLR" -m ExplorePwdAsync
-- fi
-- ]===],
-- },
-- },
-- }
--
-- -- Serve `$PWD` using a static web server via LAN.
-- xplr.config.modes.builtin.default.key_bindings.on_key.S = {
-- help = "serve $PWD",
-- messages = {
-- {
-- BashExec0 = [===[
-- IP=$(ip addr | rg -w inet | cut -d/ -f1 | rg -Eo '[0-9]{1,3}\.[0-9]{ 1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sk --prompt 'Select IP > ')
-- echo "IP: ${IP:?}"
-- read -p "Port (default 5000): " PORT
-- echo
-- sfz --all --cors --no-ignore --bind ${IP:?} --port ${PORT:-5000} . &
-- sleep 1 && read -p '[press enter to exit]'
-- kill -9 %1
-- ]===],
-- },
-- },
-- }

3079
.config/xplr/init.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
#!/bin/zsh #!/bin/sh
if [ "$(tty)" = "/dev/tty1" ]; then export WM="Hyprland"
pgrep Hyprland || Hyprland export XDG_CURRENT_DESKTOP=Hyprland
fi export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=Hyprland
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Hyprland >/dev/null 2>&1 && Hyprland

View File

@ -81,7 +81,18 @@ lfcd() {
lf -last-dir-path="$tmp" "$@" lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then if [ -f "$tmp" ]; then
dir="$(cat "$tmp")" dir="$(cat "$tmp")"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" || return
fi
}
xplrcd() {
tmp="$(mktemp -uq)"
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
xplr -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" || return
fi fi
} }

View File

@ -13,14 +13,15 @@ file=$(readlink -f "$1")
dir=${file%/*} dir=${file%/*}
base="${file%.*}" base="${file%.*}"
ext="${file##*.}" ext="${file##*.}"
echo "$file"
cd "$dir" || exit 1 cd "$dir" || exit 1
textype() { textype() {
textarget="$(getcomproot "$file" || echo "$file")" textarget="$(getcomproot "$file" || echo "$file")"
echo "$textarget" echo "$textarget"
command="pdflatex" command="luatex"
(head -n5 "$textarget" | grep -qi 'xelatex') && command="xelatex" (head -n5 "$textarget" | grep -qi "xelatex") && command="xelatex"
$command --output-directory="${textarget%/*}" "${textarget%.*}" $command --output-directory="${textarget%/*}" "${textarget%.*}"
grep -qi addbibresource "$textarget" && grep -qi addbibresource "$textarget" &&
biber --input-directory "${textarget%/*}" "${textarget%.*}" && biber --input-directory "${textarget%/*}" "${textarget%.*}" &&
@ -32,12 +33,13 @@ case "$ext" in
# Try to keep these cases in alphabetical order. # Try to keep these cases in alphabetical order.
[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf >"$base".pdf ;; [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf >"$base".pdf ;;
c) cc "$file" -o "$base" && "$base" ;; c) cc "$file" -o "$base" && "$base" ;;
cpp) g++ "$file" -o "$base" && "$base" ;; cpp | cc) g++ "$file" -o "$base" && "$base" ;;
cs) mcs "$file" && mono "$base".exe ;; cs) mcs "$file" && mono "$base".exe ;;
go) go run "$file" ;; go) go run "$file" ;;
h) sudo make install ;; h) sudo make install ;;
java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; java) javac -d classes "$file" && java -cp classes "${1%.*}" ;;
m) octave "$file" ;; m) octave "$file" ;;
*/Makefile) make --file "$file" ;;
md) if [ -x "$(command -v lowdown)" ]; then md) if [ -x "$(command -v lowdown)" ]; then
lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept -T pdf >"$base".pdf lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept -T pdf >"$base".pdf
elif [ -x "$(command -v groffdown)" ]; then elif [ -x "$(command -v groffdown)" ]; then
@ -50,7 +52,7 @@ ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf >"$base".pdf ;;
org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;; org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;;
py) python "$file" ;; py) python "$file" ;;
[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; [rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;;
rs) cargo build ;; rs) cargo run ;;
sass) sassc -a "$file" "$base".css ;; sass) sassc -a "$file" "$base".css ;;
scad) openscad -o "$base".stl "$file" ;; scad) openscad -o "$base".stl "$file" ;;
sent) setsid -f sent "$file" 2>/dev/null ;; sent) setsid -f sent "$file" 2>/dev/null ;;

23
.local/bin/imv-open Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
FIFO_PATH="$1"
IMAGE="$2"
MAINWINDOW="$(xdotool getactivewindow)"
IMV_PID="$(pgrep nsxiv)"
if [ ! "$IMV_PID" ]; then
nsxiv -aio "$IMAGE" &
IMV_PID=$!
fi
sleep 0.5
xdotool windowactivate "$MAINWINDOW"
while read -r path; do
imv-msg "$IMV_PID" close all
imv-msg "$IMV_PID" open "$path"
done <"$FIFO_PATH"
imv-msg "$IMV_PID" quit
[ -e "$FIFO_PATH" ] && rm -f -- "$FIFO_PATH"

View File

@ -1,4 +1,9 @@
#!/bin/sh #!/bin/sh
# This is a wrapper script for lb that allows it to create image previews with
# ueberzug. This works in concert with the lf configuration file and the
# lf-cleaner script.
set -e set -e
cleanup() { cleanup() {
@ -9,11 +14,11 @@ cleanup() {
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
lf "$@" lf "$@"
else else
[ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf" [ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$"
mkfifo "$FIFO_UEBERZUG" mkfifo "$FIFO_UEBERZUG"
ueberzug layer -s -p json <"$FIFO_UEBERZUG" & ueberzug layer -s -p json <"$FIFO_UEBERZUG" &
exec 3>"$FIFO_UEBERZUG" exec 3>"$FIFO_UEBERZUG"
trap cleanup EXIT trap cleanup HUP INT QUIT TERM PWR EXIT
lf "$@" 3>&- lf "$@" 3>&-
fi fi

View File

@ -14,4 +14,4 @@ killall xcape 2>/dev/null
# Turn off caps lock if on since there is no longer a key for it. # Turn off caps lock if on since there is no longer a key for it.
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
# Turn on num lock # Turn on num lock
xset -q | grep "Num Lock:\s*on" && xdotool key Num_Lock xset -q | grep "Num Lock:\s*off" && xdotool key Num_Lock

View File

@ -0,0 +1 @@
9b2f00a5-323b-4f7b-89d5-82ada7d245ea

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.