Added .gitconfig
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
! urxvt
|
||||
! Fonts
|
||||
urxvt*font: xft:Hack Nerd Font Mono:style=Regular:size=11:hinting=full, xft:DejaVu Sans Mono for Powerline:size=11, SourceHanSans-Regular
|
||||
urxvt*font: xft:DejaVuSansM Nerd Font Mono:style=Regular:size=11:hinting=full
|
||||
|
||||
! Behavior
|
||||
urxvt*scrollBar: false
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
set -g prefix F12
|
||||
unbind-key -n C-a
|
||||
@@ -1,15 +0,0 @@
|
||||
# Status bar for tmux and screen
|
||||
|
||||
# Status beginning with '#' are disabled.
|
||||
|
||||
# Screen has two status lines, with 4 quadrants for status
|
||||
screen_upper_left="color"
|
||||
screen_upper_right="color whoami hostname ip_address menu"
|
||||
screen_lower_left="color logo distro release #arch session"
|
||||
screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time"
|
||||
|
||||
|
||||
# Tmux has one status line, with 2 halves for status
|
||||
tmux_left=" logo #distro #release #arch #session"
|
||||
# You can have as many tmux right lines below here, and cycle through them using Shift-F5
|
||||
tmux_right="#network #disk_io #custom #entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime #fan_speed #cpu_temp battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap #disk #whoami #hostname ip_address #time_utc date time"
|
||||
@@ -11,7 +11,7 @@ style = "Bold Italic"
|
||||
style = "Italic"
|
||||
|
||||
[font.normal]
|
||||
family = "DejaVu Sans Mono for Powerline"
|
||||
family = "DejaVuSansM Nerd Font Mono"
|
||||
style = "Regular"
|
||||
|
||||
[window]
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
||||
; mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. Autosens must be turned off for this to take effect.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-200). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
; bars = 0
|
||||
; bar_width = 2
|
||||
; bar_spacing = 1
|
||||
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'.
|
||||
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
method = pulse
|
||||
; source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'.
|
||||
# 'noncurses' is for systems that does not suport ncurses.
|
||||
# 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
; method = ncurses
|
||||
|
||||
# Visual channels. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' averages both channels and outputs left to right lowest to highest frequencies.
|
||||
; channels = stereo
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
|
||||
|
||||
[color]
|
||||
|
||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a
|
||||
# terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
; background = black
|
||||
; foreground = blue
|
||||
|
||||
# Gradient mode, only hex defined colors are supported, background must also be defined in hex
|
||||
# or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will
|
||||
# not able to restore color definitions on exit, simply restart your terminal to restore colors.
|
||||
gradient = 1
|
||||
# GMK Noel
|
||||
gradient_color_1 = '#FFFFFF'
|
||||
gradient_color_2 = '#EEB9C1'
|
||||
gradient_color_3 = '#B3DCE1'
|
||||
gradient_color_4 = '#66B9D2'
|
||||
# Cool Blues
|
||||
; gradient_color_1 = '#2193b0'
|
||||
; gradient_color_2 = '#6dd5ed'
|
||||
# Quepal
|
||||
; gradient_color_1 = '#11998e'
|
||||
; gradient_color_2 = '#38ef7d'
|
||||
# Teal Love
|
||||
; gradient_color_1 = '#11FFBD'
|
||||
; gradient_color_2 = '#AAFFA9'
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
; integral = 70
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
||||
; monstercat = 1
|
||||
; waves = 0;
|
||||
|
||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
||||
; gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
; ignore = 0
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
; 1 = 1 # bass
|
||||
; 2 = 1
|
||||
; 3 = 1 # midtone
|
||||
; 4 = 1
|
||||
; 5 = 1 # treble
|
||||
@@ -1,79 +0,0 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
uniform int bar_width; // bar width (configurable), not used here
|
||||
uniform int bar_spacing; // space bewteen bars (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution
|
||||
|
||||
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||
uniform vec3 bg_color; // background color
|
||||
uniform vec3 fg_color; // foreground color
|
||||
|
||||
uniform int gradient_count;
|
||||
uniform vec3 gradient_colors[8]; // gradient colors
|
||||
|
||||
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
|
||||
{
|
||||
//create color based on fraction of this color and next color
|
||||
float yr = (y - y_min) / (y_max - y_min);
|
||||
return col_1 * (1.0 - yr) + col_2 * yr;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
float x = u_resolution.x * fragCoord.x;
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
//calculate a bar size
|
||||
float bar_size = u_resolution.x / bars_count;
|
||||
|
||||
//the y coordinate and bar values are the same
|
||||
float y = bars[bar];
|
||||
|
||||
// make sure there is a thin line at bottom
|
||||
if (y * u_resolution.y < 1.0)
|
||||
{
|
||||
y = 1.0 / u_resolution.y;
|
||||
}
|
||||
|
||||
//draw the bar up to current height
|
||||
if (y > fragCoord.y)
|
||||
{
|
||||
//make some space between bars basen on settings
|
||||
if (x > (bar + 1) * (bar_size) - bar_spacing)
|
||||
{
|
||||
fragColor = vec4(bg_color,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gradient_count == 0)
|
||||
{
|
||||
fragColor = vec4(fg_color,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//find which color in the configured gradient we are at
|
||||
int color = int((gradient_count - 1) * fragCoord.y);
|
||||
|
||||
//find where on y this and next color is supposed to be
|
||||
float y_min = color / (gradient_count - 1.0);
|
||||
float y_max = (color + 1.0) / (gradient_count - 1.0);
|
||||
|
||||
//make color
|
||||
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fragColor = vec4(bg_color,1.0);
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution, not used here
|
||||
|
||||
//colors, configurable in cava config file
|
||||
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
|
||||
uniform vec3 fg_color; // foreground color, not used here
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
|
||||
float y = (bars[bar]) * bar_y;
|
||||
|
||||
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
|
||||
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
|
||||
|
||||
bar_r = bar_r * bar_r * 2;
|
||||
|
||||
// set color
|
||||
fragColor.r = fg_color.x * y * bar_r;
|
||||
fragColor.g = fg_color.y * y * bar_r;
|
||||
fragColor.b = fg_color.z * y * bar_r;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#version 330
|
||||
|
||||
|
||||
// Input vertex data, different for all executions of this shader.
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
|
||||
// Output data ; will be interpolated for each fragment.
|
||||
out vec2 fragCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vertexPosition_modelspace,1);
|
||||
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
|
||||
}
|
||||
@@ -86,17 +86,14 @@ for_window [title="KeePassX$"] floating enable border normal
|
||||
############################ Startup Applications #############################
|
||||
###############################################################################
|
||||
|
||||
# exec --no-startup-id setxkbmap us,de; setxkbmap -option ctrl:nocaps; setxkbmap -option grp:lalt_lshift_toggle
|
||||
exec --no-startup-id setxkbmap eu; setxkbmap -option ctrl:nocaps;
|
||||
exec --no-startup-id picom
|
||||
exec --no-startup-id udiskie
|
||||
exec --no-startup-id conky -c ~/.conky/syclo-crimson-bottomleft.conkyrc
|
||||
# exec --no-startup-id synergyc -f --no-tray --debug INFO --name genesis --enable-crypto 192.168.178.38:24800
|
||||
exec --no-startup-id dunst
|
||||
exec --no-startup-id ~/.scripts/startup.sh
|
||||
exec --no-startup-id llk
|
||||
exec --no-startup-id emacs --daemon
|
||||
exec --no-startup-id syncthing
|
||||
exec --no-startup-id xrandr --output eDP1 --auto --left-of HDMI1 --output HDMI1 --off --output DP1 --off; feh --randomize --bg-fill /home/tuan/Pictures/Wallpaper/*
|
||||
exec --no-startup-id feh --randomize --bg-fill $HOME/Pictures/Wallpaper/*
|
||||
|
||||
###############################################################################
|
||||
@@ -110,13 +107,13 @@ bindsym $mod+Shift+s exec poweroff
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+space exec alacritty
|
||||
bindsym $mod+Return exec alacritty -e nu /home/tuan/.scripts/zellij-chooser.nu
|
||||
bindsym $mod+Return exec alacritty -e zellij
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start program launcher
|
||||
bindsym $mod+d exec --no-startup-id /home/tuan/.config/rofi/launchers/type-1/launcher.sh
|
||||
bindsym $mod+d exec --no-startup-id $HOME/.config/rofi/launchers/type-1/launcher.sh
|
||||
|
||||
# Screen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id ~/.scripts/screen.sh up
|
||||
@@ -133,9 +130,7 @@ bindsym XF86AudioPrevious exec "playerctl previous"
|
||||
|
||||
# Application Shortcuts
|
||||
bindsym $mod+b exec firefox
|
||||
bindsym $mod+p exec firefox --private-window https://mos4.de
|
||||
bindsym $mod+e exec emacsclient -c
|
||||
bindsym $mod+m exec thunderbird
|
||||
bindsym $mod+p exec firefox --private-window https://tudattr.dev
|
||||
|
||||
# Whole Screen
|
||||
bindsym Control+Print exec --no-startup-id ~/.scripts/screenshot.sh screen
|
||||
|
||||
@@ -1,556 +0,0 @@
|
||||
# Nushell Config File
|
||||
|
||||
# For more information on defining custom themes, see
|
||||
# https://www.nushell.sh/book/coloring_and_theming.html
|
||||
# And here is the theme collection
|
||||
# https://github.com/nushell/nu_scripts/tree/main/themes
|
||||
let dark_theme = {
|
||||
# color for nushell primitives
|
||||
separator: white
|
||||
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
|
||||
header: green_bold
|
||||
empty: blue
|
||||
# Closures can be used to choose colors for specific values.
|
||||
# The value (in this case, a bool) is piped into the closure.
|
||||
bool: { || if $in { 'light_cyan' } else { 'light_gray' } }
|
||||
int: white
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
'white'
|
||||
} else if $e < 1mb {
|
||||
'cyan'
|
||||
} else { 'blue' }
|
||||
}
|
||||
duration: white
|
||||
date: { || (date now) - $in |
|
||||
if $in < 1hr {
|
||||
'red3b'
|
||||
} else if $in < 6hr {
|
||||
'orange3'
|
||||
} else if $in < 1day {
|
||||
'yellow3b'
|
||||
} else if $in < 3day {
|
||||
'chartreuse2b'
|
||||
} else if $in < 1wk {
|
||||
'green3b'
|
||||
} else if $in < 6wk {
|
||||
'darkturquoise'
|
||||
} else if $in < 52wk {
|
||||
'deepskyblue3b'
|
||||
} else { 'dark_gray' }
|
||||
}
|
||||
range: white
|
||||
float: white
|
||||
string: white
|
||||
nothing: white
|
||||
binary: white
|
||||
cellpath: white
|
||||
row_index: green_bold
|
||||
record: white
|
||||
list: white
|
||||
block: white
|
||||
hints: dark_gray
|
||||
|
||||
shape_and: purple_bold
|
||||
shape_binary: purple_bold
|
||||
shape_block: blue_bold
|
||||
shape_bool: light_cyan
|
||||
shape_custom: green
|
||||
shape_datetime: cyan_bold
|
||||
shape_directory: cyan
|
||||
shape_external: cyan
|
||||
shape_externalarg: green_bold
|
||||
shape_filepath: cyan
|
||||
shape_flag: blue_bold
|
||||
shape_float: purple_bold
|
||||
# shapes are used to change the cli syntax highlighting
|
||||
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b}
|
||||
shape_globpattern: cyan_bold
|
||||
shape_int: purple_bold
|
||||
shape_internalcall: cyan_bold
|
||||
shape_list: cyan_bold
|
||||
shape_literal: blue
|
||||
shape_matching_brackets: { attr: u }
|
||||
shape_nothing: light_cyan
|
||||
shape_operator: yellow
|
||||
shape_or: purple_bold
|
||||
shape_pipe: purple_bold
|
||||
shape_range: yellow_bold
|
||||
shape_record: cyan_bold
|
||||
shape_redirection: purple_bold
|
||||
shape_signature: green_bold
|
||||
shape_string: green
|
||||
shape_string_interpolation: cyan_bold
|
||||
shape_table: blue_bold
|
||||
shape_variable: purple
|
||||
}
|
||||
|
||||
let light_theme = {
|
||||
# color for nushell primitives
|
||||
separator: dark_gray
|
||||
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
|
||||
header: green_bold
|
||||
empty: blue
|
||||
# Closures can be used to choose colors for specific values.
|
||||
# The value (in this case, a bool) is piped into the closure.
|
||||
bool: { || if $in { 'dark_cyan' } else { 'dark_gray' } }
|
||||
int: dark_gray
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
'dark_gray'
|
||||
} else if $e < 1mb {
|
||||
'cyan_bold'
|
||||
} else { 'blue_bold' }
|
||||
}
|
||||
duration: dark_gray
|
||||
date: { || (date now) - $in |
|
||||
if $in < 1hr {
|
||||
'red3b'
|
||||
} else if $in < 6hr {
|
||||
'orange3'
|
||||
} else if $in < 1day {
|
||||
'yellow3b'
|
||||
} else if $in < 3day {
|
||||
'chartreuse2b'
|
||||
} else if $in < 1wk {
|
||||
'green3b'
|
||||
} else if $in < 6wk {
|
||||
'darkturquoise'
|
||||
} else if $in < 52wk {
|
||||
'deepskyblue3b'
|
||||
} else { 'dark_gray' }
|
||||
}
|
||||
range: dark_gray
|
||||
float: dark_gray
|
||||
string: dark_gray
|
||||
nothing: dark_gray
|
||||
binary: dark_gray
|
||||
cellpath: dark_gray
|
||||
row_index: green_bold
|
||||
record: white
|
||||
list: white
|
||||
block: white
|
||||
hints: dark_gray
|
||||
|
||||
shape_and: purple_bold
|
||||
shape_binary: purple_bold
|
||||
shape_block: blue_bold
|
||||
shape_bool: light_cyan
|
||||
shape_custom: green
|
||||
shape_datetime: cyan_bold
|
||||
shape_directory: cyan
|
||||
shape_external: cyan
|
||||
shape_externalarg: green_bold
|
||||
shape_filepath: cyan
|
||||
shape_flag: blue_bold
|
||||
shape_float: purple_bold
|
||||
# shapes are used to change the cli syntax highlighting
|
||||
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b}
|
||||
shape_globpattern: cyan_bold
|
||||
shape_int: purple_bold
|
||||
shape_internalcall: cyan_bold
|
||||
shape_list: cyan_bold
|
||||
shape_literal: blue
|
||||
shape_matching_brackets: { attr: u }
|
||||
shape_nothing: light_cyan
|
||||
shape_operator: yellow
|
||||
shape_or: purple_bold
|
||||
shape_pipe: purple_bold
|
||||
shape_range: yellow_bold
|
||||
shape_record: cyan_bold
|
||||
shape_redirection: purple_bold
|
||||
shape_signature: green_bold
|
||||
shape_string: green
|
||||
shape_string_interpolation: cyan_bold
|
||||
shape_table: blue_bold
|
||||
shape_variable: purple
|
||||
}
|
||||
|
||||
# External completer example
|
||||
# let carapace_completer = {|spans|
|
||||
# carapace $spans.0 nushell $spans | from json
|
||||
# }
|
||||
|
||||
|
||||
# The default config record. This is where much of your global configuration is setup.
|
||||
let-env config = {
|
||||
ls: {
|
||||
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
|
||||
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
|
||||
}
|
||||
rm: {
|
||||
always_trash: false # always act as if -t was given. Can be overridden with -p
|
||||
}
|
||||
cd: {
|
||||
abbreviations: false # allows `cd s/o/f` to expand to `cd some/other/folder`
|
||||
}
|
||||
table: {
|
||||
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
|
||||
trim: {
|
||||
methodology: wrapping # wrapping or truncating
|
||||
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
|
||||
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
|
||||
}
|
||||
}
|
||||
|
||||
explore: {
|
||||
help_banner: true
|
||||
exit_esc: true
|
||||
|
||||
command_bar_text: '#C4C9C6'
|
||||
# command_bar: {fg: '#C4C9C6' bg: '#223311' }
|
||||
|
||||
status_bar_background: {fg: '#1D1F21' bg: '#C4C9C6' }
|
||||
# status_bar_text: {fg: '#C4C9C6' bg: '#223311' }
|
||||
|
||||
highlight: {bg: 'yellow' fg: 'black' }
|
||||
|
||||
status: {
|
||||
# warn: {bg: 'yellow', fg: 'blue'}
|
||||
# error: {bg: 'yellow', fg: 'blue'}
|
||||
# info: {bg: 'yellow', fg: 'blue'}
|
||||
}
|
||||
|
||||
try: {
|
||||
# border_color: 'red'
|
||||
# highlighted_color: 'blue'
|
||||
|
||||
# reactive: false
|
||||
}
|
||||
|
||||
table: {
|
||||
split_line: '#404040'
|
||||
|
||||
cursor: true
|
||||
|
||||
line_index: true
|
||||
line_shift: true
|
||||
line_head_top: true
|
||||
line_head_bottom: true
|
||||
|
||||
show_head: true
|
||||
show_index: true
|
||||
|
||||
# selected_cell: {fg: 'white', bg: '#777777'}
|
||||
# selected_row: {fg: 'yellow', bg: '#C1C2A3'}
|
||||
# selected_column: blue
|
||||
|
||||
# padding_column_right: 2
|
||||
# padding_column_left: 2
|
||||
|
||||
# padding_index_left: 2
|
||||
# padding_index_right: 1
|
||||
}
|
||||
|
||||
config: {
|
||||
cursor_color: {bg: 'yellow' fg: 'black' }
|
||||
|
||||
# border_color: white
|
||||
# list_color: green
|
||||
}
|
||||
}
|
||||
|
||||
history: {
|
||||
max_size: 10000 # Session has to be reloaded for this to take effect
|
||||
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
|
||||
file_format: "plaintext" # "sqlite" or "plaintext"
|
||||
}
|
||||
completions: {
|
||||
case_sensitive: false # set to true to enable case-sensitive completions
|
||||
quick: true # set this to false to prevent auto-selecting completions when only one remains
|
||||
partial: true # set this to false to prevent partial filling of the prompt
|
||||
algorithm: "prefix" # prefix or fuzzy
|
||||
external: {
|
||||
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
|
||||
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||
completer: null # check 'carapace_completer' above as an example
|
||||
}
|
||||
}
|
||||
filesize: {
|
||||
metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
|
||||
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
|
||||
}
|
||||
|
||||
color_config: $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme`
|
||||
use_grid_icons: true
|
||||
footer_mode: "25" # always, never, number_of_rows, auto
|
||||
float_precision: 2 # the precision for displaying floats in tables
|
||||
# buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
|
||||
use_ansi_coloring: true
|
||||
edit_mode: emacs # emacs, vi
|
||||
shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue
|
||||
# true or false to enable or disable the welcome banner at startup
|
||||
show_banner: false
|
||||
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||
|
||||
#hooks: {
|
||||
# pre_prompt: [{ ||
|
||||
# null # replace with source code to run before the prompt is shown
|
||||
# }]
|
||||
# pre_execution: [{ ||
|
||||
# null # replace with source code to run before the repl input is run
|
||||
# }]
|
||||
# env_change: { ||
|
||||
# PWD: [{|before, after|
|
||||
# null # replace with source code to run if the PWD environment is different since the last repl input
|
||||
# }]
|
||||
# }
|
||||
# display_output: { ||
|
||||
# if (term size).columns >= 100 { table -e } else { table }
|
||||
# }
|
||||
#}
|
||||
menus: [
|
||||
# Configuration for default nushell menus
|
||||
# Note the lack of source parameter
|
||||
{
|
||||
name: completion_menu
|
||||
only_buffer_difference: false
|
||||
marker: "| "
|
||||
type: {
|
||||
layout: columnar
|
||||
columns: 4
|
||||
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||
col_padding: 2
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
only_buffer_difference: true
|
||||
marker: "? "
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
{
|
||||
name: help_menu
|
||||
only_buffer_difference: true
|
||||
marker: "? "
|
||||
type: {
|
||||
layout: description
|
||||
columns: 4
|
||||
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||
col_padding: 2
|
||||
selection_rows: 4
|
||||
description_rows: 10
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
# Example of extra menus created using a nushell source
|
||||
# Use the source field to create a list of records that populates
|
||||
# the menu
|
||||
{
|
||||
name: commands_menu
|
||||
only_buffer_difference: false
|
||||
marker: "# "
|
||||
type: {
|
||||
layout: columnar
|
||||
columns: 4
|
||||
col_width: 20
|
||||
col_padding: 2
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
source: { |buffer, position|
|
||||
$nu.scope.commands
|
||||
| where name =~ $buffer
|
||||
| each { |it| {value: $it.name description: $it.usage} }
|
||||
}
|
||||
}
|
||||
{
|
||||
name: vars_menu
|
||||
only_buffer_difference: true
|
||||
marker: "# "
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
source: { |buffer, position|
|
||||
$nu.scope.vars
|
||||
| where name =~ $buffer
|
||||
| sort-by name
|
||||
| each { |it| {value: $it.name description: $it.type} }
|
||||
}
|
||||
}
|
||||
{
|
||||
name: commands_with_description
|
||||
only_buffer_difference: true
|
||||
marker: "# "
|
||||
type: {
|
||||
layout: description
|
||||
columns: 4
|
||||
col_width: 20
|
||||
col_padding: 2
|
||||
selection_rows: 4
|
||||
description_rows: 10
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
source: { |buffer, position|
|
||||
$nu.scope.commands
|
||||
| where name =~ $buffer
|
||||
| each { |it| {value: $it.name description: $it.usage} }
|
||||
}
|
||||
}
|
||||
]
|
||||
keybindings: [
|
||||
{
|
||||
name: completion_menu
|
||||
modifier: none
|
||||
keycode: tab
|
||||
mode: [emacs vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menu name: completion_menu }
|
||||
{ send: menunext }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: completion_previous
|
||||
modifier: shift
|
||||
keycode: backtab
|
||||
mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
|
||||
event: { send: menuprevious }
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
modifier: control
|
||||
keycode: char_r
|
||||
mode: emacs
|
||||
event: { send: menu name: history_menu }
|
||||
}
|
||||
{
|
||||
name: next_page
|
||||
modifier: control
|
||||
keycode: char_x
|
||||
mode: emacs
|
||||
event: { send: menupagenext }
|
||||
}
|
||||
{
|
||||
name: undo_or_previous_page
|
||||
modifier: control
|
||||
keycode: char_z
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{ send: menupageprevious }
|
||||
{ edit: undo }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: yank
|
||||
modifier: control
|
||||
keycode: char_y
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{edit: pastecutbufferafter}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: unix-line-discard
|
||||
modifier: control
|
||||
keycode: char_u
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{edit: cutfromlinestart}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: kill-line
|
||||
modifier: control
|
||||
keycode: char_k
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{edit: cuttolineend}
|
||||
]
|
||||
}
|
||||
}
|
||||
# Keybindings used to trigger the user defined menus
|
||||
{
|
||||
name: commands_menu
|
||||
modifier: control
|
||||
keycode: char_t
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menu name: commands_menu }
|
||||
}
|
||||
{
|
||||
name: vars_menu
|
||||
modifier: alt
|
||||
keycode: char_o
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menu name: vars_menu }
|
||||
}
|
||||
{
|
||||
name: commands_with_description
|
||||
modifier: control
|
||||
keycode: char_s
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menu name: commands_with_description }
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
def add_soft [project] { git remote add soft $"ssh://git.aya00:/($project)" }
|
||||
|
||||
alias ll = ls -la
|
||||
alias la = ls -a
|
||||
alias q = exit
|
||||
alias e = emacsclient -t
|
||||
alias ekill = (pkill emacs;pkill emacsclient;emacs --daemon)
|
||||
alias picotik = picocom --b 115199 /dev/ttyUSB0
|
||||
alias nmap = ^nmap -T5 --min-parallelism 100 -Pn
|
||||
alias ed = emacs --daemon
|
||||
alias eledger = emacsclient -nw ~/Documents/Finanzen/Ledger/MyBudget.ledger
|
||||
alias sshconfig = emacsclient -nw ~/.ssh/config
|
||||
alias econfig = emacsclient -nw ~/.doom.d/init.el
|
||||
alias wttr = curl wttr.in/Essen
|
||||
alias tvres = xrandr --output HDMI1 --transform 1.02,0,-20,0,1.02,-10,0,0,1
|
||||
alias defaultres = xrandr --output HDMI1 --transform 1.00,0,0,0,1.00,0,0,0,1
|
||||
alias latexmk = ^latexmk -f -pdf -interaction=nonstopmode
|
||||
|
||||
# git
|
||||
alias gpa = git push all --all
|
||||
alias gras = add_soft
|
||||
alias gd = git diff
|
||||
alias gp = git push
|
||||
alias gcsm = git commit -s -m
|
||||
alias gaa = git add --all
|
||||
alias gco = git checkout
|
||||
alias grv = git remote -v
|
||||
|
||||
let-env DOCKER_BUILDKIT = 1 # Disable for podman
|
||||
source ~/.cache/starship/init.nu
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
# Nushell Environment Config File
|
||||
|
||||
def create_left_prompt [] {
|
||||
let home = ($env | get -i (if $nu.os-info.name == "windows" { "USERPROFILE" } else { "HOME" }) | into string)
|
||||
let dir = ([
|
||||
($env.PWD | str substring 0..($home | str length) | str replace -s $home "~"),
|
||||
($env.PWD | str substring ($home | str length)..)
|
||||
] | str join)
|
||||
|
||||
let path_segment = if (is-admin) {
|
||||
$"(ansi red_bold)($dir)"
|
||||
} else {
|
||||
$"(ansi green_bold)($dir)"
|
||||
}
|
||||
|
||||
$path_segment
|
||||
}
|
||||
|
||||
def create_right_prompt [] {
|
||||
let time_segment = ([
|
||||
(date now | date format '%m/%d/%Y %r')
|
||||
] | str join)
|
||||
|
||||
$time_segment
|
||||
}
|
||||
|
||||
# Use nushell functions to define your right and left prompt
|
||||
let-env PROMPT_COMMAND = { || create_left_prompt }
|
||||
let-env PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
||||
|
||||
# The prompt indicators are environmental variables that represent
|
||||
# the state of the prompt
|
||||
let-env PROMPT_INDICATOR = { || "〉" }
|
||||
let-env PROMPT_INDICATOR_VI_INSERT = { || ": " }
|
||||
let-env PROMPT_INDICATOR_VI_NORMAL = { || "〉" }
|
||||
let-env PROMPT_MULTILINE_INDICATOR = { || "::: " }
|
||||
|
||||
# Specifies how environment variables are:
|
||||
# - converted from a string to a value on Nushell startup (from_string)
|
||||
# - converted from a value back to a string when running external commands (to_string)
|
||||
# Note: The conversions happen *after* config.nu is loaded
|
||||
let-env ENV_CONVERSIONS = {
|
||||
"PATH": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand -n }
|
||||
to_string: { |v| $v | path expand -n | str join (char esep) }
|
||||
}
|
||||
"Path": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand -n }
|
||||
to_string: { |v| $v | path expand -n | str join (char esep) }
|
||||
}
|
||||
}
|
||||
|
||||
# Directories to search for scripts when calling source or use
|
||||
#
|
||||
# By default, <nushell-config-dir>/scripts is added
|
||||
let-env NU_LIB_DIRS = [
|
||||
($nu.config-path | path dirname | path join 'scripts')
|
||||
]
|
||||
|
||||
# Directories to search for plugin binaries when calling register
|
||||
#
|
||||
# By default, <nushell-config-dir>/plugins is added
|
||||
let-env NU_PLUGIN_DIRS = [
|
||||
($nu.config-path | path dirname | path join 'plugins')
|
||||
]
|
||||
|
||||
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
|
||||
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
|
||||
let-env VISUAL = 'emacsclient -t'
|
||||
let-env EDITOR = 'emacsclient -t'
|
||||
@@ -1,392 +0,0 @@
|
||||
[colors]
|
||||
background = ${xrdb:color0:#22300}
|
||||
background-alt = ${xrdb:color8:#fa400}
|
||||
foreground = ${xrdb:color7:#cdd}
|
||||
foreground-alt = ${xrdb:color15:#eef}
|
||||
black = ${xrdb:color0:#233}
|
||||
red = ${xrdb:color1:#f90}
|
||||
green = ${xrdb:color2:#8c4}
|
||||
yellow = ${xrdb:color3:#fc0}
|
||||
blue = ${xrdb:color4:#0af}
|
||||
magenta = ${xrdb:color5:#e16}
|
||||
cyan = ${xrdb:color6:#098}
|
||||
white = ${xrdb:color7:#cdd}
|
||||
|
||||
[bar/systray]
|
||||
width = 100%
|
||||
height = 25
|
||||
|
||||
radius = 6.0
|
||||
fixed-center = true
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 0
|
||||
|
||||
background = #00000000
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
|
||||
font-0 = DejaVu Sans Mono for Powerline:pixelsize=10;1
|
||||
# font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||
# font-2 = siji:pixelsize=10;1
|
||||
# font-3 = FontAwesome:style=Regular:pixelsize=10
|
||||
|
||||
modules-left =
|
||||
modules-center = i3
|
||||
modules-right =
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
|
||||
[bar/beep]
|
||||
width = 100%
|
||||
height = 25
|
||||
|
||||
radius = 6.0
|
||||
fixed-center = true
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
|
||||
background = #00000000
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
|
||||
font-0 = fixed:pixelsize=10;1
|
||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||
font-2 = siji:pixelsize=10;1
|
||||
font-3 = FontAwesome:style=Regular:pixelsize=10
|
||||
|
||||
modules-left = volume xkeyboard
|
||||
modules-center = date
|
||||
modules-right =
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[bar/boop]
|
||||
width = 100%
|
||||
height = 2%
|
||||
bottom = true
|
||||
radius = 6.0
|
||||
fixed-center = true
|
||||
|
||||
background = #00000000
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 0
|
||||
|
||||
line-color = ${colors.blue}
|
||||
|
||||
border-size = 0
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
font-0 = fixed:pixelsize=10;1
|
||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||
font-2 = siji:pixelsize=10;1
|
||||
font-3 = FontAwesome:style=Regular:pixelsize=10
|
||||
|
||||
modules-left = airvpn
|
||||
modules-center = i3
|
||||
modules-right = xbacklight wlan eth battery1 powermenu
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-prefix-underline = ${colors.magenta}
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-underline = ${colors.magenta}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-background = ${colors.magenta}
|
||||
label-indicator-underline = ${colors.magenta}
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
exec-if = pgrep -x spotify
|
||||
exec = echo "$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
|
||||
|
||||
[module/spotify-prev]
|
||||
type = custom/script
|
||||
exec-if = pgrep -x spotify
|
||||
exec = echo ""
|
||||
click-left = bash -c "playerctl previous"
|
||||
|
||||
[module/spotify-next]
|
||||
type = custom/script
|
||||
exec-if = pgrep -x spotify
|
||||
exec = echo ""
|
||||
click-left = bash -c "playerctl next"
|
||||
|
||||
[module/spotify-play]
|
||||
type = custom/script
|
||||
exec-if = pgrep -x spotify
|
||||
exec = ~/.scripts/spotify-play.out
|
||||
tail = true
|
||||
click-left = bash -c "if [ `cat /home/$USER/.scripts/playstate` = 0 ]; then echo '1'>/home/$USER/.scripts/playstate;else echo '0'>/home/$USER/.scripts/playstate;fi"
|
||||
|
||||
[module/spotify-stop]
|
||||
type = custom/script
|
||||
exec-if = pgrep -x spotify
|
||||
exec = echo ""
|
||||
tail = true
|
||||
click-left = bash -c "playerctl stop && echo '0'>/home/$USER/.scripts/playstate"
|
||||
|
||||
[module/airvpn]
|
||||
type = custom/script
|
||||
exec-if =
|
||||
exec = "if [[ $(ip addr | grep tun) ]]; then echo 'VPN: connected'; else echo 'VPN: disconnectd'; fi"
|
||||
tail = true
|
||||
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
|
||||
pin-workspaces = true
|
||||
|
||||
strip-wsnumbers = true
|
||||
|
||||
index-sort = false
|
||||
|
||||
enable-click = false
|
||||
|
||||
enable-scroll = false
|
||||
|
||||
wrapping-scroll = false
|
||||
|
||||
reverse-scroll = false
|
||||
|
||||
fuzzy-match = true
|
||||
|
||||
ws-icon-0 = 1;
|
||||
ws-icon-1 = 2;
|
||||
ws-icon-2 = 3;
|
||||
ws-icon-3 = 4;
|
||||
ws-icon-4 = 5;
|
||||
ws-icon-5 = 6;
|
||||
ws-icon-6 = 7;
|
||||
ws-icon-7 = 8;
|
||||
ws-icon-8 = 9;
|
||||
ws-icon-default =
|
||||
|
||||
format = <label-state>
|
||||
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 2
|
||||
label-mode-background = ${colors.black}
|
||||
|
||||
label-focused = %name%
|
||||
label-focused-foreground = ${colors.foreground}
|
||||
label-focused-background = ${colors.background}
|
||||
label-focused-underline = ${colors.blue}
|
||||
label-focused-padding = 4
|
||||
|
||||
label-unfocused = %name%
|
||||
label-unfocused-padding = 4
|
||||
|
||||
label-visible = %name%
|
||||
label-visible-underline = ${colors.red}
|
||||
label-visible-padding = 4
|
||||
|
||||
label-urgent = %name%
|
||||
label-urgent-foreground = ${colors.black}
|
||||
label-urgent-background = ${colors.red}
|
||||
label-urgent-padding = 4
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label>
|
||||
label = %percentage%%
|
||||
label-underline = ${colors.yellow}
|
||||
|
||||
[module/backlight-acpi]
|
||||
inherit = module/xbacklight
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <label-connected>
|
||||
format-connected-underline = ${colors.cyan}
|
||||
label-connected = %essid%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date =
|
||||
date-alt = " %Y-%m-%d"
|
||||
|
||||
time = " %H:%M:%S"
|
||||
time-alt =
|
||||
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = ${colors.magenta}
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume =
|
||||
label-volume-foreground = ${root.foreground}
|
||||
format-volume-underline = ${colors.green}
|
||||
|
||||
|
||||
format-muted-foreground = ${colors.foreground-alt}
|
||||
label-muted = Muted
|
||||
label-muted-underline = ${colors.red}
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = ${colors.green}
|
||||
bar-volume-foreground-1 = ${colors.green}
|
||||
bar-volume-foreground-2 = ${colors.green}
|
||||
bar-volume-foreground-3 = ${colors.green}
|
||||
bar-volume-foreground-4 = ${colors.green}
|
||||
bar-volume-foreground-5 = ${colors.yellow}
|
||||
bar-volume-foreground-6 = ${colors.red}
|
||||
bar-volume-gradient = true
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/battery1]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = AC0
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = ${colors.yellow}
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix =
|
||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
animation-charging-foreground = ${colors.foreground-alt}
|
||||
animation-charging-framerate = 750
|
||||
|
||||
[module/battery2]
|
||||
type = internal/battery
|
||||
battery = BAT1
|
||||
adapter = ACP0
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = ${colors.yellow}
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix =
|
||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
animation-charging-foreground = ${colors.foreground-alt}
|
||||
animation-charging-framerate = 750
|
||||
|
||||
# [module/powermenu]
|
||||
# type = custom/menu
|
||||
# expand-right = true
|
||||
# format-spacing = 1
|
||||
#
|
||||
# label-open =
|
||||
# label-open-foreground = ${colors.magenta}
|
||||
# label-close = cancel
|
||||
# label-close-foreground = ${colors.magenta}
|
||||
# label-separator = |
|
||||
# label-separator-foreground = ${colors.foreground-alt}
|
||||
#
|
||||
# menu-0-0 = power off
|
||||
# menu-0-0-exec = poweroff
|
||||
# menu-0-1 = reboot
|
||||
# menu-0-1-exec = reboot
|
||||
# menu-0-2 = logout
|
||||
# menu-0-2-exec = dm-tool lock
|
||||
|
||||
;; Power Menu Module
|
||||
[module/powermenu]
|
||||
type = custom/text
|
||||
|
||||
content = aaa
|
||||
content-background = ${colors.magenta}
|
||||
content-foreground = ${colors.magenta}
|
||||
|
||||
click-left = ~/.config/rofi/powermenu/type-1/powermenu.sh
|
||||
click-right = powermenu_t1
|
||||
|
||||
[settings]
|
||||
;screenchange-reload = true
|
||||
;compositing-background = xor
|
||||
;compositing-background = screen
|
||||
;compositing-foreground = source
|
||||
;compositing-border = over
|
||||
|
||||
[global/wm]
|
||||
margin-top = 5
|
||||
margin-bottom = 5
|
||||
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
|
||||
# you can edit this file to change keybindings lines that start with '#' are comments
|
||||
# the syntax is pretty simple. Some examples:
|
||||
#command k (command is executed when k is pressed)
|
||||
#command <C-k> (command is executed when k is pressed while holding control)
|
||||
#command <S-k> (command is executed when k is pressed while holding shift)
|
||||
#command <A-k> (command is executed when k is pressed while holding alt)
|
||||
#command <S-+> (command is executed when = is pressed while holding shift.
|
||||
# Note that <S-=> would not work because of a bug in the command system so
|
||||
# when prefixing non-ascii keys with shift, you have to specify the shift
|
||||
# modified key in addition to the shift modifier)
|
||||
#command <C-S-k> (command is executed when k is pressed while holding control and shift)
|
||||
#command gg (command is executed when g is pressed twice)
|
||||
#command gt (command is executed when g is pressed and then t is pressed)
|
||||
#command g<C-n><S-d>t (command is executed when g is pressed and then n is pressed while holding\
|
||||
# control and then d is pressed while holding shift and then t is pressed)
|
||||
|
||||
|
||||
# ---------- NAVIGATION AND ZOOM ----------
|
||||
|
||||
# Goto the begining of document. If prefixed with a number, it will go to that page.
|
||||
# for example 150gg goes to page 150.
|
||||
goto_begining gg
|
||||
goto_begining <C-<home>>
|
||||
|
||||
# Opens a prompt to enter page number and jump to that page
|
||||
goto_page_with_page_number <home>
|
||||
|
||||
# Goto the end of the document
|
||||
goto_end <end>
|
||||
goto_end <S-g>
|
||||
|
||||
# movement (can be prefixed with a number)
|
||||
move_down <down>
|
||||
move_up <up>
|
||||
move_left <right>
|
||||
move_right <left>
|
||||
move_down j
|
||||
move_up k
|
||||
move_left l
|
||||
move_right h
|
||||
|
||||
# Goto forward for one page width. (can be prefixed with a number)
|
||||
# (note that going forward for one page width is not usually what you want becaue if
|
||||
# the page is larger than the screen you will miss some content. What you usually want is screen_down)
|
||||
next_page <C-<pagedown>>
|
||||
previous_page <C-<pageup>>
|
||||
|
||||
# Go down one screen width (can be prefixed with a number which tells how many screen widths should we go down)
|
||||
screen_down <space>
|
||||
screen_up <S-space>
|
||||
screen_down <pagedown>
|
||||
screen_up <pageup>
|
||||
|
||||
# Goto the next/prev chapter
|
||||
next_chapter gc
|
||||
prev_chapter g<S-c>
|
||||
|
||||
# Goto previous viewing state and delete the current (and future) state(s).
|
||||
pop_state w
|
||||
|
||||
# if we are not at the end of viewing history, goto the next history point
|
||||
next_state <l>
|
||||
# goto the previous history point
|
||||
prev_state <h>
|
||||
prev_state <backspace>
|
||||
next_state <C-<right>>
|
||||
prev_state <C-<left>>
|
||||
|
||||
# Open table of contents.
|
||||
goto_toc t
|
||||
|
||||
# zoom
|
||||
zoom_in <S-+>
|
||||
zoom_in =
|
||||
zoom_out -
|
||||
|
||||
# Automatically set the zoom level and horizontal offset such that the current page is centered horizontally and
|
||||
# it fills the screen width
|
||||
fit_to_page_width <f9>
|
||||
# same as fit_to_page_with but ignores page margins
|
||||
fit_to_page_width_smart <f10>
|
||||
|
||||
# Open a file dialog to select a document.
|
||||
open_document o
|
||||
open_document_embedded <C-o>
|
||||
open_document_embedded_from_current_path <C-S-o>
|
||||
|
||||
# Open a searchable list of previously opened documents.
|
||||
open_prev_doc <S-o>
|
||||
|
||||
|
||||
# ---------- SEARCH ----------
|
||||
|
||||
# search the document.
|
||||
# example: /something (searches the document for 'something')
|
||||
# you can also specify a page range to search:
|
||||
# example: /<110,135>something (searches pages 110 to 135 (inclusive) for 'something')
|
||||
search <C-f>
|
||||
search /
|
||||
|
||||
# this is the same as search.
|
||||
ranged_search r<C-f>
|
||||
ranged_search r/
|
||||
|
||||
# searches the current chapter. This is essentially the same as search but the range prefix is autofilled
|
||||
# with the range of the current lowest level subchapter.
|
||||
chapter_search c<C-f>
|
||||
chapter_search c/
|
||||
|
||||
# Goto the next search item. Can be prefixed with a number which is the same as performing the command n times
|
||||
# for example if we are on the 10th search result and we input 15n, we go to the 25th search result.
|
||||
next_item n
|
||||
# Goto the previous search result. Can be prefixed with a number with similar rules as next_item.
|
||||
previous_item <S-n>
|
||||
|
||||
# ---------- BOOKMARKS ----------
|
||||
# Add a bookmark in the current location (opens a text input where you can specify the bookmark text)
|
||||
add_bookmark b
|
||||
delete_bookmark db
|
||||
|
||||
# Open bookmarks menu of the current document.
|
||||
goto_bookmark gb
|
||||
|
||||
# Open bookmarks menu of all documents.
|
||||
goto_bookmark_g g<S-b>
|
||||
|
||||
# ---------- HIGHLIGHTS ----------
|
||||
# you can select a piece of text and press the `add_highlight` shortcut followed by a symbol (a character from a-z) to highlight
|
||||
# the text
|
||||
add_highlight h
|
||||
# search in highlights of current document
|
||||
goto_highlight gh
|
||||
# search in highlights of all documents
|
||||
goto_highlight_g g<S-h>
|
||||
# click on a highlight and then press the `delete_highlight` shortcut to delete it.
|
||||
delete_highlight dh
|
||||
|
||||
# ---------- MARKS ----------
|
||||
|
||||
# Mark the current location. After pressing the mark button, you must enter a symbol (a letter from a-z or A-Z).
|
||||
# this marks the current location in the file with the entered symbol. Afterwards you will be able to return to
|
||||
# the locations of the marks using goto_mark command.
|
||||
# example: mm (marks the current location in the file with a mark named 'm')
|
||||
set_mark m
|
||||
# Goto a previously set mark. After pressing goto_mark you must enter a symbol associated with a previously set mark.
|
||||
# example: `m (goes to the location of the mark named m)
|
||||
goto_mark `
|
||||
|
||||
|
||||
# ---------- PORTALS ----------
|
||||
# If we are in default state, goto portal state with the current location in document as the portal source
|
||||
# if we are already in the portal state, create the portal with the current location as destination.
|
||||
link p
|
||||
|
||||
# Delete the portal with the closest source to current location
|
||||
delete_link dp
|
||||
|
||||
# Goto the position of the portal with the closest source to current location
|
||||
goto_link <tab>
|
||||
|
||||
# Similar to goto_link, except when prev_state is called, the destination of the link is update to be the state
|
||||
# on which prev_state is called
|
||||
edit_link <S-p>
|
||||
edit_link <S-<tab>>
|
||||
|
||||
# Open/Close the helper window for portals
|
||||
toggle_one_window <f12>
|
||||
|
||||
# ---------- MISC ----------
|
||||
|
||||
# copy selected text
|
||||
copy y
|
||||
|
||||
toggle_fullscreen <f11>
|
||||
|
||||
# Toggles whether we highlight pdf links or not
|
||||
toggle_highlight <f1>
|
||||
|
||||
# open command line
|
||||
command <S-:>
|
||||
|
||||
# seach the selected text using one of the search engines defined using search_url_* settings in prefs.config (* can be any letter between 'a' and 'z')
|
||||
external_search s
|
||||
|
||||
#search_selected_text_in_google_scholar ss
|
||||
#search_selected_text_in_libgen sl
|
||||
|
||||
open_selected_url <S-q>
|
||||
|
||||
toggle_dark_mode <f8>
|
||||
|
||||
# toggle synctex mode. When in synctex mode, right clicking on a pdf launches the corresponding latex page.
|
||||
toggle_synctex <f4>
|
||||
|
||||
# while in mouse drag mode, instead of selecting text you can pan the screen using mouse
|
||||
toggle_mouse_drag_mode <f6>
|
||||
|
||||
# command the move the visual mark to the next/previous line
|
||||
#move_visual_mark_up k
|
||||
#move_visual_mark_down j
|
||||
|
||||
# In visual scroll mode, mouse wheel performs `move_visual_mark_up` and `move_visual_mark_down` commands
|
||||
toggle_visual_scroll <f7>
|
||||
|
||||
toggle_presentation_mode <f5>
|
||||
|
||||
quit q
|
||||
@@ -1,137 +0,0 @@
|
||||
# (can be 0 or 1) if set, shows a notification on startup if a new version of sioyek is available
|
||||
check_for_updates_on_startup 0
|
||||
|
||||
# The color with which the screen is cleared before rendering the pdf
|
||||
background_color 1.0 1.0 1.0
|
||||
dark_mode_background_color 0.0 0.0 0.0
|
||||
|
||||
# Showing full white text on black background can be irritating for the eye, we can dim the whites a little bit using the contrast option
|
||||
dark_mode_contrast 0.8
|
||||
|
||||
# Highlight color when text is selected using mouse
|
||||
text_highlight_color 1.0 1.0 0.0
|
||||
|
||||
# The color of highlight bar which is displayed when right click is pressed
|
||||
vertical_line_color 0.0 0.0 0.0 0.1
|
||||
|
||||
# Highlight color when text is a search match
|
||||
search_highlight_color 0.0 1.0 0.0
|
||||
|
||||
# Hihglight color for PDF links (note that highlight is off by default
|
||||
# and can only be seen by performing a toggle_highlight command. See keys.config for more details)
|
||||
link_highlight_color 0.0 0.0 1.0
|
||||
|
||||
# Hihglight color for synctex forward search highlights
|
||||
synctex_highlight_color 1.0 0.0 1.0
|
||||
|
||||
# urls to use when executing external_search commands
|
||||
search_url_s https://scholar.google.com/scholar?q=
|
||||
search_url_l http://gen.lib.rus.ec/scimag/?q=
|
||||
search_url_g https://www.google.com/search?q=
|
||||
|
||||
# which search url to choose when middle clicking or shift middle clicking on text (the values are the letters of corresponding search_url_* )
|
||||
# for example if i set `middle_click_search_engine s`, then we use the url associated with `search_url_s` to handle middle click searches
|
||||
middle_click_search_engine s
|
||||
shift_middle_click_search_engine l
|
||||
|
||||
# The factor by which we increase/decrease zoom when performing zoom_in or zoom_out
|
||||
zoom_inc_factor 1.2
|
||||
|
||||
# How many inches we move vertically/horizontally when performing move_* commands
|
||||
vertical_move_amount 1.0
|
||||
horizontal_move_amount 1.0
|
||||
|
||||
# When performing screen_down/screen_up we usually don't move a full screen because it causes the user to lose context
|
||||
# Here we specify the fraction of the screen width by which we move when performing these commands
|
||||
move_screen_percentage 0.5
|
||||
|
||||
# If 0, Table of Contents is shown in a hierarchial tree, otherwise it is a flat list (can improve performance for extremely large table of contents)
|
||||
flat_toc 0
|
||||
|
||||
# If it is 1, when launching the application if we detect multiple monitors, we automatically launch the helper window in second monitor
|
||||
should_use_multiple_monitors 0
|
||||
|
||||
# if the last opened document is empty, load the tutorial pdf instead
|
||||
should_load_tutorial_when_no_other_file 1
|
||||
|
||||
# if it is 0, then we use the previous instance of sioyek when launching a new file.
|
||||
# otherwise a new instance is launched every time we open a new file.
|
||||
should_launch_new_instance 0
|
||||
|
||||
# the command to use when trying to do inverse search into a LaTeX document. Uncomment and provide your own command.
|
||||
# %1 expands to the name of the file and %2 expans to the line number.
|
||||
#inverse_search_command "C:\path\to\vscode\Code.exe" -r -g %1:%2
|
||||
|
||||
# you can specify the exact highlight color for each of 26 different highlight types
|
||||
|
||||
# when moving to the next line using visual marker, this setting specifies the distance of the market to the top of the screen in fractions of screen size
|
||||
visual_mark_next_page_fraction 0.25
|
||||
|
||||
# when moving to the next line using visual marker, this setting determines at which point we move the screen
|
||||
visual_mark_next_page_fraction 0.2
|
||||
|
||||
#Amethyst
|
||||
highlight_color_a 0.94 0.64 1.00
|
||||
#Blue
|
||||
highlight_color_b 0.00 0.46 0.86
|
||||
#Caramel
|
||||
highlight_color_c 0.60 0.25 0.00
|
||||
#Damson
|
||||
highlight_color_d 0.30 0.00 0.36
|
||||
#Ebony
|
||||
highlight_color_e 0.10 0.10 0.10
|
||||
#Forest
|
||||
highlight_color_f 0.00 0.36 0.19
|
||||
#Green
|
||||
highlight_color_g 0.17 0.81 0.28
|
||||
#Honeydew
|
||||
highlight_color_h 1.00 0.80 0.60
|
||||
#Iron
|
||||
highlight_color_i 0.50 0.50 0.50
|
||||
#Jade
|
||||
highlight_color_j 0.58 1.00 0.71
|
||||
#Khaki
|
||||
highlight_color_k 0.56 0.49 0.00
|
||||
#Lime
|
||||
highlight_color_l 0.62 0.80 0.00
|
||||
#Mallow
|
||||
highlight_color_m 0.76 0.00 0.53
|
||||
#Navy
|
||||
highlight_color_n 0.00 0.20 0.50
|
||||
#Orpiment
|
||||
highlight_color_o 1.00 0.64 0.02
|
||||
#Pink
|
||||
highlight_color_p 1.00 0.66 0.73
|
||||
#Quagmire
|
||||
highlight_color_q 0.26 0.40 0.00
|
||||
#Red
|
||||
highlight_color_r 1.00 0.00 0.06
|
||||
#Sky
|
||||
highlight_color_s 0.37 0.95 0.95
|
||||
#Turquoise
|
||||
highlight_color_t 0.00 0.60 0.56
|
||||
#Uranium
|
||||
highlight_color_u 0.88 1.00 0.40
|
||||
#Violet
|
||||
highlight_color_v 0.45 0.04 1.00
|
||||
#Wine
|
||||
highlight_color_w 0.60 0.00 0.00
|
||||
#Xanthin
|
||||
highlight_color_x 1.00 1.00 0.50
|
||||
#Yellow
|
||||
highlight_color_y 1.00 1.00 0.00
|
||||
#Zinnia
|
||||
highlight_color_z 1.00 0.31 0.02
|
||||
|
||||
|
||||
# if set, we display a checkerboard pattern for unrendered pages (by default we display nothing)
|
||||
should_draw_unrendered_pages 0
|
||||
|
||||
# displays an overview of destination when hovering over a link with mouse
|
||||
hover_overview 0
|
||||
|
||||
# Use dark mode by default
|
||||
default_dark_mode 0
|
||||
|
||||
# if set, we sort the bookmarks by their location instead of their creation time
|
||||
sort_bookmarks_by_location 0
|
||||
@@ -1,64 +0,0 @@
|
||||
format = """
|
||||
[░▒▓](#a3aed2)\
|
||||
[ ](bg:#a3aed2 fg:#090c0c)\
|
||||
[](bg:#769ff0 fg:#a3aed2)\
|
||||
$directory\
|
||||
[](fg:#769ff0 bg:#394260)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:#394260 bg:#212736)\
|
||||
$nodejs\
|
||||
$rust\
|
||||
$golang\
|
||||
$php\
|
||||
[](fg:#212736 bg:#1d2230)\
|
||||
$time\
|
||||
[ ](fg:#1d2230)\
|
||||
\n$character"""
|
||||
|
||||
[directory]
|
||||
style = "fg:#e3e5e5 bg:#769ff0"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:#394260"
|
||||
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'
|
||||
|
||||
[git_status]
|
||||
style = "bg:#394260"
|
||||
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:#212736"
|
||||
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:#212736"
|
||||
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
|
||||
|
||||
[golang]
|
||||
symbol = "ﳑ"
|
||||
style = "bg:#212736"
|
||||
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
|
||||
|
||||
[php]
|
||||
symbol = ""
|
||||
style = "bg:#212736"
|
||||
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%R" # Hour:Minute Format
|
||||
style = "bg:#1d2230"
|
||||
format = '[[ $time ](fg:#a0a9cb bg:#1d2230)]($style)'
|
||||
@@ -1,46 +0,0 @@
|
||||
[options]
|
||||
font = Hack Nerd Font Monoo 11
|
||||
font = DejaVu Sans Mono for Powerline 11
|
||||
|
||||
[colors]
|
||||
|
||||
[colors]
|
||||
|
||||
# special
|
||||
foreground = #98abb2
|
||||
foreground_bold = #98abb2
|
||||
cursor = #98abb2
|
||||
background = rgba(0,0,0,0.9)
|
||||
|
||||
# black
|
||||
color0 = #000000
|
||||
color8 = #0c0e14
|
||||
|
||||
# red
|
||||
color1 = #e84f4f
|
||||
color9 = #d23d3d
|
||||
|
||||
# green
|
||||
color2 = #00ffaf
|
||||
color10 = #237885
|
||||
|
||||
# yellow
|
||||
color3 = #ffbb24
|
||||
color11 = #f8ec09
|
||||
|
||||
# blue
|
||||
color4 = #007fff
|
||||
color12 = #00c4ff
|
||||
|
||||
# magenta
|
||||
color5 = #8c00fd
|
||||
color13 = #cd00df
|
||||
|
||||
# cyan
|
||||
color6 = #00e8b7
|
||||
color14 = #00d3a7
|
||||
|
||||
# white
|
||||
color7 = #98abb2
|
||||
color15 = #c0bfbc
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
--[[
|
||||
#=====================================================================================
|
||||
# Date : package-date
|
||||
# Author : Nicola Bicocchi
|
||||
# Version : package-version
|
||||
# License : Distributed under the terms of GNU GPL version 2 or later
|
||||
#======================================================================================
|
||||
# CONKY
|
||||
# For commands in conky.config section:
|
||||
# http://conky.sourceforge.net/config_settings.html
|
||||
#
|
||||
# For commands in conky.text section:
|
||||
# http://conky.sourceforge.net/variables.html
|
||||
#
|
||||
# A PDF with all variables is provided
|
||||
#=====================================================================================
|
||||
# FONTS
|
||||
# To avoid copyright infringements you will have to download
|
||||
# and install the fonts yourself sometimes.
|
||||
#=====================================================================================
|
||||
# GENERAL INFO ABOUT FONTS
|
||||
# Go and look for a nice font on sites like http://www.dafont.com/
|
||||
# Download and unzip - double click the font to install it (font-manager must be installed)
|
||||
# No font-manager then put fonts in ~/.fonts
|
||||
# Change the font name in the conky
|
||||
# The name can be known with a command in the terminal: fc-list | grep "part of name"
|
||||
# Change width and height of the conky according to font
|
||||
# Reboot your system or fc-cache -fv in terminal
|
||||
# Enjoy
|
||||
#=====================================================================================
|
||||
]]
|
||||
|
||||
conky.config = {
|
||||
|
||||
--Various settings
|
||||
|
||||
background = true, -- forked to background
|
||||
cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring.
|
||||
diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring.
|
||||
double_buffer = true, -- Use the Xdbe extension? (eliminates flicker)
|
||||
if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address
|
||||
net_avg_samples = 2, -- The number of samples to average for net data
|
||||
no_buffers = true, -- Subtract (file system) buffers from used memory?
|
||||
temperature_unit = 'celsius', -- fahrenheit or celsius
|
||||
text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256
|
||||
update_interval = 2, -- update interval
|
||||
imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song
|
||||
|
||||
|
||||
--Placement
|
||||
|
||||
alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
|
||||
-- middle_left,middle_middle,middle_right,none
|
||||
--Arch Duoscreen
|
||||
--gap_x = -1910,
|
||||
gap_x = 15, -- pixels between right or left border
|
||||
gap_y = 0, -- pixels between bottom or left border
|
||||
minimum_height = 1000, -- minimum height of window
|
||||
minimum_width = 500, -- minimum width of window
|
||||
maximum_width = 600, -- maximum width of window
|
||||
|
||||
--Graphical
|
||||
|
||||
border_inner_margin = 10, -- margin between border and text
|
||||
border_outer_margin = 10, -- margin between border and edge of window
|
||||
border_width = 0, -- border width in pixels
|
||||
default_bar_width = 0, -- default is 0 - full width
|
||||
default_bar_height = 25, -- default is 6
|
||||
default_gauge_height = 25, -- default is 25
|
||||
default_gauge_width = 0, -- default is 40
|
||||
default_graph_height = 80, -- default is 25
|
||||
default_graph_width = 0, -- default is 0 - full width
|
||||
default_shade_color = '#000000', -- default shading colour
|
||||
default_outline_color = '#000000', -- default outline colour
|
||||
draw_borders = false, -- draw borders around text
|
||||
draw_graph_borders = true, -- draw borders around graphs
|
||||
draw_shades = false, -- draw shades
|
||||
draw_outline = false, -- draw outline
|
||||
stippled_borders = 0, -- dashing the border
|
||||
|
||||
--Textual
|
||||
|
||||
extra_newline = false, -- extra newline at the end - for asesome's wiboxes
|
||||
format_human_readable = true, -- KiB, MiB rather then number of bytes
|
||||
font = 'Roboto Mono:size=15', -- font for complete conky unless in code defined
|
||||
max_text_width = 0, -- 0 will make sure line does not get broken if width too smal
|
||||
max_user_text = 16384, -- max text in conky default 16384
|
||||
override_utf8_locale = true, -- force UTF8 requires xft
|
||||
short_units = true, -- shorten units from KiB to k
|
||||
top_name_width = 21, -- width for $top name value default 15
|
||||
top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false.
|
||||
uppercase = false, -- uppercase or not
|
||||
use_spacer = 'none', -- adds spaces around certain objects to align - default none
|
||||
use_xft = true, -- xft font - anti-aliased font
|
||||
xftalpha = 1, -- alpha of the xft font - between 0-1
|
||||
|
||||
--Windows
|
||||
|
||||
own_window = true, -- create your own window to draw
|
||||
own_window_argb_value = 100, -- real transparency - composite manager required 0-255
|
||||
own_window_argb_visual = true, -- use ARGB - composite manager required
|
||||
own_window_colour = '#000000', -- set colour if own_window_transparent no
|
||||
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it
|
||||
own_window_transparent = false, -- if own_window_argb_visual is true sets background opacity 0%
|
||||
own_window_title = 'system_conky', -- set the name manually - default conky "hostname"
|
||||
own_window_type = 'normal', -- if own_window true options are: normal/override/dock/desktop/panel
|
||||
|
||||
|
||||
--Colours
|
||||
default_color = '#D9FFE2',
|
||||
color1 = '#FF0000',
|
||||
color2 = '#3E5570',
|
||||
color3 = '#CCCCCC',
|
||||
color4 = '#BBBBBB',
|
||||
color5 = '#C0FF00',
|
||||
color6 = '#FFFFFF',
|
||||
|
||||
--Signal Colours
|
||||
color7 = '#C0FF00', --green
|
||||
color8 = '#FFA726', --orange
|
||||
color9 = '#F1544B', --firebrick
|
||||
};
|
||||
|
||||
conky.text = [[
|
||||
${color6}${font Roboto:size=140}${alignc}${time %H}:${time %M}${font}
|
||||
|
||||
${color6}${font Roboto:size=25}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font}
|
||||
|
||||
${color5}${font Roboto:style=Bold:size=17}S Y S T E M ${hr 2}${font}
|
||||
${color6}Hostname:${color}${alignr}${nodename}
|
||||
${color6}OS:${color}${alignr}${texeci 3600 lsb_release -d | awk '{$1=""; print $0}'}
|
||||
${color6}Kernel:${color}${alignr}${kernel}
|
||||
${color6}Uptime:${color}${alignr}${uptime}
|
||||
${color6}Processes:${color}${alignr}${processes}
|
||||
|
||||
${color5}${font Roboto:style=Bold:size=17}C P U ${hr 2}${font}
|
||||
${color6}CPU Frequency:${color}${alignr}${freq}MHz
|
||||
${color6}CPU Temperature:${color}${alignr}${texeci 30 sensors | grep "Package id 0" | cut -d ':' -f 2 | cut -d '(' -f 1 | tr -d ' '}
|
||||
${color6}CPU Usage:${color}${alignr}${cpu}%
|
||||
${cpugraph cpu0}
|
||||
${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem%
|
||||
${color}${top name 1} ${alignr}${offset -75}${top pid 1}${alignr}${offset -45}${top cpu 1}${alignr}${top mem 1}
|
||||
${color}${top name 2} ${alignr}${offset -75}${top pid 2}${alignr}${offset -45}${top cpu 2}${alignr}${top mem 2}
|
||||
${color}${top name 3} ${alignr}${offset -75}${top pid 3}${alignr}${offset -45}${top cpu 3}${alignr}${top mem 3}
|
||||
|
||||
${color5}${font Roboto:style=Bold:size=17}M E M O R Y ${hr 2}${font}
|
||||
${color6}Swap Usage:${color}${alignr}${swap}/${swapmax}
|
||||
${color6}Memory Usage:${color}${alignr}${mem}/${memmax}
|
||||
${memgraph}
|
||||
${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem%
|
||||
${color}${top_mem name 1} ${alignr}${offset -75}${top_mem pid 1}${alignr}${offset -45}${top_mem cpu 1}${alignr}${top_mem mem 1}
|
||||
${color}${top_mem name 2} ${alignr}${offset -75}${top_mem pid 2}${alignr}${offset -45}${top_mem cpu 2}${alignr}${top_mem mem 2}
|
||||
${color}${top_mem name 3} ${alignr}${offset -75}${top_mem pid 3}${alignr}${offset -45}${top_mem cpu 3}${alignr}${top_mem mem 3}
|
||||
|
||||
${color5}${font Roboto:style=Bold:size=17}D I S K ${hr 2}${font}
|
||||
${color6}Disk Usage:${color}${alignr}${fs_used /}/${fs_size /}
|
||||
${color6}IO Read / Write:${color}${alignr}${diskio_read /dev/nvme0n1p2} / ${diskio_write /dev/nvme0n1p2}
|
||||
${diskiograph_read nvme0n1p2}
|
||||
${diskiograph_write nvme0n1p2}
|
||||
${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem%
|
||||
${color}${top_io name 1} ${alignr}${offset -75}${top_io pid 1}${alignr}${offset -45}${top_io cpu 1}${alignr}${top_io mem 1}
|
||||
${color}${top_io name 2} ${alignr}${offset -75}${top_io pid 2}${alignr}${offset -45}${top_io cpu 2}${alignr}${top_io mem 2}
|
||||
${color}${top_io name 3} ${alignr}${offset -75}${top_io pid 3}${alignr}${offset -45}${top_io cpu 3}${alignr}${top_io mem 3}
|
||||
|
||||
${color5}${font Roboto:style=Bold:size=17}N E T W O R K ${hr 2}${font}
|
||||
${color6}Default Gateway:${color}${alignr}${gw_ip}
|
||||
${color6}Internal IP Address:${color}${alignr}${addrs enp6s0}
|
||||
${color6}External IP Address:${color}${alignr}${texeci 3600 wget -q -O- https://ipecho.net/plain}
|
||||
${color6}Upload / Download Total:${color}${alignr}${totalup enp6s0} / ${totaldown enp6s0}
|
||||
${color6}Upload / Download Speed:${color}${alignr}${upspeed enp6s0} / ${downspeed enp6s0}
|
||||
${upspeedgraph enp6s0}
|
||||
${downspeedgraph enp6s0}
|
||||
]];
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/bin/sh
|
||||
# vim: ft=sh:ts=4:sw=4:et:ai:cin
|
||||
|
||||
conky_bin="conky"
|
||||
config_file=$(dirname $0)/"conky.conf"
|
||||
magic_id=$(md5sum "$config_file" | cut -c -12)
|
||||
toggle_mode="N"
|
||||
|
||||
usage() {
|
||||
echo "USAGE: $(basename $0) [-t] [-p]"
|
||||
}
|
||||
|
||||
start_conky() {
|
||||
"$conky_bin" --daemonize --quiet --config="$config_file" -- "$magic_id"
|
||||
return $?
|
||||
}
|
||||
|
||||
stop_conky() {
|
||||
pkill --signal kill --full "conky.*\s-- $magic_id"
|
||||
return $?
|
||||
}
|
||||
|
||||
toggle_conky() {
|
||||
if stop_conky; then
|
||||
true
|
||||
else
|
||||
start_conky
|
||||
fi
|
||||
}
|
||||
|
||||
restart_conky() {
|
||||
stop_conky
|
||||
sleep 1
|
||||
start_conky
|
||||
}
|
||||
|
||||
while getopts "tp:h" opt; do
|
||||
case $opt in
|
||||
t) # toggle mode on
|
||||
toggle_mode="Y"
|
||||
;;
|
||||
p) # path to conky binary
|
||||
conky_bin=$(realpath -- "$OPTARG")
|
||||
if [ -x "$conky_bin" ]; then
|
||||
echo "Conky binary path: ${conky_bin}"
|
||||
else
|
||||
echo "ERROR: ${conky_bin} is not executable, path to Conky binary needed\n" >&2
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
h) # help
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$((OPTIND - 1))"
|
||||
|
||||
if [ "$toggle_mode" == "Y" ]; then
|
||||
toggle_conky
|
||||
else
|
||||
restart_conky
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
18
config/.gitconfig
Normal file
18
config/.gitconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
[core]
|
||||
pager = delta
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[delta]
|
||||
navigate = true # use n and N to move between diff sections
|
||||
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
|
||||
|
||||
[merge]
|
||||
conflictstyle = diff3
|
||||
|
||||
[diff]
|
||||
colorMoved = default
|
||||
[user]
|
||||
email = tuan-dat.tran@tudattr.dev
|
||||
name = Tuan-Dat Tran
|
||||
@@ -1,18 +0,0 @@
|
||||
u:/home/tuan/Documents/Uni/Studium
|
||||
p:/home/tuan/Documents/Protokolle/FSE
|
||||
o:/home/tuan/.dotfiles/config
|
||||
m:/run/media/tuan
|
||||
a:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK
|
||||
l:/home/tuan/Local
|
||||
c:/home/tuan/Documents/CTF
|
||||
t:/home/tuan/Templates
|
||||
w:/home/tuan/workspace_l/home_lab/wiki
|
||||
k:/home/tuan/.syncthing/Documents/Uni/Studium/2022_Sommersemester/Bachelorprojekt/Implement EFCF based on libAFL/git/foundry/evm/src/executor
|
||||
q:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/02-gps
|
||||
':/home/tuan/.syncthing/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/03-demonstration_23-10-31/state 24-01-22/5g-uulm-network-monitoring
|
||||
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
||||
s:/home/tuan/Pictures/Screenshots
|
||||
v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible
|
||||
f:/home/tuan/Documents/Finanzen/Unternehmen/Rechnungen
|
||||
g:/home/tuan/workspace_l/home_lab
|
||||
r:/home/tuan/Documents/roam
|
||||
@@ -1,3 +0,0 @@
|
||||
#back-button, #forward-button, #page-action-buttons{
|
||||
display:none;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
[Install4F96D1932A9F858E]
|
||||
Default=2x4tnepw.default
|
||||
Locked=1
|
||||
|
||||
[Profile0]
|
||||
Name=default
|
||||
IsRelative=1
|
||||
Path=2x4tnepw.default
|
||||
Default=1
|
||||
|
||||
[General]
|
||||
StartWithLastProfile=1
|
||||
Version=2
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let filename = (date now | date format "%s")
|
||||
while 1 == 1 {
|
||||
(sudo tlp-stat -b | grep Charge | split column '=' | str trim ) | insert a (date now | date format "%s") | reject column1 | rename Charge Timestamp | to csv -n | str replace " \\[%\\]" "" |save -a $"$filename".csv;
|
||||
sleep 50ms;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let zellij_session_table = (zellij ls | lines);
|
||||
let zellij_session_count = ($zellij_session_table | length);
|
||||
|
||||
if $zellij_session_count == 0 {
|
||||
zellij
|
||||
} else if $zellij_session_count == 1 {
|
||||
zellij attach
|
||||
} else {
|
||||
let prompt = $" zellij sessions:
|
||||
|
||||
($zellij_session_table|table)
|
||||
|
||||
Choose session 0-($zellij_session_count - 1): ";
|
||||
|
||||
let user_input = (input $"($prompt)");
|
||||
|
||||
try {
|
||||
"Into Try"
|
||||
let user_input = ($user_input | into int);
|
||||
"Converted"
|
||||
$"User Input: ($user_input)";
|
||||
$"Threshold: 0-($zellij_session_count - 0)";
|
||||
$"UserInput in Threshold? (0 < $user_input or $user_input < $zellij_session_count - 1)"
|
||||
if (0 < $user_input or $user_input < $zellij_session_count - 1) {
|
||||
"Valid Input"
|
||||
let table_entry = ($zellij_session_table | select $user_input);
|
||||
zellij attach $table_entry;
|
||||
} else {
|
||||
"Invalid Input"
|
||||
zellij;
|
||||
}
|
||||
} catch {
|
||||
"Catch"
|
||||
zellij;
|
||||
}
|
||||
}
|
||||
@@ -1,606 +0,0 @@
|
||||
#! perl -w
|
||||
# Author: Bert Muennich
|
||||
# Website: http://www.github.com/muennich/urxvt-perls
|
||||
# License: GPLv2
|
||||
|
||||
# Use keyboard shortcuts to select and copy text.
|
||||
|
||||
# Usage: put the following lines in your .Xdefaults/.Xresources:
|
||||
# URxvt.perl-ext-common: ...,keyboard-select
|
||||
# URxvt.keysym.M-Escape: perl:keyboard-select:activate
|
||||
# The following line overwrites the default Meta-s binding and allows to
|
||||
# activate keyboard-select directly in backward search mode:
|
||||
# URxvt.keysym.M-s: perl:keyboard-select:search
|
||||
|
||||
# Use Meta-Escape to activate selection mode, then use the following keys:
|
||||
# h/j/k/l: Move cursor left/down/up/right (also with arrow keys)
|
||||
# g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys
|
||||
# '/'/?: Start forward/backward search
|
||||
# n/N: Repeat last search, N: in reverse direction
|
||||
# Ctrl-f/b: Scroll down/up one screen
|
||||
# Ctrl-d/u: Scroll down/up half a screen
|
||||
# v/V/Ctrl-v: Toggle normal/linewise/blockwise selection
|
||||
# y/Return: Copy selection to primary buffer, Return: quit afterwards
|
||||
# Y: Copy selected lines to primary buffer or cursor line and quit
|
||||
# q/Escape: Quit keyboard selection mode
|
||||
|
||||
# Options:
|
||||
# URxvt.keyboard-select.clipboard: If true, copy to clipboard too
|
||||
|
||||
|
||||
use strict;
|
||||
|
||||
sub on_start{
|
||||
my ($self) = @_;
|
||||
|
||||
$self->{clipboard} = $self->x_resource_boolean('keyboard-select.clipboard');
|
||||
|
||||
$self->{patterns}{'w'} = qr/\w[^\w\s]|\W\w|\s\S/;
|
||||
$self->{patterns}{'W'} = qr/\s\S/;
|
||||
$self->{patterns}{'b'} = qr/.*(?:\w[^\w\s]|\W\w|\s\S)/;
|
||||
$self->{patterns}{'B'} = qr/.*\s\S/;
|
||||
$self->{patterns}{'e'} = qr/[^\w\s](?=\w)|\w(?=\W)|\S(?=\s|$)/;
|
||||
$self->{patterns}{'E'} = qr/\S(?=\s|$)/;
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub on_action {
|
||||
my ($self, $action) = @_;
|
||||
|
||||
on_user_command($self, "keyboard-select:" . $action);
|
||||
}
|
||||
|
||||
|
||||
sub on_user_command {
|
||||
my ($self, $cmd) = @_;
|
||||
|
||||
if (not $self->{active}) {
|
||||
if ($cmd eq 'keyboard-select:activate') {
|
||||
activate($self);
|
||||
} elsif ($cmd eq 'keyboard-select:search') {
|
||||
activate($self, 1);
|
||||
}
|
||||
}
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub key_press {
|
||||
my ($self, $event, $keysym, $char) = @_;
|
||||
my $key = chr($keysym);
|
||||
|
||||
if (lc($key) eq 'c' && $event->{state} & urxvt::ControlMask) {
|
||||
deactivate($self);
|
||||
} elsif ($self->{search}) {
|
||||
if ($keysym == 0xff1b) {
|
||||
if ($self->{search_mode}) {
|
||||
deactivate($self);
|
||||
} else {
|
||||
$self->{search} = '';
|
||||
status_area($self);
|
||||
}
|
||||
} elsif ($keysym == 0xff08) {
|
||||
$self->{search} = substr($self->{search}, 0, -1);
|
||||
if (not $self->{search} and $self->{search_mode}) {
|
||||
deactivate($self);
|
||||
} else {
|
||||
status_area($self);
|
||||
}
|
||||
} elsif ($keysym == 0xff0d ||
|
||||
(lc($key) eq 'm' && $event->{state} & urxvt::ControlMask)) {
|
||||
my $txt = substr($self->{search}, 1);
|
||||
if ($txt) {
|
||||
$self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ :
|
||||
qr/\Q$txt\E/i;
|
||||
} elsif ($self->{pattern}) {
|
||||
delete $self->{pattern};
|
||||
}
|
||||
$self->{search} = '';
|
||||
$self->screen_cur($self->{srhcr}, $self->{srhcc});
|
||||
if (not find_next($self)) {
|
||||
if ($self->{search_mode}) {
|
||||
deactivate($self);
|
||||
} else {
|
||||
status_area($self);
|
||||
}
|
||||
}
|
||||
} elsif (length($char) > 0) {
|
||||
$self->{search} .= $self->locale_decode($char);
|
||||
my $txt = substr($self->{search}, 1);
|
||||
if ($txt) {
|
||||
$self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ :
|
||||
qr/\Q$txt\E/i;
|
||||
} elsif ($self->{pattern}) {
|
||||
delete $self->{pattern};
|
||||
}
|
||||
$self->screen_cur($self->{srhcr}, $self->{srhcc});
|
||||
find_next($self);
|
||||
status_area($self);
|
||||
}
|
||||
} elsif ($self->{move_to}) {
|
||||
if ($keysym == 0xff1b) {
|
||||
$self->{move_to} = 0;
|
||||
status_area($self);
|
||||
} elsif (length($char) > 0) {
|
||||
$self->{move_to} = 0;
|
||||
$self->{patterns}{'f-1'} = qr/^.*\Q$key\E/;
|
||||
$self->{patterns}{'f+1'} = qr/^.+?\Q$key\E/;
|
||||
move_to($self, ';');
|
||||
status_area($self);
|
||||
}
|
||||
} elsif ($keysym == 0xff1b || lc($key) eq 'q') {
|
||||
deactivate($self);
|
||||
} elsif (lc($key) eq 'y' || $keysym == 0xff0d ||
|
||||
(lc($key) eq 'm' && $event->{state} & urxvt::ControlMask)) {
|
||||
my $quit = 0;
|
||||
if ($key eq 'Y' && $self->{select} ne 'l') {
|
||||
$quit = !$self->{select};
|
||||
toggle_select($self, 'l');
|
||||
}
|
||||
if ($self->{select}) {
|
||||
my ($br, $bc, $er, $ec) = calc_span($self);
|
||||
$ec = $self->line($er)->l if $self->{select} eq 'l';
|
||||
$self->selection_beg($br, $bc);
|
||||
$self->selection_end($er, $ec);
|
||||
$self->selection_make($event->{time}, $self->{select} eq 'b');
|
||||
if ($self->{clipboard}) {
|
||||
$self->selection($self->selection(), 1);
|
||||
$self->selection_grab($event->{time}, 1);
|
||||
}
|
||||
if (lc($key) eq 'y') {
|
||||
$self->selection_beg(1, 0);
|
||||
$self->selection_end(1, 0);
|
||||
$self->{select} = '';
|
||||
status_area($self);
|
||||
$self->want_refresh();
|
||||
} else {
|
||||
$quit = 1;
|
||||
}
|
||||
}
|
||||
if ($quit) {
|
||||
deactivate($self);
|
||||
}
|
||||
} elsif ($key eq 'V') {
|
||||
toggle_select($self, 'l');
|
||||
} elsif ($key eq 'v') {
|
||||
if ($event->{state} & urxvt::ControlMask) {
|
||||
toggle_select($self, 'b');
|
||||
} else {
|
||||
toggle_select($self, 'n');
|
||||
}
|
||||
} elsif ($key eq 'k' || $keysym == 0xff52) {
|
||||
move_cursor($self, 'k');
|
||||
} elsif ($key eq 'j' || $keysym == 0xff54) {
|
||||
move_cursor($self, 'j');
|
||||
} elsif ($key eq 'h' || $keysym == 0xff51) {
|
||||
move_cursor($self, 'h');
|
||||
} elsif ($key eq 'l' || $keysym == 0xff53) {
|
||||
move_cursor($self, 'l');
|
||||
} elsif ($keysym == 0xff57) {
|
||||
move_cursor($self, '$');
|
||||
} elsif ($keysym == 0xff50) {
|
||||
move_cursor($self, '^');
|
||||
} elsif ('gG0^$HML' =~ m/\Q$key\E/ ||
|
||||
('fbdu' =~ m/\Q$key\E/ && $event->{state} & urxvt::ControlMask)) {
|
||||
move_cursor($self, $key);
|
||||
} elsif (lc($key) eq 'f') {
|
||||
$self->{move_to} = 1;
|
||||
$self->{move_dir} = $key eq 'F' ? -1 : 1;
|
||||
status_area($self, $key);
|
||||
} elsif (';,wWbBeE' =~ m/\Q$key\E/) {
|
||||
move_to($self, $key);
|
||||
} elsif ($key eq '/' || $key eq '?') {
|
||||
$self->{search} = $key;
|
||||
$self->{search_dir} = $key eq '?' ? -1 : 1;
|
||||
($self->{srhcr}, $self->{srhcc}) = $self->screen_cur();
|
||||
status_area($self);
|
||||
} elsif (lc($key) eq 'n') {
|
||||
find_next($self, $self->{search_dir} * ($key eq 'N' ? -1 : 1));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
sub move_cursor {
|
||||
my ($self, $key) = @_;
|
||||
my ($cr, $cc) = $self->screen_cur();
|
||||
my $line = $self->line($cr);
|
||||
|
||||
if ($key eq 'k' && $line->beg > $self->top_row) {
|
||||
$cr = $line->beg - 1;
|
||||
} elsif ($key eq 'j' && $line->end < $self->nrow - 1) {
|
||||
$cr = $line->end + 1;
|
||||
} elsif ($key eq 'h' && $self->{offset} > 0) {
|
||||
$self->{offset} = $line->offset_of($cr, $cc) - 1;
|
||||
$self->{dollar} = 0;
|
||||
} elsif ($key eq 'l' && $self->{offset} < $line->l - 1) {
|
||||
++$self->{offset};
|
||||
} elsif ($key eq 'f' || $key eq 'd') {
|
||||
my $vs = $self->view_start() +
|
||||
($key eq 'd' ? $self->nrow / 2 : $self->nrow - 1);
|
||||
$vs = 0 if $vs > 0;
|
||||
$cr += $vs - $self->view_start($vs);
|
||||
} elsif ($key eq 'b' || $key eq 'u') {
|
||||
my $vs = $self->view_start() -
|
||||
($key eq 'u' ? $self->nrow / 2 : $self->nrow - 1);
|
||||
$vs = $self->top_row if $vs < $self->top_row;
|
||||
$cr += $vs - $self->view_start($vs);
|
||||
} elsif ($key eq 'g') {
|
||||
($cr, $self->{offset}) = ($self->top_row, 0);
|
||||
$self->{dollar} = 0;
|
||||
} elsif ($key eq 'G') {
|
||||
($cr, $self->{offset}) = ($self->nrow - 1, 0);
|
||||
$self->{dollar} = 0;
|
||||
} elsif ($key eq '0') {
|
||||
$self->{offset} = 0;
|
||||
$self->{dollar} = 0;
|
||||
} elsif ($key eq '^') {
|
||||
my $ltxt = $self->special_decode($line->t);
|
||||
while ($ltxt =~ s/^( *)\t/$1 . " " x (8 - length($1) % 8)/e) {}
|
||||
$self->{offset} = $ltxt =~ m/^ +/ ? $+[0] : 0;
|
||||
$self->{dollar} = 0;
|
||||
} elsif ($key eq '$') {
|
||||
my $co = $line->offset_of($cr, $cc);
|
||||
$self->{dollar} = $co + 1;
|
||||
$self->{offset} = $line->l - 1;
|
||||
} elsif ($key eq 'H') {
|
||||
$cr = $self->view_start();
|
||||
} elsif ($key eq 'M') {
|
||||
$cr = $self->view_start() + $self->nrow / 2;
|
||||
} elsif ($key eq 'L') {
|
||||
$cr = $self->view_start() + $self->nrow - 1;
|
||||
}
|
||||
|
||||
$line = $self->line($cr);
|
||||
$cc = $self->{dollar} || $self->{offset} >= $line->l ? $line->l - 1 :
|
||||
$self->{offset};
|
||||
$self->screen_cur($line->coord_of($cc));
|
||||
|
||||
status_area($self);
|
||||
$self->want_refresh();
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub move_to {
|
||||
my ($self, $key) = @_;
|
||||
my ($cr, $cc) = $self->screen_cur();
|
||||
my $line = $self->line($cr);
|
||||
my $offset = $self->{offset};
|
||||
my ($dir, $pattern);
|
||||
my ($wrap, $found) = (0, 0);
|
||||
|
||||
if ($key eq ';' || $key eq ',') {
|
||||
$dir = $self->{move_dir} * ($key eq ',' ? -1 : 1);
|
||||
$pattern = $self->{patterns}{sprintf('f%+d', $dir)};
|
||||
return if not $pattern;
|
||||
} else {
|
||||
if (lc($key) eq 'b') {
|
||||
$dir = -1;
|
||||
} else {
|
||||
$dir = 1;
|
||||
++$offset if lc($key) eq 'e';
|
||||
}
|
||||
$pattern = $self->{patterns}{$key};
|
||||
$wrap = 1;
|
||||
}
|
||||
|
||||
if ($dir > 0) {
|
||||
NEXTDOWN: my $text = substr($line->t, $offset);
|
||||
if ($text =~ m/$pattern/) {
|
||||
$offset += $+[0] - 1;
|
||||
$found = 1;
|
||||
} elsif ($wrap && $line->end + 1 < $self->nrow) {
|
||||
$cr = $line->end + 1;
|
||||
$line = $self->line($cr);
|
||||
$offset = 0;
|
||||
if (lc($key) eq 'e') {
|
||||
goto NEXTDOWN;
|
||||
} else {
|
||||
$found = 1;
|
||||
}
|
||||
}
|
||||
} elsif ($dir < 0) {
|
||||
NEXTUP: my $text = substr($line->t, 0, $offset);
|
||||
if ($text =~ m/$pattern/) {
|
||||
$offset += $+[0] - length($text) - 1;
|
||||
$found = 1;
|
||||
} elsif ($wrap) {
|
||||
if ($offset > 0) {
|
||||
$offset = 0;
|
||||
$found = 1;
|
||||
} elsif ($line->beg > $self->top_row) {
|
||||
$cr = $line->beg - 1;
|
||||
$line = $self->line($cr);
|
||||
$offset = $line->l;
|
||||
goto NEXTUP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($found) {
|
||||
$self->{dollar} = 0;
|
||||
$self->{offset} = $offset;
|
||||
$self->screen_cur($line->coord_of($offset));
|
||||
$self->want_refresh();
|
||||
}
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub find_next {
|
||||
my ($self, $dir) = @_;
|
||||
|
||||
return if not $self->{pattern};
|
||||
$dir = $self->{search_dir} if not $dir;
|
||||
|
||||
my ($cr, $cc) = $self->screen_cur();
|
||||
my $line = $self->line($cr);
|
||||
my $offset = $line->offset_of($cr, $cc);
|
||||
my $text;
|
||||
my $found = 0;
|
||||
|
||||
++$offset if $dir > 0;
|
||||
|
||||
while (not $found) {
|
||||
if ($dir > 0) {
|
||||
$text = substr($line->t, $offset);
|
||||
if ($text =~ m/$self->{pattern}/) {
|
||||
$found = 1;
|
||||
$offset += $-[0];
|
||||
} else {
|
||||
last if $line->end >= $self->nrow;
|
||||
$line = $self->line($line->end + 1);
|
||||
$offset = 0;
|
||||
}
|
||||
} else {
|
||||
$text = substr($line->t, 0, $offset);
|
||||
if ($text =~ m/$self->{pattern}/) {
|
||||
$found = 1;
|
||||
$offset = $-[0] while $text =~ m/$self->{pattern}/g;
|
||||
} else {
|
||||
last if $line->beg <= $self->top_row;
|
||||
$line = $self->line($line->beg - 1);
|
||||
$offset = $line->l;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($found) {
|
||||
$self->{dollar} = 0;
|
||||
$self->{offset} = $offset;
|
||||
$self->screen_cur($line->coord_of($offset));
|
||||
status_area($self);
|
||||
$self->want_refresh();
|
||||
}
|
||||
|
||||
return $found;
|
||||
}
|
||||
|
||||
|
||||
sub tt_write {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
sub refresh {
|
||||
my ($self) = @_;
|
||||
my ($cr, $cc) = $self->screen_cur();
|
||||
|
||||
# scroll the current cursor position into visible area
|
||||
if ($cr < $self->view_start()) {
|
||||
$self->view_start($cr);
|
||||
} elsif ($cr >= $self->view_start() + $self->nrow) {
|
||||
$self->view_start($cr - $self->nrow + 1);
|
||||
}
|
||||
|
||||
if ($self->{select}) {
|
||||
my ($hl, $reverse_cursor);
|
||||
my ($br, $bc, $er, $ec) = calc_span($self);
|
||||
|
||||
if ($self->x_resource('highlightColor')) {
|
||||
$hl = urxvt::RS_Sel;
|
||||
$reverse_cursor = 0;
|
||||
} else {
|
||||
$hl = urxvt::RS_RVid;
|
||||
$reverse_cursor = $self->{select} ne 'l';
|
||||
}
|
||||
if ($self->{select} eq 'b') {
|
||||
my $co = $self->line($cr)->offset_of($cr, $cc);
|
||||
my $dollar = $self->{dollar} && $co >= $self->{dollar} - 1;
|
||||
|
||||
my $r = $br;
|
||||
while ($r <= $er) {
|
||||
my $line = $self->line($r);
|
||||
if ($bc < $line->l) {
|
||||
$ec = $line->l if $dollar;
|
||||
my ($br, $bc) = $line->coord_of($bc);
|
||||
my ($er, $ec) = $line->coord_of($ec <= $line->l ? $ec : $line->l);
|
||||
$self->scr_xor_span($br, $bc, $er, $ec, $hl);
|
||||
} elsif ($r == $cr) {
|
||||
$reverse_cursor = 0;
|
||||
}
|
||||
$r = $line->end + 1;
|
||||
}
|
||||
} else {
|
||||
$self->scr_xor_span($br, $bc, $er, $ec, $hl);
|
||||
}
|
||||
|
||||
if ($reverse_cursor) {
|
||||
# make the cursor visible again
|
||||
$self->scr_xor_span($cr, $cc, $cr, $cc + 1, $hl);
|
||||
}
|
||||
}
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub activate {
|
||||
my ($self, $search) = @_;
|
||||
|
||||
$self->{active} = 1;
|
||||
|
||||
$self->{select} = '';
|
||||
$self->{dollar} = 0;
|
||||
$self->{move_to} = 0;
|
||||
|
||||
if ($search) {
|
||||
$self->{search} = '?';
|
||||
$self->{search_dir} = -1;
|
||||
$self->{search_mode} = 1;
|
||||
} else {
|
||||
$self->{search} = '';
|
||||
$self->{search_mode} = 0;
|
||||
}
|
||||
|
||||
($self->{oldcr}, $self->{oldcc}) = $self->screen_cur();
|
||||
($self->{srhcr}, $self->{srhcc}) = $self->screen_cur();
|
||||
$self->{old_view_start} = $self->view_start();
|
||||
$self->{old_pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE);
|
||||
|
||||
my $line = $self->line($self->{oldcr});
|
||||
$self->{offset} = $line->offset_of($self->{oldcr}, $self->{oldcc});
|
||||
|
||||
$self->selection_beg(1, 0);
|
||||
$self->selection_end(1, 0);
|
||||
|
||||
$self->enable(
|
||||
key_press => \&key_press,
|
||||
refresh_begin => \&refresh,
|
||||
refresh_end => \&refresh,
|
||||
tt_write => \&tt_write,
|
||||
);
|
||||
|
||||
if ($self->{offset} >= $line->l) {
|
||||
$self->{offset} = $line->l > 0 ? $line->l - 1 : 0;
|
||||
$self->screen_cur($line->coord_of($self->{offset}));
|
||||
$self->want_refresh();
|
||||
}
|
||||
|
||||
$self->{overlay_len} = 0;
|
||||
status_area($self);
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub deactivate {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->selection_beg(1, 0);
|
||||
$self->selection_end(1, 0);
|
||||
|
||||
delete $self->{overlay} if $self->{overlay};
|
||||
|
||||
$self->disable("key_press", "refresh_begin", "refresh_end", "tt_write");
|
||||
$self->screen_cur($self->{oldcr}, $self->{oldcc});
|
||||
$self->view_start($self->{old_view_start});
|
||||
$self->pty_ev_events($self->{old_pty_ev_events});
|
||||
|
||||
$self->want_refresh();
|
||||
|
||||
$self->{active} = 0;
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub status_area {
|
||||
my ($self, $extra) = @_;
|
||||
my ($stat, $stat_len);
|
||||
|
||||
if ($self->{search}) {
|
||||
$stat_len = $self->ncol;
|
||||
$stat = $self->{search} . ' ' x ($stat_len - length($self->{search}));
|
||||
} else {
|
||||
if ($self->{select}) {
|
||||
$stat = "-V" . ($self->{select} ne 'n' ? uc($self->{select}) : "") . "- ";
|
||||
}
|
||||
|
||||
if ($self->top_row == 0) {
|
||||
$stat .= "All";
|
||||
} elsif ($self->view_start() == $self->top_row) {
|
||||
$stat .= "Top";
|
||||
} elsif ($self->view_start() == 0) {
|
||||
$stat .= "Bot";
|
||||
} else {
|
||||
$stat .= sprintf("%2d%%",
|
||||
($self->top_row - $self->view_start) * 100 / $self->top_row);
|
||||
}
|
||||
|
||||
$stat = "$extra $stat" if $extra;
|
||||
$stat_len = length($stat);
|
||||
}
|
||||
|
||||
if (!$self->{overlay} || $self->{overlay_len} != $stat_len) {
|
||||
delete $self->{overlay} if $self->{overlay};
|
||||
$self->{overlay} = $self->overlay(-1, -1, $stat_len, 1,
|
||||
urxvt::OVERLAY_RSTYLE, 0);
|
||||
$self->{overlay_len} = $stat_len;
|
||||
}
|
||||
|
||||
$self->{overlay}->set(0, 0, $self->special_encode($stat));
|
||||
$self->{overlay}->show();
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub toggle_select {
|
||||
my ($self, $mode) = @_;
|
||||
|
||||
if ($self->{select} eq $mode) {
|
||||
$self->{select} = '';
|
||||
} else {
|
||||
if (not $self->{select}) {
|
||||
($self->{ar}, $self->{ac}) = $self->screen_cur();
|
||||
}
|
||||
$self->{select} = $mode;
|
||||
}
|
||||
|
||||
status_area($self);
|
||||
$self->want_refresh();
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub calc_span {
|
||||
my ($self) = @_;
|
||||
my ($cr, $cc) = $self->screen_cur();
|
||||
my ($br, $bc, $er, $ec);
|
||||
|
||||
if ($self->{select} eq 'b') {
|
||||
$br = $self->line($cr)->beg;
|
||||
$bc = $self->line($cr)->offset_of($cr, $cc);
|
||||
$er = $self->line($self->{ar})->beg;
|
||||
$ec = $self->line($self->{ar})->offset_of($self->{ar}, $self->{ac});
|
||||
($br, $er) = ($er, $br) if $br > $er;
|
||||
($bc, $ec) = ($ec, $bc) if $bc > $ec;
|
||||
} else {
|
||||
if ($cr < $self->{ar}) {
|
||||
($br, $bc, $er, $ec) = ($cr, $cc, $self->{ar}, $self->{ac});
|
||||
} elsif ($cr > $self->{ar}) {
|
||||
($br, $bc, $er, $ec) = ($self->{ar}, $self->{ac}, $cr, $cc);
|
||||
} else {
|
||||
($br, $er) = ($cr, $cr);
|
||||
($bc, $ec) = $cc < $self->{ac} ? ($cc, $self->{ac}) : ($self->{ac}, $cc);
|
||||
}
|
||||
}
|
||||
|
||||
if ($self->{select} eq 'l') {
|
||||
($br, $er) = ($self->line($br)->beg, $self->line($er)->end);
|
||||
($bc, $ec) = (0, $self->ncol);
|
||||
} else {
|
||||
++$ec;
|
||||
}
|
||||
|
||||
return ($br, $bc, $er, $ec);
|
||||
}
|
||||
Reference in New Issue
Block a user