add and move stuff
This commit is contained in:
22
bin/dmount
Executable file
22
bin/dmount
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
pgrep -x dmenu && exit
|
||||||
|
COLS="name,type,size,mountpoint"
|
||||||
|
|
||||||
|
drives="$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
|
||||||
|
|
||||||
|
[ -z "$drives" ] && exit 1
|
||||||
|
chosen="$(echo "$drives" | dmenu -i -p "What to mount?" | awk '{print $1}')"
|
||||||
|
[ -z "$chosen" ] && exit 1
|
||||||
|
sudo -A mount "$chosen" && notify-send "$chosen mounted on $(mount | grep $chosen | awk '{print $3}')" && exit 0
|
||||||
|
|
||||||
|
mp="$(find /mnt /media /home -type d -maxdepth 5 2>/dev/null | dmenu -i -p "Type in mount point")"
|
||||||
|
[ "$mp" = "" ] && exit 1
|
||||||
|
|
||||||
|
if [ ! -d "$mp" ]; then
|
||||||
|
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?")
|
||||||
|
[ "$mkdiryn" = "Yes" ] && sudo -A mkdir -p "$mp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo -A mount "$chosen" "$mp" && notify-send "$chosen mounted to $mp"
|
||||||
|
|
||||||
10
bin/dumount
Executable file
10
bin/dumount
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
COLS="name,type,size,mountpoint"
|
||||||
|
|
||||||
|
drives=$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4!~/boot|home|SWAP/&&length($4)>1{printf "%s (%s) on %s\n",$1,$3,$4}')
|
||||||
|
[ -z "$drives" ] && exit
|
||||||
|
chosen=$(echo "$drives" | dmenu -i -p "Which drive?" | awk '{print $1}')
|
||||||
|
[ -z "$chosen" ] && exit
|
||||||
|
sudo -A umount "$chosen" && notify-send "$chosen unmounted"
|
||||||
|
|
||||||
12
bin/wtk_connect-vpn
Executable file
12
bin/wtk_connect-vpn
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
#if [[ -d $HOME/Projects/WTK/vpn/SimonStuderCISLab/ ]]; then
|
||||||
|
# cd $HOME/Projects/WTK/vpn/SimonStuderCISLab/
|
||||||
|
#elif [[ -d $HOME/WTK/VPNs/SimonStuderCISLab/ ]]; then
|
||||||
|
# cd $HOME/WTK/VPNs/SimonStuderCISLab/
|
||||||
|
#fi
|
||||||
|
|
||||||
|
#sudo openvpn --config CISLab.ovpn --float --script-security 2 --up /etc/openvpn/update-resolv-conf --down /etc/openvpn/update-resolv-conf --down-pre
|
||||||
|
|
||||||
|
sudo openfortivpn vpn.cislabs.ch:4004 -u simon.studer
|
||||||
|
|
||||||
22
config/alacritty/alacritty.toml
Normal file
22
config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
[env]
|
||||||
|
TERM = "alacritty"
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 11.0
|
||||||
|
|
||||||
|
[font.glyph_offset]
|
||||||
|
x = 0
|
||||||
|
y = 0
|
||||||
|
|
||||||
|
[font.italic]
|
||||||
|
style = "Italic"
|
||||||
|
|
||||||
|
[font.normal]
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[font.offset]
|
||||||
|
x = 0
|
||||||
|
y = 0
|
||||||
|
|
||||||
|
[window]
|
||||||
|
opacity = 0.95
|
||||||
436
config/dunst/dunstrc
Normal file
436
config/dunst/dunstrc
Normal file
@@ -0,0 +1,436 @@
|
|||||||
|
# See dunst(5) for all configuration options
|
||||||
|
|
||||||
|
[global]
|
||||||
|
### Display ###
|
||||||
|
|
||||||
|
# Which monitor should the notifications be displayed on.
|
||||||
|
monitor = 0
|
||||||
|
|
||||||
|
# Display notification on focused monitor. Possible modes are:
|
||||||
|
# mouse: follow mouse pointer
|
||||||
|
# keyboard: follow window with keyboard focus
|
||||||
|
# none: don't follow anything
|
||||||
|
#
|
||||||
|
# "keyboard" needs a window manager that exports the
|
||||||
|
# _NET_ACTIVE_WINDOW property.
|
||||||
|
# This should be the case for almost all modern window managers.
|
||||||
|
#
|
||||||
|
# If this option is set to mouse or keyboard, the monitor option
|
||||||
|
# will be ignored.
|
||||||
|
follow = none
|
||||||
|
|
||||||
|
### Geometry ###
|
||||||
|
|
||||||
|
# dynamic width from 0 to 300
|
||||||
|
# width = (0, 300)
|
||||||
|
# constant width of 300
|
||||||
|
width = 300
|
||||||
|
|
||||||
|
# The maximum height of a single notification, excluding the frame.
|
||||||
|
height = 300
|
||||||
|
|
||||||
|
# Position the notification in the top right corner
|
||||||
|
origin = bottom-right
|
||||||
|
|
||||||
|
# Offset from the origin
|
||||||
|
offset = 30x40
|
||||||
|
|
||||||
|
# Scale factor. It is auto-detected if value is 0.
|
||||||
|
scale = 0
|
||||||
|
|
||||||
|
# Maximum number of notification (0 means no limit)
|
||||||
|
notification_limit = 5
|
||||||
|
|
||||||
|
### Progress bar ###
|
||||||
|
|
||||||
|
# Turn on the progress bar. It appears when a progress hint is passed with
|
||||||
|
# for example dunstify -h int:value:12
|
||||||
|
progress_bar = true
|
||||||
|
|
||||||
|
# Set the progress bar height. This includes the frame, so make sure
|
||||||
|
# it's at least twice as big as the frame width.
|
||||||
|
progress_bar_height = 10
|
||||||
|
|
||||||
|
# Set the frame width of the progress bar
|
||||||
|
progress_bar_frame_width = 1
|
||||||
|
|
||||||
|
# Set the minimum width for the progress bar
|
||||||
|
progress_bar_min_width = 150
|
||||||
|
|
||||||
|
# Set the maximum width for the progress bar
|
||||||
|
progress_bar_max_width = 300
|
||||||
|
|
||||||
|
|
||||||
|
# Show how many messages are currently hidden (because of
|
||||||
|
# notification_limit).
|
||||||
|
indicate_hidden = yes
|
||||||
|
|
||||||
|
# The transparency of the window. Range: [0; 100].
|
||||||
|
# This option will only work if a compositing window manager is
|
||||||
|
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
|
||||||
|
transparency = 16
|
||||||
|
|
||||||
|
# Draw a line of "separator_height" pixel height between two
|
||||||
|
# notifications.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
separator_height = 2
|
||||||
|
|
||||||
|
# Padding between text and separator.
|
||||||
|
padding = 8
|
||||||
|
|
||||||
|
# Horizontal padding.
|
||||||
|
horizontal_padding = 8
|
||||||
|
|
||||||
|
# Padding between text and icon.
|
||||||
|
text_icon_padding = 0
|
||||||
|
|
||||||
|
# Defines width in pixels of frame around the notification window.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
frame_width = 1
|
||||||
|
|
||||||
|
# Defines color of the frame around the notification window.
|
||||||
|
frame_color = "#7f3fbf"
|
||||||
|
|
||||||
|
# Define a color for the separator.
|
||||||
|
# possible values are:
|
||||||
|
# * auto: dunst tries to find a color fitting to the background;
|
||||||
|
# * foreground: use the same color as the foreground;
|
||||||
|
# * frame: use the same color as the frame;
|
||||||
|
# * anything else will be interpreted as a X color.
|
||||||
|
separator_color = auto
|
||||||
|
|
||||||
|
# Sort messages by urgency.
|
||||||
|
sort = yes
|
||||||
|
|
||||||
|
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||||
|
# for longer than idle_threshold seconds.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
# A client can set the 'transient' hint to bypass this. See the rules
|
||||||
|
# section for how to disable this if necessary
|
||||||
|
idle_threshold = 0
|
||||||
|
|
||||||
|
### Text ###
|
||||||
|
|
||||||
|
font = Noto Sans Regular 9
|
||||||
|
|
||||||
|
# The spacing between lines. If the height is smaller than the
|
||||||
|
# font height, it will get raised to the font height.
|
||||||
|
line_height = 0
|
||||||
|
|
||||||
|
# Possible values are:
|
||||||
|
# full: Allow a small subset of html markup in notifications:
|
||||||
|
# <b>bold</b>
|
||||||
|
# <i>italic</i>
|
||||||
|
# <s>strikethrough</s>
|
||||||
|
# <u>underline</u>
|
||||||
|
#
|
||||||
|
# For a complete reference see
|
||||||
|
# <https://docs.gtk.org/Pango/pango_markup.html>.
|
||||||
|
#
|
||||||
|
# strip: This setting is provided for compatibility with some broken
|
||||||
|
# clients that send markup even though it's not enabled on the
|
||||||
|
# server. Dunst will try to strip the markup but the parsing is
|
||||||
|
# simplistic so using this option outside of matching rules for
|
||||||
|
# specific applications *IS GREATLY DISCOURAGED*.
|
||||||
|
#
|
||||||
|
# no: Disable markup parsing, incoming notifications will be treated as
|
||||||
|
# plain text. Dunst will not advertise that it has the body-markup
|
||||||
|
# capability if this is set as a global setting.
|
||||||
|
#
|
||||||
|
# It's important to note that markup inside the format option will be parsed
|
||||||
|
# regardless of what this is set to.
|
||||||
|
markup = full
|
||||||
|
|
||||||
|
# The format of the message. Possible variables are:
|
||||||
|
# %a appname
|
||||||
|
# %s summary
|
||||||
|
# %b body
|
||||||
|
# %i iconname (including its path)
|
||||||
|
# %I iconname (without its path)
|
||||||
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
|
# %n progress value if set without any extra characters
|
||||||
|
# %% Literal %
|
||||||
|
# Markup is allowed
|
||||||
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
|
# Alignment of message text.
|
||||||
|
# Possible values are "left", "center" and "right".
|
||||||
|
alignment = left
|
||||||
|
|
||||||
|
# Vertical alignment of message text and icon.
|
||||||
|
# Possible values are "top", "center" and "bottom".
|
||||||
|
vertical_alignment = center
|
||||||
|
|
||||||
|
# Show age of message if message is older than show_age_threshold
|
||||||
|
# seconds.
|
||||||
|
# Set to -1 to disable.
|
||||||
|
show_age_threshold = 60
|
||||||
|
|
||||||
|
# Specify where to make an ellipsis in long lines.
|
||||||
|
# Possible values are "start", "middle" and "end".
|
||||||
|
ellipsize = middle
|
||||||
|
|
||||||
|
# Ignore newlines '\n' in notifications.
|
||||||
|
ignore_newline = no
|
||||||
|
|
||||||
|
# Stack together notifications with the same content
|
||||||
|
stack_duplicates = true
|
||||||
|
|
||||||
|
# Hide the count of stacked notifications with the same content
|
||||||
|
hide_duplicate_count = true
|
||||||
|
|
||||||
|
# Display indicators for URLs (U) and actions (A).
|
||||||
|
show_indicators = yes
|
||||||
|
|
||||||
|
### Icons ###
|
||||||
|
|
||||||
|
# Align icons left/right/off
|
||||||
|
icon_position = left
|
||||||
|
|
||||||
|
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||||
|
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||||
|
# max_icon_size takes precedence over this.
|
||||||
|
min_icon_size = 0
|
||||||
|
|
||||||
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
|
max_icon_size = 32
|
||||||
|
|
||||||
|
# Paths to default icons.
|
||||||
|
#icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||||
|
icon_path = /usr/share/icons/Qogir/16/status:/usr/share/icons/Qogir/16/devices/:/usr/share/icons/Qogir/24/panel/:/usr/share/icons/Qogir/16/apps/:/usr/share/pixmaps/
|
||||||
|
### History ###
|
||||||
|
|
||||||
|
# Should a notification popped up from history be sticky or timeout
|
||||||
|
# as if it would normally do.
|
||||||
|
sticky_history = false
|
||||||
|
|
||||||
|
# Maximum amount of notifications kept in history
|
||||||
|
history_length = 0
|
||||||
|
|
||||||
|
### Misc/Advanced ###
|
||||||
|
|
||||||
|
# dmenu path.
|
||||||
|
dmenu = /usr/bin/dmenu -p dunst:
|
||||||
|
|
||||||
|
# Browser for opening urls in context menu.
|
||||||
|
browser = /usr/bin/xdg-open
|
||||||
|
|
||||||
|
# Always run rule-defined scripts, even if the notification is suppressed
|
||||||
|
always_run_script = true
|
||||||
|
|
||||||
|
# Define the title of the windows spawned by dunst
|
||||||
|
title = Dunst
|
||||||
|
|
||||||
|
# Define the class of the windows spawned by dunst
|
||||||
|
class = Dunst
|
||||||
|
|
||||||
|
# Define the corner radius of the notification window
|
||||||
|
# in pixel size. If the radius is 0, you have no rounded
|
||||||
|
# corners.
|
||||||
|
# The radius will be automatically lowered if it exceeds half of the
|
||||||
|
# notification height to avoid clipping text and/or icons.
|
||||||
|
corner_radius = 7
|
||||||
|
|
||||||
|
# Ignore the dbus closeNotification message.
|
||||||
|
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||||
|
# parameter, an application may close the notification sent before the
|
||||||
|
# user defined timeout.
|
||||||
|
ignore_dbusclose = false
|
||||||
|
|
||||||
|
### Wayland ###
|
||||||
|
# These settings are Wayland-specific. They have no effect when using X11
|
||||||
|
|
||||||
|
# Uncomment this if you want to let notications appear under fullscreen
|
||||||
|
# applications (default: overlay)
|
||||||
|
# layer = top
|
||||||
|
|
||||||
|
# Set this to true to use X11 output on Wayland.
|
||||||
|
force_xwayland = false
|
||||||
|
|
||||||
|
### Legacy
|
||||||
|
|
||||||
|
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||||
|
# This setting is provided for compatibility with older nVidia drivers that
|
||||||
|
# do not support RandR and using it on systems that support RandR is highly
|
||||||
|
# discouraged.
|
||||||
|
#
|
||||||
|
# By enabling this setting dunst will not be able to detect when a monitor
|
||||||
|
# is connected or disconnected which might break follow mode if the screen
|
||||||
|
# layout changes.
|
||||||
|
force_xinerama = false
|
||||||
|
|
||||||
|
### mouse
|
||||||
|
|
||||||
|
# Defines list of actions for each mouse event
|
||||||
|
# Possible values are:
|
||||||
|
# * none: Don't do anything.
|
||||||
|
# * do_action: Invoke the action determined by the action_name rule. If there is no
|
||||||
|
# such action, open the context menu.
|
||||||
|
# * open_url: If the notification has exactly one url, open it. If there are multiple
|
||||||
|
# ones, open the context menu.
|
||||||
|
# * close_current: Close current notification.
|
||||||
|
# * close_all: Close all notifications.
|
||||||
|
# * context: Open context menu for the notification.
|
||||||
|
# * context_all: Open context menu for all notifications.
|
||||||
|
# These values can be strung together for each mouse event, and
|
||||||
|
# will be executed in sequence.
|
||||||
|
mouse_left_click = close_current
|
||||||
|
mouse_middle_click = do_action, close_current
|
||||||
|
mouse_right_click = close_all
|
||||||
|
|
||||||
|
# Experimental features that may or may not work correctly. Do not expect them
|
||||||
|
# to have a consistent behaviour across releases.
|
||||||
|
[experimental]
|
||||||
|
# Calculate the dpi to use on a per-monitor basis.
|
||||||
|
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||||
|
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||||
|
# using the resolution and physical size. This might be useful in setups
|
||||||
|
# where there are multiple screens with very different dpi values.
|
||||||
|
per_monitor_dpi = false
|
||||||
|
|
||||||
|
|
||||||
|
[urgency_low]
|
||||||
|
# IMPORTANT: colors have to be defined in quotation marks.
|
||||||
|
# Otherwise the "#" and following would be interpreted as a comment.
|
||||||
|
background = "#28143c"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with low urgency, uncomment to enable
|
||||||
|
icon = /usr/share/icons/Arc-X-D/status/16/dialog-information.png
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
background = "#28143c"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with normal urgency, uncomment to enable
|
||||||
|
icon = /usr/share/icons/Arc-X-D/status/16/dialog-question.png
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
background = "#28143c"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
frame_color = "#ff7f7f"
|
||||||
|
timeout = 120
|
||||||
|
# Icon for notifications with critical urgency, uncomment to enable
|
||||||
|
icon = /usr/share/icons/Arc-X-D/status/16/dialog-warning.png
|
||||||
|
|
||||||
|
# Every section that isn't one of the above is interpreted as a rules to
|
||||||
|
# override settings for certain messages.
|
||||||
|
#
|
||||||
|
# Messages can be matched by
|
||||||
|
# appname (discouraged, see desktop_entry)
|
||||||
|
# body
|
||||||
|
# category
|
||||||
|
# desktop_entry
|
||||||
|
# icon
|
||||||
|
# match_transient
|
||||||
|
# msg_urgency
|
||||||
|
# stack_tag
|
||||||
|
# summary
|
||||||
|
#
|
||||||
|
# and you can override the
|
||||||
|
# background
|
||||||
|
# foreground
|
||||||
|
# format
|
||||||
|
# frame_color
|
||||||
|
# fullscreen
|
||||||
|
# new_icon
|
||||||
|
# set_stack_tag
|
||||||
|
# set_transient
|
||||||
|
# set_category
|
||||||
|
# timeout
|
||||||
|
# urgency
|
||||||
|
# skip_display
|
||||||
|
# history_ignore
|
||||||
|
# action_name
|
||||||
|
# word_wrap
|
||||||
|
# ellipsize
|
||||||
|
# alignment
|
||||||
|
#
|
||||||
|
# Shell-like globing will get expanded.
|
||||||
|
#
|
||||||
|
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||||
|
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||||
|
# the desktop-entry won't get localized.
|
||||||
|
#
|
||||||
|
# SCRIPTING
|
||||||
|
# You can specify a script that gets run when the rule matches by
|
||||||
|
# setting the "script" option.
|
||||||
|
# The script will be called as follows:
|
||||||
|
# script appname summary body icon urgency
|
||||||
|
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||||
|
#
|
||||||
|
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||||
|
# to find fitting options for rules.
|
||||||
|
|
||||||
|
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||||
|
# client
|
||||||
|
#[transient_disable]
|
||||||
|
# match_transient = yes
|
||||||
|
# set_transient = no
|
||||||
|
#
|
||||||
|
# Make the handling of transient notifications more strict by making them not
|
||||||
|
# be placed in history.
|
||||||
|
#[transient_history_ignore]
|
||||||
|
# match_transient = yes
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
# fullscreen values
|
||||||
|
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||||
|
# delay: displays the new notification, if there is no fullscreen window active
|
||||||
|
# If the notification is already drawn, it won't get undrawn.
|
||||||
|
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||||
|
# withdrawn from screen again and will get delayed like a new notification
|
||||||
|
#[fullscreen_delay_everything]
|
||||||
|
# fullscreen = delay
|
||||||
|
#[fullscreen_show_critical]
|
||||||
|
# msg_urgency = critical
|
||||||
|
# fullscreen = show
|
||||||
|
|
||||||
|
#[espeak]
|
||||||
|
# summary = "*"
|
||||||
|
# script = dunst_espeak.sh
|
||||||
|
|
||||||
|
#[script-test]
|
||||||
|
# summary = "*script*"
|
||||||
|
# script = dunst_test.sh
|
||||||
|
|
||||||
|
#[ignore]
|
||||||
|
# # This notification will not be displayed
|
||||||
|
# summary = "foobar"
|
||||||
|
# skip_display = true
|
||||||
|
|
||||||
|
#[history-ignore]
|
||||||
|
# # This notification will not be saved in history
|
||||||
|
# summary = "foobar"
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
#[skip-display]
|
||||||
|
# # This notification will not be displayed, but will be included in the history
|
||||||
|
# summary = "foobar"
|
||||||
|
# skip_display = yes
|
||||||
|
|
||||||
|
#[signed_on]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = "*signed on*"
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[signed_off]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *signed off*
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[says]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *says*
|
||||||
|
# urgency = critical
|
||||||
|
#
|
||||||
|
#[twitter]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *twitter.com*
|
||||||
|
# urgency = normal
|
||||||
|
#
|
||||||
|
[stack-volumes]
|
||||||
|
appname = "some_volume_notifiers"
|
||||||
|
set_stack_tag = "volume"
|
||||||
|
#
|
||||||
|
# vim: ft=cfg
|
||||||
316
config/dunst/dunstrc_old
Normal file
316
config/dunst/dunstrc_old
Normal file
@@ -0,0 +1,316 @@
|
|||||||
|
[global]
|
||||||
|
|
||||||
|
title = Dunst
|
||||||
|
class = Dunst
|
||||||
|
|
||||||
|
frame_width = 1
|
||||||
|
frame_color = "#788388"
|
||||||
|
|
||||||
|
font = Noto Sans 10
|
||||||
|
|
||||||
|
# Allow a small subset of html markup:
|
||||||
|
# <b>bold</b>
|
||||||
|
# <i>italic</i>
|
||||||
|
# <s>strikethrough</s>
|
||||||
|
# <u>underline</u>
|
||||||
|
#
|
||||||
|
# For a complete reference see
|
||||||
|
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||||
|
# If markup is not allowed, those tags will be stripped out of the
|
||||||
|
# message.
|
||||||
|
markup = full
|
||||||
|
|
||||||
|
# The format of the message. Possible variables are:
|
||||||
|
# %a appname
|
||||||
|
# %s summary
|
||||||
|
# %b body
|
||||||
|
# %i iconname (including its path)
|
||||||
|
# %I iconname (without its path)
|
||||||
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
|
# Markup is allowed
|
||||||
|
format = "<b>%s</b> %p\n%b"
|
||||||
|
|
||||||
|
# Sort messages by urgency.
|
||||||
|
sort = yes
|
||||||
|
|
||||||
|
# Show how many messages are currently hidden (because of geometry).
|
||||||
|
indicate_hidden = yes
|
||||||
|
|
||||||
|
# Alignment of message text.
|
||||||
|
# Possible values are "left", "center" and "right".
|
||||||
|
alignment = left
|
||||||
|
|
||||||
|
# The frequency with wich text that is longer than the notification
|
||||||
|
# window allows bounces back and forth.
|
||||||
|
# This option conflicts with "word_wrap".
|
||||||
|
# Set to 0 to disable.
|
||||||
|
bounce_freq = 5
|
||||||
|
|
||||||
|
|
||||||
|
# Show age of message if message is older than show_age_threshold
|
||||||
|
# seconds.
|
||||||
|
# Set to -1 to disable.
|
||||||
|
show_age_threshold = 60
|
||||||
|
|
||||||
|
# Split notifications into multiple lines if they don't fit into
|
||||||
|
# geometry.
|
||||||
|
word_wrap = yes
|
||||||
|
|
||||||
|
ellipsize = middle
|
||||||
|
|
||||||
|
# Ignore newlines '\n' in notifications.
|
||||||
|
ignore_newline = no
|
||||||
|
|
||||||
|
stack_duplicates = true
|
||||||
|
hide_duplicate_count = false
|
||||||
|
|
||||||
|
# The geometry of the window:
|
||||||
|
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||||
|
# The geometry of the message window.
|
||||||
|
# The height is measured in number of notifications everything else
|
||||||
|
# in pixels. If the width is omitted but the height is given
|
||||||
|
# ("-geometry x2"), the message window expands over the whole screen
|
||||||
|
# (dmenu-like). If width is 0, the window expands to the longest
|
||||||
|
# message displayed. A positive x is measured from the left, a
|
||||||
|
# negative from the right side of the screen. Y is measured from
|
||||||
|
# the top and down respectevly.
|
||||||
|
# The width can be negative. In this case the actual width is the
|
||||||
|
# screen width minus the width defined in within the geometry option.
|
||||||
|
geometry = "0x4-25+25"
|
||||||
|
# geometry = "300x5-30+20
|
||||||
|
|
||||||
|
# Shrink window if it's smaller than the width. Will be ignored if
|
||||||
|
# width is 0.
|
||||||
|
shrink = yes
|
||||||
|
|
||||||
|
# The transparency of the window. Range: [0; 100].
|
||||||
|
# This option will only work if a compositing windowmanager is
|
||||||
|
# present (e.g. xcompmgr, compiz, etc.).
|
||||||
|
transparency = 15
|
||||||
|
|
||||||
|
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||||
|
# for longer than idle_threshold seconds.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
# default 120
|
||||||
|
idle_threshold = 120
|
||||||
|
|
||||||
|
# Which monitor should the notifications be displayed on.
|
||||||
|
monitor = 0
|
||||||
|
|
||||||
|
# Display notification on focused monitor. Possible modes are:
|
||||||
|
# mouse: follow mouse pointer
|
||||||
|
# keyboard: follow window with keyboard focus
|
||||||
|
# none: don't follow anything
|
||||||
|
#
|
||||||
|
# "keyboard" needs a windowmanager that exports the
|
||||||
|
# _NET_ACTIVE_WINDOW property.
|
||||||
|
# This should be the case for almost all modern windowmanagers.
|
||||||
|
#
|
||||||
|
# If this option is set to mouse or keyboard, the monitor option
|
||||||
|
# will be ignored.
|
||||||
|
follow = mouse
|
||||||
|
|
||||||
|
# Should a notification popped up from history be sticky or timeout
|
||||||
|
# as if it would normally do.
|
||||||
|
sticky_history = yes
|
||||||
|
|
||||||
|
# Maximum amount of notifications kept in history
|
||||||
|
history_length = 20
|
||||||
|
|
||||||
|
# Display indicators for URLs (U) and actions (A).
|
||||||
|
show_indicators = yes
|
||||||
|
|
||||||
|
# The height of a single line. If the height is smaller than the
|
||||||
|
# font height, it will get raised to the font height.
|
||||||
|
# This adds empty space above and under the text.
|
||||||
|
line_height = 0
|
||||||
|
|
||||||
|
# Draw a line of "separator_height" pixel height between two
|
||||||
|
# notifications.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
separator_height = 1
|
||||||
|
|
||||||
|
notification_height = 0
|
||||||
|
separator_height = 2
|
||||||
|
|
||||||
|
# Padding between text and separator.
|
||||||
|
# padding = 8
|
||||||
|
padding = 8
|
||||||
|
|
||||||
|
# Horizontal padding.
|
||||||
|
horizontal_padding = 8
|
||||||
|
|
||||||
|
# Define a color for the separator.
|
||||||
|
# possible values are:
|
||||||
|
# * auto: dunst tries to find a color fitting to the background;
|
||||||
|
# * foreground: use the same color as the foreground;
|
||||||
|
# * frame: use the same color as the frame;
|
||||||
|
# * anything else will be interpreted as a X color.
|
||||||
|
separator_color = #263238
|
||||||
|
|
||||||
|
# Print a notification on startup.
|
||||||
|
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||||
|
# automatically after a crash.
|
||||||
|
startup_notification = false
|
||||||
|
|
||||||
|
# dmenu path.
|
||||||
|
dmenu = /usr/bin/dmenu -p dunst:
|
||||||
|
|
||||||
|
# Browser for opening urls in context menu.
|
||||||
|
browser = brave
|
||||||
|
|
||||||
|
always_run_script = true
|
||||||
|
|
||||||
|
# Align icons left/right/off
|
||||||
|
icon_position = left
|
||||||
|
|
||||||
|
# Paths to default icons.
|
||||||
|
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/
|
||||||
|
|
||||||
|
# Limit icons size.
|
||||||
|
max_icon_size=128
|
||||||
|
|
||||||
|
[shortcuts]
|
||||||
|
|
||||||
|
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||||
|
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||||
|
# "mod3" and "mod4" (windows-key).
|
||||||
|
# Xev might be helpful to find names for keys.
|
||||||
|
|
||||||
|
# Close notification.
|
||||||
|
close = ctrl+space
|
||||||
|
|
||||||
|
# Close all notifications.
|
||||||
|
# close_all = ctrl+shift+space
|
||||||
|
close_all = ctrl+shift+space
|
||||||
|
|
||||||
|
# Redisplay last message(s).
|
||||||
|
# On the US keyboard layout "grave" is normally above TAB and left
|
||||||
|
# of "1".
|
||||||
|
history = ctrl+mod4+h
|
||||||
|
|
||||||
|
# Context menu.
|
||||||
|
context = ctrl+mod1+c
|
||||||
|
|
||||||
|
[urgency_low]
|
||||||
|
# IMPORTANT: colors have to be defined in quotation marks.
|
||||||
|
# Otherwise the "#" and following would be interpreted as a comment.
|
||||||
|
background = "#263238"
|
||||||
|
foreground = "#556064"
|
||||||
|
timeout = 10
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
background = "#263238"
|
||||||
|
foreground = "#F9FAF9"
|
||||||
|
timeout = 10
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
background = "#D62929"
|
||||||
|
foreground = "#F9FAF9"
|
||||||
|
timeout = 0
|
||||||
|
|
||||||
|
|
||||||
|
# Every section that isn't one of the above is interpreted as a rules to
|
||||||
|
# override settings for certain messages.
|
||||||
|
# Messages can be matched by "appname", "summary", "body", "icon", "category",
|
||||||
|
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
|
||||||
|
# "background", "new_icon" and "format".
|
||||||
|
# Shell-like globbing will get expanded.
|
||||||
|
#
|
||||||
|
# SCRIPTING
|
||||||
|
# You can specify a script that gets run when the rule matches by
|
||||||
|
# setting the "script" option.
|
||||||
|
# The script will be called as follows:
|
||||||
|
# script appname summary body icon urgency
|
||||||
|
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||||
|
#
|
||||||
|
# NOTE: if you don't want a notification to be displayed, set the format
|
||||||
|
# to "".
|
||||||
|
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||||
|
# to find fitting options for rules.
|
||||||
|
|
||||||
|
#[espeak]
|
||||||
|
# summary = "*"
|
||||||
|
# script = dunst_espeak.sh
|
||||||
|
|
||||||
|
#[script-test]
|
||||||
|
# summary = "*script*"
|
||||||
|
# script = dunst_test.sh
|
||||||
|
|
||||||
|
#[ignore]
|
||||||
|
# # This notification will not be displayed
|
||||||
|
# summary = "foobar"
|
||||||
|
# format = ""
|
||||||
|
|
||||||
|
#[signed_on]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = "*signed on*"
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[signed_off]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *signed off*
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[says]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *says*
|
||||||
|
# urgency = critical
|
||||||
|
#
|
||||||
|
#[twitter]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *twitter.com*
|
||||||
|
# urgency = normal
|
||||||
|
#
|
||||||
|
#[Claws Mail]
|
||||||
|
# appname = claws-mail
|
||||||
|
# category = email.arrived
|
||||||
|
# urgency = normal
|
||||||
|
# background = "#2F899E"
|
||||||
|
# foreground = "#FFA247"
|
||||||
|
#
|
||||||
|
#[mute.sh]
|
||||||
|
# appname = mute
|
||||||
|
# category = mute.sound
|
||||||
|
# script = mute.sh
|
||||||
|
#
|
||||||
|
#[JDownloader]
|
||||||
|
# appname = JDownloader
|
||||||
|
# category = JD
|
||||||
|
# background = "#FFA247"
|
||||||
|
# foreground = "#FFFFFF"
|
||||||
|
#
|
||||||
|
#[newsbeuter]
|
||||||
|
# summary = *Feeds*
|
||||||
|
# background = "#A8EB41"
|
||||||
|
# foreground = "#FFFFFF"
|
||||||
|
#
|
||||||
|
[irc]
|
||||||
|
appname = weechat
|
||||||
|
timeout = 0
|
||||||
|
background = "#0033bb"
|
||||||
|
foreground = "#dddddd"
|
||||||
|
#
|
||||||
|
[weechat hl]
|
||||||
|
appname = weechat
|
||||||
|
category = weechat.HL
|
||||||
|
background = "#FF5C47"
|
||||||
|
foreground = "#FFFFFF"
|
||||||
|
#
|
||||||
|
[weechat pn]
|
||||||
|
appname = weechat
|
||||||
|
category = weechat.PM
|
||||||
|
background = "#D53B84"
|
||||||
|
foreground = "#FFFFFF"
|
||||||
|
#
|
||||||
|
#[CMUS]
|
||||||
|
# appname = CMUS
|
||||||
|
# category = cmus
|
||||||
|
# background = "#6C4AB7"
|
||||||
|
# foreground = "#FFE756"
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# background = "#30AB70"
|
||||||
|
# foreground = "#F67245"
|
||||||
|
#
|
||||||
|
# vim: ft=cfg
|
||||||
28
config/git/config
Normal file
28
config/git/config
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[diff]
|
||||||
|
tool = vimdiff
|
||||||
|
[difftool]
|
||||||
|
prompt = false
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
[http]
|
||||||
|
sslVerify = false
|
||||||
|
[alias]
|
||||||
|
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
|
||||||
|
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
||||||
|
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
|
||||||
|
a = add
|
||||||
|
c = commit -m
|
||||||
|
ca = commit -am
|
||||||
|
s = status
|
||||||
|
d = diff
|
||||||
|
co = checkout
|
||||||
|
col = checkout -
|
||||||
|
comaster = checkout master
|
||||||
|
comain = checkout main
|
||||||
|
com = checkout main
|
||||||
|
cod = checkout dev
|
||||||
|
nb = checkout -b
|
||||||
|
db = branch -d
|
||||||
|
[user]
|
||||||
|
email = s.studer.s@gmail.com
|
||||||
|
name = Simon Studer
|
||||||
605
config/i3/config
Normal file
605
config/i3/config
Normal file
@@ -0,0 +1,605 @@
|
|||||||
|
# exec --no-startup-id ~/set_once.sh
|
||||||
|
# This file is a modified version based on default i3-config-wizard config
|
||||||
|
# source is available here:
|
||||||
|
# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/etc/skel/.config/i3/config
|
||||||
|
# Maintainer: joekamprad [joekamprad //a_t// endeavouros.com]
|
||||||
|
# https://endeavouros.com
|
||||||
|
#
|
||||||
|
# iconic font icon search: https://fontawesome.com/v4.7/cheatsheet/
|
||||||
|
#
|
||||||
|
# --> to update this run the following command (will backup existing setup file)
|
||||||
|
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/etc/skel/.config/i3/config -P ~/.config/i3/
|
||||||
|
#
|
||||||
|
# Endeavouros-i3 config file
|
||||||
|
# Source for complete framework of our i3 config and theming here: https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||||
|
# EndeavourOS wiki holds some Information also: https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
|
||||||
|
# Please see http://i3wm.org/docs/userguide.html for the official i3 reference!
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# config starts here: #
|
||||||
|
#######################
|
||||||
|
|
||||||
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
|
# is used in the bar {} block below.
|
||||||
|
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||||
|
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||||
|
font pango: Noto Sans Regular 10
|
||||||
|
|
||||||
|
# set the mod key to the winkey:
|
||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
#####################
|
||||||
|
# workspace layout: #
|
||||||
|
#####################
|
||||||
|
|
||||||
|
# default i3 tiling mode:
|
||||||
|
workspace_layout default
|
||||||
|
|
||||||
|
# i3 stacking layout:
|
||||||
|
# Each window will be fullscreen and tabbed top to bottom.
|
||||||
|
#workspace_layout stacking
|
||||||
|
|
||||||
|
# i3 tabbed layout:
|
||||||
|
# Each new window will open fullscreen as a tab (left to right)
|
||||||
|
#workspace_layout tabbed
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# extra options for windows: #
|
||||||
|
##############################
|
||||||
|
|
||||||
|
#border indicator on windows:
|
||||||
|
new_window pixel 1
|
||||||
|
|
||||||
|
# thin borders
|
||||||
|
# hide_edge_borders both
|
||||||
|
|
||||||
|
# Set inner/outer gaps
|
||||||
|
gaps inner 2
|
||||||
|
gaps outer 4
|
||||||
|
|
||||||
|
# smart gaps
|
||||||
|
smart_gaps on
|
||||||
|
|
||||||
|
# smart borders
|
||||||
|
smart_borders on
|
||||||
|
|
||||||
|
# show window title bars (not officially supported with i3gaps)
|
||||||
|
#default_border normal
|
||||||
|
|
||||||
|
# window title alignment
|
||||||
|
#title_align center
|
||||||
|
|
||||||
|
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||||
|
floating_modifier $mod
|
||||||
|
|
||||||
|
# switch/iterate between workspaces
|
||||||
|
bindsym $mod+Tab workspace next
|
||||||
|
bindsym $mod+Shift+Tab workspace prev
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindcode $mod+10 workspace $ws1
|
||||||
|
bindcode $mod+11 workspace $ws2
|
||||||
|
bindcode $mod+12 workspace $ws3
|
||||||
|
bindcode $mod+13 workspace $ws4
|
||||||
|
bindcode $mod+14 workspace $ws5
|
||||||
|
bindcode $mod+15 workspace $ws6
|
||||||
|
bindcode $mod+16 workspace $ws7
|
||||||
|
bindcode $mod+17 workspace $ws8
|
||||||
|
bindcode $mod+18 workspace $ws9
|
||||||
|
bindcode $mod+19 workspace $ws10
|
||||||
|
|
||||||
|
# switch to workspace with numpad keys
|
||||||
|
bindcode $mod+87 workspace $ws1
|
||||||
|
bindcode $mod+88 workspace $ws2
|
||||||
|
bindcode $mod+89 workspace $ws3
|
||||||
|
bindcode $mod+83 workspace $ws4
|
||||||
|
bindcode $mod+84 workspace $ws5
|
||||||
|
bindcode $mod+85 workspace $ws6
|
||||||
|
bindcode $mod+79 workspace $ws7
|
||||||
|
bindcode $mod+80 workspace $ws8
|
||||||
|
bindcode $mod+81 workspace $ws9
|
||||||
|
bindcode $mod+90 workspace $ws10
|
||||||
|
|
||||||
|
# switch to workspace with numlock numpad keys
|
||||||
|
bindcode $mod+Mod2+87 workspace $ws1
|
||||||
|
bindcode $mod+Mod2+88 workspace $ws2
|
||||||
|
bindcode $mod+Mod2+89 workspace $ws3
|
||||||
|
bindcode $mod+Mod2+83 workspace $ws4
|
||||||
|
bindcode $mod+Mod2+84 workspace $ws5
|
||||||
|
bindcode $mod+Mod2+85 workspace $ws6
|
||||||
|
bindcode $mod+Mod2+79 workspace $ws7
|
||||||
|
bindcode $mod+Mod2+80 workspace $ws8
|
||||||
|
bindcode $mod+Mod2+81 workspace $ws9
|
||||||
|
bindcode $mod+Mod2+90 workspace $ws10
|
||||||
|
|
||||||
|
# move focused container to workspace
|
||||||
|
bindcode $mod+Shift+10 move container to workspace $ws1
|
||||||
|
bindcode $mod+Shift+11 move container to workspace $ws2
|
||||||
|
bindcode $mod+Shift+12 move container to workspace $ws3
|
||||||
|
bindcode $mod+Shift+13 move container to workspace $ws4
|
||||||
|
bindcode $mod+Shift+14 move container to workspace $ws5
|
||||||
|
bindcode $mod+Shift+15 move container to workspace $ws6
|
||||||
|
bindcode $mod+Shift+16 move container to workspace $ws7
|
||||||
|
bindcode $mod+Shift+17 move container to workspace $ws8
|
||||||
|
bindcode $mod+Shift+18 move container to workspace $ws9
|
||||||
|
bindcode $mod+Shift+19 move container to workspace $ws10
|
||||||
|
|
||||||
|
# move focused container to workspace with numpad keys
|
||||||
|
bindcode $mod+Shift+Mod2+87 move container to workspace $ws1
|
||||||
|
bindcode $mod+Shift+Mod2+88 move container to workspace $ws2
|
||||||
|
bindcode $mod+Shift+Mod2+89 move container to workspace $ws3
|
||||||
|
bindcode $mod+Shift+Mod2+83 move container to workspace $ws4
|
||||||
|
bindcode $mod+Shift+Mod2+84 move container to workspace $ws5
|
||||||
|
bindcode $mod+Shift+Mod2+85 move container to workspace $ws6
|
||||||
|
bindcode $mod+Shift+Mod2+79 move container to workspace $ws7
|
||||||
|
bindcode $mod+Shift+Mod2+80 move container to workspace $ws8
|
||||||
|
bindcode $mod+Shift+Mod2+81 move container to workspace $ws9
|
||||||
|
bindcode $mod+Shift+Mod2+90 move container to workspace $ws10
|
||||||
|
|
||||||
|
# move focused container to workspace with numpad keys
|
||||||
|
bindcode $mod+Shift+87 move container to workspace $ws1
|
||||||
|
bindcode $mod+Shift+88 move container to workspace $ws2
|
||||||
|
bindcode $mod+Shift+89 move container to workspace $ws3
|
||||||
|
bindcode $mod+Shift+83 move container to workspace $ws4
|
||||||
|
bindcode $mod+Shift+84 move container to workspace $ws5
|
||||||
|
bindcode $mod+Shift+85 move container to workspace $ws6
|
||||||
|
bindcode $mod+Shift+79 move container to workspace $ws7
|
||||||
|
bindcode $mod+Shift+80 move container to workspace $ws8
|
||||||
|
bindcode $mod+Shift+81 move container to workspace $ws9
|
||||||
|
bindcode $mod+Shift+90 move container to workspace $ws10
|
||||||
|
|
||||||
|
# resize window (you can also use the mouse for that):
|
||||||
|
#mode "resize" {
|
||||||
|
# These bindings trigger as soon as you enter the resize mode
|
||||||
|
# Pressing left will shrink the window's width.
|
||||||
|
# Pressing right will grow the window's width.
|
||||||
|
# Pressing up will shrink the window's height.
|
||||||
|
# Pressing down will grow the window's height.
|
||||||
|
# bindsym j resize shrink width 10 px or 10 ppt
|
||||||
|
# bindsym k resize grow height 10 px or 10 ppt
|
||||||
|
# bindsym l resize shrink height 10 px or 10 ppt
|
||||||
|
# bindsym ; resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# same bindings, but for the arrow keys
|
||||||
|
# bindsym Left resize shrink width 10 px or 10 ppt
|
||||||
|
# bindsym Down resize grow height 10 px or 10 ppt
|
||||||
|
# bindsym Up resize shrink height 10 px or 10 ppt
|
||||||
|
# bindsym Right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# back to normal: Enter or Escape
|
||||||
|
# bindsym Return mode "default"
|
||||||
|
# bindsym Escape mode "default"
|
||||||
|
#}
|
||||||
|
|
||||||
|
#bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# keybindings for different actions: #
|
||||||
|
######################################
|
||||||
|
|
||||||
|
# start a terminal
|
||||||
|
#bindsym $mod+Return exec --no-startup-id xfce4-terminal
|
||||||
|
bindsym $mod+Return exec --no-startup-id alacritty
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
# exit-menu
|
||||||
|
bindsym $mod+Shift+e exec --no-startup-id ~/.config/i3/scripts/powermenu
|
||||||
|
|
||||||
|
# Lock the system
|
||||||
|
# lock with a picture:
|
||||||
|
#bindsym $mod+l exec --no-startup-id i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
|
||||||
|
# lock by blurring the screen:
|
||||||
|
#bindsym $mod+l exec --no-startup-id ~/.config/i3/scripts/blur-lock
|
||||||
|
|
||||||
|
# reload the configuration file
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
|
||||||
|
# restart i3 inplace (preserves your layout/session, can be used to update i3)
|
||||||
|
bindsym $mod+Shift+r restart
|
||||||
|
|
||||||
|
# keybinding in fancy rofi (automated):
|
||||||
|
bindsym F1 exec --no-startup-id ~/.config/i3/scripts/keyhint-2
|
||||||
|
# alternative
|
||||||
|
# keybinding list in editor:
|
||||||
|
# bindsym $mod+F1 exec --no-startup-id xed ~/.config/i3/keybindings
|
||||||
|
|
||||||
|
# Backlight control
|
||||||
|
#bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||||
|
#bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||||
|
# Backlight setting using dunst osc
|
||||||
|
bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_up
|
||||||
|
bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_down
|
||||||
|
|
||||||
|
# change focus
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+l focus right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Left focus left
|
||||||
|
bindsym $mod+Down focus down
|
||||||
|
bindsym $mod+Up focus up
|
||||||
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
bindsym $mod+Shift+h move left
|
||||||
|
bindsym $mod+Shift+j move down
|
||||||
|
bindsym $mod+Shift+k move up
|
||||||
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Shift+Left move left
|
||||||
|
bindsym $mod+Shift+Down move down
|
||||||
|
bindsym $mod+Shift+Up move up
|
||||||
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
|
# split in horizontal orientation
|
||||||
|
bindsym $mod+Ctrl+h split h; exec notify-send 'tile horizontally'
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
bindsym $mod+Ctrl+v split v; exec notify-send 'tile horizontally'
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
|
# change focus between tiling / floating windows
|
||||||
|
bindsym $mod+space focus mode_toggle
|
||||||
|
|
||||||
|
# focus the parent container
|
||||||
|
bindsym $mod+q focus parent
|
||||||
|
|
||||||
|
# focus the child container
|
||||||
|
bindsym $mod+a focus child
|
||||||
|
|
||||||
|
# open new empty workspace
|
||||||
|
bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace
|
||||||
|
|
||||||
|
# Multimedia Keys
|
||||||
|
|
||||||
|
# volume
|
||||||
|
# use meta keys without showing osc
|
||||||
|
#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
|
||||||
|
#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
|
||||||
|
# use meta keys showing osc using dunst
|
||||||
|
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_up
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_down
|
||||||
|
|
||||||
|
# gradular volume control
|
||||||
|
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
|
||||||
|
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
|
||||||
|
|
||||||
|
# mute
|
||||||
|
#bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks
|
||||||
|
# use meta keys showing osc using dunst
|
||||||
|
bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_mute
|
||||||
|
|
||||||
|
# mic mute toggle
|
||||||
|
bindsym XF86AudioMicMute exec amixer sset Capture toggle
|
||||||
|
|
||||||
|
# audio control
|
||||||
|
bindsym XF86AudioPlay exec --no-startup-id playerctl play
|
||||||
|
bindsym XF86AudioPause exec --no-startup-id playerctl pause
|
||||||
|
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
||||||
|
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||||
|
|
||||||
|
# Redirect sound to headphones
|
||||||
|
bindsym $mod+p exec --no-startup-id /usr/local/bin/switch-audio-port
|
||||||
|
|
||||||
|
## App shortcuts
|
||||||
|
#bindsym $mod+w exec --no-startup-id /usr/bin/firefox
|
||||||
|
#bindsym $mod+n exec --no-startup-id /usr/bin/thunar
|
||||||
|
bindsym Print exec --no-startup-id scrot ~/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved to ~/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
||||||
|
|
||||||
|
# Power Profiles menu switcher (rofi)
|
||||||
|
bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# configuration for workspace behaviour: #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
# Define names for default workspaces for which we configure key bindings later on.
|
||||||
|
# We use variables to avoid repeating the names in multiple places.
|
||||||
|
set $ws1 "1"
|
||||||
|
set $ws2 "2"
|
||||||
|
set $ws3 "3"
|
||||||
|
set $ws4 "4"
|
||||||
|
set $ws5 "5"
|
||||||
|
set $ws6 "6"
|
||||||
|
set $ws7 "7"
|
||||||
|
set $ws8 "8"
|
||||||
|
set $ws9 "9"
|
||||||
|
set $ws10 "10"
|
||||||
|
|
||||||
|
# use workspaces on different displays:
|
||||||
|
# where you have to replace VGA-0/HDMI-0 with the names for your displays
|
||||||
|
# you can get from xrandr command
|
||||||
|
#workspace $ws1 output VGA-0
|
||||||
|
#workspace $ws2 output VGA-0
|
||||||
|
#workspace $ws3 output HDMI-0
|
||||||
|
#workspace $ws4 output HDMI-0
|
||||||
|
#workspace $ws5 output HDMI-0
|
||||||
|
|
||||||
|
# bind program to workspace and focus to them on startup:
|
||||||
|
#assign [class="Xfce4-terminal"] $ws1
|
||||||
|
#assign [class="(?i)firefox"] $ws2
|
||||||
|
#assign [class="Thunar"] $ws3
|
||||||
|
#assign [class="thunderbird"] $ws4
|
||||||
|
#assign [class="TelegramDesktop"] $ws5
|
||||||
|
|
||||||
|
# automatic set focus new window if it opens on another workspace than the current:
|
||||||
|
#for_window [class=Xfce4-terminal] focus
|
||||||
|
#for_window [class=(?i)firefox] focus
|
||||||
|
#for_window [class=Thunar] focus
|
||||||
|
#for_window [class=Thunderbird] focus
|
||||||
|
#for_window [class=TelegramDesktop] focus
|
||||||
|
|
||||||
|
##############
|
||||||
|
# compositor #
|
||||||
|
##############
|
||||||
|
|
||||||
|
# transparency
|
||||||
|
# uncomment one of them to be used
|
||||||
|
# options could need changes, related to used GPU and drivers.
|
||||||
|
# to find the right setting consult the archwiki or ask at the forum.
|
||||||
|
#
|
||||||
|
# xcompmgr: https://wiki.archlinux.org/title/Xcompmgr
|
||||||
|
# manpage: https://man.archlinux.org/man/xcompmgr.1.en
|
||||||
|
# install xcompmgr package to use it (yay -S xcompmgr)
|
||||||
|
#exec --no-startup-id xcompmgr -C -n &
|
||||||
|
# or an more specialized config like this:
|
||||||
|
#exec --no-startup-id xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
|
||||||
|
#
|
||||||
|
# or:
|
||||||
|
#
|
||||||
|
# picom: https://wiki.archlinux.org/title/Picom
|
||||||
|
# manpage: https://man.archlinux.org/man/picom.1.en
|
||||||
|
# The default configuration is available in /etc/xdg/picom.conf
|
||||||
|
# For modifications, it can be copied to ~/.config/picom/picom.conf or ~/.config/picom.conf
|
||||||
|
# install picom package (yay -S picom)
|
||||||
|
# start using default config
|
||||||
|
# exec_always --no-startup-id picom -b
|
||||||
|
#
|
||||||
|
# for custom config:
|
||||||
|
#exec_always --no-startup-id picom --config ~/.config/picom.conf
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# autostart applications/services on login: #
|
||||||
|
#############################################
|
||||||
|
|
||||||
|
#get auth work with polkit-gnome
|
||||||
|
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
|
||||||
|
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
||||||
|
# when second to i3 a DE is installed or mixed usage of i3 + xfce4 or GNOME
|
||||||
|
# in this cases better disable dex and use manual starting apps using xdg/autostart
|
||||||
|
# if enabled you should comment welcome app.
|
||||||
|
# https://github.com/jceb/dex
|
||||||
|
#exec --no-startup-id dex -a -s /etc/xdg/autostart/:~/.config/autostart/
|
||||||
|
exec --no-startup-id dex --autostart --environment i3
|
||||||
|
|
||||||
|
# start welcome app
|
||||||
|
#exec --no-startup-id sh /usr/share/endeavouros/scripts/welcome --startdelay=3
|
||||||
|
|
||||||
|
# num lock activated
|
||||||
|
#exec --no-startup-id numlockx on
|
||||||
|
|
||||||
|
# configure multiple keyboard layouts and hotkey to switch (Alt+CAPSLOCK in this example)
|
||||||
|
#exec --no-startup-id setxkbmap -layout 'us,sk' -variant altgr-intl,qwerty -option 'grp:alt_caps_toggle'
|
||||||
|
|
||||||
|
# start conky:
|
||||||
|
#exec_always --no-startup-id conky
|
||||||
|
|
||||||
|
# start a script to setup displays
|
||||||
|
# uncomment the next line, use arandr to setup displays and save the file as monitor:
|
||||||
|
exec --no-startup-id ~/.screenlayout/monitor.sh
|
||||||
|
|
||||||
|
# set wallpaper
|
||||||
|
# exec --no-startup-id sleep 2 && nitrogen --restore
|
||||||
|
exec --no-startup-id sleep 1 && feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png
|
||||||
|
|
||||||
|
# set powersavings for display:
|
||||||
|
exec --no-startup-id xset s 480 dpms 600 600 600
|
||||||
|
|
||||||
|
# disable power saving (for example if using xscreensaver)
|
||||||
|
#exec --no-startup-id xset -dpms
|
||||||
|
|
||||||
|
# use xautolock to use autosuspend rules for mobile devices
|
||||||
|
# https://wiki.archlinux.org/title/Session_lock#xautolock
|
||||||
|
#exec --no-startup-id xautolock -time 60 -locker "systemctl suspend"
|
||||||
|
|
||||||
|
|
||||||
|
# xscreensaver
|
||||||
|
# https://www.jwz.org/xscreensaver
|
||||||
|
#exec --no-startup-id xscreensaver --no-splash
|
||||||
|
|
||||||
|
# Desktop notifications
|
||||||
|
# dunst config used ~/.config/dunst/dunstrc
|
||||||
|
# set alternative config if needed:
|
||||||
|
#exec --no-startup-id /usr/bin/dunst --config ~/.config/dunst/dunstrc
|
||||||
|
# may need to run dbus-launch explicitly:
|
||||||
|
#exec --no-startup-id dbus-launch /usr/bin/dunst
|
||||||
|
exec --no-startup-id /usr/bin/dunst
|
||||||
|
# alternative if you installed aside with XFCE4:
|
||||||
|
# exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd &
|
||||||
|
|
||||||
|
# autotiling script
|
||||||
|
# https://github.com/nwg-piotr/autotiling
|
||||||
|
# `yay -S autotiling ;) (it is in AUR)
|
||||||
|
#exec_always --no-startup-id autotiling
|
||||||
|
|
||||||
|
# Autostart apps as you like
|
||||||
|
#exec --no-startup-id sleep 2 && xfce4-terminal
|
||||||
|
#exec --no-startup-id sleep 7 && firefox https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/force-knowledge.md
|
||||||
|
#exec --no-startup-id sleep 3 && thunar
|
||||||
|
|
||||||
|
###############
|
||||||
|
# system tray #
|
||||||
|
###############
|
||||||
|
# if you do not use dex: exec --no-startup-id dex --autostart --environment i3
|
||||||
|
# you need to have tray apps started manually one by one:
|
||||||
|
|
||||||
|
# start blueberry app for managing bluetooth devices from tray:
|
||||||
|
#exec --no-startup-id blueberry-tray
|
||||||
|
|
||||||
|
# networkmanager-applet
|
||||||
|
#exec --no-startup-id nm-applet
|
||||||
|
|
||||||
|
# clipman-applet
|
||||||
|
#exec --no-startup-id xfce4-clipman
|
||||||
|
|
||||||
|
##################
|
||||||
|
# floating rules #
|
||||||
|
##################
|
||||||
|
|
||||||
|
# set floating (nontiling) for apps needing it
|
||||||
|
for_window [class="Yad" instance="yad"] floating enable
|
||||||
|
for_window [class="Galculator" instance="galculator"] floating enable
|
||||||
|
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
|
||||||
|
|
||||||
|
# set floating (nontiling) for special apps
|
||||||
|
for_window [class="Xsane" instance="xsane"] floating enable
|
||||||
|
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
|
||||||
|
for_window [class="qt5ct" instance="qt5ct"] floating enable
|
||||||
|
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
|
||||||
|
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
||||||
|
for_window [class="Pamac-manager"] floating enable
|
||||||
|
for_window [window_role="About"] floating enable
|
||||||
|
|
||||||
|
# set border of floating window
|
||||||
|
for_window [class="urxvt"] border pixel 1
|
||||||
|
|
||||||
|
# set size of floating window
|
||||||
|
#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
|
||||||
|
#for_window [class=".*"] resize set 640 480 #to change size of all floating windows
|
||||||
|
|
||||||
|
# set position of floating window
|
||||||
|
#for_window [class=".*"] move position center
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# color settings for bar and windows #
|
||||||
|
######################################
|
||||||
|
|
||||||
|
# Define colors variables:
|
||||||
|
set $darkbluetrans #08052be6
|
||||||
|
set $darkblue #08052b
|
||||||
|
set $lightblue #5294e2
|
||||||
|
set $urgentred #e53935
|
||||||
|
set $white #ffffff
|
||||||
|
set $black #000000
|
||||||
|
set $purple #e345ff
|
||||||
|
set $darkgrey #383c4a
|
||||||
|
set $grey #b0b5bd
|
||||||
|
set $mediumgrey #8b8b8b
|
||||||
|
set $yellowbrown #e1b700
|
||||||
|
|
||||||
|
# define colors for windows:
|
||||||
|
#class border bground text indicator child_border
|
||||||
|
client.focused $lightblue $darkblue $white $mediumgrey $mediumgrey
|
||||||
|
client.unfocused $darkblue $darkblue $grey $darkgrey $darkgrey
|
||||||
|
client.focused_inactive $darkblue $darkblue $grey $black $black
|
||||||
|
client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# bar settings (input comes from i3blocks) #
|
||||||
|
############################################
|
||||||
|
|
||||||
|
# Start i3bar to display a workspace bar
|
||||||
|
# (plus the system information i3status finds out, if available)
|
||||||
|
bar {
|
||||||
|
font pango: Noto Sans Regular 10
|
||||||
|
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||||
|
position bottom
|
||||||
|
# i3bar_command i3bar --transparency
|
||||||
|
# it could be that you have no primary display set: set one (xrandr --output <output> --primary)
|
||||||
|
# reference: https://i3wm.org/docs/userguide.html#_tray_output
|
||||||
|
#tray_output primary
|
||||||
|
tray_padding 0
|
||||||
|
|
||||||
|
# When strip_workspace_numbers is set to yes,
|
||||||
|
# any workspace that has a name of the form
|
||||||
|
# “[n][:][NAME]” will display only the name.
|
||||||
|
strip_workspace_numbers yes
|
||||||
|
##strip_workspace_name no
|
||||||
|
|
||||||
|
colors {
|
||||||
|
separator $purple
|
||||||
|
background $darkgrey
|
||||||
|
statusline $white
|
||||||
|
# border bg txt indicator
|
||||||
|
focused_workspace $mediumgrey $grey $darkgrey $purple
|
||||||
|
active_workspace $lightblue $mediumgrey $darkgrey $purple
|
||||||
|
inactive_workspace $darkgrey $darkgrey $grey $purple
|
||||||
|
urgent_workspace $urgentred $urgentred $white $purple
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# you can add different bars for multidisplay setups on each display:
|
||||||
|
# set output HDMI-0 to the display you want the bar, --transparency can be set.
|
||||||
|
# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
|
||||||
|
# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
|
||||||
|
# #08052be6 --> e6=90%
|
||||||
|
|
||||||
|
# bar {
|
||||||
|
# font pango: Noto Sans Regular 10
|
||||||
|
# status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
|
||||||
|
# i3bar_command i3bar --transparency
|
||||||
|
# output HDMI-0
|
||||||
|
# position bottom
|
||||||
|
#
|
||||||
|
# When strip_workspace_numbers is set to yes,
|
||||||
|
# any workspace that has a name of the form
|
||||||
|
# “[n][:][NAME]” will display only the name.
|
||||||
|
#strip_workspace_numbers yes
|
||||||
|
##strip_workspace_name no
|
||||||
|
#
|
||||||
|
# colors {
|
||||||
|
# separator $purple
|
||||||
|
# background $darkbluetrans
|
||||||
|
# statusline $white
|
||||||
|
# border bg txt indicator
|
||||||
|
# focused_workspace $lighterblue $lighterblue $darkblue $purple
|
||||||
|
# active_workspace $lightdblue $lightdblue $darkblue $purple
|
||||||
|
# inactive_workspace $darkblue $darkblue $lightdblue $purple
|
||||||
|
# urgent_workspace $urgentred $urgentred $white $purple
|
||||||
|
# }
|
||||||
|
#}
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Application menu handled by rofi: #
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
## rofi bindings fancy application menu ($mod+d /F9 optional disabled)
|
||||||
|
|
||||||
|
bindsym $mod+d exec --no-startup-id rofi -modi drun -show drun \
|
||||||
|
-config ~/.config/rofi/rofidmenu.rasi
|
||||||
|
|
||||||
|
#bindsym F9 exec --no-startup-id rofi -modi drun -show drun \
|
||||||
|
# -config ~/.config/rofi/rofidmenu.rasi
|
||||||
|
|
||||||
|
## rofi bindings for window menu ($mod+t /F10 optional disabled)
|
||||||
|
|
||||||
|
bindsym $mod+t exec --no-startup-id rofi -show window \
|
||||||
|
-config ~/.config/rofi/rofidmenu.rasi
|
||||||
|
|
||||||
|
#bindsym F10 exec --no-startup-id rofi -show window \
|
||||||
|
# -config ~/.config/rofi/rofidmenu.rasi
|
||||||
|
|
||||||
|
## rofi bindings to manage clipboard (install rofi-greenclip from the AUR)
|
||||||
|
|
||||||
|
#exec --no-startup-id greenclip daemon>/dev/null
|
||||||
|
#bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \
|
||||||
|
# -config ~/.config/rofi/rofidmenu.rasi
|
||||||
|
|
||||||
|
# ranger
|
||||||
|
bindsym $mod+r exec --no-startup-id alacritty -e ranger
|
||||||
551
config/i3/config_old
Normal file
551
config/i3/config_old
Normal file
@@ -0,0 +1,551 @@
|
|||||||
|
# i3 config file (v4)
|
||||||
|
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
|
|
||||||
|
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
|
||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
# set default desktop layout (default is tiling)
|
||||||
|
# workspace_layout tabbed <stacking|tabbed>
|
||||||
|
|
||||||
|
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||||
|
default_border pixel 1
|
||||||
|
default_floating_border normal
|
||||||
|
|
||||||
|
# Hide borders
|
||||||
|
hide_edge_borders none
|
||||||
|
|
||||||
|
# change borders
|
||||||
|
#bindsym $mod+u border none
|
||||||
|
#bindsym $mod+y border pixel 1
|
||||||
|
#bindsym $mod+n border normal
|
||||||
|
|
||||||
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
|
# is used in the bar {} block below.
|
||||||
|
font xft:URWGothic-Book 11
|
||||||
|
|
||||||
|
# Use Mouse+$mod to drag floating windows
|
||||||
|
floating_modifier $mod
|
||||||
|
|
||||||
|
################################################################################################
|
||||||
|
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
|
||||||
|
################################################################################################
|
||||||
|
|
||||||
|
exec --no-startup-id volumeicon
|
||||||
|
bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
|
||||||
|
#exec --no-startup-id pulseaudio
|
||||||
|
#exec --no-startup-id pa-applet
|
||||||
|
#bindsym $mod+Ctrl+m exec pavucontrol
|
||||||
|
|
||||||
|
################################################################################################
|
||||||
|
|
||||||
|
# Screen brightness controls
|
||||||
|
# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
|
||||||
|
# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
|
||||||
|
|
||||||
|
# Start Applications
|
||||||
|
bindsym Print exec --no-startup-id i3-scrot
|
||||||
|
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w
|
||||||
|
bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s
|
||||||
|
|
||||||
|
focus_follows_mouse no
|
||||||
|
|
||||||
|
# change focus
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+l focus right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Left focus left
|
||||||
|
bindsym $mod+Down focus down
|
||||||
|
bindsym $mod+Up focus up
|
||||||
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
bindsym $mod+Shift+h move left
|
||||||
|
bindsym $mod+Shift+j move down
|
||||||
|
bindsym $mod+Shift+k move up
|
||||||
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Shift+Left move left
|
||||||
|
bindsym $mod+Shift+Down move down
|
||||||
|
bindsym $mod+Shift+Up move up
|
||||||
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
|
# workspace back and forth (with/without active container)
|
||||||
|
workspace_auto_back_and_forth yes
|
||||||
|
#bindsym $mod+b workspace back_and_forth
|
||||||
|
#bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
|
||||||
|
|
||||||
|
# split orientation
|
||||||
|
bindsym $mod+Ctrl+h split h;exec notify-send 'tile horizontally'
|
||||||
|
bindsym $mod+Ctrl+v split v;exec notify-send 'tile vertically'
|
||||||
|
#bindsym $mod+q split toggle
|
||||||
|
|
||||||
|
# toggle fullscreen mode for the focused container
|
||||||
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
|
# change focus between tiling / floating windows
|
||||||
|
bindsym $mod+space focus mode_toggle
|
||||||
|
|
||||||
|
# toggle sticky
|
||||||
|
bindsym $mod+Shift+s sticky toggle
|
||||||
|
|
||||||
|
# focus the parent container
|
||||||
|
bindsym $mod+q focus parent
|
||||||
|
# focus the child container
|
||||||
|
bindsym $mod+a focus child
|
||||||
|
|
||||||
|
# move the currently focused window to the scratchpad
|
||||||
|
bindsym $mod+Shift+minus move scratchpad
|
||||||
|
|
||||||
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||||
|
# If there are multiple scratchpad windows, this command cycles through them.
|
||||||
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
|
#navigate workspaces next / previous
|
||||||
|
bindsym $mod+Ctrl+Right workspace next
|
||||||
|
bindsym $mod+Ctrl+Left workspace prev
|
||||||
|
|
||||||
|
# Workspace names
|
||||||
|
# to display names or symbols instead of plain workspace numbers you can use
|
||||||
|
# something like: set $ws1 1:mail
|
||||||
|
# set $ws2 2:
|
||||||
|
set $ws1 "1"
|
||||||
|
set $ws2 "2"
|
||||||
|
set $ws3 "3"
|
||||||
|
set $ws4 "4"
|
||||||
|
set $ws5 "5"
|
||||||
|
set $ws6 "6"
|
||||||
|
set $ws7 "7"
|
||||||
|
set $ws8 "8"
|
||||||
|
set $ws9 "9"
|
||||||
|
set $ws0 "10"
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym $mod+1 workspace $ws1
|
||||||
|
bindsym $mod+2 workspace $ws2
|
||||||
|
bindsym $mod+3 workspace $ws3
|
||||||
|
bindsym $mod+4 workspace $ws4
|
||||||
|
bindsym $mod+5 workspace $ws5
|
||||||
|
bindsym $mod+6 workspace $ws6
|
||||||
|
bindsym $mod+7 workspace $ws7
|
||||||
|
bindsym $mod+8 workspace $ws8
|
||||||
|
bindsym $mod+9 workspace $ws9
|
||||||
|
bindsym $mod+0 workspace $ws0
|
||||||
|
|
||||||
|
# Move focused container to workspace
|
||||||
|
bindsym $mod+Ctrl+1 move container to workspace $ws1
|
||||||
|
bindsym $mod+Ctrl+2 move container to workspace $ws2
|
||||||
|
bindsym $mod+Ctrl+3 move container to workspace $ws3
|
||||||
|
bindsym $mod+Ctrl+4 move container to workspace $ws4
|
||||||
|
bindsym $mod+Ctrl+5 move container to workspace $ws5
|
||||||
|
bindsym $mod+Ctrl+6 move container to workspace $ws6
|
||||||
|
bindsym $mod+Ctrl+7 move container to workspace $ws7
|
||||||
|
bindsym $mod+Ctrl+8 move container to workspace $ws8
|
||||||
|
bindsym $mod+Ctrl+9 move container to workspace $ws9
|
||||||
|
bindsym $mod+Ctrl+0 move container to workspace $ws0
|
||||||
|
|
||||||
|
# Move to workspace with focused container
|
||||||
|
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
|
||||||
|
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
||||||
|
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
||||||
|
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
||||||
|
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
||||||
|
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
||||||
|
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
||||||
|
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||||
|
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||||||
|
bindsym $mod+Shift+0 move container to workspace $ws0; workspace $ws0
|
||||||
|
|
||||||
|
# Open applications on specific workspaces
|
||||||
|
# assign [class="Thunderbird"] $ws1
|
||||||
|
# assign [class="Pale moon"] $ws2
|
||||||
|
# assign [class="Pcmanfm"] $ws3
|
||||||
|
# assign [class="Skype"] $ws5
|
||||||
|
|
||||||
|
# Open specific applications in floating mode
|
||||||
|
for_window [title="alsamixer"] floating enable border pixel 1
|
||||||
|
for_window [class="calamares"] floating enable border normal
|
||||||
|
for_window [class="Clipgrab"] floating enable
|
||||||
|
for_window [title="File Transfer*"] floating enable
|
||||||
|
for_window [class="fpakman"] floating enable
|
||||||
|
for_window [class="Galculator"] floating enable border pixel 1
|
||||||
|
for_window [class="GParted"] floating enable border normal
|
||||||
|
for_window [title="i3_help"] floating enable sticky enable border normal
|
||||||
|
for_window [class="Lightdm-settings"] floating enable
|
||||||
|
for_window [class="Lxappearance"] floating enable sticky enable border normal
|
||||||
|
for_window [class="Manjaro-hello"] floating enable
|
||||||
|
for_window [class="Manjaro Settings Manager"] floating enable border normal
|
||||||
|
for_window [title="MuseScore: Play Panel"] floating enable
|
||||||
|
for_window [class="Nitrogen"] floating enable sticky enable border normal
|
||||||
|
for_window [class="Oblogout"] fullscreen enable
|
||||||
|
for_window [class="octopi"] floating enable
|
||||||
|
for_window [title="About Pale Moon"] floating enable
|
||||||
|
for_window [class="Pamac-manager"] floating enable
|
||||||
|
for_window [class="Pavucontrol"] floating enable
|
||||||
|
for_window [class="qt5ct"] floating enable sticky enable border normal
|
||||||
|
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
|
||||||
|
for_window [class="Simple-scan"] floating enable border normal
|
||||||
|
for_window [class="(?i)System-config-printer.py"] floating enable border normal
|
||||||
|
for_window [class="Skype"] floating enable border normal
|
||||||
|
for_window [class="Timeset-gui"] floating enable border normal
|
||||||
|
for_window [class="(?i)virtualbox"] floating enable border normal
|
||||||
|
for_window [class="Xfburn"] floating enable
|
||||||
|
|
||||||
|
# switch to workspace with urgent window automatically
|
||||||
|
for_window [urgent=latest] focus
|
||||||
|
|
||||||
|
# reload the configuration file
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
|
||||||
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
|
bindsym $mod+Shift+r restart
|
||||||
|
|
||||||
|
# exit i3 (logs you out of your X session)
|
||||||
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
|
# Set shut down, restart and locking features
|
||||||
|
bindsym $mod+F12 mode "$mode_system"
|
||||||
|
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
|
||||||
|
mode "$mode_system" {
|
||||||
|
bindsym l exec --no-startup-id i3exit lock, mode "default"
|
||||||
|
bindsym s exec --no-startup-id i3exit suspend, mode "default"
|
||||||
|
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
|
||||||
|
bindsym e exec --no-startup-id i3exit logout, mode "default"
|
||||||
|
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
|
||||||
|
bindsym r exec --no-startup-id i3exit reboot, mode "default"
|
||||||
|
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
|
||||||
|
|
||||||
|
# exit system mode: "Enter" or "Escape"
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Resize window (you can also use the mouse for that)
|
||||||
|
#bindsym $mod+r mode "resize"
|
||||||
|
mode "resize" {
|
||||||
|
# These bindings trigger as soon as you enter the resize mode
|
||||||
|
# Pressing left will shrink the window’s width.
|
||||||
|
# Pressing right will grow the window’s width.
|
||||||
|
# Pressing up will shrink the window’s height.
|
||||||
|
# Pressing down will grow the window’s height.
|
||||||
|
bindsym j resize shrink width 5 px or 5 ppt
|
||||||
|
bindsym k resize grow height 5 px or 5 ppt
|
||||||
|
bindsym l resize shrink height 5 px or 5 ppt
|
||||||
|
bindsym semicolon resize grow width 5 px or 5 ppt
|
||||||
|
|
||||||
|
# same bindings, but for the arrow keys
|
||||||
|
bindsym Left resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym Down resize grow height 10 px or 10 ppt
|
||||||
|
bindsym Up resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym Right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# exit resize mode: Enter or Escape
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Lock screen
|
||||||
|
bindsym $mod+Escape exec --no-startup-id blurlock
|
||||||
|
|
||||||
|
# Autostart applications
|
||||||
|
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
|
||||||
|
exec --no-startup-id manjaro-hello
|
||||||
|
exec --no-startup-id nm-applet
|
||||||
|
exec --no-startup-id xfce4-power-manager
|
||||||
|
exec --no-startup-id pamac-tray
|
||||||
|
exec --no-startup-id clipit
|
||||||
|
# exec --no-startup-id blueman-applet
|
||||||
|
# exec_always --no-startup-id sbxkb
|
||||||
|
exec --no-startup-id start_conky_maia
|
||||||
|
# exec --no-startup-id start_conky_green
|
||||||
|
exec --no-startup-id xautolock -time 20 -locker blurlock
|
||||||
|
exec_always --no-startup-id ff-theme-util
|
||||||
|
exec_always --no-startup-id fix_xcursor
|
||||||
|
|
||||||
|
# Color palette used for the terminal ( ~/.Xresources file )
|
||||||
|
# Colors are gathered based on the documentation:
|
||||||
|
# https://i3wm.org/docs/userguide.html#xresources
|
||||||
|
# Change the variable name at the place you want to match the color
|
||||||
|
# of your terminal like this:
|
||||||
|
# [example]
|
||||||
|
# If you want your bar to have the same background color as your
|
||||||
|
# terminal background change the line 362 from:
|
||||||
|
# background #14191D
|
||||||
|
# to:
|
||||||
|
# background $term_background
|
||||||
|
# Same logic applied to everything else.
|
||||||
|
set_from_resource $term_background background
|
||||||
|
set_from_resource $term_foreground foreground
|
||||||
|
set_from_resource $term_color0 color0
|
||||||
|
set_from_resource $term_color1 color1
|
||||||
|
set_from_resource $term_color2 color2
|
||||||
|
set_from_resource $term_color3 color3
|
||||||
|
set_from_resource $term_color4 color4
|
||||||
|
set_from_resource $term_color5 color5
|
||||||
|
set_from_resource $term_color6 color6
|
||||||
|
set_from_resource $term_color7 color7
|
||||||
|
set_from_resource $term_color8 color8
|
||||||
|
set_from_resource $term_color9 color9
|
||||||
|
set_from_resource $term_color10 color10
|
||||||
|
set_from_resource $term_color11 color11
|
||||||
|
set_from_resource $term_color12 color12
|
||||||
|
set_from_resource $term_color13 color13
|
||||||
|
set_from_resource $term_color14 color14
|
||||||
|
set_from_resource $term_color15 color15
|
||||||
|
|
||||||
|
# Start i3bar to display a workspace bar (plus the system information i3status if available)
|
||||||
|
bar {
|
||||||
|
i3bar_command i3bar
|
||||||
|
status_command i3status
|
||||||
|
position bottom
|
||||||
|
|
||||||
|
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
|
||||||
|
# tray_output primary
|
||||||
|
# tray_output eDP1
|
||||||
|
|
||||||
|
bindsym button4 nop
|
||||||
|
bindsym button5 nop
|
||||||
|
# font xft:URWGothic-Book 11
|
||||||
|
strip_workspace_numbers yes
|
||||||
|
|
||||||
|
colors {
|
||||||
|
background #222D31
|
||||||
|
statusline #F9FAF9
|
||||||
|
separator #454947
|
||||||
|
|
||||||
|
# border backgr. text
|
||||||
|
focused_workspace #F9FAF9 #16a085 #292F34
|
||||||
|
active_workspace #595B5B #353836 #FDF6E3
|
||||||
|
inactive_workspace #595B5B #222D31 #EEE8D5
|
||||||
|
binding_mode #16a085 #2C2C2C #F9FAF9
|
||||||
|
urgent_workspace #16a085 #FDF6E3 #E5201D
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# hide/unhide i3status bar
|
||||||
|
bindsym $mod+m bar mode toggle
|
||||||
|
|
||||||
|
# Theme colors
|
||||||
|
# class border backgr. text indic. child_border
|
||||||
|
client.focused #556064 #556064 #80FFF9 #FDF6E3
|
||||||
|
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
|
||||||
|
client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
|
||||||
|
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
|
||||||
|
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||||
|
|
||||||
|
client.background #2B2C2B
|
||||||
|
|
||||||
|
#############################
|
||||||
|
### settings for i3-gaps: ###
|
||||||
|
#############################
|
||||||
|
|
||||||
|
# Set inner/outer gaps
|
||||||
|
gaps inner 2
|
||||||
|
gaps outer 4
|
||||||
|
|
||||||
|
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
|
||||||
|
# gaps inner|outer current|all set|plus|minus <px>
|
||||||
|
# gaps inner all set 10
|
||||||
|
# gaps outer all plus 5
|
||||||
|
|
||||||
|
# Smart gaps (gaps used if only more than one container on the workspace)
|
||||||
|
smart_gaps on
|
||||||
|
|
||||||
|
# Smart borders (draw borders around container only if it is not the only container on this workspace)
|
||||||
|
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
|
||||||
|
smart_borders on
|
||||||
|
|
||||||
|
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
|
||||||
|
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||||
|
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||||
|
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||||
|
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||||
|
|
||||||
|
mode "$mode_gaps" {
|
||||||
|
bindsym o mode "$mode_gaps_outer"
|
||||||
|
bindsym i mode "$mode_gaps_inner"
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
mode "$mode_gaps_inner" {
|
||||||
|
bindsym plus gaps inner current plus 5
|
||||||
|
bindsym minus gaps inner current minus 5
|
||||||
|
bindsym 0 gaps inner current set 0
|
||||||
|
|
||||||
|
bindsym Shift+plus gaps inner all plus 5
|
||||||
|
bindsym Shift+minus gaps inner all minus 5
|
||||||
|
bindsym Shift+0 gaps inner all set 0
|
||||||
|
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
mode "$mode_gaps_outer" {
|
||||||
|
bindsym plus gaps outer current plus 5
|
||||||
|
bindsym minus gaps outer current minus 5
|
||||||
|
bindsym 0 gaps outer current set 0
|
||||||
|
|
||||||
|
bindsym Shift+plus gaps outer all plus 5
|
||||||
|
bindsym Shift+minus gaps outer all minus 5
|
||||||
|
bindsym Shift+0 gaps outer all set 0
|
||||||
|
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
# F1
|
||||||
|
|
||||||
|
# F2
|
||||||
|
bindsym $mod+F2 exec palemoon
|
||||||
|
|
||||||
|
# F3
|
||||||
|
bindsym $mod+F3 exec pcmanfm
|
||||||
|
#bindsym $mod+Shift+F3 exec $HOME/.config/ranger/ranger-launcher.sh
|
||||||
|
#bindsym $mod+Shift+F3 exec pcmanfm_pkexec
|
||||||
|
|
||||||
|
# F4
|
||||||
|
|
||||||
|
# F5
|
||||||
|
bindsym $mod+F5 exec terminal -e 'mocp'
|
||||||
|
|
||||||
|
# F6
|
||||||
|
|
||||||
|
# F7
|
||||||
|
|
||||||
|
# F8
|
||||||
|
|
||||||
|
# F9
|
||||||
|
|
||||||
|
# F10
|
||||||
|
|
||||||
|
# F11
|
||||||
|
|
||||||
|
# F12
|
||||||
|
# bindsym $mod+F12 mode "$mode_system"
|
||||||
|
|
||||||
|
# q
|
||||||
|
# kill focused window
|
||||||
|
bindsym $mod+Shift+q kill
|
||||||
|
# bindsym $mod+q split toggle
|
||||||
|
|
||||||
|
# w
|
||||||
|
# bindsym $mod+w layout tabbed
|
||||||
|
|
||||||
|
# e
|
||||||
|
# bindsym $mod+e layout toggle split
|
||||||
|
# exit i3 (logs you out of your X session)
|
||||||
|
# bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
|
# r
|
||||||
|
# ranger
|
||||||
|
bindsym $mod+r exec $HOME/.config/ranger/ranger-launcher.sh
|
||||||
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
|
# bindsym $mod+Shift+r restart
|
||||||
|
|
||||||
|
# t
|
||||||
|
bindsym $mod+t exec --no-startup-id pkill picom
|
||||||
|
bindsym $mod+Ctrl+t exec --no-startup-id picom -b
|
||||||
|
|
||||||
|
# z
|
||||||
|
# launch categorized menu
|
||||||
|
bindsym $mod+z exec --no-startup-id morc_menu
|
||||||
|
|
||||||
|
# u
|
||||||
|
|
||||||
|
# i
|
||||||
|
|
||||||
|
# o
|
||||||
|
|
||||||
|
# p
|
||||||
|
|
||||||
|
# ü
|
||||||
|
|
||||||
|
# a
|
||||||
|
# focus the parent container
|
||||||
|
# bindsym $mod+a focus parent
|
||||||
|
|
||||||
|
# s
|
||||||
|
# bindsym $mod+s layout stacking
|
||||||
|
# bindsym $mod+Shift+s sticky toggle
|
||||||
|
|
||||||
|
# d
|
||||||
|
# start program launcher
|
||||||
|
bindsym $mod+d exec --no-startup-id dmenu_recency
|
||||||
|
bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'"
|
||||||
|
|
||||||
|
# f
|
||||||
|
# bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
# g
|
||||||
|
|
||||||
|
# h
|
||||||
|
# bindsym $mod+h focus left
|
||||||
|
# bindsym $mod+Shift+h move left
|
||||||
|
# bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf # disabled for window moving
|
||||||
|
# bindsym $mod+Ctrl+h split h;exec notify-send 'tile horizontally'
|
||||||
|
|
||||||
|
# j
|
||||||
|
# bindsym $mod+j focus down
|
||||||
|
# bindsym $mod+Shift+j move down
|
||||||
|
|
||||||
|
# k
|
||||||
|
# bindsym $mod+k focus up
|
||||||
|
# bindsym $mod+Shift+k move up
|
||||||
|
|
||||||
|
# l
|
||||||
|
# bindsym $mod+l focus right
|
||||||
|
# bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
|
# ö
|
||||||
|
|
||||||
|
# y
|
||||||
|
|
||||||
|
# x
|
||||||
|
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
|
||||||
|
|
||||||
|
# c
|
||||||
|
# reload the configuration file
|
||||||
|
# bindsym $mod+Shift+c reload
|
||||||
|
|
||||||
|
# v
|
||||||
|
# bindsym $mod+Ctrl+v split v;exec notify-send 'tile vertically'
|
||||||
|
|
||||||
|
# b
|
||||||
|
# brave
|
||||||
|
bindsym $mod+b exec brave
|
||||||
|
|
||||||
|
# alternate browser
|
||||||
|
bindsym $mod+Shift+b exec palemoon
|
||||||
|
# bindsym $mod+Shift+b exec google-chrome-stable
|
||||||
|
|
||||||
|
bindsym $mod+Ctrl+b exec terminal -e 'bmenu'
|
||||||
|
|
||||||
|
# n
|
||||||
|
|
||||||
|
# m
|
||||||
|
# bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' # defined above
|
||||||
|
# bindsym $mod+m bar mode toggle
|
||||||
|
|
||||||
|
# ,
|
||||||
|
|
||||||
|
# .
|
||||||
|
|
||||||
|
# -
|
||||||
|
|
||||||
|
# Return
|
||||||
|
# start a terminal
|
||||||
|
bindsym $mod+Return exec alacritty
|
||||||
|
bindsym $mod+Shift+Return exec terminal
|
||||||
|
|
||||||
|
|
||||||
179
config/i3/i3blocks.conf
Normal file
179
config/i3/i3blocks.conf
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
# i3blocks config file changed for EndeavourOS-i3 setup
|
||||||
|
|
||||||
|
# source is available here:
|
||||||
|
# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/etc/skel/.config/i3/i3blocks.conf
|
||||||
|
# Maintainer: joekamprad [joekamprad //a_t// endeavouros.com]
|
||||||
|
# Former Visual Designer: Florent Valetti [@FLVAL EndeavourOS]
|
||||||
|
# created for i3wm setup on EndeavourOS
|
||||||
|
# https://endeavouros.com
|
||||||
|
|
||||||
|
# cheatsheet for icon fonts used on the block-bar:
|
||||||
|
# https://fontawesome.com/v4.7/cheatsheet/
|
||||||
|
|
||||||
|
# --> to update this run the following command:
|
||||||
|
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/etc/skel/.config/i3/i3blocks.conf -P ~/.config/i3/
|
||||||
|
|
||||||
|
# Please see man i3blocks for a complete reference!
|
||||||
|
# The man page is also hosted at http://vivien.github.io/i3blocks
|
||||||
|
|
||||||
|
|
||||||
|
# List of valid properties:
|
||||||
|
#
|
||||||
|
# align
|
||||||
|
# color
|
||||||
|
# command
|
||||||
|
# full_text
|
||||||
|
# instance
|
||||||
|
# interval
|
||||||
|
# label
|
||||||
|
# min_width
|
||||||
|
# name
|
||||||
|
# separator
|
||||||
|
# separator_block_width
|
||||||
|
# short_text
|
||||||
|
# signal
|
||||||
|
# urgent
|
||||||
|
|
||||||
|
# Global properties
|
||||||
|
#
|
||||||
|
# The top properties below are applied to every block, but can be overridden.
|
||||||
|
separator=false
|
||||||
|
markup=pango
|
||||||
|
|
||||||
|
#[Weather]
|
||||||
|
#command=~/.config/i3/scripts/openweather
|
||||||
|
# or:
|
||||||
|
#command=~/.config/i3/scripts/openweather-city
|
||||||
|
#interval=1800
|
||||||
|
#color=#7275b3
|
||||||
|
|
||||||
|
[terminal]
|
||||||
|
full_text=
|
||||||
|
color=#807dfe
|
||||||
|
command=i3-msg -q exec alacritty
|
||||||
|
|
||||||
|
[browser]
|
||||||
|
full_text=
|
||||||
|
color=#ff7f81
|
||||||
|
command=i3-msg -q exec brave
|
||||||
|
|
||||||
|
[files]
|
||||||
|
full_text=
|
||||||
|
color=#7f3fbf
|
||||||
|
command=i3-msg -q exec thunar ~/
|
||||||
|
|
||||||
|
#[mail]
|
||||||
|
#full_text=
|
||||||
|
#color=#dbcb75
|
||||||
|
#command=i3-msg -q exec thunderbird
|
||||||
|
|
||||||
|
[simple-2]
|
||||||
|
full_text=: :
|
||||||
|
color=#717171
|
||||||
|
|
||||||
|
# Disk usage
|
||||||
|
#
|
||||||
|
# The directory defaults to $HOME if the instance is not specified.
|
||||||
|
# The script may be called with a optional argument to set the alert
|
||||||
|
# (defaults to 10 for 10%).
|
||||||
|
[disk]
|
||||||
|
label=
|
||||||
|
instance=/
|
||||||
|
command=~/.config/i3/scripts/disk
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
# Memory usage
|
||||||
|
#
|
||||||
|
# The type defaults to "mem" if the instance is not specified.
|
||||||
|
[memory]
|
||||||
|
label=
|
||||||
|
command=~/.config/i3/scripts/memory
|
||||||
|
interval=2
|
||||||
|
|
||||||
|
[cpu_usage]
|
||||||
|
label=
|
||||||
|
command=~/.config/i3/scripts/cpu_usage
|
||||||
|
#min_width=CPU: 100.00%
|
||||||
|
interval=2
|
||||||
|
|
||||||
|
[CPU-temperature]
|
||||||
|
label=
|
||||||
|
command=~/.config/i3/scripts/temperature
|
||||||
|
interval=30
|
||||||
|
T_WARN=70
|
||||||
|
T_CRIT=90
|
||||||
|
#SENSOR_CHIP=""
|
||||||
|
# where SENSOR_CHIP can be find with sensors output
|
||||||
|
# can be used also for GPU temperature or other temperature sensors lm-sensors detects.
|
||||||
|
|
||||||
|
# showing name of connected network (enable for wifi use)
|
||||||
|
[net]
|
||||||
|
label=
|
||||||
|
command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')"
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
[bandwidth]
|
||||||
|
command=~/.config/i3/scripts/bandwidth2
|
||||||
|
interval=persist
|
||||||
|
|
||||||
|
# Battery indicator
|
||||||
|
[battery]
|
||||||
|
command=~/.config/i3/scripts/battery2
|
||||||
|
# for alternative battery script change to battery1
|
||||||
|
# change this to battery-pinebook-pro if you are running on pinebook-pro
|
||||||
|
label=
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
[simple-2]
|
||||||
|
full_text=: :
|
||||||
|
color=#717171
|
||||||
|
|
||||||
|
[pavucontrol]
|
||||||
|
full_text=
|
||||||
|
command=pavucontrol
|
||||||
|
|
||||||
|
[volume-pulseaudio]
|
||||||
|
command=~/.config/i3/scripts/volume
|
||||||
|
instance=Master
|
||||||
|
interval=1
|
||||||
|
|
||||||
|
# display keyboard layout name
|
||||||
|
# for keyboard layouts switcher
|
||||||
|
# see i3 config file
|
||||||
|
# this needs xkblayout-state installed from the AUR:
|
||||||
|
# https://aur.archlinux.org/packages/xkblayout-state-git
|
||||||
|
#[keyboard-layout]
|
||||||
|
#command=~/.config/i3/scripts/keyboard-layout
|
||||||
|
#interval=2
|
||||||
|
|
||||||
|
[keybindings]
|
||||||
|
full_text=
|
||||||
|
command=~/.config/i3/scripts/keyhint
|
||||||
|
|
||||||
|
# power-profiles-daemon implementation:
|
||||||
|
# needs package power-profiles-daemon installed and the service running see here:
|
||||||
|
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
||||||
|
|
||||||
|
#set power-profile
|
||||||
|
[ppd_menu]
|
||||||
|
full_text=
|
||||||
|
command=~/.config/i3/scripts/power-profiles
|
||||||
|
color=#407437
|
||||||
|
|
||||||
|
#Show the current power-profile
|
||||||
|
[ppd-status]
|
||||||
|
command=~/.config/i3/scripts/ppd-status
|
||||||
|
interval=5
|
||||||
|
|
||||||
|
[time]
|
||||||
|
#label=
|
||||||
|
command=date '+%a %d %b %H:%M:%S'
|
||||||
|
interval=1
|
||||||
|
|
||||||
|
[shutdown_menu]
|
||||||
|
full_text=
|
||||||
|
command=~/.config/i3/scripts/powermenu
|
||||||
|
|
||||||
|
[simple-2]
|
||||||
|
full_text=: :
|
||||||
|
color=#717171
|
||||||
106
config/i3/keybindings
Normal file
106
config/i3/keybindings
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
EndeavourOS i3wm Keybindings cheat sheet:
|
||||||
|
|
||||||
|
--> to update this run the following command:
|
||||||
|
wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/keybindings -P ~/.config/i3/
|
||||||
|
|
||||||
|
All sources and updates are available at GitHub:
|
||||||
|
https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||||
|
|
||||||
|
For reference consult our WIKI:
|
||||||
|
https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
|
||||||
|
|
||||||
|
= windows key
|
||||||
|
|
||||||
|
# start xfce4-terminal
|
||||||
|
+Return
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
+q
|
||||||
|
|
||||||
|
# Application menu search by typing (fancy Rofi menu):
|
||||||
|
+d
|
||||||
|
|
||||||
|
# Window switcher menu (fancy Rofi menu):
|
||||||
|
+t
|
||||||
|
|
||||||
|
# fancy exit-menu on bottom right:
|
||||||
|
+Shift+e
|
||||||
|
|
||||||
|
# Lock the system
|
||||||
|
# lock with a picture or blurring the screen (options in config)
|
||||||
|
+l
|
||||||
|
|
||||||
|
# reload the configuration file
|
||||||
|
+Shift+c
|
||||||
|
|
||||||
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
|
+Shift+r
|
||||||
|
|
||||||
|
# keybinding in fancy rofi (automated)
|
||||||
|
F1
|
||||||
|
|
||||||
|
# full keybinding list in editor:
|
||||||
|
+F1
|
||||||
|
|
||||||
|
# change window focus
|
||||||
|
+j focus left
|
||||||
|
+k focus down
|
||||||
|
+b focus up
|
||||||
|
+o focus right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
+Left focus left
|
||||||
|
+Down focus down
|
||||||
|
+Up focus up
|
||||||
|
+Right focus right
|
||||||
|
|
||||||
|
# move a focused window
|
||||||
|
+Shift+j move left
|
||||||
|
+Shift+k move down
|
||||||
|
+Shift+b move up
|
||||||
|
+Shift+o move right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
+Shift+Left move left
|
||||||
|
+Shift+Down move down
|
||||||
|
+Shift+Up move up
|
||||||
|
+Shift+Right move right
|
||||||
|
|
||||||
|
# split in horizontal orientation
|
||||||
|
+h split h
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
+v split v
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
+f fullscreen toggle
|
||||||
|
|
||||||
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
|
+s layout stacking
|
||||||
|
+g layout tabbed
|
||||||
|
+e layout toggle split
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
+Shift+space floating toggle
|
||||||
|
|
||||||
|
# change focus between tiling / floating windows
|
||||||
|
+space focus mode_toggle
|
||||||
|
|
||||||
|
# focus the parent container
|
||||||
|
+a focus parent
|
||||||
|
|
||||||
|
# focus the child container
|
||||||
|
#+d focus child
|
||||||
|
|
||||||
|
# resize floating window
|
||||||
|
+right mouse button
|
||||||
|
|
||||||
|
## Multimedia Keys
|
||||||
|
|
||||||
|
# Redirect sound to headphones
|
||||||
|
+p
|
||||||
|
|
||||||
|
## App shortcuts
|
||||||
|
+w starts Firefox
|
||||||
|
+n starts Thunar
|
||||||
|
Button screenshot
|
||||||
104
config/i3/scripts/bandwidth2
Executable file
104
config/i3/scripts/bandwidth2
Executable file
@@ -0,0 +1,104 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 James Murphy
|
||||||
|
# Licensed under the terms of the GNU GPL v2 only.
|
||||||
|
#
|
||||||
|
# i3blocks blocklet script to monitor bandwidth usage
|
||||||
|
|
||||||
|
iface="${BLOCK_INSTANCE}"
|
||||||
|
iface="${IFACE:-$iface}"
|
||||||
|
dt="${DT:-3}"
|
||||||
|
unit="${UNIT:-MB}"
|
||||||
|
LABEL="${LABEL:-<span font='FontAwesome'> </span>}" # down arrow up arrow
|
||||||
|
printf_command="${PRINTF_COMMAND:-"printf \"${LABEL}%1.0f/%1.0f %s/s\\n\", rx, wx, unit;"}"
|
||||||
|
|
||||||
|
function default_interface {
|
||||||
|
ip route | awk '/^default via/ {print $5; exit}'
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_proc_net_dev {
|
||||||
|
if [ ! -f "/proc/net/dev" ]; then
|
||||||
|
echo "/proc/net/dev not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function list_interfaces {
|
||||||
|
check_proc_net_dev
|
||||||
|
echo "Interfaces in /proc/net/dev:"
|
||||||
|
grep -o "^[^:]\\+:" /proc/net/dev | tr -d " :"
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts i:t:u:p:lh opt; do
|
||||||
|
case "$opt" in
|
||||||
|
i) iface="$OPTARG" ;;
|
||||||
|
t) dt="$OPTARG" ;;
|
||||||
|
u) unit="$OPTARG" ;;
|
||||||
|
p) printf_command="$OPTARG" ;;
|
||||||
|
l) list_interfaces && exit 0 ;;
|
||||||
|
h) printf \
|
||||||
|
"Usage: bandwidth3 [-i interface] [-t time] [-u unit] [-p printf_command] [-l] [-h]
|
||||||
|
Options:
|
||||||
|
-i\tNetwork interface to measure. Default determined using \`ip route\`.
|
||||||
|
-t\tTime interval in seconds between measurements. Default: 3
|
||||||
|
-u\tUnits to measure bytes in. Default: Mb
|
||||||
|
\tAllowed units: Kb, KB, Mb, MB, Gb, GB, Tb, TB
|
||||||
|
\tUnits may have optional it/its/yte/ytes on the end, e.g. Mbits, KByte
|
||||||
|
-p\tAwk command to be called after a measurement is made.
|
||||||
|
\tDefault: printf \"<span font='FontAwesome'> </span>%%-5.1f/%%5.1f %%s/s\\\\n\", rx, wx, unit;
|
||||||
|
\tExposed variables: rx, wx, tx, unit, iface
|
||||||
|
-l\tList available interfaces in /proc/net/dev
|
||||||
|
-h\tShow this help text
|
||||||
|
" && exit 0;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
check_proc_net_dev
|
||||||
|
|
||||||
|
iface="${iface:-$(default_interface)}"
|
||||||
|
while [ -z "$iface" ]; do
|
||||||
|
echo No default interface
|
||||||
|
sleep "$dt"
|
||||||
|
iface=$(default_interface)
|
||||||
|
done
|
||||||
|
|
||||||
|
case "$unit" in
|
||||||
|
Kb|Kbit|Kbits) bytes_per_unit=$((1024 / 8));;
|
||||||
|
KB|KByte|KBytes) bytes_per_unit=$((1024));;
|
||||||
|
Mb|Mbit|Mbits) bytes_per_unit=$((1024 * 1024 / 8));;
|
||||||
|
MB|MByte|MBytes) bytes_per_unit=$((1024 * 1024));;
|
||||||
|
Gb|Gbit|Gbits) bytes_per_unit=$((1024 * 1024 * 1024 / 8));;
|
||||||
|
GB|GByte|GBytes) bytes_per_unit=$((1024 * 1024 * 1024));;
|
||||||
|
Tb|Tbit|Tbits) bytes_per_unit=$((1024 * 1024 * 1024 * 1024 / 8));;
|
||||||
|
TB|TByte|TBytes) bytes_per_unit=$((1024 * 1024 * 1024 * 1024));;
|
||||||
|
*) echo Bad unit "$unit" && exit 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
scalar=$((bytes_per_unit * dt))
|
||||||
|
init_line=$(cat /proc/net/dev | grep "^[ ]*$iface:")
|
||||||
|
if [ -z "$init_line" ]; then
|
||||||
|
echo Interface not found in /proc/net/dev: "$iface"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
init_received=$(awk '{print $2}' <<< $init_line)
|
||||||
|
init_sent=$(awk '{print $10}' <<< $init_line)
|
||||||
|
|
||||||
|
(while true; do cat /proc/net/dev; sleep "$dt"; done) |\
|
||||||
|
stdbuf -oL grep "^[ ]*$iface:" |\
|
||||||
|
awk -v scalar="$scalar" -v unit="$unit" -v iface="$iface" '
|
||||||
|
BEGIN{old_received='"$init_received"';old_sent='"$init_sent"'}
|
||||||
|
{
|
||||||
|
received=$2
|
||||||
|
sent=$10
|
||||||
|
rx=(received-old_received)/scalar;
|
||||||
|
wx=(sent-old_sent)/scalar;
|
||||||
|
tx=rx+wr;
|
||||||
|
old_received=received;
|
||||||
|
old_sent=sent;
|
||||||
|
if(rx >= 0 && wx >= 0){
|
||||||
|
'"$printf_command"';
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'
|
||||||
18
config/i3/scripts/battery-pinebook-pro
Executable file
18
config/i3/scripts/battery-pinebook-pro
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#simple Shellscript for i3blocks on Pinebook pro
|
||||||
|
#05012020 geri123@gmx.net Gerhard S.
|
||||||
|
#battery-symbols: on Manjaro you need the awesome-terminal-fonts package installed!
|
||||||
|
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
|
||||||
|
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
|
||||||
|
case $((
|
||||||
|
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
|
||||||
|
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
|
||||||
|
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
|
||||||
|
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
|
||||||
|
#
|
||||||
|
(1) echo $STATUS:"" :$PERCENT%;;
|
||||||
|
(2) echo $STATUS:"" :$PERCENT%;;
|
||||||
|
(3) echo $STATUS:"" :$PERCENT%;;
|
||||||
|
(4) echo $STATUS:"" :$PERCENT%;;
|
||||||
|
(5) echo $STATUS:"" :$PERCENT%;;
|
||||||
|
esac
|
||||||
114
config/i3/scripts/battery1
Executable file
114
config/i3/scripts/battery1
Executable file
@@ -0,0 +1,114 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||||
|
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||||
|
#
|
||||||
|
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||||
|
#
|
||||||
|
# This script is meant to use with i3blocks. It parses the output of the "acpi"
|
||||||
|
# command (often provided by a package of the same name) to read the status of
|
||||||
|
# the battery, and eventually its remaining time (to full charge or discharge).
|
||||||
|
#
|
||||||
|
# The color will gradually change for a percentage below 85%, and the urgency
|
||||||
|
# (exit code 33) is set if there is less that 5% remaining.
|
||||||
|
|
||||||
|
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
# otherwise we get in console "Wide character in print at"
|
||||||
|
binmode(STDOUT, ':utf8');
|
||||||
|
|
||||||
|
# my $acpi;
|
||||||
|
my $upower;
|
||||||
|
my $percent;
|
||||||
|
my $bat_state;
|
||||||
|
my $status;
|
||||||
|
my $ac_adapt;
|
||||||
|
my $full_text;
|
||||||
|
my $short_text;
|
||||||
|
my $label = '😅';
|
||||||
|
my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
|
||||||
|
|
||||||
|
open (UPOWER, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'percentage' |") or die;
|
||||||
|
$upower = <UPOWER>;
|
||||||
|
close(UPOWER);
|
||||||
|
|
||||||
|
# fail on unexpected output
|
||||||
|
if ($upower !~ /: (\d+)%/) {
|
||||||
|
die "$upower\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$percent = $1;
|
||||||
|
$full_text = "$percent%";
|
||||||
|
|
||||||
|
open (BAT_STATE, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'state' |") or die;
|
||||||
|
$bat_state = <BAT_STATE>;
|
||||||
|
close(BAT_STATE);
|
||||||
|
|
||||||
|
if ($bat_state !~ /: (\w+)/) {
|
||||||
|
die "$bat_state\n";
|
||||||
|
}
|
||||||
|
$status = $1;
|
||||||
|
|
||||||
|
if ($status eq 'discharging') {
|
||||||
|
$full_text .= ' ';
|
||||||
|
} elsif ($status eq 'charging') {
|
||||||
|
$full_text .= ' ';
|
||||||
|
} elsif ($status eq 'Unknown') {
|
||||||
|
open (AC_ADAPTER, "acpi -a |") or die;
|
||||||
|
$ac_adapt = <AC_ADAPTER>;
|
||||||
|
close(AC_ADAPTER);
|
||||||
|
|
||||||
|
if ($ac_adapt =~ /: ([\w-]+)/) {
|
||||||
|
$ac_adapt = $1;
|
||||||
|
|
||||||
|
if ($ac_adapt eq 'on-line') {
|
||||||
|
$full_text .= ' CHR';
|
||||||
|
} elsif ($ac_adapt eq 'off-line') {
|
||||||
|
$full_text .= ' DIS';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$short_text = $full_text;
|
||||||
|
|
||||||
|
if ($percent < 20) {
|
||||||
|
$label = '';
|
||||||
|
} elsif ($percent < 45) {
|
||||||
|
$label = '';
|
||||||
|
} elsif ($percent < 70) {
|
||||||
|
$label = '';
|
||||||
|
} elsif ($percent < 95) {
|
||||||
|
$label = '';
|
||||||
|
} else {
|
||||||
|
$label = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
# print text
|
||||||
|
print " ${label}";
|
||||||
|
print " $full_text\n";
|
||||||
|
print " ${label}";
|
||||||
|
print " $short_text\n";
|
||||||
|
|
||||||
|
# consider color and urgent flag only on discharge
|
||||||
|
if ($status eq 'discharging') {
|
||||||
|
|
||||||
|
if ($percent < 20) {
|
||||||
|
print "#FF0000\n";
|
||||||
|
} elsif ($percent < 40) {
|
||||||
|
print "#FFAE00\n";
|
||||||
|
} elsif ($percent < 60) {
|
||||||
|
print "#FFF600\n";
|
||||||
|
} elsif ($percent < 85) {
|
||||||
|
print "#A8FF00\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($percent < 5) {
|
||||||
|
exit(33);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(0);
|
||||||
106
config/i3/scripts/battery2
Executable file
106
config/i3/scripts/battery2
Executable file
@@ -0,0 +1,106 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# Copyright (C) 2016 James Murphy
|
||||||
|
# Licensed under the GPL version 2 only
|
||||||
|
#
|
||||||
|
# A battery indicator blocklet script for i3blocks
|
||||||
|
|
||||||
|
from subprocess import check_output
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
config = dict(os.environ)
|
||||||
|
status = check_output(['acpi'], universal_newlines=True)
|
||||||
|
|
||||||
|
if not status:
|
||||||
|
# stands for no battery found
|
||||||
|
color = config.get("color_10", "red")
|
||||||
|
fulltext = "<span color='{}'><span font='FontAwesome'>\uf00d \uf240</span></span>".format(color)
|
||||||
|
percentleft = 100
|
||||||
|
else:
|
||||||
|
# if there is more than one battery in one laptop, the percentage left is
|
||||||
|
# available for each battery separately, although state and remaining
|
||||||
|
# time for overall block is shown in the status of the first battery
|
||||||
|
batteries = status.split("\n")
|
||||||
|
state_batteries=[]
|
||||||
|
commasplitstatus_batteries=[]
|
||||||
|
percentleft_batteries=[]
|
||||||
|
time = ""
|
||||||
|
for battery in batteries:
|
||||||
|
if battery!='':
|
||||||
|
state_batteries.append(battery.split(": ")[1].split(", ")[0])
|
||||||
|
commasplitstatus = battery.split(", ")
|
||||||
|
if not time:
|
||||||
|
time = commasplitstatus[-1].strip()
|
||||||
|
# check if it matches a time
|
||||||
|
time = re.match(r"(\d+):(\d+)", time)
|
||||||
|
if time:
|
||||||
|
time = ":".join(time.groups())
|
||||||
|
timeleft = " ({})".format(time)
|
||||||
|
else:
|
||||||
|
timeleft = ""
|
||||||
|
|
||||||
|
p = int(commasplitstatus[1].rstrip("%\n"))
|
||||||
|
if p>0:
|
||||||
|
percentleft_batteries.append(p)
|
||||||
|
commasplitstatus_batteries.append(commasplitstatus)
|
||||||
|
state = state_batteries[0]
|
||||||
|
commasplitstatus = commasplitstatus_batteries[0]
|
||||||
|
if percentleft_batteries:
|
||||||
|
percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries))
|
||||||
|
else:
|
||||||
|
percentleft = 0
|
||||||
|
|
||||||
|
# stands for charging
|
||||||
|
color = config.get("color_charging", "yellow")
|
||||||
|
FA_LIGHTNING = "<span color='{}'><span font='FontAwesome'>\uf0e7</span></span>".format(color)
|
||||||
|
|
||||||
|
# stands for plugged in
|
||||||
|
FA_PLUG = "<span font='FontAwesome'>\uf1e6</span>"
|
||||||
|
|
||||||
|
# stands for using battery
|
||||||
|
FA_BATTERY = "<span font='FontAwesome'>\uf240</span>"
|
||||||
|
|
||||||
|
# stands for unknown status of battery
|
||||||
|
FA_QUESTION = "<span font='FontAwesome'>\uf128</span>"
|
||||||
|
|
||||||
|
|
||||||
|
if state == "Discharging":
|
||||||
|
fulltext = FA_BATTERY + " "
|
||||||
|
elif state == "Full":
|
||||||
|
fulltext = FA_PLUG + " "
|
||||||
|
timeleft = ""
|
||||||
|
elif state == "Unknown":
|
||||||
|
fulltext = FA_QUESTION + " " + FA_BATTERY + " "
|
||||||
|
timeleft = ""
|
||||||
|
else:
|
||||||
|
fulltext = FA_LIGHTNING + " " + FA_PLUG + " "
|
||||||
|
|
||||||
|
def color(percent):
|
||||||
|
if percent < 10:
|
||||||
|
# exit code 33 will turn background red
|
||||||
|
return config.get("color_10", "#FFFFFF")
|
||||||
|
if percent < 20:
|
||||||
|
return config.get("color_20", "#FF3300")
|
||||||
|
if percent < 30:
|
||||||
|
return config.get("color_30", "#FF6600")
|
||||||
|
if percent < 40:
|
||||||
|
return config.get("color_40", "#FF9900")
|
||||||
|
if percent < 50:
|
||||||
|
return config.get("color_50", "#FFCC00")
|
||||||
|
if percent < 60:
|
||||||
|
return config.get("color_60", "#FFFF00")
|
||||||
|
if percent < 70:
|
||||||
|
return config.get("color_70", "#FFFF33")
|
||||||
|
if percent < 80:
|
||||||
|
return config.get("color_80", "#FFFF66")
|
||||||
|
return config.get("color_full", "#FFFFFF")
|
||||||
|
|
||||||
|
form = '<span color="{}">{}%</span>'
|
||||||
|
fulltext += form.format(color(percentleft), percentleft)
|
||||||
|
#fulltext += timeleft
|
||||||
|
|
||||||
|
print(fulltext)
|
||||||
|
print(fulltext)
|
||||||
|
if percentleft < 10:
|
||||||
|
exit(33)
|
||||||
11
config/i3/scripts/blur-lock
Executable file
11
config/i3/scripts/blur-lock
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
PICTURE=/tmp/i3lock.png
|
||||||
|
SCREENSHOT="scrot -z $PICTURE"
|
||||||
|
|
||||||
|
BLUR="5x4"
|
||||||
|
|
||||||
|
$SCREENSHOT
|
||||||
|
convert $PICTURE -blur $BLUR $PICTURE
|
||||||
|
i3lock -i $PICTURE
|
||||||
|
rm $PICTURE
|
||||||
62
config/i3/scripts/cpu_usage
Executable file
62
config/i3/scripts/cpu_usage
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||||
|
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||||
|
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
||||||
|
#
|
||||||
|
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
use Getopt::Long;
|
||||||
|
|
||||||
|
# default values
|
||||||
|
my $t_warn = $ENV{T_WARN} // 50;
|
||||||
|
my $t_crit = $ENV{T_CRIT} // 80;
|
||||||
|
my $cpu_usage = -1;
|
||||||
|
my $decimals = $ENV{DECIMALS} // 0;
|
||||||
|
my $label = $ENV{LABEL} // "";
|
||||||
|
|
||||||
|
sub help {
|
||||||
|
print "Usage: cpu_usage [-w <warning>] [-c <critical>] [-d <decimals>]\n";
|
||||||
|
print "-w <percent>: warning threshold to become yellow\n";
|
||||||
|
print "-c <percent>: critical threshold to become red\n";
|
||||||
|
print "-d <decimals>: Use <decimals> decimals for percentage (default is $decimals) \n";
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetOptions("help|h" => \&help,
|
||||||
|
"w=i" => \$t_warn,
|
||||||
|
"c=i" => \$t_crit,
|
||||||
|
"d=i" => \$decimals,
|
||||||
|
);
|
||||||
|
|
||||||
|
# Get CPU usage
|
||||||
|
$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
|
||||||
|
open (MPSTAT, 'mpstat 1 1 |') or die;
|
||||||
|
while (<MPSTAT>) {
|
||||||
|
if (/^.*\s+(\d+\.\d+)[\s\x00]?$/) {
|
||||||
|
$cpu_usage = 100 - $1; # 100% - %idle
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(MPSTAT);
|
||||||
|
|
||||||
|
$cpu_usage eq -1 and die 'Can\'t find CPU information';
|
||||||
|
|
||||||
|
# Print short_text, full_text
|
||||||
|
print "${label}";
|
||||||
|
printf "%02.${decimals}f%%\n", $cpu_usage;
|
||||||
|
print "${label}";
|
||||||
|
printf "%02.${decimals}f%%\n", $cpu_usage;
|
||||||
|
|
||||||
|
# Print color, if needed
|
||||||
|
if ($cpu_usage >= $t_crit) {
|
||||||
|
print "#FF0000\n";
|
||||||
|
exit 33;
|
||||||
|
} elsif ($cpu_usage >= $t_warn) {
|
||||||
|
print "#FFFC00\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
exit 0;
|
||||||
48
config/i3/scripts/disk
Executable file
48
config/i3/scripts/disk
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
DIR="${DIR:-$BLOCK_INSTANCE}"
|
||||||
|
DIR="${DIR:-$HOME}"
|
||||||
|
ALERT_LOW="${ALERT_LOW:-$1}"
|
||||||
|
ALERT_LOW="${ALERT_LOW:-10}" # color will turn red under this value (default: 10%)
|
||||||
|
|
||||||
|
LOCAL_FLAG="-l"
|
||||||
|
if [ "$1" = "-n" ] || [ "$2" = "-n" ]; then
|
||||||
|
LOCAL_FLAG=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
df -h -P $LOCAL_FLAG "$DIR" | awk -v label="$LABEL" -v alert_low=$ALERT_LOW '
|
||||||
|
/\/.*/ {
|
||||||
|
# full text
|
||||||
|
print label $4
|
||||||
|
|
||||||
|
# short text
|
||||||
|
print label $4
|
||||||
|
|
||||||
|
use=$5
|
||||||
|
|
||||||
|
# no need to continue parsing
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
END {
|
||||||
|
gsub(/%$/,"",use)
|
||||||
|
if (100 - use < alert_low) {
|
||||||
|
# color
|
||||||
|
print "#FF0000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'
|
||||||
10
config/i3/scripts/empty_workspace
Executable file
10
config/i3/scripts/empty_workspace
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
MAX_DESKTOPS=20
|
||||||
|
|
||||||
|
WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
|
||||||
|
|
||||||
|
EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
|
||||||
|
echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
|
||||||
|
|
||||||
|
i3-msg workspace ${EMPTY_WORKSPACE}
|
||||||
5
config/i3/scripts/keyboard-layout
Executable file
5
config/i3/scripts/keyboard-layout
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
KBD=$(/usr/bin/xkblayout-state print '%s')
|
||||||
|
echo $KBD
|
||||||
|
|
||||||
25
config/i3/scripts/keyhint
Executable file
25
config/i3/scripts/keyhint
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
Main() {
|
||||||
|
source /usr/share/endeavouros/scripts/eos-script-lib-yad || return 1
|
||||||
|
|
||||||
|
local command=(
|
||||||
|
eos_yad --title="EndeavourOS i3-wm keybindings:" --no-buttons --geometry=400x345-15-400 --list
|
||||||
|
--column=key: --column=description: --column=command:
|
||||||
|
"ESC" "close this app" ""
|
||||||
|
"=" "modkey" "(set mod Mod4)"
|
||||||
|
"+enter" "open a terminal" ""
|
||||||
|
"+Shift+n" "new empty workspace" ""
|
||||||
|
"+w" "open Browser" ""
|
||||||
|
"+n" "open Filebrowser" ""
|
||||||
|
"+d" "app menu" ""
|
||||||
|
"+q" "close focused app" ""
|
||||||
|
"Print-key" "screenshot" ""
|
||||||
|
"+Shift+e" "logout menu" ""
|
||||||
|
"F1" "open keybinding helper" ""
|
||||||
|
)
|
||||||
|
|
||||||
|
"${command[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
Main "$@"
|
||||||
6
config/i3/scripts/keyhint-2
Executable file
6
config/i3/scripts/keyhint-2
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
I3_CONFIG=$HOME/.config/i3/config
|
||||||
|
mod_key=$(sed -nre 's/^set \$mod (.*)/\1/p' ${I3_CONFIG})
|
||||||
|
grep "^bindsym" ${I3_CONFIG} \
|
||||||
|
| sed "s/-\(-\w\+\)\+//g;s/\$mod/${mod_key}/g;s/Mod1/Alt/g;s/exec //;s/bindsym //;s/^\s\+//;s/^\([^ ]\+\) \(.\+\)$/\2: \1/;s/^\s\+//" \
|
||||||
|
| tr -s ' ' \
|
||||||
|
| rofi -dmenu -theme ~/.config/rofi/rofikeyhint.rasi
|
||||||
69
config/i3/scripts/memory
Executable file
69
config/i3/scripts/memory
Executable file
@@ -0,0 +1,69 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TYPE="${BLOCK_INSTANCE:-mem}"
|
||||||
|
|
||||||
|
awk -v type=$TYPE '
|
||||||
|
/^MemTotal:/ {
|
||||||
|
mem_total=$2
|
||||||
|
}
|
||||||
|
/^MemFree:/ {
|
||||||
|
mem_free=$2
|
||||||
|
}
|
||||||
|
/^Buffers:/ {
|
||||||
|
mem_free+=$2
|
||||||
|
}
|
||||||
|
/^Cached:/ {
|
||||||
|
mem_free+=$2
|
||||||
|
}
|
||||||
|
/^SwapTotal:/ {
|
||||||
|
swap_total=$2
|
||||||
|
}
|
||||||
|
/^SwapFree:/ {
|
||||||
|
swap_free=$2
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
if (type == "swap") {
|
||||||
|
free=swap_free/1024/1024
|
||||||
|
used=(swap_total-swap_free)/1024/1024
|
||||||
|
total=swap_total/1024/1024
|
||||||
|
} else {
|
||||||
|
free=mem_free/1024/1024
|
||||||
|
used=(mem_total-mem_free)/1024/1024
|
||||||
|
total=mem_total/1024/1024
|
||||||
|
}
|
||||||
|
|
||||||
|
pct=0
|
||||||
|
if (total > 0) {
|
||||||
|
pct=used/total*100
|
||||||
|
}
|
||||||
|
|
||||||
|
# full text
|
||||||
|
# printf("%.1fG/%.1fG (%.f%%)\n", used, total, pct)
|
||||||
|
|
||||||
|
# short text
|
||||||
|
printf("%02.f%%\n", pct)
|
||||||
|
|
||||||
|
# color
|
||||||
|
if (pct > 90) {
|
||||||
|
print("#FF0000")
|
||||||
|
} else if (pct > 80) {
|
||||||
|
print("#FFAE00")
|
||||||
|
} else if (pct > 70) {
|
||||||
|
print("#FFF600")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' /proc/meminfo
|
||||||
93
config/i3/scripts/openweather
Executable file
93
config/i3/scripts/openweather
Executable file
@@ -0,0 +1,93 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
||||||
|
|
||||||
|
temps=("#0600FF" "#0500FF" "#0400FF" "#0300FF" "#0200FF" "#0100FF" "#0000FF" "#0002FF" "#0012FF" "#0022FF" "#0032FF" "#0044FF" "#0054FF" "#0064FF" "#0074FF" "#0084FF" "#0094FF" "#00A4FF" "#00B4FF" "#00C4FF" "#00D4FF" "#00E4FF" "#00FFF4" "#00FFD0" "#00FFA8" "#00FF83" "#00FF5C" "#00FF36" "#00FF10" "#17FF00" "#3EFF00" "#65FF00" "#B0FF00" "#FDFF00" "#FFF000" "#FFDC00" "#FFC800" "#FFB400" "#FFA000" "#FF8C00" "#FF7800" "#FF6400" "#FF5000" "#FF3C00" "#FF2800" "#FF1400" "#FF0000")
|
||||||
|
|
||||||
|
command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
|
||||||
|
Aborting."; exit 1; }
|
||||||
|
command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
|
||||||
|
Aborting."; exit 1; }
|
||||||
|
|
||||||
|
# To use this script you need to create an API key here https://home.openweathermap.org
|
||||||
|
# You need to put your Open Weather APIKEY here:
|
||||||
|
APIKEY="keykeykey"
|
||||||
|
# And get your Latitute and Longitudes to put in here:
|
||||||
|
LAT="XX.XXXX"
|
||||||
|
LON="XX.XXXX"
|
||||||
|
URL="http://api.openweathermap.org/data/2.5/onecall?lat=${LAT}&lon=${LON}&units=metric&exclude=minutely,hourly,daily&APPID=${APIKEY}"
|
||||||
|
WEATHER_RESPONSE=$(wget -qO- "${URL}")
|
||||||
|
|
||||||
|
WEATHER_CONDITION=$(echo "$WEATHER_RESPONSE" | jq '.current.weather[0].main' | sed 's/"//g')
|
||||||
|
WEATHER_TEMP=$(echo "$WEATHER_RESPONSE" | jq '.current.feels_like')
|
||||||
|
WEATHER_INT=${WEATHER_TEMP%.*}
|
||||||
|
|
||||||
|
TIME_NOW=$( echo "$WEATHER_RESPONSE" | jq '.current.dt')
|
||||||
|
SUNRISE=$( echo "$WEATHER_RESPONSE" | jq '.current.sunrise')
|
||||||
|
SUNSET=$( echo "$WEATHER_RESPONSE" | jq '.current.sunset')
|
||||||
|
DESCRIPTION=$( echo "$WEATHER_RESPONSE" | jq '.current.weather[0].description' | sed 's/"//g')
|
||||||
|
WEATHER_ALERT=$( echo "$WEATHER_RESPONSE" | jq '.alerts[0].event' | sed 's/"//g')
|
||||||
|
DAYTIME="n"
|
||||||
|
|
||||||
|
if [[ "$TIME_NOW" > "$SUNRISE" ]] && [[ "$TIME_NOW" < "$SUNSET" ]]; then
|
||||||
|
DAYTIME="d"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $WEATHER_CONDITION in
|
||||||
|
'Clouds')
|
||||||
|
if [ "$DAYTIME" == "d" ]; then
|
||||||
|
WEATHER_ICON=""
|
||||||
|
else
|
||||||
|
WEATHER_ICON=""
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
'Rain')
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
'Drizzle')
|
||||||
|
if [ "$DAYTIME" == "d" ]; then
|
||||||
|
WEATHER_ICON=""
|
||||||
|
else
|
||||||
|
WEATHER_ICON=""
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
'Thunderstorm')
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
'Snow')
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
'Clear')
|
||||||
|
if [ "$DAYTIME" == "d" ]; then
|
||||||
|
WEATHER_ICON=""
|
||||||
|
else
|
||||||
|
WEATHER_ICON=""
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
WEATHER_ICON="🌫"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
WEATHER_COLOR="#FFFFFF"
|
||||||
|
if [ "$WEATHER_INT" -lt "-11" ]; then
|
||||||
|
WEATHER_COLOR="#0000FF"
|
||||||
|
elif [ "$WEATHER_INT" -gt 35 ]; then
|
||||||
|
WEATHER_COLOR="#FF0000"
|
||||||
|
else
|
||||||
|
WEATHER_INT=$(( WEATHER_INT + 11 ))
|
||||||
|
WEATHER_COLOR="${temps[$WEATHER_INT]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} "
|
||||||
|
if [ "$WEATHER_ALERT" != "null" ]; then
|
||||||
|
WARN_START=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].start')
|
||||||
|
WARN_END=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].end')
|
||||||
|
WARN_START=$(date -d @"$WARN_START" +%a_%k:%M)
|
||||||
|
WARN_END=$(date -d @"$WARN_END" +%a_%k:%M)
|
||||||
|
full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} ${WEATHER_ALERT} from ${WARN_START} to ${WARN_END} "
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "${full_text}"
|
||||||
|
echo "${WEATHER_TEMP}°C "
|
||||||
|
echo "${WEATHER_COLOR}"
|
||||||
43
config/i3/scripts/openweather-city
Executable file
43
config/i3/scripts/openweather-city
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
|
||||||
|
Aborting."; exit 1; }
|
||||||
|
command -v curl >/dev/null 2>&1 || { echo >&2 "Program 'curl' required but is not installed.
|
||||||
|
Aborting."; exit 1; }
|
||||||
|
|
||||||
|
# To use this script you need to create an API key here https://home.openweathermap.org
|
||||||
|
# You need to put your Open Weather APIKEY here:
|
||||||
|
APIKEY="keykey"
|
||||||
|
# find your City ID here: https://openweathermap.org/
|
||||||
|
# search for your city and copy the ID from the URL inside the browser.
|
||||||
|
CITY_ID="idid"
|
||||||
|
URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&units=metric&APPID=${APIKEY}"
|
||||||
|
|
||||||
|
WEATHER_RESPONSE=$(timeout --signal=1 2s curl -s "${URL}") || exit 1;
|
||||||
|
|
||||||
|
WEATHER_CONDITION=$(echo $WEATHER_RESPONSE | jq '.weather[0].main' | sed 's/"//g')
|
||||||
|
WEATHER_TEMP=$(echo $WEATHER_RESPONSE | jq '.main.temp')
|
||||||
|
WIND_DIR=$( echo "$WEATHER_RESPONSE" | jq '.wind.deg')
|
||||||
|
WIND_SPEED=$( echo "$WEATHER_RESPONSE" | jq '.wind.speed')
|
||||||
|
|
||||||
|
WIND_SPEED=$(awk "BEGIN {print 60*60*$WIND_SPEED/1000}")
|
||||||
|
WIND_DIR=$(awk "BEGIN {print int(($WIND_DIR % 360)/22.5)}")
|
||||||
|
DIR_ARRAY=( N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW N )
|
||||||
|
WIND_DIR=${DIR_ARRAY[WIND_DIR]}
|
||||||
|
|
||||||
|
case $WEATHER_CONDITION in
|
||||||
|
'Clouds')
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
'Rain')
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
'Snow')
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
WEATHER_ICON=""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "${WEATHER_ICON} ${WEATHER_TEMP}°C: ${WIND_SPEED} km/h ${WIND_DIR}"
|
||||||
5
config/i3/scripts/openweather.conf
Executable file
5
config/i3/scripts/openweather.conf
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
# Weather
|
||||||
|
[Weather]
|
||||||
|
command=~/.config/i3/scripts/openweather
|
||||||
|
interval=1800
|
||||||
|
color=#7275b3
|
||||||
204
config/i3/scripts/power-profiles
Executable file
204
config/i3/scripts/power-profiles
Executable file
@@ -0,0 +1,204 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Use rofi/zenity to change system runstate thanks to systemd.
|
||||||
|
#
|
||||||
|
# Note: this currently relies on associative array support in the shell.
|
||||||
|
#
|
||||||
|
# Inspired from i3pystatus wiki:
|
||||||
|
# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
|
||||||
|
#
|
||||||
|
# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# power-profiles-daemon implementation:
|
||||||
|
# needs package power-profiles-daemon installed and the service running see here:
|
||||||
|
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
||||||
|
# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/ppd-status
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# BEGIN CONFIG #
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
# Use a custom lock script
|
||||||
|
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||||
|
|
||||||
|
# Colors: FG (foreground), BG (background), HL (highlighted)
|
||||||
|
FG_COLOR="#bbbbbb"
|
||||||
|
BG_COLOR="#111111"
|
||||||
|
HLFG_COLOR="#111111"
|
||||||
|
HLBG_COLOR="#bbbbbb"
|
||||||
|
BORDER_COLOR="#222222"
|
||||||
|
|
||||||
|
# Options not related to colors
|
||||||
|
#ROFI_TEXT=":"
|
||||||
|
#ROFI_OPTIONS=(-width -11 -location 0 -hide-scrollbar -bw 30 -color-window "#dd310027,#dd0310027,#dd310027" -padding 5)
|
||||||
|
#ROFI_OPTIONS=(-width -18 -location 4 -hide-scrollbar -color-window "#cc310027,#00a0009a,#cc310027" -padding 5 -font "Sourcecode Pro Regular 10, FontAwesome 9")
|
||||||
|
ROFI_OPTIONS=(-theme ~/.config/rofi/power-profiles.rasi)
|
||||||
|
# Zenity options
|
||||||
|
ZENITY_TITLE="Power Profiles"
|
||||||
|
ZENITY_TEXT="Set Profiles:"
|
||||||
|
ZENITY_OPTIONS=(--column= --hide-header)
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# END CONFIG #
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
# Whether to ask for user's confirmation
|
||||||
|
enable_confirmation=false
|
||||||
|
|
||||||
|
# Preferred launcher if both are available
|
||||||
|
preferred_launcher="rofi"
|
||||||
|
|
||||||
|
usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
|
||||||
|
|
||||||
|
where:
|
||||||
|
-h show this help text
|
||||||
|
-c ask for user confirmation
|
||||||
|
-p preferred launcher (rofi or zenity)
|
||||||
|
|
||||||
|
This script depends on:
|
||||||
|
- systemd,
|
||||||
|
- i3,
|
||||||
|
- rofi or zenity."
|
||||||
|
|
||||||
|
# Check whether the user-defined launcher is valid
|
||||||
|
launcher_list=(rofi zenity)
|
||||||
|
function check_launcher() {
|
||||||
|
if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
|
||||||
|
echo "Supported launchers: ${launcher_list[*]}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# Get array with unique elements and preferred launcher first
|
||||||
|
# Note: uniq expects a sorted list, so we cannot use it
|
||||||
|
i=1
|
||||||
|
launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
|
||||||
|
| sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Parse CLI arguments
|
||||||
|
while getopts "hcp:" option; do
|
||||||
|
case "${option}" in
|
||||||
|
h) echo "${usage}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
c) enable_confirmation=true
|
||||||
|
;;
|
||||||
|
p) preferred_launcher="${OPTARG}"
|
||||||
|
check_launcher "${preferred_launcher}"
|
||||||
|
;;
|
||||||
|
*) exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Check whether a command exists
|
||||||
|
function command_exists() {
|
||||||
|
command -v "$1" &> /dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
# systemctl required
|
||||||
|
if ! command_exists systemctl ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# default_menu_options defined as an associative array
|
||||||
|
typeset -A default_menu_options
|
||||||
|
|
||||||
|
# The default options with keys/commands
|
||||||
|
|
||||||
|
default_menu_options=(
|
||||||
|
[ Performance]="powerprofilesctl set performance"
|
||||||
|
[ Balanced]="powerprofilesctl set balanced"
|
||||||
|
[ Power Saver]="powerprofilesctl set power-saver"
|
||||||
|
[ Cancel]=""
|
||||||
|
)
|
||||||
|
|
||||||
|
# The menu that will be displayed
|
||||||
|
typeset -A menu
|
||||||
|
menu=()
|
||||||
|
|
||||||
|
# Only add power profiles that are available to menu
|
||||||
|
for key in "${!default_menu_options[@]}"; do
|
||||||
|
grep_arg=${default_menu_options[${key}]##* }
|
||||||
|
if powerprofilesctl list | grep -q "$grep_arg"; then
|
||||||
|
menu[${key}]=${default_menu_options[${key}]}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
unset grep_arg
|
||||||
|
unset default_menu_options
|
||||||
|
|
||||||
|
menu_nrows=${#menu[@]}
|
||||||
|
|
||||||
|
# Menu entries that may trigger a confirmation message
|
||||||
|
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||||
|
|
||||||
|
launcher_exe=""
|
||||||
|
launcher_options=""
|
||||||
|
rofi_colors=""
|
||||||
|
|
||||||
|
function prepare_launcher() {
|
||||||
|
if [[ "$1" == "rofi" ]]; then
|
||||||
|
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
|
||||||
|
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
|
||||||
|
launcher_exe="rofi"
|
||||||
|
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
|
||||||
|
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||||
|
elif [[ "$1" == "zenity" ]]; then
|
||||||
|
launcher_exe="zenity"
|
||||||
|
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
|
||||||
|
"${ZENITY_OPTIONS[@]}")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for l in "${launcher_list[@]}"; do
|
||||||
|
if command_exists "${l}" ; then
|
||||||
|
prepare_launcher "${l}"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# No launcher available
|
||||||
|
if [[ -z "${launcher_exe}" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
launcher=(${launcher_exe} "${launcher_options[@]}")
|
||||||
|
selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
|
||||||
|
|
||||||
|
function ask_confirmation() {
|
||||||
|
if [ "${launcher_exe}" == "rofi" ]; then
|
||||||
|
confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
|
||||||
|
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||||
|
[ "${confirmed}" == "Yes" ] && confirmed=0
|
||||||
|
elif [ "${launcher_exe}" == "zenity" ]; then
|
||||||
|
zenity --question --text "Are you sure you want to ${selection,,}?"
|
||||||
|
confirmed=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${confirmed}" == 0 ]; then
|
||||||
|
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $? -eq 0 && ! -z ${selection} ]]; then
|
||||||
|
if [[ "${enable_confirmation}" = true && \
|
||||||
|
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
|
||||||
|
ask_confirmation
|
||||||
|
else
|
||||||
|
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
186
config/i3/scripts/powermenu
Executable file
186
config/i3/scripts/powermenu
Executable file
@@ -0,0 +1,186 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Use rofi/zenity to change system runstate thanks to systemd.
|
||||||
|
#
|
||||||
|
# Note: this currently relies on associative array support in the shell.
|
||||||
|
#
|
||||||
|
# Inspired from i3pystatus wiki:
|
||||||
|
# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
|
||||||
|
#
|
||||||
|
# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# modified to work with latest rofi update by joekamprad <joekamprad@endeavouros.com>
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# BEGIN CONFIG #
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
# Use a custom lock script
|
||||||
|
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||||
|
|
||||||
|
# Colors: FG (foreground), BG (background), HL (highlighted)
|
||||||
|
FG_COLOR="#bbbbbb"
|
||||||
|
BG_COLOR="#111111"
|
||||||
|
HLFG_COLOR="#111111"
|
||||||
|
HLBG_COLOR="#bbbbbb"
|
||||||
|
BORDER_COLOR="#222222"
|
||||||
|
|
||||||
|
# Options not related to colors (most rofi options do not work anymore)
|
||||||
|
ROFI_OPTIONS=(-theme ~/.config/rofi/powermenu.rasi)
|
||||||
|
# Zenity options
|
||||||
|
ZENITY_TITLE="Power Menu"
|
||||||
|
ZENITY_TEXT="Action:"
|
||||||
|
ZENITY_OPTIONS=(--column= --hide-header)
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# END CONFIG #
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
# Whether to ask for user's confirmation
|
||||||
|
enable_confirmation=false
|
||||||
|
|
||||||
|
# Preferred launcher if both are available
|
||||||
|
preferred_launcher="rofi"
|
||||||
|
|
||||||
|
usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
|
||||||
|
|
||||||
|
where:
|
||||||
|
-h show this help text
|
||||||
|
-c ask for user confirmation
|
||||||
|
-p preferred launcher (rofi or zenity)
|
||||||
|
|
||||||
|
This script depends on:
|
||||||
|
- systemd,
|
||||||
|
- i3,
|
||||||
|
- rofi or zenity."
|
||||||
|
|
||||||
|
# Check whether the user-defined launcher is valid
|
||||||
|
launcher_list=(rofi zenity)
|
||||||
|
function check_launcher() {
|
||||||
|
if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
|
||||||
|
echo "Supported launchers: ${launcher_list[*]}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# Get array with unique elements and preferred launcher first
|
||||||
|
# Note: uniq expects a sorted list, so we cannot use it
|
||||||
|
i=1
|
||||||
|
launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
|
||||||
|
| sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Parse CLI arguments
|
||||||
|
while getopts "hcp:" option; do
|
||||||
|
case "${option}" in
|
||||||
|
h) echo "${usage}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
c) enable_confirmation=true
|
||||||
|
;;
|
||||||
|
p) preferred_launcher="${OPTARG}"
|
||||||
|
check_launcher "${preferred_launcher}"
|
||||||
|
;;
|
||||||
|
*) exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Check whether a command exists
|
||||||
|
function command_exists() {
|
||||||
|
command -v "$1" &> /dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
# systemctl required
|
||||||
|
if ! command_exists systemctl ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# menu defined as an associative array
|
||||||
|
typeset -A menu
|
||||||
|
|
||||||
|
# Menu with keys/commands
|
||||||
|
|
||||||
|
menu=(
|
||||||
|
[ Shutdown]="systemctl poweroff"
|
||||||
|
[ Reboot]="systemctl reboot"
|
||||||
|
[ Suspend]="systemctl suspend"
|
||||||
|
[ Hibernate]="systemctl hibernate"
|
||||||
|
[ Lock]="~/.config/i3/scripts/blur-lock"
|
||||||
|
[ Logout]="i3-msg exit"
|
||||||
|
[ Cancel]=""
|
||||||
|
)
|
||||||
|
|
||||||
|
menu_nrows=${#menu[@]}
|
||||||
|
|
||||||
|
# Menu entries that may trigger a confirmation message
|
||||||
|
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||||
|
|
||||||
|
launcher_exe=""
|
||||||
|
launcher_options=""
|
||||||
|
rofi_colors=""
|
||||||
|
|
||||||
|
function prepare_launcher() {
|
||||||
|
if [[ "$1" == "rofi" ]]; then
|
||||||
|
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
|
||||||
|
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
|
||||||
|
launcher_exe="rofi"
|
||||||
|
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
|
||||||
|
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||||
|
elif [[ "$1" == "zenity" ]]; then
|
||||||
|
launcher_exe="zenity"
|
||||||
|
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
|
||||||
|
"${ZENITY_OPTIONS[@]}")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for l in "${launcher_list[@]}"; do
|
||||||
|
if command_exists "${l}" ; then
|
||||||
|
prepare_launcher "${l}"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# No launcher available
|
||||||
|
if [[ -z "${launcher_exe}" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
launcher=(${launcher_exe} "${launcher_options[@]}")
|
||||||
|
selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
|
||||||
|
|
||||||
|
function ask_confirmation() {
|
||||||
|
if [ "${launcher_exe}" == "rofi" ]; then
|
||||||
|
confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
|
||||||
|
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||||
|
[ "${confirmed}" == "Yes" ] && confirmed=0
|
||||||
|
elif [ "${launcher_exe}" == "zenity" ]; then
|
||||||
|
zenity --question --text "Are you sure you want to ${selection,,}?"
|
||||||
|
confirmed=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${confirmed}" == 0 ]; then
|
||||||
|
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $? -eq 0 && ! -z ${selection} ]]; then
|
||||||
|
if [[ "${enable_confirmation}" = true && \
|
||||||
|
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
|
||||||
|
ask_confirmation
|
||||||
|
else
|
||||||
|
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
11
config/i3/scripts/ppd-status
Executable file
11
config/i3/scripts/ppd-status
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# power-profiles-daemon implementation:
|
||||||
|
# needs package power-profiles-daemon installed and the service running see here:
|
||||||
|
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
||||||
|
# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/power-profiles
|
||||||
|
|
||||||
|
# script to show current power profile
|
||||||
|
|
||||||
|
current_profile=$(/usr/bin/powerprofilesctl get)
|
||||||
|
echo "$current_profile"
|
||||||
86
config/i3/scripts/temperature
Executable file
86
config/i3/scripts/temperature
Executable file
@@ -0,0 +1,86 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||||
|
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||||
|
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
||||||
|
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
use Getopt::Long;
|
||||||
|
|
||||||
|
binmode(STDOUT, ":utf8");
|
||||||
|
|
||||||
|
# default values
|
||||||
|
my $t_warn = $ENV{T_WARN} || 70;
|
||||||
|
my $t_crit = $ENV{T_CRIT} || 90;
|
||||||
|
my $chip = $ENV{SENSOR_CHIP} || "";
|
||||||
|
my $temperature = -9999;
|
||||||
|
my $label = "😀 ";
|
||||||
|
|
||||||
|
sub help {
|
||||||
|
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
|
||||||
|
print "-w <percent>: warning threshold to become yellow\n";
|
||||||
|
print "-c <percent>: critical threshold to become red\n";
|
||||||
|
print "--chip <chip>: sensor chip\n";
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetOptions("help|h" => \&help,
|
||||||
|
"w=i" => \$t_warn,
|
||||||
|
"c=i" => \$t_crit,
|
||||||
|
"chip=s" => \$chip);
|
||||||
|
|
||||||
|
# Get chip temperature
|
||||||
|
open (SENSORS, "sensors -u $chip |") or die;
|
||||||
|
while (<SENSORS>) {
|
||||||
|
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
|
||||||
|
$temperature = $1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(SENSORS);
|
||||||
|
|
||||||
|
$temperature eq -9999 and die 'Cannot find temperature';
|
||||||
|
|
||||||
|
if ($temperature < 45) {
|
||||||
|
$label = '';
|
||||||
|
} elsif ($temperature < 55) {
|
||||||
|
$label = '';
|
||||||
|
} elsif ($temperature < 65) {
|
||||||
|
$label = '';
|
||||||
|
} elsif ($temperature < 75) {
|
||||||
|
$label = '';
|
||||||
|
} else {
|
||||||
|
$label = '';
|
||||||
|
}
|
||||||
|
# Print short_text, full_text
|
||||||
|
print "${label}";
|
||||||
|
print " $temperature°C\n";
|
||||||
|
print "${label}";
|
||||||
|
print " $temperature°C\n";
|
||||||
|
|
||||||
|
# Print color, if needed
|
||||||
|
if ($temperature >= $t_crit) {
|
||||||
|
print "#FF0000\n";
|
||||||
|
exit 33;
|
||||||
|
} elsif ($temperature >= $t_warn) {
|
||||||
|
print "#FFFC00\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
exit 0;
|
||||||
93
config/i3/scripts/volume
Executable file
93
config/i3/scripts/volume
Executable file
@@ -0,0 +1,93 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||||
|
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# original source: https://github.com/vivien/i3blocks-contrib/tree/master/volume
|
||||||
|
# check the readme: https://github.com/vivien/i3blocks-contrib/blob/master/volume/README.md
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The second parameter overrides the mixer selection
|
||||||
|
# For PulseAudio users, eventually use "pulse"
|
||||||
|
# For Jack/Jack2 users, use "jackplug"
|
||||||
|
# For ALSA users, you may use "default" for your primary card
|
||||||
|
# or you may use hw:# where # is the number of the card desired
|
||||||
|
if [[ -z "$MIXER" ]] ; then
|
||||||
|
MIXER="default"
|
||||||
|
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
|
||||||
|
# pulseaudio is running, but not all installations use "pulse"
|
||||||
|
if amixer -D pulse info >/dev/null 2>&1 ; then
|
||||||
|
MIXER="pulse"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
|
||||||
|
MIXER="${2:-$MIXER}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The instance option sets the control to report and configure
|
||||||
|
# This defaults to the first control of your selected mixer
|
||||||
|
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
|
||||||
|
if [[ -z "$SCONTROL" ]] ; then
|
||||||
|
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
|
||||||
|
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
|
||||||
|
head -n1
|
||||||
|
)}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The first parameter sets the step to change the volume by (and units to display)
|
||||||
|
# This may be in in % or dB (eg. 5% or 3dB)
|
||||||
|
if [[ -z "$STEP" ]] ; then
|
||||||
|
STEP="${1:-5%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# AMIXER(1):
|
||||||
|
# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
|
||||||
|
# more natural for human ear."
|
||||||
|
NATURAL_MAPPING=${NATURAL_MAPPING:-0}
|
||||||
|
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
|
||||||
|
AMIXER_PARAMS="-M"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
|
capability() { # Return "Capture" if the device is a capture device
|
||||||
|
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
|
||||||
|
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume() {
|
||||||
|
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
|
||||||
|
}
|
||||||
|
|
||||||
|
format() {
|
||||||
|
|
||||||
|
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
|
||||||
|
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
|
||||||
|
# If dB was selected, print that instead
|
||||||
|
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
|
||||||
|
perl_filter+='"; exit}'
|
||||||
|
output=$(perl -ne "$perl_filter")
|
||||||
|
echo "$LABEL$output"
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
|
case $BLOCK_BUTTON in
|
||||||
|
3) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
|
||||||
|
4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
|
||||||
|
5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
|
||||||
|
esac
|
||||||
|
|
||||||
|
volume | format
|
||||||
96
config/i3/scripts/volume_brightness.sh
Executable file
96
config/i3/scripts/volume_brightness.sh
Executable file
@@ -0,0 +1,96 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# original source: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
|
||||||
|
|
||||||
|
# taken from here: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
|
||||||
|
|
||||||
|
# See README.md for usage instructions
|
||||||
|
bar_color="#7f7fff"
|
||||||
|
volume_step=1
|
||||||
|
brightness_step=2.5
|
||||||
|
max_volume=100
|
||||||
|
|
||||||
|
# Uses regex to get volume from pactl
|
||||||
|
function get_volume {
|
||||||
|
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Uses regex to get mute status from pactl
|
||||||
|
function get_mute {
|
||||||
|
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Uses regex to get brightness from xbacklight
|
||||||
|
function get_brightness {
|
||||||
|
xbacklight | grep -Po '[0-9]{1,3}' | head -n 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume
|
||||||
|
function get_volume_icon {
|
||||||
|
volume=$(get_volume)
|
||||||
|
mute=$(get_mute)
|
||||||
|
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ] ; then
|
||||||
|
volume_icon=""
|
||||||
|
elif [ "$volume" -lt 50 ]; then
|
||||||
|
volume_icon=""
|
||||||
|
else
|
||||||
|
volume_icon=""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Always returns the same icon - I couldn't get the brightness-low icon to work with fontawesome
|
||||||
|
function get_brightness_icon {
|
||||||
|
brightness_icon=""
|
||||||
|
}
|
||||||
|
|
||||||
|
# Displays a volume notification using dunstify
|
||||||
|
function show_volume_notif {
|
||||||
|
volume=$(get_mute)
|
||||||
|
get_volume_icon
|
||||||
|
dunstify -i audio-volume-muted-blocking -t 1000 -r 2593 -u normal "$volume_icon $volume%" -h int:value:$volume -h string:hlcolor:$bar_color
|
||||||
|
}
|
||||||
|
|
||||||
|
# Displays a brightness notification using dunstify
|
||||||
|
function show_brightness_notif {
|
||||||
|
brightness=$(get_brightness)
|
||||||
|
get_brightness_icon
|
||||||
|
dunstify -t 1000 -r 2593 -u normal "$brightness_icon $brightness%" -h int:value:$brightness -h string:hlcolor:$bar_color
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main function - Takes user input, "volume_up", "volume_down", "brightness_up", or "brightness_down"
|
||||||
|
case $1 in
|
||||||
|
volume_up)
|
||||||
|
# Unmutes and increases volume, then displays the notification
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ 0
|
||||||
|
volume=$(get_volume)
|
||||||
|
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
|
||||||
|
else
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
|
||||||
|
fi
|
||||||
|
show_volume_notif
|
||||||
|
;;
|
||||||
|
|
||||||
|
volume_down)
|
||||||
|
# Raises volume and displays the notification
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
|
||||||
|
show_volume_notif
|
||||||
|
;;
|
||||||
|
|
||||||
|
volume_mute)
|
||||||
|
# Toggles mute and displays the notification
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
show_volume_notif
|
||||||
|
;;
|
||||||
|
|
||||||
|
brightness_up)
|
||||||
|
# Increases brightness and displays the notification
|
||||||
|
xbacklight -inc $brightness_step -time 0
|
||||||
|
show_brightness_notif
|
||||||
|
;;
|
||||||
|
|
||||||
|
brightness_down)
|
||||||
|
# Decreases brightness and displays the notification
|
||||||
|
xbacklight -dec $brightness_step -time 0
|
||||||
|
show_brightness_notif
|
||||||
|
;;
|
||||||
|
esac
|
||||||
25
config/i3/scripts/vpn
Executable file
25
config/i3/scripts/vpn
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Copyright (C) 2021 Andreas Lindlbauer
|
||||||
|
# Licensed under the terms of EUPLv1.2.
|
||||||
|
#
|
||||||
|
# i3blocks blocklet script to monitor the (nord)vpn connection
|
||||||
|
|
||||||
|
vpnstatus="📢"
|
||||||
|
nordvpn_output=$(nordvpn status | cat -v | head -1 | sed -e 's/\^M-^M ^M//g' )
|
||||||
|
if [ "${nordvpn_output}" = "Status: Connected" ]; then
|
||||||
|
vpnstatus="🥸"
|
||||||
|
elif [ "${nordvpn_output}" = "A new version of NordVPN is available! Please update the application." ]; then
|
||||||
|
nordvpn_output=$(nordvpn status | cat -v | head -2 | tail -1 | sed -e 's/\^M-^M ^M//g' )
|
||||||
|
if [ "${nordvpn_output}" = "Status: Connected" ]; then
|
||||||
|
vpnstatus="🥴"
|
||||||
|
elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
|
||||||
|
vpnstatus="📢"
|
||||||
|
fi
|
||||||
|
elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
|
||||||
|
vpnstatus="📢"
|
||||||
|
elif [[ "$nordvpn_output" == *\/* ]] || [[ "$nordvpn_output" == *\\* ]]; then
|
||||||
|
vpnstatus="Something's very wrong"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$vpnstatus"
|
||||||
51
config/lvim/config.lua
Normal file
51
config/lvim/config.lua
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
-- Read the docs: https://www.lunarvim.org/docs/configuration
|
||||||
|
-- Example configs: https://github.com/LunarVim/starter.lvim
|
||||||
|
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
|
||||||
|
-- Forum: https://www.reddit.com/r/lunarvim/
|
||||||
|
-- Discord: https://discord.com/invite/Xb9B4Ny
|
||||||
|
|
||||||
|
-- jump to first character on line
|
||||||
|
-- vim.cmd("map 0 ^")
|
||||||
|
|
||||||
|
-- move accross visual lines
|
||||||
|
-- vim.cmd("noremap j gj")
|
||||||
|
-- vim.cmd("noremap k gk")
|
||||||
|
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
-- move to first character on line
|
||||||
|
vim.keymap.set('n','0','^')
|
||||||
|
|
||||||
|
-- jump over lines visually
|
||||||
|
vim.keymap.set('n','j','gj')
|
||||||
|
vim.keymap.set('n','k','gk')
|
||||||
|
|
||||||
|
-- format
|
||||||
|
vim.keymap.set('n','<leader>', 'gqip')
|
||||||
|
|
||||||
|
-- fast-saving
|
||||||
|
vim.keymap.set('n', '<space>w', ':w!<cr>')
|
||||||
|
|
||||||
|
-- :W sudo saves that file with sudo persmission
|
||||||
|
|
||||||
|
-- smart way to move between windows
|
||||||
|
-- vim.keymap.set('', '<C-j>', '<C-W>j')
|
||||||
|
-- vim.keymap.set('', '<C-k>', '<C-W>k')
|
||||||
|
-- vim.keymap.set('', '<C-h>', '<C-W>h')
|
||||||
|
-- vim.keymap.set('', '<C-l>', '<C-W>l')
|
||||||
|
|
||||||
|
-- hightlight last inserted text
|
||||||
|
vim.keymap.set('n', 'gV', '`[v`]', {noremap=true})
|
||||||
|
|
||||||
|
-- jk is escape in insert mode
|
||||||
|
vim.keymap.set('i', 'jk', '<esc>', {noremap=true})
|
||||||
|
|
||||||
|
-- yank whole line
|
||||||
|
vim.keymap.set('n', 'Y', 'y$', {noremap=true})
|
||||||
|
|
||||||
|
-- insert empty line below or above
|
||||||
|
vim.keymap.set('n', '<CR>', 'o<Esc>k')
|
||||||
|
vim.keymap.set('n', '<C-o>', 'O<Esc>j')
|
||||||
|
|
||||||
|
lvim.transparent_window = true
|
||||||
3
config/lvim/generate_all_settings.sh
Executable file
3
config/lvim/generate_all_settings.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
lvim --headless +'lua require("lvim.utils").generate_settings()' +qa && sort -o lv-settings.lua{,}
|
||||||
44
config/lvim/lazy-lock.json
Normal file
44
config/lvim/lazy-lock.json
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" },
|
||||||
|
"alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" },
|
||||||
|
"bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "a4bd44523316928a7c4a5c09a3407d02c30b6027" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "d6a782c7002682f4a01b79fc3918c4584ad6e8fb" },
|
||||||
|
"lir.nvim": { "branch": "master", "commit": "1aa871f20637eccc4e1e26b0fbcf9aafc9b6caf7" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" },
|
||||||
|
"lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" },
|
||||||
|
"neodev.nvim": { "branch": "main", "commit": "0043cf91c18aeac8db5765eb86c6078e17ac9325" },
|
||||||
|
"nlsp-settings.nvim": { "branch": "main", "commit": "32aa12da328258f2dccb15d327c26a8d21d9f4bd" },
|
||||||
|
"null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" },
|
||||||
|
"nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "bb375fb20327c49920c41d2b51c1ce2f4fe7deb3" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "2ce3c9080cfe4a39c7907e672edafd2a95244a7c" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" },
|
||||||
|
"onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
|
||||||
|
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||||
|
"schemastore.nvim": { "branch": "main", "commit": "0b396f538f195c249f021a48c3d8988f0d3f86f7" },
|
||||||
|
"structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||||
|
"telescope.nvim": { "branch": "0.1.x", "commit": "9de317bdea2bc393074651179c4fc7f93e9b2d56" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" }
|
||||||
|
}
|
||||||
36
config/nvim/init.lua
Normal file
36
config/nvim/init.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
-- move to first character on line
|
||||||
|
vim.keymap.set('n','0','^')
|
||||||
|
|
||||||
|
-- jump over lines visually
|
||||||
|
vim.keymap.set('n','j','gj')
|
||||||
|
vim.keymap.set('n','k','gk')
|
||||||
|
|
||||||
|
-- format
|
||||||
|
vim.keymap.set('n','<leader>', 'gqip')
|
||||||
|
|
||||||
|
-- fast-saving
|
||||||
|
vim.keymap.set('n', '<space>w', ':w!<cr>')
|
||||||
|
|
||||||
|
-- :W sudo saves that file with sudo persmission
|
||||||
|
|
||||||
|
-- smart way to move between windows
|
||||||
|
-- vim.keymap.set('', '<C-j>', '<C-W>j')
|
||||||
|
-- vim.keymap.set('', '<C-k>', '<C-W>k')
|
||||||
|
-- vim.keymap.set('', '<C-h>', '<C-W>h')
|
||||||
|
-- vim.keymap.set('', '<C-l>', '<C-W>l')
|
||||||
|
|
||||||
|
-- hightlight last inserted text
|
||||||
|
vim.keymap.set('n', 'gV', '`[v`]', {noremap=true})
|
||||||
|
|
||||||
|
-- jk is escape in insert mode
|
||||||
|
vim.keymap.set('i', 'jk', '<esc>', {noremap=true})
|
||||||
|
|
||||||
|
-- yank whole line
|
||||||
|
vim.keymap.set('n', 'Y', 'y$', {noremap=true})
|
||||||
|
|
||||||
|
-- insert empty line below or above
|
||||||
|
vim.keymap.set('n', '<CR>', 'o<Esc>k')
|
||||||
|
vim.keymap.set('n', '<C-o>', 'O<Esc>j')
|
||||||
BIN
config/ranger/__pycache__/devicons.cpython-311.pyc
Normal file
BIN
config/ranger/__pycache__/devicons.cpython-311.pyc
Normal file
Binary file not shown.
38
config/ranger/commands.py
Normal file
38
config/ranger/commands.py
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
from ranger.api.commands import Command
|
||||||
|
|
||||||
|
class paste_as_root(Command):
|
||||||
|
def execute(self):
|
||||||
|
if self.fm.do_cut:
|
||||||
|
self.fm.execute_console('shell sudo mv %c .')
|
||||||
|
else:
|
||||||
|
self.fm.execute_console('shell sudo cp -r %c .')
|
||||||
|
|
||||||
|
class fzf_select(Command):
|
||||||
|
"""
|
||||||
|
:fzf_select
|
||||||
|
|
||||||
|
Find a file using fzf.
|
||||||
|
|
||||||
|
With a prefix argument select only directories.
|
||||||
|
|
||||||
|
See: https://github.com/junegunn/fzf
|
||||||
|
"""
|
||||||
|
def execute(self):
|
||||||
|
import subprocess
|
||||||
|
import os.path
|
||||||
|
if self.quantifier:
|
||||||
|
# match only directories
|
||||||
|
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
|
||||||
|
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse --header='Jump to file'"
|
||||||
|
else:
|
||||||
|
# match files and directories
|
||||||
|
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
|
||||||
|
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse --header='Jump to filemap <C-f> fzf_select'"
|
||||||
|
fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE)
|
||||||
|
stdout, stderr = fzf.communicate()
|
||||||
|
if fzf.returncode == 0:
|
||||||
|
fzf_file = os.path.abspath(stdout.rstrip('\n'))
|
||||||
|
if os.path.isdir(fzf_file):
|
||||||
|
self.fm.cd(fzf_file)
|
||||||
|
else:
|
||||||
|
self.fm.select_file(fzf_file)
|
||||||
219
config/ranger/devicons.py
Normal file
219
config/ranger/devicons.py
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# coding=UTF-8
|
||||||
|
# These glyphs, and the mapping of file extensions to glyphs
|
||||||
|
# has been copied from the vimscript code that is present in
|
||||||
|
# https://github.com/ryanoasis/vim-devicons
|
||||||
|
import re;
|
||||||
|
import os;
|
||||||
|
|
||||||
|
# all those glyphs will show as weird squares if you don't have the correct patched font
|
||||||
|
# My advice is to use NerdFonts which can be found here:
|
||||||
|
# https://github.com/ryanoasis/nerd-fonts
|
||||||
|
file_node_extensions = {
|
||||||
|
'7z' : '',
|
||||||
|
'ai' : '',
|
||||||
|
'apk' : '',
|
||||||
|
'avi' : '',
|
||||||
|
'bat' : '',
|
||||||
|
'bmp' : '',
|
||||||
|
'bz2' : '',
|
||||||
|
'c' : '',
|
||||||
|
'c++' : '',
|
||||||
|
'cab' : '',
|
||||||
|
'cc' : '',
|
||||||
|
'clj' : '',
|
||||||
|
'cljc' : '',
|
||||||
|
'cljs' : '',
|
||||||
|
'coffee' : '',
|
||||||
|
'conf' : '',
|
||||||
|
'cp' : '',
|
||||||
|
'cpio' : '',
|
||||||
|
'cpp' : '',
|
||||||
|
'css' : '',
|
||||||
|
'cxx' : '',
|
||||||
|
'd' : '',
|
||||||
|
'dart' : '',
|
||||||
|
'db' : '',
|
||||||
|
'deb' : '',
|
||||||
|
'diff' : '',
|
||||||
|
'dump' : '',
|
||||||
|
'edn' : '',
|
||||||
|
'ejs' : '',
|
||||||
|
'epub' : '',
|
||||||
|
'erl' : '',
|
||||||
|
'f#' : '',
|
||||||
|
'fish' : '',
|
||||||
|
'flac' : '',
|
||||||
|
'flv' : '',
|
||||||
|
'fs' : '',
|
||||||
|
'fsi' : '',
|
||||||
|
'fsscript' : '',
|
||||||
|
'fsx' : '',
|
||||||
|
'gem' : '',
|
||||||
|
'gif' : '',
|
||||||
|
'go' : '',
|
||||||
|
'gz' : '',
|
||||||
|
'gzip' : '',
|
||||||
|
'hbs' : '',
|
||||||
|
'hrl' : '',
|
||||||
|
'hs' : '',
|
||||||
|
'htm' : '',
|
||||||
|
'html' : '',
|
||||||
|
'ico' : '',
|
||||||
|
'ini' : '',
|
||||||
|
'java' : '',
|
||||||
|
'jl' : '',
|
||||||
|
'jpeg' : '',
|
||||||
|
'jpg' : '',
|
||||||
|
'js' : '',
|
||||||
|
'json' : '',
|
||||||
|
'jsx' : '',
|
||||||
|
'less' : '',
|
||||||
|
'lha' : '',
|
||||||
|
'lhs' : '',
|
||||||
|
'log' : '',
|
||||||
|
'lua' : '',
|
||||||
|
'lzh' : '',
|
||||||
|
'lzma' : '',
|
||||||
|
'markdown' : '',
|
||||||
|
'md' : '',
|
||||||
|
'mkv' : '',
|
||||||
|
'ml' : 'λ',
|
||||||
|
'mli' : 'λ',
|
||||||
|
'mov' : '',
|
||||||
|
'mp3' : '',
|
||||||
|
'mp4' : '',
|
||||||
|
'mpeg' : '',
|
||||||
|
'mpg' : '',
|
||||||
|
'mustache' : '',
|
||||||
|
'ogg' : '',
|
||||||
|
'pdf' : '',
|
||||||
|
'php' : '',
|
||||||
|
'pl' : '',
|
||||||
|
'pm' : '',
|
||||||
|
'png' : '',
|
||||||
|
'psb' : '',
|
||||||
|
'psd' : '',
|
||||||
|
'py' : '',
|
||||||
|
'pyc' : '',
|
||||||
|
'pyd' : '',
|
||||||
|
'pyo' : '',
|
||||||
|
'rar' : '',
|
||||||
|
'rb' : '',
|
||||||
|
'rc' : '',
|
||||||
|
'rlib' : '',
|
||||||
|
'rpm' : '',
|
||||||
|
'rs' : '',
|
||||||
|
'rss' : '',
|
||||||
|
'scala' : '',
|
||||||
|
'scss' : '',
|
||||||
|
'sh' : '',
|
||||||
|
'slim' : '',
|
||||||
|
'sln' : '',
|
||||||
|
'sql' : '',
|
||||||
|
'styl' : '',
|
||||||
|
'suo' : '',
|
||||||
|
't' : '',
|
||||||
|
'tar' : '',
|
||||||
|
'tgz' : '',
|
||||||
|
'ts' : '',
|
||||||
|
'twig' : '',
|
||||||
|
'vim' : '',
|
||||||
|
'vimrc' : '',
|
||||||
|
'wav' : '',
|
||||||
|
'xml' : '',
|
||||||
|
'xul' : '',
|
||||||
|
'xz' : '',
|
||||||
|
'yml' : '',
|
||||||
|
'zip' : '',
|
||||||
|
}
|
||||||
|
|
||||||
|
dir_node_exact_matches = {
|
||||||
|
# English
|
||||||
|
'.git' : '',
|
||||||
|
'Desktop' : '',
|
||||||
|
'Documents' : '',
|
||||||
|
'Downloads' : '',
|
||||||
|
'Dropbox' : '',
|
||||||
|
'Music' : '',
|
||||||
|
'Pictures' : '',
|
||||||
|
'Public' : '',
|
||||||
|
'Templates' : '',
|
||||||
|
'Videos' : '',
|
||||||
|
# French
|
||||||
|
'Bureau' : '',
|
||||||
|
'Documents' : '',
|
||||||
|
'Images' : '',
|
||||||
|
'Musique' : '',
|
||||||
|
'Publique' : '',
|
||||||
|
'Téléchargements' : '',
|
||||||
|
'Vidéos' : '',
|
||||||
|
# Portuguese
|
||||||
|
'Documentos' : '',
|
||||||
|
'Imagens' : '',
|
||||||
|
'Modelos' : '',
|
||||||
|
'Música' : '',
|
||||||
|
'Público' : '',
|
||||||
|
'Vídeos' : '',
|
||||||
|
'Área de trabalho' : '',
|
||||||
|
# Italian
|
||||||
|
'Documenti' : '',
|
||||||
|
'Immagini' : '',
|
||||||
|
'Modelli' : '',
|
||||||
|
'Musica' : '',
|
||||||
|
'Pubblici' : '',
|
||||||
|
'Scaricati' : '',
|
||||||
|
'Scrivania' : '',
|
||||||
|
'Video' : '',
|
||||||
|
# German
|
||||||
|
'Bilder' : '',
|
||||||
|
'Dokumente' : '',
|
||||||
|
'Musik' : '',
|
||||||
|
'Schreibtisch' : '',
|
||||||
|
'Vorlagen' : '',
|
||||||
|
'Öffentlich' : '',
|
||||||
|
}
|
||||||
|
|
||||||
|
file_node_exact_matches = {
|
||||||
|
'.Xdefaults' : '',
|
||||||
|
'.Xresources' : '',
|
||||||
|
'.bashprofile' : '',
|
||||||
|
'.bashrc' : '',
|
||||||
|
'.dmrc' : '',
|
||||||
|
'.ds_store' : '',
|
||||||
|
'.fasd' : '',
|
||||||
|
'.gitconfig' : '',
|
||||||
|
'.gitignore' : '',
|
||||||
|
'.jack-settings' : '',
|
||||||
|
'.mime.types' : '',
|
||||||
|
'.nvidia-settings-rc' : '',
|
||||||
|
'.pam_environment' : '',
|
||||||
|
'.profile' : '',
|
||||||
|
'.recently-used' : '',
|
||||||
|
'.selected_editor' : '',
|
||||||
|
'.vimrc' : '',
|
||||||
|
'.xinputrc' : '',
|
||||||
|
'config' : '',
|
||||||
|
'dropbox' : '',
|
||||||
|
'exact-match-case-sensitive-1.txt' : 'X1',
|
||||||
|
'exact-match-case-sensitive-2' : 'X2',
|
||||||
|
'favicon.ico' : '',
|
||||||
|
'gruntfile.coffee' : '',
|
||||||
|
'gruntfile.js' : '',
|
||||||
|
'gruntfile.ls' : '',
|
||||||
|
'gulpfile.coffee' : '',
|
||||||
|
'gulpfile.js' : '',
|
||||||
|
'gulpfile.ls' : '',
|
||||||
|
'ini' : '',
|
||||||
|
'ledger' : '',
|
||||||
|
'license' : '',
|
||||||
|
'mimeapps.list' : '',
|
||||||
|
'node_modules' : '',
|
||||||
|
'procfile' : '',
|
||||||
|
'react.jsx' : '',
|
||||||
|
'user-dirs.dirs' : '',
|
||||||
|
}
|
||||||
|
|
||||||
|
def devicon(file):
|
||||||
|
if file.is_directory: return dir_node_exact_matches.get(file.relative_path, '')
|
||||||
|
return file_node_exact_matches.get(file.relative_path, file_node_extensions.get(file.extension, ''))
|
||||||
0
config/ranger/plugins/__init__.py
Normal file
0
config/ranger/plugins/__init__.py
Normal file
BIN
config/ranger/plugins/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
config/ranger/plugins/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
22
config/ranger/plugins/devicons_linemode.py
Normal file
22
config/ranger/plugins/devicons_linemode.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import os
|
||||||
|
terminal=terminal=os.getenv('TERM')
|
||||||
|
if terminal != 'linux':
|
||||||
|
import ranger.api
|
||||||
|
from ranger.core.linemode import LinemodeBase
|
||||||
|
from devicons import *
|
||||||
|
|
||||||
|
@ranger.api.register_linemode
|
||||||
|
class DevIconsLinemode(LinemodeBase):
|
||||||
|
name = "devicons"
|
||||||
|
|
||||||
|
uses_metadata = False
|
||||||
|
|
||||||
|
def filetitle(self, file, metadata):
|
||||||
|
return devicon(file) + ' ' + file.relative_path
|
||||||
|
|
||||||
|
@ranger.api.register_linemode
|
||||||
|
class DevIconsLinemodeFile(LinemodeBase):
|
||||||
|
name = "filename"
|
||||||
|
|
||||||
|
def filetitle(self, file, metadata):
|
||||||
|
return devicon(file) + ' ' + file.relative_path
|
||||||
4
config/ranger/ranger-launcher.sh
Executable file
4
config/ranger/ranger-launcher.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
export RANGERCD=true
|
||||||
|
$TERM
|
||||||
|
|
||||||
619
config/ranger/rc.conf
Normal file
619
config/ranger/rc.conf
Normal file
@@ -0,0 +1,619 @@
|
|||||||
|
# ===================================================================
|
||||||
|
# This file contains the default startup commands for ranger.
|
||||||
|
# To change them, it is recommended to create the file
|
||||||
|
# ~/.config/ranger/rc.conf and add your custom commands there.
|
||||||
|
#
|
||||||
|
# If you copy this whole file there, you may want to set the environment
|
||||||
|
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
|
||||||
|
#
|
||||||
|
# The purpose of this file is mainly to define keybindings and settings.
|
||||||
|
# For running more complex python code, please create a plugin in "plugins/" or
|
||||||
|
# a command in "commands.py".
|
||||||
|
#
|
||||||
|
# Each line is a command that will be run before the user interface
|
||||||
|
# is initialized. As a result, you can not use commands which rely
|
||||||
|
# on the UI such as :delete or :mark.
|
||||||
|
# ===================================================================
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Options
|
||||||
|
# ===================================================================
|
||||||
|
|
||||||
|
# Which viewmode should be used? Possible values are:
|
||||||
|
# miller: Use miller columns which show multiple levels of the hierarchy
|
||||||
|
# multipane: Midnight-commander like multipane view showing all tabs next
|
||||||
|
# to each other
|
||||||
|
set viewmode miller
|
||||||
|
#set viewmode multipane
|
||||||
|
|
||||||
|
# How many columns are there, and what are their relative widths?
|
||||||
|
set column_ratios 1,3,4
|
||||||
|
|
||||||
|
# Which files should be hidden? (regular expression)
|
||||||
|
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
|
||||||
|
|
||||||
|
# Show hidden files? You can toggle this by typing 'zh'
|
||||||
|
set show_hidden false
|
||||||
|
|
||||||
|
# Ask for a confirmation when running the "delete" command?
|
||||||
|
# Valid values are "always", "never", "multiple" (default)
|
||||||
|
# With "multiple", ranger will ask only if you delete multiple files at once.
|
||||||
|
set confirm_on_delete never
|
||||||
|
|
||||||
|
# Which script is used to generate file previews?
|
||||||
|
# ranger ships with scope.sh, a script that calls external programs (see
|
||||||
|
# README.md for dependencies) to preview images, archives, etc.
|
||||||
|
set preview_script ~/.config/ranger/scope.sh
|
||||||
|
|
||||||
|
# Use the external preview script or display simple plain text or image previews?
|
||||||
|
set use_preview_script true
|
||||||
|
|
||||||
|
# Automatically count files in the directory, even before entering them?
|
||||||
|
set automatically_count_files true
|
||||||
|
|
||||||
|
# Open all images in this directory when running certain image viewers
|
||||||
|
# like feh or sxiv? You can still open selected files by marking them.
|
||||||
|
set open_all_images true
|
||||||
|
|
||||||
|
# Be aware of version control systems and display information.
|
||||||
|
set vcs_aware true
|
||||||
|
|
||||||
|
# State of the three backends git, hg, bzr. The possible states are
|
||||||
|
# disabled, local (only show local info), enabled (show local and remote
|
||||||
|
# information).
|
||||||
|
set vcs_backend_git enabled
|
||||||
|
set vcs_backend_hg disabled
|
||||||
|
set vcs_backend_bzr disabled
|
||||||
|
|
||||||
|
# Use one of the supported image preview protocols
|
||||||
|
set preview_images true
|
||||||
|
|
||||||
|
# Set the preview image method. Supported methods:
|
||||||
|
#
|
||||||
|
# * w3m (default):
|
||||||
|
# Preview images in full color with the external command "w3mimgpreview"?
|
||||||
|
# This requires the console web browser "w3m" and a supported terminal.
|
||||||
|
# It has been successfully tested with "xterm" and "urxvt" without tmux.
|
||||||
|
#
|
||||||
|
# * iterm2:
|
||||||
|
# Preview images in full color using iTerm2 image previews
|
||||||
|
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
|
||||||
|
# with image preview support.
|
||||||
|
#
|
||||||
|
# * urxvt:
|
||||||
|
# Preview images in full color using urxvt image backgrounds. This
|
||||||
|
# requires using urxvt compiled with pixbuf support.
|
||||||
|
#
|
||||||
|
# * urxvt-full:
|
||||||
|
# The same as urxvt but utilizing not only the preview pane but the
|
||||||
|
# whole terminal window.
|
||||||
|
set preview_images_method ueberzug
|
||||||
|
|
||||||
|
# Use a unicode "..." character to mark cut-off filenames?
|
||||||
|
set unicode_ellipsis false
|
||||||
|
|
||||||
|
# Show dotfiles in the bookmark preview box?
|
||||||
|
set show_hidden_bookmarks true
|
||||||
|
|
||||||
|
# Which colorscheme to use? These colorschemes are available by default:
|
||||||
|
# default, jungle, snow, solarized
|
||||||
|
set colorscheme default
|
||||||
|
|
||||||
|
# Preview files on the rightmost column?
|
||||||
|
# And collapse (shrink) the last column if there is nothing to preview?
|
||||||
|
set preview_files true
|
||||||
|
set preview_directories true
|
||||||
|
set collapse_preview true
|
||||||
|
|
||||||
|
# Save the console history on exit?
|
||||||
|
set save_console_history true
|
||||||
|
|
||||||
|
# Draw the status bar on top of the browser window (default: bottom)
|
||||||
|
set status_bar_on_top false
|
||||||
|
|
||||||
|
# Draw a progress bar in the status bar which displays the average state of all
|
||||||
|
# currently running tasks which support progress bars?
|
||||||
|
set draw_progress_bar_in_status_bar true
|
||||||
|
|
||||||
|
# Draw borders around columns?
|
||||||
|
set draw_borders true
|
||||||
|
|
||||||
|
# Display the directory name in tabs?
|
||||||
|
set dirname_in_tabs false
|
||||||
|
|
||||||
|
# Enable the mouse support?
|
||||||
|
set mouse_enabled true
|
||||||
|
|
||||||
|
# Display the file size in the main column or status bar?
|
||||||
|
set display_size_in_main_column true
|
||||||
|
set display_size_in_status_bar true
|
||||||
|
|
||||||
|
# Display files tags in all columns or only in main column?
|
||||||
|
set display_tags_in_all_columns true
|
||||||
|
|
||||||
|
# Set a title for the window?
|
||||||
|
set update_title false
|
||||||
|
|
||||||
|
# Set the title to "ranger" in the tmux program?
|
||||||
|
set update_tmux_title false
|
||||||
|
|
||||||
|
# Shorten the title if it gets long? The number defines how many
|
||||||
|
# directories are displayed at once, 0 turns off this feature.
|
||||||
|
set shorten_title 3
|
||||||
|
|
||||||
|
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
|
||||||
|
set tilde_in_titlebar false
|
||||||
|
|
||||||
|
# How many directory-changes or console-commands should be kept in history?
|
||||||
|
set max_history_size 20
|
||||||
|
set max_console_history_size 50
|
||||||
|
|
||||||
|
# Try to keep so much space between the top/bottom border when scrolling:
|
||||||
|
set scroll_offset 8
|
||||||
|
|
||||||
|
# Flush the input after each key hit? (Noticeable when ranger lags)
|
||||||
|
set flushinput true
|
||||||
|
|
||||||
|
# Padding on the right when there's no preview?
|
||||||
|
# This allows you to click into the space to run the file.
|
||||||
|
set padding_right true
|
||||||
|
|
||||||
|
# Save bookmarks (used with mX and `X) instantly?
|
||||||
|
# This helps to synchronize bookmarks between multiple ranger
|
||||||
|
# instances but leads to *slight* performance loss.
|
||||||
|
# When false, bookmarks are saved when ranger is exited.
|
||||||
|
set autosave_bookmarks true
|
||||||
|
|
||||||
|
# You can display the "real" cumulative size of directories by using the
|
||||||
|
# command :get_cumulative_size or typing "dc". The size is expensive to
|
||||||
|
# calculate and will not be updated automatically. You can choose
|
||||||
|
# to update it automatically though by turning on this option:
|
||||||
|
set autoupdate_cumulative_size false
|
||||||
|
|
||||||
|
# Turning this on makes sense for screen readers:
|
||||||
|
set show_cursor false
|
||||||
|
|
||||||
|
# One of: size, natural, basename, atime, ctime, mtime, type, random
|
||||||
|
set sort natural
|
||||||
|
|
||||||
|
# Additional sorting options
|
||||||
|
set sort_reverse false
|
||||||
|
set sort_case_insensitive true
|
||||||
|
set sort_directories_first true
|
||||||
|
set sort_unicode false
|
||||||
|
|
||||||
|
# Enable this if key combinations with the Alt Key don't work for you.
|
||||||
|
# (Especially on xterm)
|
||||||
|
set xterm_alt_key false
|
||||||
|
|
||||||
|
# Whether to include bookmarks in cd command
|
||||||
|
set cd_bookmarks true
|
||||||
|
|
||||||
|
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
||||||
|
# disable this feature.
|
||||||
|
set preview_max_size 0
|
||||||
|
|
||||||
|
# Add the highlighted file to the path in the titlebar
|
||||||
|
set show_selection_in_titlebar true
|
||||||
|
|
||||||
|
# The delay that ranger idly waits for user input, in milliseconds, with a
|
||||||
|
# resolution of 100ms. Lower delay reduces lag between directory updates but
|
||||||
|
# increases CPU load.
|
||||||
|
set idle_delay 2000
|
||||||
|
|
||||||
|
# When the metadata manager module looks for metadata, should it only look for
|
||||||
|
# a ".metadata.json" file in the current directory, or do a deep search and
|
||||||
|
# check all directories above the current one as well?
|
||||||
|
set metadata_deep_search false
|
||||||
|
|
||||||
|
# Clear all existing filters when leaving a directory
|
||||||
|
set clear_filters_on_dir_change false
|
||||||
|
|
||||||
|
# Disable displaying line numbers in main column
|
||||||
|
set line_numbers false
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Local Options
|
||||||
|
# ===================================================================
|
||||||
|
# You can set local options that only affect a single directory.
|
||||||
|
|
||||||
|
# Examples:
|
||||||
|
# setlocal path=~/downloads sort mtime
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Command Aliases in the Console
|
||||||
|
# ===================================================================
|
||||||
|
|
||||||
|
alias e edit
|
||||||
|
alias q quit
|
||||||
|
alias q! quitall
|
||||||
|
alias qa quitall
|
||||||
|
alias qall quitall
|
||||||
|
alias setl setlocal
|
||||||
|
|
||||||
|
alias filter scout -prt
|
||||||
|
alias find scout -aeit
|
||||||
|
alias mark scout -mr
|
||||||
|
alias unmark scout -Mr
|
||||||
|
alias search scout -rs
|
||||||
|
alias search_inc scout -rts
|
||||||
|
alias travel scout -aefiklst
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Define keys for the browser
|
||||||
|
# ===================================================================
|
||||||
|
|
||||||
|
# Basic
|
||||||
|
map Q quit!
|
||||||
|
map q quit
|
||||||
|
copymap q ZZ ZQ
|
||||||
|
|
||||||
|
map R reload_cwd
|
||||||
|
map <C-r> reset
|
||||||
|
map <C-l> redraw_window
|
||||||
|
map <C-c> abort
|
||||||
|
map <esc> change_mode normal
|
||||||
|
map ~ set viewmode!
|
||||||
|
|
||||||
|
map i display_file
|
||||||
|
map ? help
|
||||||
|
map W display_log
|
||||||
|
map w taskview_open
|
||||||
|
map S shell $SHELL
|
||||||
|
|
||||||
|
map : console
|
||||||
|
map ; console
|
||||||
|
map ! console shell%space
|
||||||
|
map @ console -p6 shell %%s
|
||||||
|
map # console shell -p%space
|
||||||
|
map s console shell%space
|
||||||
|
map r chain draw_possible_programs; console open_with%%space
|
||||||
|
#map f console find%space
|
||||||
|
map f console scout -ftsea%space
|
||||||
|
map cd console cd%space
|
||||||
|
|
||||||
|
# Change the line mode
|
||||||
|
map Mf linemode filename
|
||||||
|
map Mi linemode fileinfo
|
||||||
|
map Mm linemode mtime
|
||||||
|
map Mp linemode permissions
|
||||||
|
map Ms linemode sizemtime
|
||||||
|
map Mt linemode metatitle
|
||||||
|
|
||||||
|
# Tagging / Marking
|
||||||
|
map t tag_toggle
|
||||||
|
map ut tag_remove
|
||||||
|
map "<any> tag_toggle tag=%any
|
||||||
|
map <Space> mark_files toggle=True
|
||||||
|
map v mark_files all=True toggle=True
|
||||||
|
map uv mark_files all=True val=False
|
||||||
|
map V toggle_visual_mode
|
||||||
|
map uV toggle_visual_mode reverse=True
|
||||||
|
|
||||||
|
# For the nostalgics: Midnight Commander bindings
|
||||||
|
map <F1> help
|
||||||
|
map <F3> display_file
|
||||||
|
map <F4> edit
|
||||||
|
map <F5> copy
|
||||||
|
map <F6> cut
|
||||||
|
map <F7> console mkdir%space
|
||||||
|
map <F8> console delete
|
||||||
|
map <F10> exit
|
||||||
|
|
||||||
|
# In case you work on a keyboard with dvorak layout
|
||||||
|
map <UP> move up=1
|
||||||
|
map <DOWN> move down=1
|
||||||
|
map <LEFT> move left=1
|
||||||
|
map <RIGHT> move right=1
|
||||||
|
map <HOME> move to=0
|
||||||
|
map <END> move to=-1
|
||||||
|
map <PAGEDOWN> move down=1 pages=True
|
||||||
|
map <PAGEUP> move up=1 pages=True
|
||||||
|
map <CR> move right=1
|
||||||
|
map <DELETE> console delete
|
||||||
|
map <INSERT> console touch%space
|
||||||
|
|
||||||
|
# VIM-like
|
||||||
|
copymap <UP> k
|
||||||
|
copymap <DOWN> j
|
||||||
|
copymap <LEFT> h
|
||||||
|
copymap <RIGHT> l
|
||||||
|
copymap <HOME> gg
|
||||||
|
copymap <END> G
|
||||||
|
copymap <PAGEDOWN> <C-F>
|
||||||
|
copymap <PAGEUP> <C-B>
|
||||||
|
|
||||||
|
map J move down=0.5 pages=True
|
||||||
|
map K move up=0.5 pages=True
|
||||||
|
copymap J <C-D>
|
||||||
|
copymap K <C-U>
|
||||||
|
|
||||||
|
# Jumping around
|
||||||
|
map H history_go -1
|
||||||
|
map L history_go 1
|
||||||
|
map ] move_parent 1
|
||||||
|
map [ move_parent -1
|
||||||
|
map } traverse
|
||||||
|
|
||||||
|
map gh cd ~
|
||||||
|
map ge cd /etc
|
||||||
|
map gu cd /usr
|
||||||
|
map gd cd /dev
|
||||||
|
map gl cd -r .
|
||||||
|
map gL cd -r %f
|
||||||
|
map go cd /opt
|
||||||
|
map gv cd /var
|
||||||
|
map gm cd /media
|
||||||
|
map gM cd /mnt
|
||||||
|
map gs cd /srv
|
||||||
|
map gr cd /
|
||||||
|
map gR eval fm.cd(ranger.RANGERDIR)
|
||||||
|
map g/ cd /
|
||||||
|
map g? cd /usr/share/doc/ranger
|
||||||
|
|
||||||
|
# External Programs
|
||||||
|
map E edit
|
||||||
|
map du shell -p du --max-depth=1 -h --apparent-size
|
||||||
|
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
|
||||||
|
map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
|
||||||
|
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
|
||||||
|
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
|
||||||
|
|
||||||
|
# Filesystem Operations
|
||||||
|
map = chmod
|
||||||
|
|
||||||
|
#map cw console rename%space
|
||||||
|
map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
|
||||||
|
map a rename_append
|
||||||
|
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
|
||||||
|
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
|
||||||
|
|
||||||
|
map pp paste
|
||||||
|
map po paste overwrite=True
|
||||||
|
map pP paste append=True
|
||||||
|
map pO paste overwrite=True append=True
|
||||||
|
map pl paste_symlink relative=False
|
||||||
|
map pL paste_symlink relative=True
|
||||||
|
map phl paste_hardlink
|
||||||
|
map pht paste_hardlinked_subtree
|
||||||
|
map pr paste_as_root
|
||||||
|
|
||||||
|
map dD console delete
|
||||||
|
|
||||||
|
map dd cut
|
||||||
|
map ud uncut
|
||||||
|
map da cut mode=add
|
||||||
|
map dr cut mode=remove
|
||||||
|
map dt cut mode=toggle
|
||||||
|
|
||||||
|
map yy copy
|
||||||
|
map uy uncut
|
||||||
|
map ya copy mode=add
|
||||||
|
map yr copy mode=remove
|
||||||
|
map yt copy mode=toggle
|
||||||
|
|
||||||
|
# Temporary workarounds
|
||||||
|
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
|
||||||
|
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
|
||||||
|
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
|
||||||
|
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
|
||||||
|
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
|
||||||
|
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
|
||||||
|
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
|
||||||
|
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
|
||||||
|
|
||||||
|
# Searching
|
||||||
|
map / console search%space
|
||||||
|
map n search_next
|
||||||
|
map N search_next forward=False
|
||||||
|
map ct search_next order=tag
|
||||||
|
map cs search_next order=size
|
||||||
|
map ci search_next order=mimetype
|
||||||
|
map cc search_next order=ctime
|
||||||
|
map cm search_next order=mtime
|
||||||
|
map ca search_next order=atime
|
||||||
|
|
||||||
|
# Tabs
|
||||||
|
map <C-n> tab_new ~
|
||||||
|
map <C-w> tab_close
|
||||||
|
map <TAB> tab_move 1
|
||||||
|
map <S-TAB> tab_move -1
|
||||||
|
map <A-Right> tab_move 1
|
||||||
|
map <A-Left> tab_move -1
|
||||||
|
map gt tab_move 1
|
||||||
|
map gT tab_move -1
|
||||||
|
map gn tab_new ~
|
||||||
|
map gc tab_close
|
||||||
|
map uq tab_restore
|
||||||
|
map <a-1> tab_open 1
|
||||||
|
map <a-2> tab_open 2
|
||||||
|
map <a-3> tab_open 3
|
||||||
|
map <a-4> tab_open 4
|
||||||
|
map <a-5> tab_open 5
|
||||||
|
map <a-6> tab_open 6
|
||||||
|
map <a-7> tab_open 7
|
||||||
|
map <a-8> tab_open 8
|
||||||
|
map <a-9> tab_open 9
|
||||||
|
|
||||||
|
# Sorting
|
||||||
|
map or set sort_reverse!
|
||||||
|
map oz set sort=random
|
||||||
|
map os chain set sort=size; set sort_reverse=False
|
||||||
|
map ob chain set sort=basename; set sort_reverse=False
|
||||||
|
map on chain set sort=natural; set sort_reverse=False
|
||||||
|
map om chain set sort=mtime; set sort_reverse=False
|
||||||
|
map oc chain set sort=ctime; set sort_reverse=False
|
||||||
|
map oa chain set sort=atime; set sort_reverse=False
|
||||||
|
map ot chain set sort=type; set sort_reverse=False
|
||||||
|
map oe chain set sort=extension; set sort_reverse=False
|
||||||
|
|
||||||
|
map oS chain set sort=size; set sort_reverse=True
|
||||||
|
map oB chain set sort=basename; set sort_reverse=True
|
||||||
|
map oN chain set sort=natural; set sort_reverse=True
|
||||||
|
map oM chain set sort=mtime; set sort_reverse=True
|
||||||
|
map oC chain set sort=ctime; set sort_reverse=True
|
||||||
|
map oA chain set sort=atime; set sort_reverse=True
|
||||||
|
map oT chain set sort=type; set sort_reverse=True
|
||||||
|
map oE chain set sort=extension; set sort_reverse=True
|
||||||
|
|
||||||
|
map dc get_cumulative_size
|
||||||
|
|
||||||
|
# Settings
|
||||||
|
map zc set collapse_preview!
|
||||||
|
map zd set sort_directories_first!
|
||||||
|
map zh set show_hidden!
|
||||||
|
map <C-h> set show_hidden!
|
||||||
|
map zI set flushinput!
|
||||||
|
map zi set preview_images!
|
||||||
|
map zm set mouse_enabled!
|
||||||
|
map zp set preview_files!
|
||||||
|
map zP set preview_directories!
|
||||||
|
map zs set sort_case_insensitive!
|
||||||
|
map zu set autoupdate_cumulative_size!
|
||||||
|
map zv set use_preview_script!
|
||||||
|
map zf console filter%space
|
||||||
|
|
||||||
|
# Bookmarks
|
||||||
|
map `<any> enter_bookmark %any
|
||||||
|
map '<any> enter_bookmark %any
|
||||||
|
map m<any> set_bookmark %any
|
||||||
|
map um<any> unset_bookmark %any
|
||||||
|
|
||||||
|
map m<bg> draw_bookmarks
|
||||||
|
copymap m<bg> um<bg> `<bg> '<bg>
|
||||||
|
|
||||||
|
# Generate all the chmod bindings with some python help:
|
||||||
|
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
|
||||||
|
|
||||||
|
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
|
||||||
|
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Define keys for the console
|
||||||
|
# ===================================================================
|
||||||
|
# Note: Unmapped keys are passed directly to the console.
|
||||||
|
|
||||||
|
# Basic
|
||||||
|
cmap <tab> eval fm.ui.console.tab()
|
||||||
|
cmap <s-tab> eval fm.ui.console.tab(-1)
|
||||||
|
cmap <ESC> eval fm.ui.console.close()
|
||||||
|
cmap <CR> eval fm.ui.console.execute()
|
||||||
|
cmap <C-l> redraw_window
|
||||||
|
|
||||||
|
copycmap <ESC> <C-c>
|
||||||
|
copycmap <CR> <C-j>
|
||||||
|
|
||||||
|
# Move around
|
||||||
|
cmap <up> eval fm.ui.console.history_move(-1)
|
||||||
|
cmap <down> eval fm.ui.console.history_move(1)
|
||||||
|
cmap <left> eval fm.ui.console.move(left=1)
|
||||||
|
cmap <right> eval fm.ui.console.move(right=1)
|
||||||
|
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
|
||||||
|
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
|
||||||
|
cmap <a-left> eval fm.ui.console.move_word(left=1)
|
||||||
|
cmap <a-right> eval fm.ui.console.move_word(right=1)
|
||||||
|
|
||||||
|
# Line Editing
|
||||||
|
cmap <backspace> eval fm.ui.console.delete(-1)
|
||||||
|
cmap <delete> eval fm.ui.console.delete(0)
|
||||||
|
cmap <C-w> eval fm.ui.console.delete_word()
|
||||||
|
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
|
||||||
|
cmap <C-k> eval fm.ui.console.delete_rest(1)
|
||||||
|
cmap <C-u> eval fm.ui.console.delete_rest(-1)
|
||||||
|
cmap <C-y> eval fm.ui.console.paste()
|
||||||
|
|
||||||
|
# And of course the emacs way
|
||||||
|
copycmap <up> <C-p>
|
||||||
|
copycmap <down> <C-n>
|
||||||
|
copycmap <left> <C-b>
|
||||||
|
copycmap <right> <C-f>
|
||||||
|
copycmap <home> <C-a>
|
||||||
|
copycmap <end> <C-e>
|
||||||
|
copycmap <delete> <C-d>
|
||||||
|
copycmap <backspace> <C-h>
|
||||||
|
|
||||||
|
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
|
||||||
|
# and <backspace2> (code 127). To be sure, use both.
|
||||||
|
copycmap <backspace> <backspace2>
|
||||||
|
|
||||||
|
# This special expression allows typing in numerals:
|
||||||
|
cmap <allow_quantifiers> false
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Pager Keybindings
|
||||||
|
# ===================================================================
|
||||||
|
|
||||||
|
# Movement
|
||||||
|
pmap <down> pager_move down=1
|
||||||
|
pmap <up> pager_move up=1
|
||||||
|
pmap <left> pager_move left=4
|
||||||
|
pmap <right> pager_move right=4
|
||||||
|
pmap <home> pager_move to=0
|
||||||
|
pmap <end> pager_move to=-1
|
||||||
|
pmap <pagedown> pager_move down=1.0 pages=True
|
||||||
|
pmap <pageup> pager_move up=1.0 pages=True
|
||||||
|
pmap <C-d> pager_move down=0.5 pages=True
|
||||||
|
pmap <C-u> pager_move up=0.5 pages=True
|
||||||
|
|
||||||
|
copypmap <UP> k <C-p>
|
||||||
|
copypmap <DOWN> j <C-n> <CR>
|
||||||
|
copypmap <LEFT> h
|
||||||
|
copypmap <RIGHT> l
|
||||||
|
copypmap <HOME> g
|
||||||
|
copypmap <END> G
|
||||||
|
copypmap <C-d> d
|
||||||
|
copypmap <C-u> u
|
||||||
|
copypmap <PAGEDOWN> n f <C-F> <Space>
|
||||||
|
copypmap <PAGEUP> p b <C-B>
|
||||||
|
|
||||||
|
# Basic
|
||||||
|
pmap <C-l> redraw_window
|
||||||
|
pmap <ESC> pager_close
|
||||||
|
copypmap <ESC> q Q i <F3>
|
||||||
|
pmap E edit_file
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# == Taskview Keybindings
|
||||||
|
# ===================================================================
|
||||||
|
|
||||||
|
# Movement
|
||||||
|
tmap <up> taskview_move up=1
|
||||||
|
tmap <down> taskview_move down=1
|
||||||
|
tmap <home> taskview_move to=0
|
||||||
|
tmap <end> taskview_move to=-1
|
||||||
|
tmap <pagedown> taskview_move down=1.0 pages=True
|
||||||
|
tmap <pageup> taskview_move up=1.0 pages=True
|
||||||
|
tmap <C-d> taskview_move down=0.5 pages=True
|
||||||
|
tmap <C-u> taskview_move up=0.5 pages=True
|
||||||
|
|
||||||
|
copytmap <UP> k <C-p>
|
||||||
|
copytmap <DOWN> j <C-n> <CR>
|
||||||
|
copytmap <HOME> g
|
||||||
|
copytmap <END> G
|
||||||
|
copytmap <C-u> u
|
||||||
|
copytmap <PAGEDOWN> n f <C-F> <Space>
|
||||||
|
copytmap <PAGEUP> p b <C-B>
|
||||||
|
|
||||||
|
# Changing priority and deleting tasks
|
||||||
|
tmap J eval -q fm.ui.taskview.task_move(-1)
|
||||||
|
tmap K eval -q fm.ui.taskview.task_move(0)
|
||||||
|
tmap dd eval -q fm.ui.taskview.task_remove()
|
||||||
|
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
|
||||||
|
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
|
||||||
|
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
||||||
|
|
||||||
|
# Basic
|
||||||
|
tmap <C-l> redraw_window
|
||||||
|
tmap <ESC> taskview_close
|
||||||
|
copytmap <ESC> q Q w <C-c>
|
||||||
|
default_linemode devicons
|
||||||
|
|
||||||
|
# find
|
||||||
|
map <C-f> fzf_select
|
||||||
302
config/ranger/rifle.conf
Normal file
302
config/ranger/rifle.conf
Normal file
@@ -0,0 +1,302 @@
|
|||||||
|
# vim: ft=cfg
|
||||||
|
#
|
||||||
|
# This is the configuration file of "rifle", ranger's file executor/opener.
|
||||||
|
# Each line consists of conditions and a command. For each line the conditions
|
||||||
|
# are checked and if they are met, the respective command is run.
|
||||||
|
#
|
||||||
|
# Syntax:
|
||||||
|
# <condition1> , <condition2> , ... = command
|
||||||
|
#
|
||||||
|
# The command can contain these environment variables:
|
||||||
|
# $1-$9 | The n-th selected file
|
||||||
|
# $@ | All selected files
|
||||||
|
#
|
||||||
|
# If you use the special command "ask", rifle will ask you what program to run.
|
||||||
|
#
|
||||||
|
# Prefixing a condition with "!" will negate its result.
|
||||||
|
# These conditions are currently supported:
|
||||||
|
# match <regexp> | The regexp matches $1
|
||||||
|
# ext <regexp> | The regexp matches the extension of $1
|
||||||
|
# mime <regexp> | The regexp matches the mime type of $1
|
||||||
|
# name <regexp> | The regexp matches the basename of $1
|
||||||
|
# path <regexp> | The regexp matches the absolute path of $1
|
||||||
|
# has <program> | The program is installed (i.e. located in $PATH)
|
||||||
|
# env <variable> | The environment variable "variable" is non-empty
|
||||||
|
# file | $1 is a file
|
||||||
|
# directory | $1 is a directory
|
||||||
|
# number <n> | change the number of this command to n
|
||||||
|
# terminal | stdin, stderr and stdout are connected to a terminal
|
||||||
|
# X | A graphical environment is available (darwin, Xorg, or Wayland)
|
||||||
|
#
|
||||||
|
# There are also pseudo-conditions which have a "side effect":
|
||||||
|
# flag <flags> | Change how the program is run. See below.
|
||||||
|
# label <label> | Assign a label or name to the command so it can
|
||||||
|
# | be started with :open_with <label> in ranger
|
||||||
|
# | or `rifle -p <label>` in the standalone executable.
|
||||||
|
# else | Always true.
|
||||||
|
#
|
||||||
|
# Flags are single characters which slightly transform the command:
|
||||||
|
# f | Fork the program, make it run in the background.
|
||||||
|
# | New command = setsid $command >& /dev/null &
|
||||||
|
# r | Execute the command with root permissions
|
||||||
|
# | New command = sudo $command
|
||||||
|
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
||||||
|
# | rifle will attempt to extract it from $TERM.
|
||||||
|
# | New command = $TERMCMD -e $command
|
||||||
|
# Note: The "New command" serves only as an illustration, the exact
|
||||||
|
# implementation may differ.
|
||||||
|
# Note: When using rifle in ranger, there is an additional flag "c" for
|
||||||
|
# only running the current file even if you have marked multiple files.
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Websites
|
||||||
|
#-------------------------------------------
|
||||||
|
# Rarely installed browsers get higher priority; It is assumed that if you
|
||||||
|
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
|
||||||
|
# other hand are often only installed as fallback browsers.
|
||||||
|
ext x?html? = ${VISUAL:-$EDITOR} -- "$@"
|
||||||
|
ext x?html?, has surf, X, flag f = surf -- file://"$1"
|
||||||
|
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
|
||||||
|
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
|
||||||
|
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
||||||
|
ext x?html?, has dwb, X, flag f = dwb -- "$@"
|
||||||
|
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
|
||||||
|
ext x?html?, has luakit, X, flag f = luakit -- "$@"
|
||||||
|
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
|
||||||
|
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
||||||
|
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
||||||
|
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
||||||
|
ext x?html?, has midori, X, flag f = midori -- "$@"
|
||||||
|
ext x?html?, has opera, X, flag f = opera -- "$@"
|
||||||
|
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
||||||
|
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
||||||
|
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
||||||
|
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||||
|
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||||
|
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||||
|
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
||||||
|
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
||||||
|
ext x?html?, has elinks, terminal = elinks "$@"
|
||||||
|
ext x?html?, has links2, terminal = links2 "$@"
|
||||||
|
ext x?html?, has links, terminal = links "$@"
|
||||||
|
ext x?html?, has lynx, terminal = lynx -- "$@"
|
||||||
|
ext x?html?, has w3m, terminal = w3m "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Misc
|
||||||
|
#-------------------------------------------
|
||||||
|
# Define the "editor" for text files as first action
|
||||||
|
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
||||||
|
mime ^text, label pager = $PAGER -- "$@"
|
||||||
|
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = ${VISUAL:-$EDITOR} -- "$@"
|
||||||
|
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = $PAGER -- "$@"
|
||||||
|
|
||||||
|
ext 1 = man "$1"
|
||||||
|
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
||||||
|
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
|
||||||
|
ext nes, has fceux, X = fceux "$1"
|
||||||
|
ext exe, has wine = wine "$1"
|
||||||
|
name ^[mM]akefile$ = make
|
||||||
|
|
||||||
|
#--------------------------------------------
|
||||||
|
# Scripts
|
||||||
|
#-------------------------------------------
|
||||||
|
ext py = python -- "$1"
|
||||||
|
ext pl = perl -- "$1"
|
||||||
|
ext rb = ruby -- "$1"
|
||||||
|
ext js = node -- "$1"
|
||||||
|
ext sh = sh -- "$1"
|
||||||
|
ext php = php -- "$1"
|
||||||
|
ext dart = dart run -- "$1"
|
||||||
|
|
||||||
|
#--------------------------------------------
|
||||||
|
# Audio without X
|
||||||
|
#-------------------------------------------
|
||||||
|
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
|
||||||
|
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
|
||||||
|
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
|
||||||
|
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
||||||
|
|
||||||
|
#--------------------------------------------
|
||||||
|
# Video/Audio with a GUI
|
||||||
|
#-------------------------------------------
|
||||||
|
mime ^video|^audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
||||||
|
mime ^video|^audio, has smplayer, X, flag f = smplayer "$@"
|
||||||
|
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
||||||
|
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
||||||
|
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
||||||
|
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
||||||
|
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
||||||
|
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
||||||
|
mime ^video|^audio, has vlc, X, flag f = vlc -- "$@"
|
||||||
|
mime ^video|^audio, has totem, X, flag f = totem -- "$@"
|
||||||
|
mime ^video|^audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
||||||
|
mime ^audio, has audacity, X, flag f = audacity -- "$@"
|
||||||
|
ext aup, has audacity, X, flag f = audacity -- "$@"
|
||||||
|
|
||||||
|
#--------------------------------------------
|
||||||
|
# Video without X
|
||||||
|
#-------------------------------------------
|
||||||
|
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
||||||
|
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
||||||
|
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Documents
|
||||||
|
#-------------------------------------------
|
||||||
|
ext pdf, has llpp, X, flag f = llpp "$@"
|
||||||
|
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
||||||
|
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
||||||
|
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
||||||
|
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
|
||||||
|
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
|
||||||
|
ext pdf, has evince, X, flag f = evince -- "$@"
|
||||||
|
ext pdf, has atril, X, flag f = atril -- "$@"
|
||||||
|
ext pdf, has okular, X, flag f = okular -- "$@"
|
||||||
|
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
|
||||||
|
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
|
||||||
|
ext pdf, has open, X, flag f = open "$@"
|
||||||
|
|
||||||
|
ext sc, has sc, = sc -- "$@"
|
||||||
|
ext docx?, has catdoc, terminal = catdoc -- "$@" | $PAGER
|
||||||
|
|
||||||
|
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
|
||||||
|
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
|
||||||
|
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
|
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
|
||||||
|
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
|
||||||
|
|
||||||
|
ext djvu, has zathura,X, flag f = zathura -- "$@"
|
||||||
|
ext djvu, has evince, X, flag f = evince -- "$@"
|
||||||
|
ext djvu, has atril, X, flag f = atril -- "$@"
|
||||||
|
ext djvu, has djview, X, flag f = djview -- "$@"
|
||||||
|
|
||||||
|
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||||
|
ext epub, has zathura, X, flag f = zathura -- "$@"
|
||||||
|
ext epub, has mupdf, X, flag f = mupdf -- "$@"
|
||||||
|
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||||
|
|
||||||
|
ext cb[rz], has qcomicbook, X, flag f = qcomicbook "$@"
|
||||||
|
ext cb[rz], has mcomix, X, flag f = mcomix -- "$@"
|
||||||
|
ext cb[rz], has zathura, X, flag f = zathura -- "$@"
|
||||||
|
ext cb[rz], has atril, X, flag f = atril -- "$@"
|
||||||
|
|
||||||
|
ext sla, has scribus, X, flag f = scribus -- "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Images
|
||||||
|
#-------------------------------------------
|
||||||
|
mime ^image, has viewnior, X, flag f = viewnior -- "$@"
|
||||||
|
|
||||||
|
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||||
|
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||||
|
|
||||||
|
mime ^image, has imv, X, flag f = imv -- "$@"
|
||||||
|
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||||
|
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||||
|
mime ^image, has feh, X, flag f, !ext gif = feh -- "$@"
|
||||||
|
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||||
|
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
||||||
|
mime ^image, has eog, X, flag f = eog -- "$@"
|
||||||
|
mime ^image, has eom, X, flag f = eom -- "$@"
|
||||||
|
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
||||||
|
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
||||||
|
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
|
||||||
|
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
|
||||||
|
mime ^image, has xviewer, X, flag f = xviewer -- "$@"
|
||||||
|
mime ^image, has mcomix, X, flag f = mcomix -- "$@"
|
||||||
|
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||||
|
mime ^image, has krita, X, flag f = krita -- "$@"
|
||||||
|
ext kra, has krita, X, flag f = krita -- "$@"
|
||||||
|
ext xcf, X, flag f = gimp -- "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Archives
|
||||||
|
#-------------------------------------------
|
||||||
|
|
||||||
|
# avoid password prompt by providing empty password
|
||||||
|
ext 7z, has 7z = 7z -p l "$@" | $PAGER
|
||||||
|
# This requires atool
|
||||||
|
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | $PAGER
|
||||||
|
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | $PAGER
|
||||||
|
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
||||||
|
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
||||||
|
|
||||||
|
# Listing and extracting archives without atool:
|
||||||
|
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | $PAGER
|
||||||
|
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
||||||
|
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
||||||
|
ext zip, has unzip = unzip -l "$1" | less
|
||||||
|
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
||||||
|
ext ace, has unace = unace l "$1" | less
|
||||||
|
ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
||||||
|
ext rar, has unrar = unrar l "$1" | less
|
||||||
|
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
||||||
|
ext rar|zip, has qcomicbook, X, flag f = qcomicbook "$@"
|
||||||
|
ext rar|zip, has mcomix, X, flag f = mcomix -- "$@"
|
||||||
|
ext rar|zip, has zathura, X, flag f = zathura -- "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Fonts
|
||||||
|
#-------------------------------------------
|
||||||
|
mime ^font, has fontforge, X, flag f = fontforge "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Flag t fallback terminals
|
||||||
|
#-------------------------------------------
|
||||||
|
# Rarely installed terminal emulators get higher priority; It is assumed that
|
||||||
|
# if you install a rare terminal emulator, you probably use it.
|
||||||
|
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
|
||||||
|
# a desktop environment or as fallback terminal emulators.
|
||||||
|
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
|
||||||
|
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
|
||||||
|
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
|
||||||
|
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Misc
|
||||||
|
#-------------------------------------------
|
||||||
|
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
||||||
|
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
||||||
|
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
||||||
|
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||||
|
|
||||||
|
#-------------------------------------------
|
||||||
|
# Generic file openers
|
||||||
|
#-------------------------------------------
|
||||||
|
label open, has xdg-open = xdg-open "$@"
|
||||||
|
label open, has open = open -- "$@"
|
||||||
|
|
||||||
|
# Define the editor for non-text files + pager as last action
|
||||||
|
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = ask
|
||||||
|
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = ${VISUAL:-$EDITOR} -- "$@"
|
||||||
|
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = $PAGER -- "$@"
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# The actions below are left so low down in this file on purpose, so #
|
||||||
|
# they are never triggered accidentally. #
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
# Execute a file as program/script.
|
||||||
|
mime application/x-executable = "$1"
|
||||||
|
|
||||||
|
# Move the file to trash using trash-cli.
|
||||||
|
label trash, has trash-put = trash-put -- "$@"
|
||||||
|
label trash = mkdir -p -- "${XDG_DATA_HOME:-$HOME/.local/share}/ranger/trash"; mv -- "$@" "${XDG_DATA_HOME:-$HOME/.local/share}/ranger/trash"
|
||||||
121
config/ranger/scope.sh
Executable file
121
config/ranger/scope.sh
Executable file
@@ -0,0 +1,121 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# ranger supports enhanced previews. If the option "use_preview_script"
|
||||||
|
# is set to True and this file exists, this script will be called and its
|
||||||
|
# output is displayed in ranger. ANSI color codes are supported.
|
||||||
|
|
||||||
|
# NOTES: This script is considered a configuration file. If you upgrade
|
||||||
|
# ranger, it will be left untouched. (You must update it yourself.)
|
||||||
|
# Also, ranger disables STDIN here, so interactive scripts won't work properly
|
||||||
|
|
||||||
|
# Meanings of exit codes:
|
||||||
|
# code | meaning | action of ranger
|
||||||
|
# -----+------------+-------------------------------------------
|
||||||
|
# 0 | success | success. display stdout as preview
|
||||||
|
# 1 | no preview | failure. display no preview at all
|
||||||
|
# 2 | plain text | display the plain content of the file
|
||||||
|
# 3 | fix width | success. Don't reload when width changes
|
||||||
|
# 4 | fix height | success. Don't reload when height changes
|
||||||
|
# 5 | fix both | success. Don't ever reload
|
||||||
|
# 6 | image | success. display the image $cached points to as an image preview
|
||||||
|
# 7 | image | success. display the file directly as an image
|
||||||
|
|
||||||
|
# Meaningful aliases for arguments:
|
||||||
|
path="$1" # Full path of the selected file
|
||||||
|
width="$2" # Width of the preview pane (number of fitting characters)
|
||||||
|
height="$3" # Height of the preview pane (number of fitting characters)
|
||||||
|
cached="$4" # Path that should be used to cache image previews
|
||||||
|
preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
|
||||||
|
|
||||||
|
maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
|
||||||
|
|
||||||
|
# Find out something about the file:
|
||||||
|
mimetype=$(file --mime-type -Lb "$path")
|
||||||
|
extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
|
||||||
|
|
||||||
|
# Functions:
|
||||||
|
# runs a command and saves its output into $output. Useful if you need
|
||||||
|
# the return value AND want to use the output in a pipe
|
||||||
|
try() { output=$(eval '"$@"'); }
|
||||||
|
|
||||||
|
# writes the output of the previously used "try" command
|
||||||
|
dump() { /bin/echo "$output"; }
|
||||||
|
|
||||||
|
# a common post-processing function used after most commands
|
||||||
|
trim() { head -n "$maxln"; }
|
||||||
|
|
||||||
|
# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
|
||||||
|
safepipe() { "$@"; test $? = 0 -o $? = 141; }
|
||||||
|
|
||||||
|
# Image previews, if enabled in ranger.
|
||||||
|
if [ "$preview_images" = "True" ]; then
|
||||||
|
case "$mimetype" in
|
||||||
|
# Image previews for SVG files, disabled by default.
|
||||||
|
image/svg+xml)
|
||||||
|
convert "$path" "$cached" && exit 6 || exit 1;;
|
||||||
|
# Image previews for image files. w3mimgdisplay will be called for all
|
||||||
|
# image files (unless overriden as above), but might fail for
|
||||||
|
# unsupported types.
|
||||||
|
image/*)
|
||||||
|
exit 7;;
|
||||||
|
# Image preview for video, disabled by default.:
|
||||||
|
video/*)
|
||||||
|
ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$extension" in
|
||||||
|
# Archive extensions:
|
||||||
|
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||||
|
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||||
|
try als "$path" && { dump | trim; exit 0; }
|
||||||
|
try acat "$path" && { dump | trim; exit 3; }
|
||||||
|
try bsdtar -lf "$path" && { dump | trim; exit 0; }
|
||||||
|
exit 1;;
|
||||||
|
rar)
|
||||||
|
# avoid password prompt by providing empty password
|
||||||
|
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
|
||||||
|
7z)
|
||||||
|
# avoid password prompt by providing empty password
|
||||||
|
try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
|
||||||
|
# PDF documents:
|
||||||
|
pdf)
|
||||||
|
try pdftotext -l 10 -nopgbrk -q "$path" - && \
|
||||||
|
{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
||||||
|
# BitTorrent Files
|
||||||
|
torrent)
|
||||||
|
try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
|
||||||
|
# ODT Files
|
||||||
|
odt|ods|odp|sxw)
|
||||||
|
try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
|
||||||
|
# HTML Pages:
|
||||||
|
htm|html|xhtml)
|
||||||
|
try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
|
||||||
|
try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
|
||||||
|
try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
|
||||||
|
;; # fall back to highlight/cat if the text browsers fail
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$mimetype" in
|
||||||
|
# Syntax highlight for text files:
|
||||||
|
text/* | */xml)
|
||||||
|
if [ "$(tput colors)" -ge 256 ]; then
|
||||||
|
pygmentize_format=terminal256
|
||||||
|
highlight_format=xterm256
|
||||||
|
else
|
||||||
|
pygmentize_format=terminal
|
||||||
|
highlight_format=ansi
|
||||||
|
fi
|
||||||
|
try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
|
||||||
|
try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
|
||||||
|
exit 2;;
|
||||||
|
# Ascii-previews of images:
|
||||||
|
image/*)
|
||||||
|
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
|
||||||
|
# Display information about media files:
|
||||||
|
video/* | audio/*)
|
||||||
|
exiftool "$path" && exit 5
|
||||||
|
# Use sed to remove spaces so the output fits into the narrow window
|
||||||
|
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 1
|
||||||
86
config/starship/starship.toml
Normal file
86
config/starship/starship.toml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
|
||||||
|
add_newline = true
|
||||||
|
command_timeout = 1000
|
||||||
|
|
||||||
|
[line_break]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[[battery.display]]
|
||||||
|
threshold = 10
|
||||||
|
style = "bold blink 196"
|
||||||
|
|
||||||
|
[[battery.display]]
|
||||||
|
threshold = 15
|
||||||
|
style = "bold 214"
|
||||||
|
|
||||||
|
#[c]
|
||||||
|
#disabled = true
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = ">"
|
||||||
|
error_symbol = "x"
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
min_time = 5_000
|
||||||
|
show_notifications = true
|
||||||
|
min_time_to_notify = 30_000
|
||||||
|
notification_timeout = 3_000
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
read_only = "[RO]"
|
||||||
|
truncation_length = 3
|
||||||
|
truncate_to_repo = true
|
||||||
|
truncation_symbol = "../"
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
always_show_remote = false
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
ahead = ">"
|
||||||
|
behind = "<"
|
||||||
|
diverged = "<>"
|
||||||
|
renamed = "r"
|
||||||
|
deleted = "x"
|
||||||
|
|
||||||
|
[git_metrics]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
#ssh_only = true
|
||||||
|
ssh_symbol = ""
|
||||||
|
format = "ssh'd to [$hostname]($style) at "
|
||||||
|
|
||||||
|
[localip]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[package]
|
||||||
|
format = "ver [$symbol$version]($style) "
|
||||||
|
symbol = ""
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = "py "
|
||||||
|
format = 'with [$symbol($version)]($style)'
|
||||||
|
version_format = "v${raw}"
|
||||||
|
|
||||||
|
[lua]
|
||||||
|
symbol = "lua "
|
||||||
|
format = "with [$symbol($version) ]($style)"
|
||||||
|
version_format = ""
|
||||||
|
# detect_extensions = ["lua","!vimrc.lua"]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
symbol = "rust "
|
||||||
|
format = "with [$symbol($version) ]($style)"
|
||||||
|
|
||||||
|
[status]
|
||||||
|
symbol = "Sig"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[sudo]
|
||||||
|
format = "[!]($style)"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[username]
|
||||||
|
format = "[$user]($style) "
|
||||||
|
|
||||||
94
config/tmux/.tmux.conf
Normal file
94
config/tmux/.tmux.conf
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# set escape key
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-y
|
||||||
|
bind C-y send-prefix
|
||||||
|
bind y send-key C-y # Ctrl-y y sends Ctrl-y
|
||||||
|
|
||||||
|
# move between panes
|
||||||
|
bind -n M-h select-pane -L
|
||||||
|
bind -n M-j select-pane -D
|
||||||
|
bind -n M-k select-pane -U
|
||||||
|
bind -n M-l select-pane -R
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
|
||||||
|
# resize panes
|
||||||
|
bind -r h resize-pane -L 5
|
||||||
|
bind -r j resize-pane -D 5
|
||||||
|
bind -r k resize-pane -U 5
|
||||||
|
bind -r l resize-pane -R 5
|
||||||
|
|
||||||
|
# setw -g mode-keys vi
|
||||||
|
set -g status-keys vi
|
||||||
|
|
||||||
|
set -g base-index 1 # start window index at 1
|
||||||
|
set -g pane-base-index 1 # for tmuxinator
|
||||||
|
|
||||||
|
# fixes some delay issues in vim
|
||||||
|
set -sg escape-time 1
|
||||||
|
|
||||||
|
# tmux messages are displayed for 4s
|
||||||
|
set -g display-time 4000
|
||||||
|
|
||||||
|
# focus events enabled for terminals that support them
|
||||||
|
|
||||||
|
bind n command-prompt 'rename-window %%'
|
||||||
|
bind N command-prompt 'rename-session %%'
|
||||||
|
bind -r < swap-window -t :-
|
||||||
|
bind -r > swap-window -t :+
|
||||||
|
|
||||||
|
# swap % and " splitting
|
||||||
|
unbind '"'
|
||||||
|
bind '"' split-window -h
|
||||||
|
unbind %
|
||||||
|
bind % split-window
|
||||||
|
|
||||||
|
# Copy mode key bindings
|
||||||
|
unbind p
|
||||||
|
bind p paste-buffer
|
||||||
|
# bind -t vi-copy 'v' begin-selection
|
||||||
|
# bind -t vi-copy 'y' copy-selection
|
||||||
|
|
||||||
|
# set default terminal color
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
|
# enable activity alerts
|
||||||
|
setw -g monitor-activity on
|
||||||
|
set -g visual-activity on
|
||||||
|
|
||||||
|
# Center window list
|
||||||
|
set -g status-justify centre
|
||||||
|
|
||||||
|
# stop auto-renaming windows
|
||||||
|
set-option -g allow-rename off
|
||||||
|
|
||||||
|
# load style file
|
||||||
|
source "$HOME/.config/tmux/tmux_style.conf"
|
||||||
|
|
||||||
|
# List of plugins
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
|
||||||
|
# restore vim sessions
|
||||||
|
#set -g @resurrect-strategy-vim 'session'
|
||||||
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
|
|
||||||
|
set -g @resurrect-save 'S'
|
||||||
|
set -g @resurrect-restore 'R'
|
||||||
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
|
|
||||||
|
set -g @resurrect-dir '$HOME/.cache/tmux/resurrect'
|
||||||
|
#set -g @resurrect-processes ''
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# install plugins with prefix+I
|
||||||
|
# update plugins with prefix+u
|
||||||
|
# uninstall plugins with prefix+alt+u
|
||||||
|
|
||||||
|
# initialize plugin manager, must be at the bottom
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
5
config/tmux/tmux_style.conf
Normal file
5
config/tmux/tmux_style.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
# set pane border styles
|
||||||
|
setw -g pane-border-style 'fg=#555555'
|
||||||
|
setw -g pane-active-border-style 'fg=#AAAAAA'
|
||||||
|
|
||||||
102
etc/pacman.conf
Normal file
102
etc/pacman.conf
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
#
|
||||||
|
# /etc/pacman.conf
|
||||||
|
#
|
||||||
|
# See the pacman.conf(5) manpage for option and repository directives
|
||||||
|
|
||||||
|
#
|
||||||
|
# GENERAL OPTIONS
|
||||||
|
#
|
||||||
|
[options]
|
||||||
|
# The following paths are commented out with their default values listed.
|
||||||
|
# If you wish to use different paths, uncomment and update the paths.
|
||||||
|
#RootDir = /
|
||||||
|
#DBPath = /var/lib/pacman/
|
||||||
|
#CacheDir = /var/cache/pacman/pkg/
|
||||||
|
#LogFile = /var/log/pacman.log
|
||||||
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
|
HoldPkg = pacman glibc dracut kernel-install-for-dracut eos-dracut
|
||||||
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
|
#CleanMethod = KeepInstalled
|
||||||
|
Architecture = auto
|
||||||
|
|
||||||
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
|
#IgnorePkg =
|
||||||
|
#IgnoreGroup =
|
||||||
|
|
||||||
|
#NoUpgrade =
|
||||||
|
#NoExtract =
|
||||||
|
|
||||||
|
# Misc options
|
||||||
|
#UseSyslog
|
||||||
|
Color
|
||||||
|
ILoveCandy
|
||||||
|
#NoProgressBar
|
||||||
|
CheckSpace
|
||||||
|
VerbosePkgLists
|
||||||
|
ParallelDownloads = 5
|
||||||
|
|
||||||
|
# By default, pacman accepts packages signed by keys that its local keyring
|
||||||
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
SigLevel = Required DatabaseOptional
|
||||||
|
LocalFileSigLevel = Optional
|
||||||
|
#RemoteFileSigLevel = Required
|
||||||
|
|
||||||
|
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||||
|
# keyring can then be populated with the keys of all official Arch Linux
|
||||||
|
# packagers with `pacman-key --populate archlinux`.
|
||||||
|
|
||||||
|
#
|
||||||
|
# REPOSITORIES
|
||||||
|
# - can be defined here or included from another file
|
||||||
|
# - pacman will search repositories in the order defined here
|
||||||
|
# - local/custom mirrors can be added here or in separate files
|
||||||
|
# - repositories listed first will take precedence when packages
|
||||||
|
# have identical names, regardless of version number
|
||||||
|
# - URLs will have $repo replaced by the name of the current repo
|
||||||
|
# - URLs will have $arch replaced by the name of the architecture
|
||||||
|
#
|
||||||
|
# Repository entries are of the format:
|
||||||
|
# [repo-name]
|
||||||
|
# Server = ServerName
|
||||||
|
# Include = IncludePath
|
||||||
|
#
|
||||||
|
# The header [repo-name] is crucial - it must be present and
|
||||||
|
# uncommented to enable the repo.
|
||||||
|
#
|
||||||
|
|
||||||
|
# The testing repositories are disabled by default. To enable, uncomment the
|
||||||
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
|
[endeavouros]
|
||||||
|
SigLevel = PackageRequired
|
||||||
|
Include = /etc/pacman.d/endeavouros-mirrorlist
|
||||||
|
|
||||||
|
#[core-testing]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[core]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
#[extra-testing]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
# enable the multilib repositories as required here.
|
||||||
|
|
||||||
|
#[multilib-testing]
|
||||||
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[multilib]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
# tips on creating your own repositories.
|
||||||
|
#[custom]
|
||||||
|
#SigLevel = Optional TrustAll
|
||||||
|
#Server = file:///home/custompkgs
|
||||||
15
home/bash_aliases
Normal file
15
home/bash_aliases
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias lah='ls -lah'
|
||||||
|
alias ll='lah'
|
||||||
|
alias v=vim
|
||||||
|
alias vim=nvim
|
||||||
|
alias nvim=lvim
|
||||||
|
|
||||||
|
# folders
|
||||||
|
alias gh="cd"
|
||||||
|
alias gr="cd /"
|
||||||
|
alias gm="cd /mnt"
|
||||||
|
alias gd="cd /dev"
|
||||||
|
|
||||||
|
# enable sudo aliases
|
||||||
|
alias sudo='sudo '
|
||||||
142
home/bashrc
Normal file
142
home/bashrc
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
#
|
||||||
|
# ~/.bashrc
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
colors() {
|
||||||
|
local fgc bgc vals seq0
|
||||||
|
|
||||||
|
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
|
||||||
|
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
|
||||||
|
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
|
||||||
|
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
|
||||||
|
|
||||||
|
# foreground colors
|
||||||
|
for fgc in {30..37}; do
|
||||||
|
# background colors
|
||||||
|
for bgc in {40..47}; do
|
||||||
|
fgc=${fgc#37} # white
|
||||||
|
bgc=${bgc#40} # black
|
||||||
|
|
||||||
|
vals="${fgc:+$fgc;}${bgc}"
|
||||||
|
vals=${vals%%;}
|
||||||
|
|
||||||
|
seq0="${vals:+\e[${vals}m}"
|
||||||
|
printf " %-9s" "${seq0:-(default)}"
|
||||||
|
printf " ${seq0}TEXT\e[m"
|
||||||
|
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
|
||||||
|
done
|
||||||
|
echo; echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
|
||||||
|
|
||||||
|
# Change the window title of X terminals
|
||||||
|
case ${TERM} in
|
||||||
|
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
|
||||||
|
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
||||||
|
;;
|
||||||
|
screen*)
|
||||||
|
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
use_color=true
|
||||||
|
|
||||||
|
# Set colorful PS1 only on colorful terminals.
|
||||||
|
# dircolors --print-database uses its own built-in database
|
||||||
|
# instead of using /etc/DIR_COLORS. Try to use the external file
|
||||||
|
# first to take advantage of user additions. Use internal bash
|
||||||
|
# globbing instead of external grep binary.
|
||||||
|
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
|
||||||
|
match_lhs=""
|
||||||
|
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
|
||||||
|
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
|
||||||
|
[[ -z ${match_lhs} ]] \
|
||||||
|
&& type -P dircolors >/dev/null \
|
||||||
|
&& match_lhs=$(dircolors --print-database)
|
||||||
|
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
|
||||||
|
|
||||||
|
if ${use_color} ; then
|
||||||
|
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
|
||||||
|
if type -P dircolors >/dev/null ; then
|
||||||
|
if [[ -f ~/.dir_colors ]] ; then
|
||||||
|
eval $(dircolors -b ~/.dir_colors)
|
||||||
|
elif [[ -f /etc/DIR_COLORS ]] ; then
|
||||||
|
eval $(dircolors -b /etc/DIR_COLORS)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EUID} == 0 ]] ; then
|
||||||
|
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias grep='grep --colour=auto'
|
||||||
|
alias egrep='egrep --colour=auto'
|
||||||
|
alias fgrep='fgrep --colour=auto'
|
||||||
|
else
|
||||||
|
if [[ ${EUID} == 0 ]] ; then
|
||||||
|
# show root@ when we don't have colors
|
||||||
|
PS1='\u@\h \W \$ '
|
||||||
|
else
|
||||||
|
PS1='\u@\h \w \$ '
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset use_color safe_term match_lhs sh
|
||||||
|
|
||||||
|
#alias cp="cp -i" # confirm before overwriting something
|
||||||
|
#alias df='df -h' # human-readable sizes
|
||||||
|
#alias free='free -m' # show sizes in MB
|
||||||
|
#alias np='nano -w PKGBUILD'
|
||||||
|
#alias more=less
|
||||||
|
|
||||||
|
xhost +local:root > /dev/null 2>&1
|
||||||
|
|
||||||
|
set -o vi
|
||||||
|
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export VISUAL="lvim"
|
||||||
|
|
||||||
|
# default
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
## load pywal colors
|
||||||
|
#. "$HOME/.cache/wal/colors.sh"
|
||||||
|
## (wal -r &)
|
||||||
|
#cat /home/studi/.cache/wal/sequences
|
||||||
|
|
||||||
|
PS1='[\u@\h \W]\$ '
|
||||||
|
|
||||||
|
# load pc individual bashrc content
|
||||||
|
if [ -e $HOME/.bashrc_individual ]; then
|
||||||
|
source $HOME/.bashrc_individual
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|
||||||
|
src_files() {
|
||||||
|
local f
|
||||||
|
for f in "$@"; do
|
||||||
|
# source dirs
|
||||||
|
if [ -d "$f" ]; then
|
||||||
|
src_files "$f"/* || true
|
||||||
|
# source files
|
||||||
|
elif [ -f "$f" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
source "$f" || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -e $HOME/.bash_aliases ]; then
|
||||||
|
source $HOME/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
src_files "$HOME/.profile.d" "$HOME/.bashrc.d"
|
||||||
|
|
||||||
4
home/bashrc.d/android
Normal file
4
home/bashrc.d/android
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# android-bashrc
|
||||||
|
if [ -e ~/.android-bashrc.bash ] ; then
|
||||||
|
source ~/.android-bashrc.bash
|
||||||
|
fi
|
||||||
1
home/bashrc.d/atuin
Normal file
1
home/bashrc.d/atuin
Normal file
@@ -0,0 +1 @@
|
|||||||
|
eval "$(atuin init bash)"
|
||||||
2
home/bashrc.d/exa
Normal file
2
home/bashrc.d/exa
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
alias ls='exa --icons '
|
||||||
|
alias ll='exa -l --icons '
|
||||||
1
home/bashrc.d/forticlient
Normal file
1
home/bashrc.d/forticlient
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PATH="/opt/forticlient:$PATH"
|
||||||
4
home/bashrc.d/nvm
Normal file
4
home/bashrc.d/nvm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# nvm
|
||||||
|
if [ -e /usr/share/nvm/init-nvm.sh ] ; then
|
||||||
|
source /usr/share/nvm/init-nvm.sh
|
||||||
|
fi
|
||||||
13
home/bashrc.d/ranger
Normal file
13
home/bashrc.d/ranger
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# run ranger-cd
|
||||||
|
function ranger-cd {
|
||||||
|
tempfile="$(mktemp -t tmp.XXXXXX)"
|
||||||
|
ranger --choosedir="$tempfile" "${@:-$(pwd)}"
|
||||||
|
test -f "$tempfile" &&
|
||||||
|
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
|
||||||
|
cd -- "$(cat "$tempfile")"
|
||||||
|
fi
|
||||||
|
rm -f -- "$tempfile"
|
||||||
|
}
|
||||||
|
alias ranger="ranger-cd"
|
||||||
|
alias r="ranger-cd"
|
||||||
|
if [ "$RANGERCD" ]; then unset RANGERCD && ranger-cd; fi
|
||||||
5
home/bashrc.d/starship
Normal file
5
home/bashrc.d/starship
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# starship
|
||||||
|
export STARSHIP_CONFIG=$HOME/.config/starship/starship.toml
|
||||||
|
export STARSHIP_CACHE=$HOME/.cache/starship/
|
||||||
|
eval "$(starship init bash)"
|
||||||
|
|
||||||
63
home/bashrc.d/tools
Normal file
63
home/bashrc.d/tools
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# Bash won't get SIGWINCH if another process is in the foreground.
|
||||||
|
# Enable checkwinsize so that bash will check the terminal size when
|
||||||
|
# it regains control. #65623
|
||||||
|
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
shopt -s expand_aliases
|
||||||
|
|
||||||
|
# export QT_SELECT=4
|
||||||
|
|
||||||
|
# Enable history appending instead of overwriting. #139609
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
#
|
||||||
|
# # ex - archive extractor
|
||||||
|
# # usage: ex <file>
|
||||||
|
ex ()
|
||||||
|
{
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xjf $1 ;;
|
||||||
|
*.tar.gz) tar xzf $1 ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) unrar x $1 ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xf $1 ;;
|
||||||
|
*.tbz2) tar xjf $1 ;;
|
||||||
|
*.tgz) tar xzf $1 ;;
|
||||||
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid file"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# own commands
|
||||||
|
cl() { cd "$@" && ls; }
|
||||||
|
|
||||||
|
# tools from https://github.com/thiagowfx/.dotfiles/blob/master/bash/.bashrc
|
||||||
|
|
||||||
|
# Complete filenames after flag arguments.
|
||||||
|
# https://stackoverflow.com/a/33740951/1745064
|
||||||
|
# $ foo --config=$HOME/.b| <TAB> would expand .bashrc.
|
||||||
|
complete -D -o default 2&> /dev/null
|
||||||
|
|
||||||
|
# Enable history expansion with space.
|
||||||
|
# Typing !!<SPC> will replace !! with the last command.
|
||||||
|
bind Space:magic-space
|
||||||
|
|
||||||
|
# Prepend cd to directory names automatically.
|
||||||
|
shopt -s autocd 2&>/dev/null
|
||||||
|
|
||||||
|
# Correct spelling errors in arguments supplied to cd.
|
||||||
|
shopt -s cdspell
|
||||||
|
|
||||||
|
# Correct spelling errors during tab-completion.
|
||||||
|
shopt -s dirspell 2&>/dev/null
|
||||||
|
|
||||||
|
# Turn on recursive globbing: Enables ** to recurse all directories
|
||||||
|
shopt -s globstar 2&>/dev/null
|
||||||
3
home/bashrc.d/zoxide
Normal file
3
home/bashrc.d/zoxide
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
eval "$(zoxide init bash)"
|
||||||
|
|
||||||
|
alias cd='z '
|
||||||
1475
home/gdbinit
Normal file
1475
home/gdbinit
Normal file
File diff suppressed because it is too large
Load Diff
4
home/mplayer/config
Normal file
4
home/mplayer/config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Write your default config options here!
|
||||||
|
|
||||||
|
nolirc=yes
|
||||||
|
|
||||||
1
home/tmux.conf
Normal file
1
home/tmux.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
source-file "$HOME/.config/tmux/.tmux.conf"
|
||||||
11
notes/manually_installed.txt
Normal file
11
notes/manually_installed.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# brave vimium
|
||||||
|
# brave keepassxc browser integration
|
||||||
|
|
||||||
|
# add manjaro-backgrounds and other images to /usr/share/backgrounds
|
||||||
|
|
||||||
|
# add ssh key to bitbucket
|
||||||
|
ssh-keygen -t ed25519 -b 4096 -C "SManjaroW" -f ~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
- 'push.autoSetupRemote' in 'git help config' to set upstream branches automatically
|
||||||
39
old/config/paru/paru.conf
Normal file
39
old/config/paru/paru.conf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#
|
||||||
|
# $PARU_CONF
|
||||||
|
# /etc/paru.conf
|
||||||
|
# ~/.config/paru/paru.conf
|
||||||
|
#
|
||||||
|
# See the paru.conf(5) manpage for options
|
||||||
|
|
||||||
|
#
|
||||||
|
# GENERAL OPTIONS
|
||||||
|
#
|
||||||
|
[options]
|
||||||
|
PgpFetch
|
||||||
|
Devel
|
||||||
|
Provides
|
||||||
|
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
|
||||||
|
#AurOnly
|
||||||
|
BottomUp
|
||||||
|
#RemoveMake
|
||||||
|
#SudoLoop
|
||||||
|
#UseAsk
|
||||||
|
#SaveChanges
|
||||||
|
#CombinedUpgrade
|
||||||
|
#CleanAfter
|
||||||
|
#UpgradeMenu
|
||||||
|
#NewsOnUpgrade
|
||||||
|
|
||||||
|
#LocalRepo
|
||||||
|
#Chroot
|
||||||
|
#Sign
|
||||||
|
#SignDb
|
||||||
|
#KeepRepoCache
|
||||||
|
|
||||||
|
#
|
||||||
|
# Binary OPTIONS
|
||||||
|
#
|
||||||
|
#[bin]
|
||||||
|
#FileManager = vifm
|
||||||
|
#MFlags = --skippgpcheck
|
||||||
|
#Sudo = doas
|
||||||
1
old/etc/modprobe.d/ppp.conf
Normal file
1
old/etc/modprobe.d/ppp.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
alias char-major-108 ppp_generic
|
||||||
352
old/etc/ppp/options
Normal file
352
old/etc/ppp/options
Normal file
@@ -0,0 +1,352 @@
|
|||||||
|
# /etc/ppp/options
|
||||||
|
#
|
||||||
|
# Originally created by Jim Knoble <jmknoble@mercury.interpath.net>
|
||||||
|
# Modified for Debian by alvar Bray <alvar@meiko.co.uk>
|
||||||
|
# Modified for PPP Server setup by Christoph Lameter <clameter@debian.org>
|
||||||
|
# Modified for ArchLinux by Manolis Tzanidakis <manolis@archlinux.org>
|
||||||
|
#
|
||||||
|
# To quickly see what options are active in this file, use this command:
|
||||||
|
# grep -Ev '#|^ *$' /etc/ppp/options
|
||||||
|
|
||||||
|
# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
|
||||||
|
# Two Servers can be remotely configured
|
||||||
|
# ms-dns 192.168.1.1
|
||||||
|
# ms-dns 192.168.1.2
|
||||||
|
|
||||||
|
# Specify which WINS Servers the incoming connection Win95 or WinNT should use
|
||||||
|
# ms-wins 192.168.1.50
|
||||||
|
# ms-wins 192.168.1.51
|
||||||
|
|
||||||
|
# Run the executable or shell command specified after pppd has
|
||||||
|
# terminated the link. This script could, for example, issue commands
|
||||||
|
# to the modem to cause it to hang up if hardware modem control signals
|
||||||
|
# were not available.
|
||||||
|
#disconnect "chat -- \d+++\d\c OK ath0 OK"
|
||||||
|
|
||||||
|
# async character map -- 32-bit hex; each bit is a character
|
||||||
|
# that needs to be escaped for pppd to receive it. 0x00000001
|
||||||
|
# represents '\x01', and 0x80000000 represents '\x1f'.
|
||||||
|
asyncmap 0
|
||||||
|
|
||||||
|
# Require the peer to authenticate itself before allowing network
|
||||||
|
# packets to be sent or received.
|
||||||
|
# Please do not disable this setting. It is expected to be standard in
|
||||||
|
# future releases of pppd. Use the call option (see manpage) to disable
|
||||||
|
# authentication for specific peers.
|
||||||
|
auth
|
||||||
|
|
||||||
|
# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
|
||||||
|
# on the serial port.
|
||||||
|
crtscts
|
||||||
|
|
||||||
|
# Use software flow control (i.e. XON/XOFF) to control the flow of data
|
||||||
|
# on the serial port.
|
||||||
|
#xonxoff
|
||||||
|
|
||||||
|
# Specifies that certain characters should be escaped on transmission
|
||||||
|
# (regardless of whether the peer requests them to be escaped with its
|
||||||
|
# async control character map). The characters to be escaped are
|
||||||
|
# specified as a list of hex numbers separated by commas. Note that
|
||||||
|
# almost any character can be specified for the escape option, unlike
|
||||||
|
# the asyncmap option which only allows control characters to be
|
||||||
|
# specified. The characters which may not be escaped are those with hex
|
||||||
|
# values 0x20 - 0x3f or 0x5e.
|
||||||
|
#escape 11,13,ff
|
||||||
|
|
||||||
|
# Don't use the modem control lines.
|
||||||
|
#local
|
||||||
|
|
||||||
|
# Specifies that pppd should use a UUCP-style lock on the serial device
|
||||||
|
# to ensure exclusive access to the device.
|
||||||
|
lock
|
||||||
|
|
||||||
|
# Don't show the passwords when logging the contents of PAP packets.
|
||||||
|
# This is the default.
|
||||||
|
hide-password
|
||||||
|
|
||||||
|
# When logging the contents of PAP packets, this option causes pppd to
|
||||||
|
# show the password string in the log message.
|
||||||
|
#show-password
|
||||||
|
|
||||||
|
# Use the modem control lines. On Ultrix, this option implies hardware
|
||||||
|
# flow control, as for the crtscts option. (This option is not fully
|
||||||
|
# implemented.)
|
||||||
|
modem
|
||||||
|
|
||||||
|
# Set the MRU [Maximum Receive Unit] value to <n> for negotiation. pppd
|
||||||
|
# will ask the peer to send packets of no more than <n> bytes. The
|
||||||
|
# minimum MRU value is 128. The default MRU value is 1500. A value of
|
||||||
|
# 296 is recommended for slow links (40 bytes for TCP/IP header + 256
|
||||||
|
# bytes of data).
|
||||||
|
#mru 542
|
||||||
|
|
||||||
|
# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
|
||||||
|
# notation (e.g. 255.255.255.0).
|
||||||
|
#netmask 255.255.255.0
|
||||||
|
|
||||||
|
# Disables the default behaviour when no local IP address is specified,
|
||||||
|
# which is to determine (if possible) the local IP address from the
|
||||||
|
# hostname. With this option, the peer will have to supply the local IP
|
||||||
|
# address during IPCP negotiation (unless it specified explicitly on the
|
||||||
|
# command line or in an options file).
|
||||||
|
#noipdefault
|
||||||
|
|
||||||
|
# Enables the "passive" option in the LCP. With this option, pppd will
|
||||||
|
# attempt to initiate a connection; if no reply is received from the
|
||||||
|
# peer, pppd will then just wait passively for a valid LCP packet from
|
||||||
|
# the peer (instead of exiting, as it does without this option).
|
||||||
|
#passive
|
||||||
|
|
||||||
|
# With this option, pppd will not transmit LCP packets to initiate a
|
||||||
|
# connection until a valid LCP packet is received from the peer (as for
|
||||||
|
# the "passive" option with old versions of pppd).
|
||||||
|
#silent
|
||||||
|
|
||||||
|
# Don't request or allow negotiation of any options for LCP and IPCP
|
||||||
|
# (use default values).
|
||||||
|
#-all
|
||||||
|
|
||||||
|
# Disable Address/Control compression negotiation (use default, i.e.
|
||||||
|
# address/control field disabled).
|
||||||
|
#-ac
|
||||||
|
|
||||||
|
# Disable asyncmap negotiation (use the default asyncmap, i.e. escape
|
||||||
|
# all control characters).
|
||||||
|
#-am
|
||||||
|
|
||||||
|
# Don't fork to become a background process (otherwise pppd will do so
|
||||||
|
# if a serial device is specified).
|
||||||
|
#-detach
|
||||||
|
|
||||||
|
# Disable IP address negotiation (with this option, the remote IP
|
||||||
|
# address must be specified with an option on the command line or in
|
||||||
|
# an options file).
|
||||||
|
#-ip
|
||||||
|
|
||||||
|
# Disable IPCP negotiation and IP communication. This option should
|
||||||
|
# only be required if the peer is buggy and gets confused by requests
|
||||||
|
# from pppd for IPCP negotiation.
|
||||||
|
#noip
|
||||||
|
|
||||||
|
# Disable magic number negotiation. With this option, pppd cannot
|
||||||
|
# detect a looped-back line.
|
||||||
|
#-mn
|
||||||
|
|
||||||
|
# Disable MRU [Maximum Receive Unit] negotiation (use default, i.e.
|
||||||
|
# 1500).
|
||||||
|
#-mru
|
||||||
|
|
||||||
|
# Disable protocol field compression negotiation (use default, i.e.
|
||||||
|
# protocol field compression disabled).
|
||||||
|
#-pc
|
||||||
|
|
||||||
|
# Require the peer to authenticate itself using PAP.
|
||||||
|
#+pap
|
||||||
|
|
||||||
|
# Don't agree to authenticate using PAP.
|
||||||
|
#-pap
|
||||||
|
|
||||||
|
# Require the peer to authenticate itself using CHAP [Cryptographic
|
||||||
|
# Handshake Authentication Protocol] authentication.
|
||||||
|
#+chap
|
||||||
|
|
||||||
|
# Don't agree to authenticate using CHAP.
|
||||||
|
#-chap
|
||||||
|
|
||||||
|
# Disable negotiation of Van Jacobson style IP header compression (use
|
||||||
|
# default, i.e. no compression).
|
||||||
|
#-vj
|
||||||
|
|
||||||
|
# Increase debugging level (same as -d). If this option is given, pppd
|
||||||
|
# will log the contents of all control packets sent or received in a
|
||||||
|
# readable form. The packets are logged through syslog with facility
|
||||||
|
# daemon and level debug. This information can be directed to a file by
|
||||||
|
# setting up /etc/syslog.conf appropriately (see syslog.conf(5)). (If
|
||||||
|
# pppd is compiled with extra debugging enabled, it will log messages
|
||||||
|
# using facility local2 instead of daemon).
|
||||||
|
#debug
|
||||||
|
|
||||||
|
# Append the domain name <d> to the local host name for authentication
|
||||||
|
# purposes. For example, if gethostname() returns the name porsche,
|
||||||
|
# but the fully qualified domain name is porsche.Quotron.COM, you would
|
||||||
|
# use the domain option to set the domain name to Quotron.COM.
|
||||||
|
#domain <d>
|
||||||
|
|
||||||
|
# Enable debugging code in the kernel-level PPP driver. The argument n
|
||||||
|
# is a number which is the sum of the following values: 1 to enable
|
||||||
|
# general debug messages, 2 to request that the contents of received
|
||||||
|
# packets be printed, and 4 to request that the contents of transmitted
|
||||||
|
# packets be printed.
|
||||||
|
#kdebug n
|
||||||
|
|
||||||
|
# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
|
||||||
|
# requests a smaller value via MRU negotiation, pppd will request that
|
||||||
|
# the kernel networking code send data packets of no more than n bytes
|
||||||
|
# through the PPP network interface.
|
||||||
|
#mtu <n>
|
||||||
|
|
||||||
|
# Set the name of the local system for authentication purposes to <n>.
|
||||||
|
# This is a privileged option. With this option, pppd will use lines in the
|
||||||
|
# secrets files which have <n> as the second field when looking for a
|
||||||
|
# secret to use in authenticating the peer. In addition, unless overridden
|
||||||
|
# with the user option, <n> will be used as the name to send to the peer
|
||||||
|
# when authenticating the local system to the peer. (Note that pppd does
|
||||||
|
# not append the domain name to <n>.)
|
||||||
|
#name <n>
|
||||||
|
|
||||||
|
# Enforce the use of the hostname as the name of the local system for
|
||||||
|
# authentication purposes (overrides the name option).
|
||||||
|
#usehostname
|
||||||
|
|
||||||
|
# Set the assumed name of the remote system for authentication purposes
|
||||||
|
# to <n>.
|
||||||
|
#remotename <n>
|
||||||
|
|
||||||
|
# Add an entry to this system's ARP [Address Resolution Protocol]
|
||||||
|
# table with the IP address of the peer and the Ethernet address of this
|
||||||
|
# system.
|
||||||
|
proxyarp
|
||||||
|
|
||||||
|
# Use the system password database for authenticating the peer using
|
||||||
|
# PAP. Note: mgetty already provides this option. If this is specified
|
||||||
|
# then dialin from users using a script under Linux to fire up ppp wont work.
|
||||||
|
# login
|
||||||
|
|
||||||
|
# If this option is given, pppd will send an LCP echo-request frame to the
|
||||||
|
# peer every n seconds. Normally the peer should respond to the echo-request
|
||||||
|
# by sending an echo-reply. This option can be used with the
|
||||||
|
# lcp-echo-failure option to detect that the peer is no longer connected.
|
||||||
|
lcp-echo-interval 30
|
||||||
|
|
||||||
|
# If this option is given, pppd will presume the peer to be dead if n
|
||||||
|
# LCP echo-requests are sent without receiving a valid LCP echo-reply.
|
||||||
|
# If this happens, pppd will terminate the connection. Use of this
|
||||||
|
# option requires a non-zero value for the lcp-echo-interval parameter.
|
||||||
|
# This option can be used to enable pppd to terminate after the physical
|
||||||
|
# connection has been broken (e.g., the modem has hung up) in
|
||||||
|
# situations where no hardware modem control lines are available.
|
||||||
|
lcp-echo-failure 4
|
||||||
|
|
||||||
|
# Set the LCP restart interval (retransmission timeout) to <n> seconds
|
||||||
|
# (default 3).
|
||||||
|
#lcp-restart <n>
|
||||||
|
|
||||||
|
# Set the maximum number of LCP terminate-request transmissions to <n>
|
||||||
|
# (default 3).
|
||||||
|
#lcp-max-terminate <n>
|
||||||
|
|
||||||
|
# Set the maximum number of LCP configure-request transmissions to <n>
|
||||||
|
# (default 10).
|
||||||
|
#lcp-max-configure <n>
|
||||||
|
|
||||||
|
# Set the maximum number of LCP configure-NAKs returned before starting
|
||||||
|
# to send configure-Rejects instead to <n> (default 10).
|
||||||
|
#lcp-max-failure <n>
|
||||||
|
|
||||||
|
# Set the IPCP restart interval (retransmission timeout) to <n>
|
||||||
|
# seconds (default 3).
|
||||||
|
#ipcp-restart <n>
|
||||||
|
|
||||||
|
# Set the maximum number of IPCP terminate-request transmissions to <n>
|
||||||
|
# (default 3).
|
||||||
|
#ipcp-max-terminate <n>
|
||||||
|
|
||||||
|
# Set the maximum number of IPCP configure-request transmissions to <n>
|
||||||
|
# (default 10).
|
||||||
|
#ipcp-max-configure <n>
|
||||||
|
|
||||||
|
# Set the maximum number of IPCP configure-NAKs returned before starting
|
||||||
|
# to send configure-Rejects instead to <n> (default 10).
|
||||||
|
#ipcp-max-failure <n>
|
||||||
|
|
||||||
|
# Set the PAP restart interval (retransmission timeout) to <n> seconds
|
||||||
|
# (default 3).
|
||||||
|
#pap-restart <n>
|
||||||
|
|
||||||
|
# Set the maximum number of PAP authenticate-request transmissions to
|
||||||
|
# <n> (default 10).
|
||||||
|
#pap-max-authreq <n>
|
||||||
|
|
||||||
|
# Set the maximum time that pppd will wait for the peer to authenticate
|
||||||
|
# itself with PAP to <n> seconds (0 means no limit).
|
||||||
|
#pap-timeout <n>
|
||||||
|
|
||||||
|
# Set the CHAP restart interval (retransmission timeout for
|
||||||
|
# challenges) to <n> seconds (default 3).
|
||||||
|
#chap-restart <n>
|
||||||
|
|
||||||
|
# Set the maximum number of CHAP challenge transmissions to <n>
|
||||||
|
# (default 10).
|
||||||
|
#chap-max-challenge
|
||||||
|
|
||||||
|
# If this option is given, pppd will rechallenge the peer every <n>
|
||||||
|
# seconds.
|
||||||
|
#chap-interval <n>
|
||||||
|
|
||||||
|
# With this option, pppd will accept the peer's idea of our local IP
|
||||||
|
# address, even if the local IP address was specified in an option.
|
||||||
|
#ipcp-accept-local
|
||||||
|
|
||||||
|
# With this option, pppd will accept the peer's idea of its (remote) IP
|
||||||
|
# address, even if the remote IP address was specified in an option.
|
||||||
|
ipcp-accept-remote
|
||||||
|
|
||||||
|
# Disable the IPXCP and IPX protocols.
|
||||||
|
# To let pppd pass IPX packets comment this out --- you'll probably also
|
||||||
|
# want to install ipxripd, and have the Internal IPX Network option enabled
|
||||||
|
# in your kernel. /usr/doc/HOWTO/IPX-HOWTO.gz contains more info.
|
||||||
|
noipx
|
||||||
|
|
||||||
|
# Exit once a connection has been made and terminated. This is the default,
|
||||||
|
# unless the `persist' or `demand' option has been specified.
|
||||||
|
#nopersist
|
||||||
|
|
||||||
|
# Do not exit after a connection is terminated; instead try to reopen
|
||||||
|
# the connection.
|
||||||
|
#persist
|
||||||
|
|
||||||
|
# Terminate after n consecutive failed connection attempts.
|
||||||
|
# A value of 0 means no limit. The default value is 10.
|
||||||
|
#maxfail <n>
|
||||||
|
|
||||||
|
# Initiate the link only on demand, i.e. when data traffic is present.
|
||||||
|
# With this option, the remote IP address must be specified by the user on
|
||||||
|
# the command line or in an options file. Pppd will initially configure
|
||||||
|
# the interface and enable it for IP traffic without connecting to the peer.
|
||||||
|
# When traffic is available, pppd will connect to the peer and perform
|
||||||
|
# negotiation, authentication, etc. When this is completed, pppd will
|
||||||
|
# commence passing data packets (i.e., IP packets) across the link.
|
||||||
|
#demand
|
||||||
|
|
||||||
|
# Specifies that pppd should disconnect if the link is idle for <n> seconds.
|
||||||
|
# The link is idle when no data packets (i.e. IP packets) are being sent or
|
||||||
|
# received. Note: it is not advisable to use this option with the persist
|
||||||
|
# option without the demand option. If the active-filter option is given,
|
||||||
|
# data packets which are rejected by the specified activity filter also
|
||||||
|
# count as the link being idle.
|
||||||
|
#idle <n>
|
||||||
|
|
||||||
|
# Specifies how many seconds to wait before re-initiating the link after
|
||||||
|
# it terminates. This option only has any effect if the persist or demand
|
||||||
|
# option is used. The holdoff period is not applied if the link was
|
||||||
|
# terminated because it was idle.
|
||||||
|
#holdoff <n>
|
||||||
|
|
||||||
|
# Wait for up n milliseconds after the connect script finishes for a valid
|
||||||
|
# PPP packet from the peer. At the end of this time, or when a valid PPP
|
||||||
|
# packet is received from the peer, pppd will commence negotiation by
|
||||||
|
# sending its first LCP packet. The default value is 1000 (1 second).
|
||||||
|
# This wait period only applies if the connect or pty option is used.
|
||||||
|
#connect-delay <n>
|
||||||
|
|
||||||
|
# Packet filtering: for more information, see pppd(8)
|
||||||
|
# Any packets matching the filter expression will be interpreted as link
|
||||||
|
# activity, and will cause a "demand" connection to be activated, and reset
|
||||||
|
# the idle connection timer. (idle option)
|
||||||
|
# The filter expression is akin to that of tcpdump(1)
|
||||||
|
#active-filter <filter-expression>
|
||||||
|
|
||||||
|
# uncomment the line below this if you use PPPoE
|
||||||
|
#plugin /usr/lib/pppd/plugins/pppoe.so
|
||||||
|
|
||||||
|
# ---<End of File>---
|
||||||
67
old/home/Xdefaults
Normal file
67
old/home/Xdefaults
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
URxvt.font: xft:RobotoMono Nerd Font:size=15
|
||||||
|
! URxvt.font: xft:FiraCode Nerd Font:style=Medium:size=15,xft:Noto Color Emoji:size=20
|
||||||
|
URxvt.boldFont: xft:RobotoMono Nerd Font:size=15
|
||||||
|
! URxvt.boldFont: xft:FiraCode Nerd Font:bold:size=15
|
||||||
|
URxvt.letterSpace: 0
|
||||||
|
|
||||||
|
URxvt.scrollBar: false
|
||||||
|
|
||||||
|
*.background: #282a36
|
||||||
|
*.foreground: #eff0eb
|
||||||
|
|
||||||
|
! original #86a2b0
|
||||||
|
*.colorUL: #eff0eb
|
||||||
|
*.underlineColor: #eff0eb
|
||||||
|
|
||||||
|
! black
|
||||||
|
*.color0 : #2E3436
|
||||||
|
*.color8 : #686868
|
||||||
|
|
||||||
|
! red strings values
|
||||||
|
*.color1 : #ff5c57
|
||||||
|
! light red
|
||||||
|
*.color9 : #ff5c57
|
||||||
|
|
||||||
|
! green
|
||||||
|
*.color2 : #5af78e
|
||||||
|
! light green
|
||||||
|
*.color10 : #5af78e
|
||||||
|
|
||||||
|
! orange language reserved words
|
||||||
|
*.color3 : #f3f99d
|
||||||
|
! yellow types
|
||||||
|
*.color11 : #f3f99d
|
||||||
|
|
||||||
|
! blue
|
||||||
|
*.color4 : #57c7ff
|
||||||
|
! light blue comments
|
||||||
|
*.color12 : #57c7ff
|
||||||
|
|
||||||
|
! magenta includes
|
||||||
|
*.color5 : #ff6ac1
|
||||||
|
! light magenta
|
||||||
|
*.color13 : #ff6ac1
|
||||||
|
|
||||||
|
! cyan
|
||||||
|
*.color6 : #9aedfe
|
||||||
|
! light cyan
|
||||||
|
*.color14 : #9aedfe
|
||||||
|
|
||||||
|
! grey
|
||||||
|
*.color7 : #f1f1f0
|
||||||
|
! light grey
|
||||||
|
*.color15 : #eff0eb
|
||||||
|
|
||||||
|
URxvt.transparent: true
|
||||||
|
URxvt.shading: 30
|
||||||
|
|
||||||
|
URxvt.perl-ext-common: default,matcher,resize-font,selection-to-clipboard
|
||||||
|
URxvt.url-launcher: /usr/bin/xdg-open
|
||||||
|
URxvt.matcher.button: 1
|
||||||
|
URxvt.matcher.rend.0: Uline Bold fg5
|
||||||
|
|
||||||
|
URxvt.iso14755: true
|
||||||
|
URxvt.iso14755_52: false
|
||||||
|
|
||||||
|
URxvt.fading: 20
|
||||||
|
|
||||||
4
old/home/inputrc
Normal file
4
old/home/inputrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
set vi-ins-mode-string \1\e[6 q\2
|
||||||
|
set vi-cmd-mode-string \1\e[2 q\2
|
||||||
|
|
||||||
94
old/home/xbindkeysrc
Normal file
94
old/home/xbindkeysrc
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
###########################
|
||||||
|
# xbindkeys configuration #
|
||||||
|
###########################
|
||||||
|
#
|
||||||
|
# Version: 0.1.3
|
||||||
|
#
|
||||||
|
# If you edit this, do not forget to uncomment any lines that you change.
|
||||||
|
# The pound(#) symbol may be used anywhere for comments.
|
||||||
|
#
|
||||||
|
# A list of keys is in /usr/include/X11/keysym.h and in
|
||||||
|
# /usr/include/X11/keysymdef.h
|
||||||
|
# The XK_ is not needed.
|
||||||
|
#
|
||||||
|
# List of modifier (on my keyboard):
|
||||||
|
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
|
||||||
|
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
|
||||||
|
#
|
||||||
|
# Another way to specifie a key is to use 'xev' and set the
|
||||||
|
# keycode with c:nnn or the modifier with m:nnn where nnn is
|
||||||
|
# the keycode or the state returned by xev
|
||||||
|
#
|
||||||
|
# This file is created by xbindkey_config
|
||||||
|
# The structure is :
|
||||||
|
# # Remark
|
||||||
|
# "command"
|
||||||
|
# m:xxx + c:xxx
|
||||||
|
# Shift+...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#keystate_numlock = enable
|
||||||
|
#keystate_scrolllock = enable
|
||||||
|
#keystate_capslock = enable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Print Screen
|
||||||
|
"screengrab --fullscreen"
|
||||||
|
m:0x0 + c:107
|
||||||
|
Print
|
||||||
|
|
||||||
|
#Alt + F4
|
||||||
|
"feh --fullscreen ~/.config/i3/imgs/nope.jpg"
|
||||||
|
m:0x8 + c:70
|
||||||
|
Alt + F4
|
||||||
|
|
||||||
|
#Volume Up
|
||||||
|
"pactl set-sink-volume 0 +5%"
|
||||||
|
m:0x0 + c:123
|
||||||
|
XF86AudioRaiseVolume
|
||||||
|
|
||||||
|
#Volume Down
|
||||||
|
"pactl set-sink-volume 0 -5%"
|
||||||
|
m:0x0 + c:122
|
||||||
|
XF86AudioLowerVolume
|
||||||
|
|
||||||
|
#Mute
|
||||||
|
"pactl set-sink-mute 0 toggle"
|
||||||
|
m:0x0 + c:121
|
||||||
|
XF86AudioMute
|
||||||
|
|
||||||
|
#Increase Brightness
|
||||||
|
"light -A 4"
|
||||||
|
m:0x0 + c:233
|
||||||
|
XF86MonBrightnessUp
|
||||||
|
|
||||||
|
#Decrease Brightness
|
||||||
|
"light -U 4"
|
||||||
|
m:0x0 + c:232
|
||||||
|
XF86MonBrightnessDown
|
||||||
|
|
||||||
|
#Toggle Mic
|
||||||
|
"pactl set-source-mute 1 toggle"
|
||||||
|
m:0x0 + c:198
|
||||||
|
XF86AudioMicMute
|
||||||
|
|
||||||
|
#Play Pause
|
||||||
|
"playerctl play-pause"
|
||||||
|
m:0x4 + c:67
|
||||||
|
Control + F1
|
||||||
|
|
||||||
|
#Next
|
||||||
|
"playerctl next"
|
||||||
|
m:0x4 + c:69
|
||||||
|
Control + F3
|
||||||
|
|
||||||
|
#Previous
|
||||||
|
"playerctl previous"
|
||||||
|
m:0x4 + c:68
|
||||||
|
Control + F2
|
||||||
|
|
||||||
|
#
|
||||||
|
# End of xbindkeys configuration
|
||||||
44
old/home/xinitrc
Normal file
44
old/home/xinitrc
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||||
|
xrandr --auto
|
||||||
|
|
||||||
|
userresources=$HOME/.Xresources
|
||||||
|
usermodmap=$HOME/.Xmodmap
|
||||||
|
sysresources=/etc/X11/xinit/.Xresources
|
||||||
|
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||||
|
|
||||||
|
# merge in defaults and keymaps
|
||||||
|
|
||||||
|
if [ -f $sysresources ]; then
|
||||||
|
xrdb $sysresources
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $sysmodmap ]; then
|
||||||
|
xmodmap $sysmodmap
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$userresources" ]; then
|
||||||
|
xrdb -merge "$userresources"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$usermodmap" ]; then
|
||||||
|
xmodmap "$usermodmap"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# start some nice programs
|
||||||
|
|
||||||
|
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||||
|
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||||
|
[ -x "$f" ] && . "$f"
|
||||||
|
done
|
||||||
|
unset f
|
||||||
|
fi
|
||||||
|
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
|
||||||
|
|
||||||
|
xbindkeys
|
||||||
|
setxkbmap ch
|
||||||
|
export TERMCMD=urxvt
|
||||||
|
wal -i /home/studi/Pictures/Wallpapers
|
||||||
|
exec i3
|
||||||
105
scripts/01_setup_configs.sh
Executable file
105
scripts/01_setup_configs.sh
Executable file
@@ -0,0 +1,105 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# cannot be used by multiple user, pacman.conf will be linked to the last invocating user
|
||||||
|
|
||||||
|
scriptdir=$(dirname $(realpath $BASH_SOURCE))
|
||||||
|
echo "script dir $scriptdir"
|
||||||
|
econfigdir=$(realpath $scriptdir/..)
|
||||||
|
|
||||||
|
echo "Setting up configs linking to $econfigdir"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
function Sudo {
|
||||||
|
local firstArg=$1
|
||||||
|
if [ $(type -t $firstArg) = function ]
|
||||||
|
then
|
||||||
|
shift && command sudo bash -c "$(declare -f $firstArg);$firstArg $*"
|
||||||
|
elif [ $(type -t $firstArg) = alias ]
|
||||||
|
then
|
||||||
|
alias sudo='\sudo '
|
||||||
|
eval "sudo $@"
|
||||||
|
else
|
||||||
|
command sudo "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
link_file() {
|
||||||
|
echo "linking file $2"
|
||||||
|
if [ $(readlink -f $2) -ef $1 ]; then
|
||||||
|
echo " is already linked like that"
|
||||||
|
else
|
||||||
|
ln -sbfv $1 $2
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
link_folder() {
|
||||||
|
echo "linking folder $2"
|
||||||
|
if [ $(is_link $2) -eq 0 ]; then
|
||||||
|
# it is still a directory, create backup
|
||||||
|
echo " is a dir (pointing to $(readlink -f $2)), creating backup at $2_original"
|
||||||
|
mv -fvT --backup=numbered $2 $2_original
|
||||||
|
fi
|
||||||
|
if [ $(readlink -f $2) -ef $1 ]; then
|
||||||
|
echo " is already linked like that"
|
||||||
|
else
|
||||||
|
ln -sbfvn $1 $2
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
is_link() {
|
||||||
|
if [ $(readlink -f $1) = $1 ]; then
|
||||||
|
echo 0
|
||||||
|
else
|
||||||
|
echo 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# bashrc
|
||||||
|
link_file $econfigdir/home/bashrc $HOME/.bashrc
|
||||||
|
link_folder $econfigdir/home/bashrc.d ~/.bashrc.d
|
||||||
|
|
||||||
|
# bash_aliases
|
||||||
|
link_file $econfigdir/home/bash_aliases ~/.bash_aliases
|
||||||
|
|
||||||
|
# git config
|
||||||
|
link_folder $econfigdir/config/git ~/.config/git
|
||||||
|
|
||||||
|
# pacman
|
||||||
|
Sudo link_file $econfigdir/etc/pacman.conf /etc/pacman.conf
|
||||||
|
|
||||||
|
# i3 config
|
||||||
|
link_folder $econfigdir/config/i3 ~/.config/i3
|
||||||
|
mv ~/.i3 ~/.i3_original > /dev/null 2>&1
|
||||||
|
|
||||||
|
# alacritty
|
||||||
|
link_folder $econfigdir/config/alacritty ~/.config/alacritty
|
||||||
|
|
||||||
|
# tmux
|
||||||
|
link_file $econfigdir/home/tmux.conf ~/.tmux.conf
|
||||||
|
link_folder $econfigdir/config/tmux ~/.config/tmux
|
||||||
|
|
||||||
|
# ranger
|
||||||
|
link_folder $econfigdir/config/ranger ~/.config/ranger
|
||||||
|
|
||||||
|
# starship
|
||||||
|
link_folder $econfigdir/config/starship ~/.config/starship
|
||||||
|
|
||||||
|
# bin
|
||||||
|
link_file $econfigdir/bin/wtk_connect-vpn ~/.local/bin/wtk_connect-vpn
|
||||||
|
link_file $econfigdir/bin/dmount ~/.local/bin/dmount
|
||||||
|
link_file $econfigdir/bin/dumount ~/.local/bin/dumount
|
||||||
|
|
||||||
|
# nvim
|
||||||
|
link_folder $econfigdir/config/nvim ~/.config/nvim
|
||||||
|
|
||||||
|
# lvim
|
||||||
|
link_folder $econfigdir/config/lvim ~/.config/lvim
|
||||||
|
|
||||||
|
# gdbinit
|
||||||
|
link_file $econfigdir/home/gdbinit ~/.gdbinit
|
||||||
|
|
||||||
|
# dunst
|
||||||
|
link_folder $econfigdir/config/dunst ~/.config/dunst
|
||||||
|
|
||||||
|
# mplayer
|
||||||
|
link_folder $econfigdir/home/mplayer ~/.mplayer
|
||||||
|
|
||||||
56
scripts/02_setup_programs.sh
Executable file
56
scripts/02_setup_programs.sh
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo pacman -Sy --noconfirm
|
||||||
|
|
||||||
|
sudo pacman -S --needed --noconfirm base-devel
|
||||||
|
sudo pacman -S --noconfirm git
|
||||||
|
|
||||||
|
mkdir -p ~/.tmp
|
||||||
|
|
||||||
|
# terminal stuff
|
||||||
|
sudo pacman -S --noconfirm alacritty
|
||||||
|
sudo pacman -S --noconfirm starship
|
||||||
|
sudo pacman -S --noconfirm tmux
|
||||||
|
|
||||||
|
# nvim
|
||||||
|
sudo pacman -S --noconfirm neovim
|
||||||
|
sudo pacman -S --noconfirm lazygit
|
||||||
|
|
||||||
|
# lunarvim
|
||||||
|
LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh) --no-install-dependencies
|
||||||
|
# do ":Lazy sync"
|
||||||
|
|
||||||
|
# ssh key
|
||||||
|
if [ -f "~/.ssh/id_ed25519" ] ; then
|
||||||
|
echo "ed25519 ssh key exists already"
|
||||||
|
else
|
||||||
|
ssh-keygen -t ed25519 -b 4096 -f ~/.ssh/id_ed25519 -N "" <<< n
|
||||||
|
fi
|
||||||
|
|
||||||
|
# unzip
|
||||||
|
sudo pacman -S --noconfirm unzip
|
||||||
|
|
||||||
|
# arp-scan
|
||||||
|
sudo pacman -S --noconfirm arp-scan
|
||||||
|
|
||||||
|
# traceroute
|
||||||
|
sudo pacman -S --noconfirm traceroute
|
||||||
|
|
||||||
|
# bind with nslookup
|
||||||
|
sudo pacman -S --noconfirm bind
|
||||||
|
|
||||||
|
# zoxide as cd
|
||||||
|
sudo pacman -S --noconfirm zoxide
|
||||||
|
|
||||||
|
# exa as ls
|
||||||
|
sudo pacman -S --noconfirm exa
|
||||||
|
|
||||||
|
# bat as cat
|
||||||
|
sudo pacman -S --noconfirm bat
|
||||||
|
|
||||||
|
# fd for simple find
|
||||||
|
sudo pacman -S --noconfirm fd
|
||||||
|
|
||||||
|
# atuin
|
||||||
|
yay -S --noconfirm atuin blesh
|
||||||
|
|
||||||
19
scripts/03_setup_gui_programs.sh
Executable file
19
scripts/03_setup_gui_programs.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# GUI Programs
|
||||||
|
# run the 02_setup_programs.sh first
|
||||||
|
|
||||||
|
# brave
|
||||||
|
paru -S --noconfirm brave-bin
|
||||||
|
|
||||||
|
# obsidian
|
||||||
|
sudo pacman -S --noconfirm obsidian
|
||||||
|
|
||||||
|
# keepassxc
|
||||||
|
sudo pacman -S --noconfirm keepassxc
|
||||||
|
|
||||||
|
# syncthing
|
||||||
|
sudo pacman -S --noconfirm syncthing
|
||||||
|
systemctl --user enable syncthing
|
||||||
|
systemctl --user start syncthing
|
||||||
|
|
||||||
13
scripts/04_setup_languages.sh
Executable file
13
scripts/04_setup_languages.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# python
|
||||||
|
sudo pacman -S --noconfirm python python-pip
|
||||||
|
|
||||||
|
# node
|
||||||
|
sudo pacman -S --noconfirm nvm
|
||||||
|
source /usr/share/nvm/init-nvm.sh
|
||||||
|
nvm install node
|
||||||
|
|
||||||
|
#sudo pacman -S --noconfirm rustup
|
||||||
|
rustup default stable
|
||||||
|
|
||||||
Reference in New Issue
Block a user