Bunch of changes
parent
7582080133
commit
0be589db42
210
dunst/dunstrc
210
dunst/dunstrc
|
@ -1,3 +1,5 @@
|
|||
# See dunst(5) for all configuration options
|
||||
|
||||
[global]
|
||||
### Display ###
|
||||
|
||||
|
@ -17,41 +19,67 @@
|
|||
# will be ignored.
|
||||
follow = none
|
||||
|
||||
# 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 respectively.
|
||||
# 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 = "300x5-10+43"
|
||||
### Geometry ###
|
||||
|
||||
# Show how many messages are currently hidden (because of 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 = top-left
|
||||
|
||||
# Offset from the origin
|
||||
offset = 10x10
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
|
||||
# Maximum number of notification (0 means no limit)
|
||||
notification_limit = 20
|
||||
|
||||
### Progress bar ###
|
||||
|
||||
# Turn on the progess 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 = 0
|
||||
|
||||
# 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
|
||||
|
||||
# Corner radius for the progress bar. 0 disables rounded corners.
|
||||
progress_bar_corner_radius = 0
|
||||
|
||||
# Corner radius for the icon image.
|
||||
icon_corner_radius = 0
|
||||
|
||||
# Show how many messages are currently hidden (because of
|
||||
# notification_limit).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# 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.).
|
||||
transparency = 25
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0
|
||||
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
|
||||
transparency = 0.3
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 5
|
||||
# If gap_size is greater than 0, this setting will be ignored.
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
@ -59,12 +87,21 @@
|
|||
# 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 = 0
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#00000000"
|
||||
frame_color = "#aaaaaa"
|
||||
|
||||
# Size of gap to display between notifications - requires a compositor.
|
||||
# If value is greater than 0, separator_height will be ignored and a border
|
||||
# of size frame_width will be drawn around each notification instead.
|
||||
# Click events on gaps do not currently propagate to applications below.
|
||||
gap_size = 10
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
|
@ -82,7 +119,7 @@
|
|||
# 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 = 120
|
||||
# idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
|
@ -100,7 +137,7 @@
|
|||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
|
||||
# <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
|
||||
|
@ -134,18 +171,14 @@
|
|||
|
||||
# Vertical alignment of message text and icon.
|
||||
# Possible values are "top", "center" and "bottom".
|
||||
vertical_alignment = top
|
||||
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
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
|
@ -153,7 +186,7 @@
|
|||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = false
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
@ -163,19 +196,28 @@
|
|||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
# Recursive icon lookup. You can set a single theme, instead of having to
|
||||
# define all lookup paths.
|
||||
enable_recursive_icon_lookup = true
|
||||
|
||||
# Set icon theme (only used for recursive icon lookup)
|
||||
icon_theme = Adwaita
|
||||
# You can also set multiple icon themes, with the leftmost one being used first.
|
||||
# icon_theme = "Adwaita, breeze"
|
||||
|
||||
# Align icons left/right/top/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
|
||||
min_icon_size = 32
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 32
|
||||
max_icon_size = 128
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/Dracula/actions/16/:/usr/share/icons/Dracula/16/:/usr/share/icons/Dracula/Places/16/
|
||||
# Paths to default icons (only neccesary when not using recursive icon lookup)
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
### History ###
|
||||
|
||||
|
@ -192,7 +234,7 @@
|
|||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/firefox -new-tab
|
||||
browser = /usr/bin/xdg-open
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
@ -203,20 +245,6 @@
|
|||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false
|
||||
|
||||
# Manage dunst's desire for talking
|
||||
# Can be one of the following values:
|
||||
# crit: Critical features. Dunst aborts
|
||||
# warn: Only non-fatal warnings
|
||||
# mesg: Important Messages
|
||||
# info: all unimportant stuff
|
||||
# debug: all less than unimportant stuff
|
||||
verbosity = mesg
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
|
@ -230,6 +258,16 @@
|
|||
# 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.
|
||||
|
@ -247,10 +285,14 @@
|
|||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * 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
|
||||
|
@ -267,50 +309,30 @@
|
|||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[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
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1". Make sure this key actually exists on your keyboard layout,
|
||||
# e.g. check output of 'xmodmap -pke'
|
||||
history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
context = ctrl+shift+period
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
background = "#222222"
|
||||
foreground = "#888888"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
#default_icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
background = "#285577"
|
||||
foreground = "#ffffff"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
#default_icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
foreground = "#ffffff"
|
||||
frame_color = "#ff0000"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
#default_icon = /path/to/icon
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
|
@ -335,8 +357,17 @@
|
|||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# set_category
|
||||
# timeout
|
||||
# urgency
|
||||
# icon_position
|
||||
# skip_display
|
||||
# history_ignore
|
||||
# action_name
|
||||
# word_wrap
|
||||
# ellipsize
|
||||
# alignment
|
||||
# hide_text
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
|
@ -351,8 +382,6 @@
|
|||
# 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.
|
||||
|
||||
|
@ -380,9 +409,6 @@
|
|||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
[no-fullscreen]
|
||||
fullscreen = pushback
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
@ -394,7 +420,7 @@
|
|||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# format = ""
|
||||
# skip_display = true
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
(defwidget audio []
|
||||
(eventbox :class "audio"
|
||||
:onclick "eww open --toggle audio"
|
||||
"墳"
|
||||
""
|
||||
))
|
||||
|
||||
(defwidget clipboard []
|
||||
(eventbox :class "clipboard"
|
||||
""
|
||||
""
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -27,17 +27,17 @@
|
|||
(eventbox :class "previous"
|
||||
:width 40
|
||||
:onclick "playerctl previous"
|
||||
"玲"
|
||||
""
|
||||
)
|
||||
(eventbox :class "pause"
|
||||
:width 40
|
||||
:onclick "playerctl play-pause"
|
||||
{media-player_status == "Playing" ? "" : "契"}
|
||||
{media-player_status == "Playing" ? "" : ""}
|
||||
)
|
||||
(eventbox :class "next"
|
||||
:width 40
|
||||
:onclick "playerctl next"
|
||||
"怜"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
abbr ls "lsd"
|
||||
abbr p "sudo pacman"
|
||||
abbr vim "nvim"
|
||||
abbr vi "nvim"
|
|
@ -1 +0,0 @@
|
|||
fisher complete
|
|
@ -1,9 +0,0 @@
|
|||
set -l subcommands (basename -s '.fish' $__fish_config_dir/functions/_tide_sub_* | string replace '_tide_sub_' '')
|
||||
set -l uninstallIndex (contains --index uninstall $subcommands)
|
||||
set -l subcommandsWithoutUninstall (printf '%s ' $subcommands[1..(math $uninstallIndex-1)] $subcommands[(math $uninstallIndex+1)..-1])
|
||||
|
||||
# Disable file completions for the entire command
|
||||
complete --command tide --no-files
|
||||
|
||||
# Offer subcommands (without uninstall) if no subcommand has been given so far
|
||||
complete --command tide --condition "not __fish_seen_subcommand_from $subcommands" --arguments=$subcommandsWithoutUninstall
|
|
@ -1,8 +0,0 @@
|
|||
# Deactivate the default virtualenv prompt so that we can add our own
|
||||
set --global --export VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||
|
||||
# Whether or not is a fresh session
|
||||
set --global _pure_fresh_session true
|
||||
|
||||
# Register `_pure_prompt_new_line` as an event handler fot `fish_prompt`
|
||||
functions -q _pure_prompt_new_line
|
|
@ -1,33 +0,0 @@
|
|||
# Dracula Color Palette
|
||||
set -l foreground f8f8f2
|
||||
set -l selection 44475a
|
||||
set -l comment 6272a4
|
||||
set -l red ff5555
|
||||
set -l orange ffb86c
|
||||
set -l yellow f1fa8c
|
||||
set -l green 50fa7b
|
||||
set -l purple bd93f9
|
||||
set -l cyan 8be9fd
|
||||
set -l pink ff79c6
|
||||
|
||||
# Syntax Highlighting Colors
|
||||
set -g fish_color_normal $foreground
|
||||
set -g fish_color_command $cyan
|
||||
set -g fish_color_quote $yellow
|
||||
set -g fish_color_redirection $foreground
|
||||
set -g fish_color_end $orange
|
||||
set -g fish_color_error $red
|
||||
set -g fish_color_param $purple
|
||||
set -g fish_color_comment $comment
|
||||
set -g fish_color_match --background=$selection
|
||||
set -g fish_color_selection --background=$selection
|
||||
set -g fish_color_search_match --background=$selection
|
||||
set -g fish_color_operator $green
|
||||
set -g fish_color_escape $pink
|
||||
set -g fish_color_autosuggestion $comment
|
||||
|
||||
# Completion Pager Colors
|
||||
set -g fish_pager_color_progress $comment
|
||||
set -g fish_pager_color_prefix $cyan
|
||||
set -g fish_pager_color_completion $foreground
|
||||
set -g fish_pager_color_description $comment
|
|
@ -1,66 +0,0 @@
|
|||
set --global pure_version 2.5.2 # used for bug report
|
||||
|
||||
# Base colors
|
||||
_pure_set_default pure_color_primary blue
|
||||
_pure_set_default pure_color_info cyan
|
||||
_pure_set_default pure_color_mute brblack
|
||||
_pure_set_default pure_color_success magenta
|
||||
_pure_set_default pure_color_normal normal
|
||||
_pure_set_default pure_color_danger red
|
||||
_pure_set_default pure_color_light white
|
||||
_pure_set_default pure_color_warning yellow
|
||||
_pure_set_default pure_color_dark black
|
||||
|
||||
# Prompt
|
||||
_pure_set_default pure_symbol_prompt "❯"
|
||||
_pure_set_default pure_symbol_reverse_prompt "❮" # used for VI mode
|
||||
_pure_set_default pure_color_prompt_on_error pure_color_danger
|
||||
_pure_set_default pure_color_prompt_on_success pure_color_success
|
||||
|
||||
# Current Working Directory
|
||||
_pure_set_default pure_color_current_directory pure_color_primary
|
||||
|
||||
# Git
|
||||
_pure_set_default pure_enable_git true
|
||||
_pure_set_default pure_symbol_git_unpulled_commits "⇣"
|
||||
_pure_set_default pure_symbol_git_unpushed_commits "⇡"
|
||||
_pure_set_default pure_symbol_git_dirty "*"
|
||||
_pure_set_default pure_color_git_unpulled_commits pure_color_info
|
||||
_pure_set_default pure_color_git_unpushed_commits pure_color_info
|
||||
_pure_set_default pure_color_git_branch pure_color_mute
|
||||
_pure_set_default pure_color_git_dirty pure_color_mute
|
||||
|
||||
# SSH info
|
||||
_pure_set_default pure_color_ssh_hostname pure_color_mute
|
||||
_pure_set_default pure_color_ssh_separator pure_color_mute
|
||||
_pure_set_default pure_color_ssh_user_normal pure_color_mute
|
||||
_pure_set_default pure_color_ssh_user_root pure_color_light
|
||||
|
||||
# Number of running jobs
|
||||
_pure_set_default pure_show_jobs false
|
||||
_pure_set_default pure_color_jobs pure_color_normal
|
||||
|
||||
# Virtualenv for Python
|
||||
_pure_set_default pure_color_virtualenv pure_color_mute
|
||||
|
||||
# Print current working directory at the beginning of prompt
|
||||
# true (default): current directory, git, user@hostname (ssh-only), command duration
|
||||
# false: user@hostname (ssh-only), current directory, git, command duration
|
||||
_pure_set_default pure_begin_prompt_with_current_directory true
|
||||
|
||||
# Show exit code of last command as a separate prompt character (cf. https://github.com/sindresorhus/pure/wiki#show-exit-code-of-last-command-as-a-separate-prompt-character)
|
||||
# false - single prompt character, default
|
||||
# true - separate prompt character
|
||||
_pure_set_default pure_separate_prompt_on_error false
|
||||
|
||||
# Max execution time of a process before its run time is shown when it exits
|
||||
_pure_set_default pure_threshold_command_duration 5
|
||||
_pure_set_default pure_color_command_duration pure_color_warning
|
||||
|
||||
# VI mode indicator
|
||||
# true (default): indicate a non-insert mode by reversing the prompt symbol (❮)
|
||||
# false: indicate vi mode with [I], [N], [V]
|
||||
_pure_set_default pure_reverse_prompt_symbol_in_vimode true
|
||||
|
||||
# Title
|
||||
_pure_set_default pure_symbol_title_bar_separator "—"
|
|
@ -1,24 +0,0 @@
|
|||
set --export SHELL /bin/fish
|
||||
set --export EDITOR "nvim"
|
||||
set -e fish_greeting
|
||||
|
||||
set -U fish_user_paths /home/kalle/.gem/ruby/2.7.0/bin $fish_user_paths
|
||||
|
||||
source "$HOME/.config/fish/abbreviations.fish"
|
||||
|
||||
function playlist-dl
|
||||
echo "Looking up playlist name..."
|
||||
set pl_line (youtube-dl --flat-playlist "$argv" | grep "\[youtube:playlist\] playlist")
|
||||
set pl_name (echo $pl_line | cut -d ']' -f2 | sed -e 's/^ playlist //g' | cut -d ':' -f1 | tr '/' ' ')
|
||||
echo "Found playlist by name: $pl_name"
|
||||
echo "Downloading it into directory: $pl_name"
|
||||
|
||||
mkdir "$pl_name"
|
||||
cd "$pl_name"
|
||||
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "$argv"
|
||||
cd ../
|
||||
end
|
||||
|
||||
function compile
|
||||
gcc -no-pie -g -o $argv[2] $argv[1]
|
||||
end
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
dracula/fish
|
||||
rafaelrinaldi/pure
|
|
@ -1,32 +0,0 @@
|
|||
set fail 1
|
||||
|
||||
function _pure_format_time \
|
||||
--description="Format milliseconds to a human readable format" \
|
||||
--argument-names milliseconds threshold
|
||||
|
||||
if test $milliseconds -lt 0; return $fail; end
|
||||
|
||||
set --local seconds (math -s0 "$milliseconds / 1000 % 60")
|
||||
set --local minutes (math -s0 "$milliseconds / 60000 % 60")
|
||||
set --local hours (math -s0 "$milliseconds / 3600000 % 24")
|
||||
set --local days (math -s0 "$milliseconds / 86400000")
|
||||
set --local time
|
||||
|
||||
if test $days -gt 0
|
||||
set time $time (printf "%sd" $days)
|
||||
end
|
||||
|
||||
if test $hours -gt 0
|
||||
set time $time (printf "%sh" $hours)
|
||||
end
|
||||
|
||||
if test $minutes -gt 0
|
||||
set time $time (printf "%sm" $minutes)
|
||||
end
|
||||
|
||||
if test $seconds -gt $threshold
|
||||
set time $time (printf "%ss" $seconds)
|
||||
end
|
||||
|
||||
echo -e (string join ' ' $time)
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
function _pure_get_prompt_symbol \
|
||||
--description 'Print prompt symbol' \
|
||||
--argument-names exit_code
|
||||
|
||||
set --local prompt_symbol $pure_symbol_prompt
|
||||
set --local is_vi_mode (string match -r "fish_(vi|hybrid)_key_bindings" $fish_key_bindings)
|
||||
if test -n "$is_vi_mode" \
|
||||
-a "$pure_reverse_prompt_symbol_in_vimode" = true \
|
||||
-a "$fish_bind_mode" != "insert"
|
||||
set prompt_symbol $pure_symbol_reverse_prompt
|
||||
end
|
||||
|
||||
echo "$prompt_symbol"
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
function _pure_parse_directory \
|
||||
--description "Replace '$HOME' with '~'" \
|
||||
--argument-names max_path_length
|
||||
|
||||
set --local folder (string replace $HOME '~' $PWD)
|
||||
|
||||
if test -n "$max_path_length";
|
||||
if test (string length $folder) -gt $max_path_length;
|
||||
# If path exceeds maximum symbol limit, use default fish path formating function
|
||||
set folder (prompt_pwd)
|
||||
end
|
||||
end
|
||||
echo $folder
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
function _pure_parse_git_branch --description "Parse current Git branch name"
|
||||
command git symbolic-ref --short HEAD 2>/dev/null;
|
||||
or command git name-rev --name-only HEAD 2>/dev/null
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
function _pure_place_iterm2_prompt_mark
|
||||
if functions -q iterm2_prompt_mark
|
||||
iterm2_prompt_mark
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
function _pure_print_prompt
|
||||
set --local prompt
|
||||
|
||||
for prompt_part in $argv
|
||||
if test (_pure_string_width $prompt_part) -gt 0
|
||||
set prompt "$prompt $prompt_part"
|
||||
end
|
||||
end
|
||||
|
||||
echo (string trim -l $prompt)
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
function _pure_prompt \
|
||||
--description 'Print prompt symbol' \
|
||||
--argument-names exit_code
|
||||
|
||||
set --local jobs (_pure_prompt_jobs)
|
||||
set --local virtualenv (_pure_prompt_virtualenv) # Python virtualenv name
|
||||
set --local vimode_indicator (_pure_prompt_vimode) # vi-mode indicator
|
||||
set --local pure_symbol (_pure_prompt_symbol $exit_code)
|
||||
|
||||
echo (_pure_print_prompt $jobs $virtualenv $vimode_indicator $pure_symbol)
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
function _pure_prompt_beginning
|
||||
# Clear existing line content
|
||||
set --local clear_line "\r\033[K"
|
||||
|
||||
echo $clear_line
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
function _pure_prompt_command_duration
|
||||
set --local command_duration
|
||||
|
||||
# Get command execution duration
|
||||
if test -n "$CMD_DURATION"
|
||||
set command_duration (_pure_format_time $CMD_DURATION $pure_threshold_command_duration)
|
||||
end
|
||||
set --local command_duration_color (_pure_set_color $pure_color_command_duration)
|
||||
|
||||
echo "$command_duration_color$command_duration"
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
set fail 1
|
||||
|
||||
function _pure_prompt_current_folder --argument-names current_prompt_width
|
||||
|
||||
if test -z "$current_prompt_width"; return $fail; end
|
||||
|
||||
set --local current_folder (_pure_parse_directory (math $COLUMNS - $current_prompt_width - 1))
|
||||
set --local current_folder_color (_pure_set_color $pure_color_current_directory)
|
||||
|
||||
echo "$current_folder_color$current_folder"
|
||||
end
|
|
@ -1,3 +0,0 @@
|
|||
function _pure_prompt_ending
|
||||
echo (set_color normal)" "
|
||||
end
|
|
@ -1,35 +0,0 @@
|
|||
function _pure_prompt_first_line \
|
||||
--description 'Print contextual information before prompt.'
|
||||
|
||||
if not type -fq git # exit if git is not available
|
||||
return 1
|
||||
end
|
||||
|
||||
set --local prompt_ssh (_pure_prompt_ssh)
|
||||
set --local prompt_git (_pure_prompt_git)
|
||||
set --local prompt_command_duration (_pure_prompt_command_duration)
|
||||
set --local prompt (_pure_print_prompt \
|
||||
$prompt_ssh \
|
||||
$prompt_git \
|
||||
$prompt_command_duration
|
||||
)
|
||||
set --local prompt_width (_pure_string_width $prompt)
|
||||
set --local current_folder (_pure_prompt_current_folder $prompt_width)
|
||||
|
||||
set --local prompt_components
|
||||
if test $pure_begin_prompt_with_current_directory = true
|
||||
set prompt_components \
|
||||
$current_folder \
|
||||
$prompt_git \
|
||||
$prompt_ssh \
|
||||
$prompt_command_duration
|
||||
else
|
||||
set prompt_components \
|
||||
$prompt_ssh \
|
||||
$current_folder \
|
||||
$prompt_git \
|
||||
$prompt_command_duration
|
||||
end
|
||||
|
||||
echo (_pure_print_prompt $prompt_components)
|
||||
end
|
|
@ -1,20 +0,0 @@
|
|||
function _pure_prompt_git \
|
||||
--description 'Print git repository informations: branch name, dirty, upstream ahead/behind'
|
||||
|
||||
if test $pure_enable_git != true
|
||||
return
|
||||
end
|
||||
|
||||
set --local is_git_repository (command git rev-parse --is-inside-work-tree 2>/dev/null)
|
||||
|
||||
if test -n "$is_git_repository"
|
||||
set --local git_prompt (_pure_prompt_git_branch)(_pure_prompt_git_dirty)
|
||||
set --local git_pending_commits (_pure_prompt_git_pending_commits)
|
||||
|
||||
if test (_pure_string_width $git_pending_commits) -ne 0
|
||||
set git_prompt $git_prompt $git_pending_commits
|
||||
end
|
||||
|
||||
echo $git_prompt
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
function _pure_prompt_git_branch
|
||||
set --local git_branch (_pure_parse_git_branch) # current git branch
|
||||
set --local git_branch_color (_pure_set_color $pure_color_git_branch)
|
||||
|
||||
echo "$git_branch_color$git_branch"
|
||||
end
|
|
@ -1,18 +0,0 @@
|
|||
function _pure_prompt_git_dirty
|
||||
set --local git_dirty_symbol
|
||||
set --local git_dirty_color
|
||||
|
||||
set --local is_git_dirty (
|
||||
# The first checks for staged changes, the second for unstaged ones.
|
||||
# We put them in this order because checking staged changes is *fast*.
|
||||
not command git diff-index --ignore-submodules --cached --quiet HEAD -- >/dev/null 2>&1
|
||||
or not command git diff --ignore-submodules --no-ext-diff --quiet --exit-code >/dev/null 2>&1
|
||||
and echo "true"
|
||||
)
|
||||
if test -n "$is_git_dirty" # untracked or un-commited files
|
||||
set git_dirty_symbol "$pure_symbol_git_dirty"
|
||||
set git_dirty_color (_pure_set_color $pure_color_git_dirty)
|
||||
end
|
||||
|
||||
echo "$git_dirty_color$git_dirty_symbol"
|
||||
end
|
|
@ -1,27 +0,0 @@
|
|||
function _pure_prompt_git_pending_commits
|
||||
set --local git_unpushed_commits
|
||||
set --local git_unpulled_commits
|
||||
|
||||
set --local has_upstream (command git rev-parse --abbrev-ref '@{upstream}' 2>/dev/null)
|
||||
if test -n "$has_upstream" # check there is an upstream repo configured
|
||||
and test "$has_upstream" != '@{upstream}' # Fixed #179, dont check the empty repo
|
||||
command git rev-list --left-right --count 'HEAD...@{upstream}' \
|
||||
| read --local --array git_status
|
||||
set --local commit_to_push $git_status[1]
|
||||
set --local commit_to_pull $git_status[2]
|
||||
|
||||
if test $commit_to_push -gt 0 # upstream is behind local repo
|
||||
set --local git_unpushed_commits_color \
|
||||
(_pure_set_color $pure_color_git_unpushed_commits)
|
||||
set git_unpushed_commits "$git_unpushed_commits_color$pure_symbol_git_unpushed_commits"
|
||||
end
|
||||
|
||||
if test $commit_to_pull -gt 0 # upstream is ahead of local repo
|
||||
set --local git_unpulled_commits_color \
|
||||
(_pure_set_color $pure_color_git_unpulled_commits)
|
||||
set git_unpulled_commits "$git_unpulled_commits_color$pure_symbol_git_unpulled_commits"
|
||||
end
|
||||
end
|
||||
|
||||
echo "$git_unpushed_commits$git_unpulled_commits"
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
function _pure_prompt_jobs --description "Display number of running jobs"
|
||||
if test $pure_show_jobs = true
|
||||
set --local njobs (count (jobs -p))
|
||||
set --local jobs_color (_pure_set_color $pure_color_jobs)
|
||||
if test $njobs -gt 0
|
||||
echo "$jobs_color"[$njobs]
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
function _pure_prompt_new_line \
|
||||
--description "Do not add a line break to a brand new session" \
|
||||
--on-event fish_prompt
|
||||
|
||||
set --local new_line
|
||||
if test $_pure_fresh_session = false
|
||||
set new_line "\n"
|
||||
end
|
||||
|
||||
echo -e -n "$new_line"
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
function _pure_prompt_ssh
|
||||
if test "$SSH_CONNECTION" != ""
|
||||
echo (_pure_prompt_ssh_user)(_pure_prompt_ssh_separator)(_pure_prompt_ssh_host)
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
function _pure_prompt_ssh_host
|
||||
set --query --global hostname
|
||||
or set --local hostname (hostname -s) # current host name compatible busybox
|
||||
set --local hostname_color (_pure_set_color $pure_color_ssh_hostname)
|
||||
|
||||
echo "$hostname_color$hostname"
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
function _pure_prompt_ssh_separator
|
||||
set --local separator_symbol "@"
|
||||
set --local separator_symbol_color (_pure_set_color $pure_color_ssh_separator)
|
||||
|
||||
echo "$separator_symbol_color$separator_symbol"
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
function _pure_prompt_ssh_user
|
||||
set --local username (whoami) # current user name
|
||||
set --local username_color (_pure_set_color $pure_color_ssh_user_normal) # default color
|
||||
|
||||
if test "$username" = "root"
|
||||
set username_color (_pure_set_color $pure_color_ssh_user_root) # different color for root
|
||||
end
|
||||
|
||||
echo "$username_color$username"
|
||||
end
|
|
@ -1,20 +0,0 @@
|
|||
function _pure_prompt_symbol \
|
||||
--description 'Print prompt symbol' \
|
||||
--argument-names exit_code
|
||||
|
||||
set --local prompt_symbol (_pure_get_prompt_symbol)
|
||||
set --local symbol_color_success (_pure_set_color $pure_color_prompt_on_success)
|
||||
set --local symbol_color_error (_pure_set_color $pure_color_prompt_on_error)
|
||||
set --local command_succeed 0
|
||||
|
||||
set --local symbol_color $symbol_color_success # default pure symbol color
|
||||
if test $exit_code -ne $command_succeed
|
||||
set symbol_color $symbol_color_error # different pure symbol color when previous command failed
|
||||
|
||||
if test "$pure_separate_prompt_on_error" = true
|
||||
set symbol_color "$symbol_color_error$prompt_symbol$symbol_color_success"
|
||||
end
|
||||
end
|
||||
|
||||
echo "$symbol_color$prompt_symbol"
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
function _pure_prompt_vimode
|
||||
if test $pure_reverse_prompt_symbol_in_vimode = false
|
||||
echo (fish_default_mode_prompt)
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
function _pure_prompt_virtualenv --description "Display virtualenv directory"
|
||||
if test -n "$VIRTUAL_ENV"
|
||||
set --local virtualenv (basename "$VIRTUAL_ENV")
|
||||
set --local virtualenv_color (_pure_set_color $pure_color_virtualenv)
|
||||
|
||||
echo "$virtualenv_color$virtualenv"
|
||||
end
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
function _pure_set_color \
|
||||
--description 'Set color' \
|
||||
--argument-names var
|
||||
|
||||
set --local color $var
|
||||
# Backwards compatibility for colors defined as control sequencies instead of fish colors
|
||||
if not string match --quiet --all --regex '\e\[[^m]*m' $color[1]
|
||||
and set -q $color
|
||||
set color $$var
|
||||
end
|
||||
|
||||
set --local result $color
|
||||
if not string match --quiet --all --regex '\e\[[^m]*m' $result[1]
|
||||
and not test -z $result[1]
|
||||
set result (set_color $color)
|
||||
end
|
||||
|
||||
echo "$result"
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
function _pure_set_default \
|
||||
--description 'Set default value for configuration variable' \
|
||||
--argument-names var default
|
||||
|
||||
if not set -q --universal $var
|
||||
set --universal $var $default
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
function _pure_string_width \
|
||||
--description 'returns raw string length, i.e. ignore ANSI-color' \
|
||||
--argument-names prompt
|
||||
|
||||
set --local empty ''
|
||||
set --local raw_prompt (string replace --all --regex '\e\[[^m]*m' $empty -- $prompt)
|
||||
|
||||
string length -- $raw_prompt
|
||||
end
|
|
@ -1,2 +0,0 @@
|
|||
function fish_greeting
|
||||
end
|
|
@ -1,2 +0,0 @@
|
|||
function fish_mode_prompt
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
function fish_prompt
|
||||
set --local exit_code $status # save previous exit code
|
||||
|
||||
echo -e -n (_pure_prompt_beginning) # init prompt context (clear current line, etc.)
|
||||
echo -e (_pure_prompt_first_line) # print current path, git branch/status, command duration
|
||||
_pure_place_iterm2_prompt_mark # place iTerm shell integration mark
|
||||
echo -e -n (_pure_prompt $exit_code) # print prompt
|
||||
echo -e (_pure_prompt_ending) # reset colors and end prompt
|
||||
|
||||
set _pure_fresh_session false
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
function fish_title \
|
||||
--description "Set title to current folder and shell name" \
|
||||
--argument-names last_command
|
||||
|
||||
set --local basename (string replace -r '^.*/' '' -- $PWD)
|
||||
set --local current_folder (_pure_parse_directory)
|
||||
set --local current_command (status current-command 2>/dev/null; or echo $_)
|
||||
|
||||
set --local prompt "$basename: $last_command $pure_symbol_title_bar_separator $current_command"
|
||||
|
||||
if test -z "$last_command"
|
||||
set prompt "$current_folder $pure_symbol_title_bar_separator $current_command"
|
||||
end
|
||||
|
||||
echo $prompt
|
||||
end
|
|
@ -1,436 +0,0 @@
|
|||
set -g fisher_version 3.3.2
|
||||
|
||||
function fisher -a cmd -d "fish plugin manager"
|
||||
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache
|
||||
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
||||
set -q XDG_DATA_HOME; or set XDG_DATA_HOME ~/.local/share
|
||||
|
||||
set -g fish_config $XDG_CONFIG_HOME/fish
|
||||
set -g fisher_cache $XDG_CACHE_HOME/fisher
|
||||
set -g fisher_data $XDG_DATA_HOME/fisher
|
||||
|
||||
set -q fisher_path; or set -g fisher_path $fish_config
|
||||
set -g fishfile $fish_config/fishfile
|
||||
|
||||
for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache
|
||||
if test ! -d $path
|
||||
command mkdir -p $path
|
||||
end
|
||||
end
|
||||
|
||||
if test ! -e $fisher_path/completions/fisher.fish
|
||||
echo "fisher complete" >$fisher_path/completions/fisher.fish
|
||||
_fisher_complete
|
||||
end
|
||||
|
||||
if test -e $fisher_path/conf.d/fisher.fish
|
||||
switch "$version"
|
||||
case \*-\*
|
||||
command rm -f $fisher_path/conf.d/fisher.fish
|
||||
case 2\*
|
||||
case \*
|
||||
command rm -f $fisher_path/conf.d/fisher.fish
|
||||
end
|
||||
else
|
||||
switch "$version"
|
||||
case \*-\*
|
||||
case 2\*
|
||||
echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish
|
||||
end
|
||||
end
|
||||
|
||||
# 2019-10-22: temp code, migrates fishfile from old path back to $fish_config
|
||||
if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile"
|
||||
command mv -f "$fisher_path/fishfile" "$fishfile"
|
||||
end
|
||||
|
||||
# 2020-06-23: temp code, migrates fisher data from XDG_CONFIG_HOME to XDG_DATA_HOME
|
||||
set -l fisher_config $XDG_CONFIG_HOME/fisher
|
||||
if test -d $fisher_config
|
||||
echo "migrating local data from $fisher_config to $fisher_data"
|
||||
command rm -rf $fisher_data
|
||||
command mv -f $fisher_config $fisher_data
|
||||
end
|
||||
|
||||
switch "$cmd"
|
||||
case {,self-}complete
|
||||
_fisher_complete
|
||||
case copy-user-key-bindings
|
||||
_fisher_copy_user_key_bindings
|
||||
case ls
|
||||
set -e argv[1]
|
||||
if test -s "$fishfile"
|
||||
set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||")
|
||||
_fisher_ls | _fisher_fmt | command awk -v FILE="$file" "
|
||||
BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/
|
||||
" | command sed "s|^$HOME|~|"
|
||||
end
|
||||
case self-update
|
||||
_fisher_self_update (status -f)
|
||||
case self-uninstall
|
||||
_fisher_self_uninstall
|
||||
case {,-}-v{ersion,}
|
||||
echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|")
|
||||
case {,-}-h{elp,}
|
||||
_fisher_help
|
||||
case ""
|
||||
_fisher_commit --
|
||||
case add rm
|
||||
if not isatty
|
||||
while read -l arg
|
||||
set argv $argv $arg
|
||||
end
|
||||
end
|
||||
|
||||
if test (count $argv) = 1
|
||||
echo "fisher: invalid number of arguments" >&2
|
||||
_fisher_help >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
_fisher_commit $argv
|
||||
case \*
|
||||
echo "fisher: unknown flag or command \"$cmd\"" >&2
|
||||
_fisher_help >&2
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_complete
|
||||
complete -ec fisher
|
||||
complete -xc fisher -n __fish_use_subcommand -a add -d "Add plugins"
|
||||
complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove plugins"
|
||||
complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed plugins matching REGEX"
|
||||
complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help"
|
||||
complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version"
|
||||
complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version"
|
||||
for pkg in (fisher ls)
|
||||
complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_copy_user_key_bindings
|
||||
if functions -q fish_user_key_bindings
|
||||
functions -c fish_user_key_bindings fish_user_key_bindings_copy
|
||||
end
|
||||
function fish_user_key_bindings
|
||||
for file in $fisher_path/conf.d/*_key_bindings.fish
|
||||
source $file >/dev/null 2>/dev/null
|
||||
end
|
||||
if functions -q fish_user_key_bindings_copy
|
||||
fish_user_key_bindings_copy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_ls
|
||||
for pkg in $fisher_data/*/*/*
|
||||
command readlink $pkg; or echo $pkg
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_fmt
|
||||
command sed "s|^[[:space:]]*||;s|^$fisher_data/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||"
|
||||
end
|
||||
|
||||
function _fisher_help
|
||||
echo "usage: fisher add <plugin...> Add plugin/s"
|
||||
echo " fisher rm <plugin...> Remove plugin/s"
|
||||
echo " fisher Update all plugins"
|
||||
echo " fisher ls [<regex>] List installed plugins matching <regex>"
|
||||
echo " fisher --help Show this help"
|
||||
echo " fisher --version Show the current version"
|
||||
echo " fisher self-update Update to the latest version"
|
||||
echo " fisher self-uninstall Uninstall from your system"
|
||||
echo "examples:"
|
||||
echo " fisher add jorgebucaran/z rafaelrinaldi/pure"
|
||||
echo " fisher add gitlab.com/foo/bar@v2"
|
||||
echo " fisher add ~/path/to/local/pkg"
|
||||
echo " fisher add <file"
|
||||
echo " fisher rm rafaelrinaldi/pure"
|
||||
echo " fisher ls | fisher rm"
|
||||
end
|
||||
|
||||
function _fisher_self_update -a file
|
||||
set -l url "https://raw.githubusercontent.com/jorgebucaran/fisher/main/fisher.fish"
|
||||
echo "fetching $url" >&2
|
||||
command curl -s "$url?nocache" >$file.
|
||||
|
||||
set -l next_version (command awk '$4 ~ /^[0-9]+\.[0-9]+\.[0-9]+$/ { print v=$4 } { exit !v }' <$file.)
|
||||
switch "$next_version"
|
||||
case "" $fisher_version
|
||||
command rm -f $file.
|
||||
if test -z "$next_version"
|
||||
echo "fisher: cannot update fisher -- are you offline?" >&2
|
||||
return 1
|
||||
end
|
||||
echo "fisher is already up-to-date" >&2
|
||||
case \*
|
||||
echo "linking $file" | command sed "s|$HOME|~|" >&2
|
||||
command mv -f $file. $file
|
||||
source $file
|
||||
echo "updated to fisher $fisher_version -- hooray!" >&2
|
||||
_fisher_complete
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_self_uninstall
|
||||
for pkg in (_fisher_ls)
|
||||
_fisher_rm $pkg
|
||||
end
|
||||
|
||||
for file in $fisher_cache $fisher_data $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile
|
||||
echo "removing $file"
|
||||
command rm -Rf $file 2>/dev/null
|
||||
end | command sed "s|$HOME|~|" >&2
|
||||
|
||||
for name in (set -n | command awk '/^fisher_/')
|
||||
set -e "$name"
|
||||
end
|
||||
|
||||
functions -e (functions -a | command awk '/^_fisher/') fisher
|
||||
complete -c fisher --erase
|
||||
end
|
||||
|
||||
function _fisher_commit -a cmd
|
||||
set -e argv[1]
|
||||
set -l elapsed (_fisher_now)
|
||||
|
||||
if test ! -e "$fishfile"
|
||||
command touch $fishfile
|
||||
echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2
|
||||
end
|
||||
|
||||
set -l old_pkgs (_fisher_ls | _fisher_fmt)
|
||||
for pkg in (_fisher_ls)
|
||||
_fisher_rm $pkg
|
||||
end
|
||||
command rm -Rf $fisher_data
|
||||
command mkdir -p $fisher_data
|
||||
|
||||
set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt))
|
||||
set -l actual_pkgs (_fisher_fetch $next_pkgs)
|
||||
set -l updated_pkgs
|
||||
for pkg in $old_pkgs
|
||||
if contains -- $pkg $actual_pkgs
|
||||
set updated_pkgs $updated_pkgs $pkg
|
||||
end
|
||||
end
|
||||
|
||||
if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs"
|
||||
echo "fisher: nothing to commit -- try adding some plugins" >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l out_pkgs
|
||||
if test "$cmd" = "rm"
|
||||
set out_pkgs $next_pkgs
|
||||
else
|
||||
for pkg in $next_pkgs
|
||||
if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs
|
||||
set out_pkgs $out_pkgs $pkg
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile
|
||||
|
||||
_fisher_complete
|
||||
|
||||
command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) '
|
||||
BEGIN {
|
||||
res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U)))
|
||||
printf((res ? res : "done") " in %.2fs\n", E / 1000)
|
||||
}
|
||||
function fmt(action, n, s) {
|
||||
return n ? (s ? s ", " : s) action " " n " plugin" (n > 1 ? "s" : "") : s
|
||||
}
|
||||
' >&2
|
||||
end
|
||||
|
||||
function _fisher_parse -a mode cmd
|
||||
set -e argv[1..2]
|
||||
command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" '
|
||||
BEGIN {
|
||||
for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i]
|
||||
}
|
||||
!NF { next } { k = getkey($1) }
|
||||
MODE == "-R" && !(k in pkgs) && ($0 = $1)
|
||||
MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") }
|
||||
MODE == "-W" || CMD == "rm" { delete pkgs[k] }
|
||||
END {
|
||||
for (k in pkgs) {
|
||||
if (CMD != "rm" || MODE == "-W") print pkgs[k]
|
||||
else print "fisher: cannot remove \""k"\" -- plugin is not in fishfile" > "/dev/stderr"
|
||||
}
|
||||
}
|
||||
function getkey(s, a) {
|
||||
return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1]
|
||||
}
|
||||
'
|
||||
end
|
||||
|
||||
function _fisher_fetch
|
||||
set -l pkg_jobs
|
||||
set -l out_pkgs
|
||||
set -l next_pkgs
|
||||
set -l local_pkgs
|
||||
set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token
|
||||
|
||||
for pkg in $argv
|
||||
switch $pkg
|
||||
case \~\* /\*
|
||||
set -l path (echo "$pkg" | command sed "s|^~|$HOME|")
|
||||
if test -e "$path"
|
||||
set local_pkgs $local_pkgs $path
|
||||
else
|
||||
echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2
|
||||
end
|
||||
continue
|
||||
end
|
||||
|
||||
command awk -v PKG="$pkg" -v FS=/ '
|
||||
BEGIN {
|
||||
split(PKG, tmp, /@/)
|
||||
pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1]
|
||||
tag = tmp[2] ? tmp[2] : "HEAD"
|
||||
print pkg "\t" (\
|
||||
pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \
|
||||
pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \
|
||||
pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg\
|
||||
)
|
||||
}
|
||||
' | read -l pkg url
|
||||
|
||||
if test ! -d "$fisher_data/$pkg"
|
||||
fish -c "
|
||||
echo fetching $url >&2
|
||||
command mkdir -p $fisher_data/$pkg $fisher_cache/(command dirname $pkg)
|
||||
if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_data/$pkg 2>/dev/null
|
||||
command rm -Rf $fisher_cache/$pkg
|
||||
command mv -f $fisher_data/$pkg/* $fisher_cache/$pkg
|
||||
command rm -Rf $fisher_data/$pkg
|
||||
command cp -Rf {$fisher_cache,$fisher_data}/$pkg
|
||||
else if test -d \"$fisher_cache/$pkg\"
|
||||
echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2
|
||||
command cp -Rf $fisher_cache/$pkg $fisher_data/$pkg/..
|
||||
else
|
||||
command rm -Rf $fisher_data/$pkg
|
||||
echo fisher: cannot add \"$pkg\" -- is this a valid plugin\? >&2
|
||||
end
|
||||
" >/dev/null &
|
||||
set pkg_jobs $pkg_jobs (_fisher_jobs --last)
|
||||
set next_pkgs $next_pkgs "$fisher_data/$pkg"
|
||||
end
|
||||
end
|
||||
|
||||
if set -q pkg_jobs[1]
|
||||
while for job in $pkg_jobs
|
||||
contains -- $job (_fisher_jobs); and break
|
||||
end
|
||||
end
|
||||
for pkg in $next_pkgs
|
||||
if test -d "$pkg"
|
||||
set out_pkgs $out_pkgs $pkg
|
||||
_fisher_add $pkg
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
set -l local_prefix $fisher_data/local/$USER
|
||||
if test ! -d "$local_prefix"
|
||||
command mkdir -p $local_prefix
|
||||
end
|
||||
for pkg in $local_pkgs
|
||||
set -l target $local_prefix/(command basename $pkg)
|
||||
if test ! -L "$target"
|
||||
command ln -sf $pkg $target
|
||||
set out_pkgs $out_pkgs $pkg
|
||||
_fisher_add $pkg --link
|
||||
end
|
||||
end
|
||||
|
||||
if set -q out_pkgs[1]
|
||||
_fisher_fetch (
|
||||
for pkg in $out_pkgs
|
||||
if test -s "$pkg/fishfile"
|
||||
_fisher_fmt <$pkg/fishfile | _fisher_parse -R
|
||||
end
|
||||
end)
|
||||
printf "%s\n" $out_pkgs | _fisher_fmt
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_add -a pkg opts
|
||||
for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish
|
||||
set -l target (command basename $src)
|
||||
switch $src
|
||||
case $pkg/conf.d\*
|
||||
set target $fisher_path/conf.d/$target
|
||||
case $pkg/completions\*
|
||||
set target $fisher_path/completions/$target
|
||||
case $pkg/{functions,}\*
|
||||
switch $target
|
||||
case uninstall.fish
|
||||
continue
|
||||
case {init,key_bindings}.fish
|
||||
set target $fisher_path/conf.d/(command basename $pkg)\_$target
|
||||
case \*
|
||||
set target $fisher_path/functions/$target
|
||||
end
|
||||
end
|
||||
echo "linking $target" | command sed "s|$HOME|~|" >&2
|
||||
if set -q opts[1]
|
||||
command ln -sf $src $target
|
||||
else
|
||||
command cp -f $src $target
|
||||
end
|
||||
switch $target
|
||||
case \*.fish
|
||||
source $target >/dev/null 2>/dev/null
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_rm -a pkg
|
||||
for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish
|
||||
set -l target (command basename $src)
|
||||
set -l filename (command basename $target .fish)
|
||||
switch $src
|
||||
case $pkg/conf.d\*
|
||||
test "$filename.fish" = "$target"; and emit "$filename"_uninstall
|
||||
set target conf.d/$target
|
||||
case $pkg/completions\*
|
||||
test "$filename.fish" = "$target"; and complete -ec $filename
|
||||
set target completions/$target
|
||||
case $pkg/{,functions}\*
|
||||
test "$filename.fish" = "$target"; and functions -e $filename
|
||||
switch $target
|
||||
case uninstall.fish
|
||||
source $src
|
||||
continue
|
||||
case {init,key_bindings}.fish
|
||||
set target conf.d/(command basename $pkg)\_$target
|
||||
case \*
|
||||
set target functions/$target
|
||||
end
|
||||
end
|
||||
command rm -f $fisher_path/$target
|
||||
end
|
||||
if not functions -q fish_prompt
|
||||
source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish"
|
||||
end
|
||||
end
|
||||
|
||||
function _fisher_jobs
|
||||
jobs $argv | command awk '/^[0-9]+\t/ { print $1 }'
|
||||
end
|
||||
|
||||
function _fisher_now -a elapsed
|
||||
switch (command uname)
|
||||
case Darwin \*BSD
|
||||
command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed
|
||||
case \*
|
||||
math (command date "+%s%3N") - "0$elapsed"
|
||||
end
|
||||
end
|
|
@ -0,0 +1,214 @@
|
|||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
#
|
||||
|
||||
# Monitor configuration
|
||||
monitor=DP-2,1920x1080@144,0x1080,1
|
||||
monitor=HDMI-A-1,1920x1080@60,1500x0,1
|
||||
monitor=HDMI-A-2,1920x1080@60,1920x1080,1,transform,3
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# Clipboard history
|
||||
exec-once = wl-paste --watch cliphist store
|
||||
# Notifications
|
||||
exec-once = dunst
|
||||
# Polkit
|
||||
exec-once = /usr/lib/polkit-kde-authentication-agent-1
|
||||
# Wallpapers
|
||||
exec-once = hyprpaper
|
||||
# Launcher
|
||||
exec-once = ulauncher --no-window-shadow --hide-window
|
||||
# Kde Connect
|
||||
exec-once = kdeconnect-indicator
|
||||
|
||||
# Bar
|
||||
exec-once = eww daemon
|
||||
exec-once = eww open bar
|
||||
|
||||
# Autostart applications
|
||||
exec-once = firefox
|
||||
exec-once = flatpak run org.mozilla.Thunderbird
|
||||
exec-once = flatpak run com.discordapp.Discord
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,24
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant = dvorak
|
||||
kb_model =
|
||||
kb_options = caps:escape
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification.
|
||||
accel_profile = flat
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
border_size = 1
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 5
|
||||
blur {
|
||||
enabled = yes
|
||||
size = 3
|
||||
passes = 1
|
||||
new_optimizations = on
|
||||
}
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
layerrule = blur,gtk-layer-shell
|
||||
layerrule = ignorezero,gtk-layer-shell
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 3, myBezier
|
||||
animation = windowsOut, 1, 3, default, popin 80%
|
||||
animation = border, 1, 5, default
|
||||
animation = borderangle, 1, 4, default
|
||||
animation = fade, 1, 3, default
|
||||
animation = workspaces, 1, 2, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
|
||||
# workspaces
|
||||
workspace = HDMI-A-1, name:third
|
||||
workspace = HDMI-A-2, name:second
|
||||
workspace = 1, monitor:DP-2
|
||||
workspace = 2, monitor:DP-2
|
||||
workspace = 3, monitor:DP-2
|
||||
workspace = 4, monitor:DP-2
|
||||
workspace = 5, monitor:DP-2
|
||||
workspace = 6, monitor:DP-2
|
||||
workspace = 7, monitor:DP-2
|
||||
workspace = 8, monitor:DP-2
|
||||
workspace = 9, monitor:DP-2
|
||||
workspace = 10, monitor:DP-2
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
$mainModShift = SUPER_SHIFT
|
||||
|
||||
bind = $mainMod, return, exec, kitty
|
||||
bind = $mainModShift, Q, killactive,
|
||||
bind = $mainMod, F, togglefloating,
|
||||
bind = $mainModShift, F, fullscreen
|
||||
bind = $mainMod, E, exec, ulauncher-toggle #wofi --show drun
|
||||
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
bind = CTRL, Print, exec, flameshot gui
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Media keys
|
||||
bind = ,XF86AudioPlay, exec, playerctl --player plasma-browser-integration play-pause
|
||||
bind = ,XF86AudioPrev, exec, playerctl previous
|
||||
bind = ,XF86AudioNext, exec, playerctl next
|
||||
bind = ,XF86AudioLowerVolume, exec, playerctl --player plasma-browser-integration volume 0.01-
|
||||
bind = ,XF86AudioRaiseVolume, exec, playerctl --player plasma-browser-integration volume 0.01+
|
||||
|
||||
|
||||
# This is a dumb work around for hyprland not passing ALT half the time with the pass dispatcher.
|
||||
bind = ALT, M, exec, xdotool key 'ALT+m'
|
||||
bind = ALT, B, exec, xdotool key 'ALT+b'
|
||||
#bind = ALT,M,pass,^(discord)$
|
||||
#bind = ALT,B,pass,^(discord)$
|
||||
|
||||
# Window rules
|
||||
# Auto workspace
|
||||
windowrule = workspace 1 silent,firefox
|
||||
windowrule = workspace name:second silent,discord
|
||||
windowrule = workspace 10 silent,thunderbird
|
||||
|
||||
# ULauncher
|
||||
windowrulev2 = forceinput,class:^(ulauncher)$
|
||||
windowrulev2 = dimaround,class:^(ulauncher)$
|
||||
|
||||
|
||||
# Flameshot
|
||||
windowrulev2 = nofullscreenrequest,title:^(flameshot)$
|
||||
windowrulev2 = float,title:^(flameshot)$
|
||||
windowrulev2 = move 0 -1080,title:^(flameshot)$
|
||||
windowrulev2 = noanim,title:^(flameshot)$
|
||||
windowrulev2 = rounding 0,title:^(flameshot)$
|
|
@ -0,0 +1,7 @@
|
|||
preload = ~/Pictures/Wallpapers/digital-art-16-1920×1080.jpg
|
||||
preload = ~/Pictures/Wallpapers/old-island-3-3840×2160.jpg
|
||||
preload = ~/Pictures/Wallpapers/lava-dragon-3-1920×1080.jpg
|
||||
|
||||
wallpaper = DP-2, ~/Pictures/Wallpapers/digital-art-16-1920×1080.jpg
|
||||
wallpaper = HDMI-A-1, ~/Pictures/Wallpapers/old-island-3-3840×2160.jpg
|
||||
wallpaper = HDMI-A-2, ~/Pictures/Wallpapers/lava-dragon-3-1920×1080.jpg
|
191
i3/config
191
i3/config
|
@ -1,191 +0,0 @@
|
|||
# Set the mod key to be the meta key.
|
||||
set $mod Mod4
|
||||
|
||||
# Set the font used by i3.
|
||||
font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Launch picom on startup
|
||||
exec --no-startup-id picom --experimental-backends -bc
|
||||
|
||||
# Set a random desktop background
|
||||
exec --no-startup-id feh --bg-scale --random ~/Pictures/Wallpapers/
|
||||
|
||||
# Launch polybar
|
||||
exec --no-startup-id polybar primary
|
||||
|
||||
# Launch dunst
|
||||
exec --no-startup-id dunst
|
||||
|
||||
# Launch MPD
|
||||
exec --no-startup-id mpd
|
||||
|
||||
# Launch flameshot
|
||||
exec --no-startup-id flameshot
|
||||
|
||||
# Launch green with envy
|
||||
exec --no-startup-id com.leinardi.gwe --hide-window
|
||||
|
||||
# Launch a polkit daemon
|
||||
exec --no-startup-id /usr/lib/polkit-kde-authentication-agent-1
|
||||
|
||||
# Launch KDE Connect on startup
|
||||
exec --no-startup-id /usr/lib/kdeconnectd
|
||||
#exec --no-startup-id kdeconnect-indicator
|
||||
|
||||
# Apply my wacom tablet config
|
||||
exec --no-startup-id ~/bin/scripts/wacom-config
|
||||
|
||||
# Set menu key as my compose key
|
||||
exec --no-startup-id setxkbmap -option compose:menu
|
||||
|
||||
# Disable screen off
|
||||
exec --no-startup-id xset s off
|
||||
exec --no-startup-id xset -dpms
|
||||
exec --no-startup-id xset s noblank
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
|
||||
# Media player controls
|
||||
bindsym XF86AudioPlay exec mpc toggle
|
||||
bindsym XF86AudioNext exec mpc next
|
||||
bindsym XF86AudioPrev exec mpc previous
|
||||
|
||||
# Flameshot binds
|
||||
bindsym Print exec --no-startup-id flameshot screen
|
||||
bindsym ctrl+Print exec --no-startup-id flameshot gui
|
||||
|
||||
# Emoji menu
|
||||
bindsym $mod+e exec --no-startup-id rofi -show emoji -modi emoji -theme appsmenu
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# Start kitty
|
||||
bindsym $mod+Return exec --no-startup-id kitty
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Window options menu
|
||||
bindsym $mod+Shift+w exec --no-startup-id ~/bin/scripts/window-menu
|
||||
|
||||
# Utility menu
|
||||
bindsym $mod+u exec --no-startup-id ~/bin/scripts/utility-menu
|
||||
|
||||
# Start dmenu
|
||||
bindsym $mod+d exec --no-startup-id dmenu
|
||||
#bindsym $mod+d exec --no-startup-id rofi -theme appsmenu -show drun
|
||||
|
||||
# Change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l 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
|
||||
|
||||
# Enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# Toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Gaps
|
||||
gaps inner 10
|
||||
gaps outer 0
|
||||
|
||||
# Disable borders
|
||||
for_window [class="^.*"] border pixel 1
|
||||
|
||||
# Make my custom timer floating by default
|
||||
for_window [class="timer"] floating enable
|
||||
# Make my custom timer "sticky". Meaning it will also be on the active workspace.
|
||||
for_window [class="timer"] sticky enable
|
||||
# Disable border for my custom timer.
|
||||
for_window [class="timer"] border pixel 0
|
||||
|
||||
# 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"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||
|
||||
assign [class="Kodi"] $ws4
|
||||
|
||||
# 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'"
|
||||
|
||||
|
||||
# Colors border bground text indicator child_border
|
||||
client.focused #3366CC #2356BC #FFFFFF #3366CC #3366CC
|
||||
client.focused_inactive #000000 #000000 #FFFFFF #000000 #000000
|
||||
client.unfocused #000000 #000000 #FFFFFF #000000 #000000
|
||||
client.urgent #900000 #900000 #FFFFFF #900000 #900000
|
||||
client.placeholder #000000 #000000 #FFFFFF #000000 #000000
|
||||
|
||||
client.background #FFFFFF
|
||||
|
||||
# TODO: Change these.
|
||||
# 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 h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
font_family Fira Code
|
||||
|
||||
background_opacity 0.8
|
||||
allow_remote_control yes
|
||||
|
|
399
mpd/mpd.conf
399
mpd/mpd.conf
|
@ -1,399 +0,0 @@
|
|||
# Files and directories #######################################################
|
||||
#
|
||||
# This setting controls the top directory which MPD will search to discover the
|
||||
# available audio files and add them to the daemon's online database. This
|
||||
# setting defaults to the XDG directory, otherwise the music directory will be
|
||||
# be disabled and audio files will only be accepted over ipc socket (using
|
||||
# file:// protocol) or streaming files over an accepted protocol.
|
||||
#
|
||||
music_directory "~/Music"
|
||||
#
|
||||
# This setting sets the MPD internal playlist directory. The purpose of this
|
||||
# directory is storage for playlists created by MPD. The server will use
|
||||
# playlist files not created by the server but only if they are in the MPD
|
||||
# format. This setting defaults to playlist saving being disabled.
|
||||
#
|
||||
playlist_directory "~/.local/share/mpd/playlists"
|
||||
#
|
||||
# This setting sets the location of the MPD database. This file is used to
|
||||
# load the database at server start up and store the database while the
|
||||
# server is not up. This setting defaults to disabled which will allow
|
||||
# MPD to accept files over ipc socket (using file:// protocol) or streaming
|
||||
# files over an accepted protocol.
|
||||
#
|
||||
db_file "~/.local/share/mpd/database"
|
||||
#
|
||||
# These settings are the locations for the daemon log files for the daemon.
|
||||
# These logs are great for troubleshooting, depending on your log_level
|
||||
# settings.
|
||||
#
|
||||
# The special value "syslog" makes MPD use the local syslog daemon. This
|
||||
# setting defaults to logging to syslog.
|
||||
#
|
||||
log_file "~/.local/share/mpd/log"
|
||||
#
|
||||
# This setting sets the location of the file which stores the process ID
|
||||
# for use of mpd --kill and some init scripts. This setting is disabled by
|
||||
# default and the pid file will not be stored.
|
||||
#
|
||||
pid_file "~/.local/share/mpd/pid"
|
||||
#
|
||||
# This setting sets the location of the file which contains information about
|
||||
# most variables to get MPD back into the same general shape it was in before
|
||||
# it was brought down. This setting is disabled by default and the server
|
||||
# state will be reset on server start up.
|
||||
#
|
||||
state_file "~/.local/share/mpd/state"
|
||||
#
|
||||
# The location of the sticker database. This is a database which
|
||||
# manages dynamic information attached to songs.
|
||||
#
|
||||
sticker_file "~/.local/share/mpd/sticker.sql"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# General music daemon options ################################################
|
||||
#
|
||||
# This setting specifies the user that MPD will run as. MPD should never run as
|
||||
# root and you may use this setting to make MPD change its user ID after
|
||||
# initialization. This setting is disabled by default and MPD is run as the
|
||||
# current user.
|
||||
#
|
||||
#user "nobody"
|
||||
#
|
||||
# This setting specifies the group that MPD will run as. If not specified
|
||||
# primary group of user specified with "user" setting will be used (if set).
|
||||
# This is useful if MPD needs to be a member of group such as "audio" to
|
||||
# have permission to use sound card.
|
||||
#
|
||||
#group "nogroup"
|
||||
#
|
||||
# This setting sets the address for the daemon to listen on. Careful attention
|
||||
# should be paid if this is assigned to anything other then the default, any.
|
||||
# This setting can deny access to control of the daemon. Not effective if
|
||||
# systemd socket activiation is in use.
|
||||
#
|
||||
# For network
|
||||
bind_to_address "0.0.0.0"
|
||||
#
|
||||
# And for Unix Socket
|
||||
#bind_to_address "~/.mpd/socket"
|
||||
#
|
||||
# This setting is the TCP port that is desired for the daemon to get assigned
|
||||
# to.
|
||||
#
|
||||
port "6600"
|
||||
#
|
||||
# Suppress all messages below the given threshold. Use "verbose" for
|
||||
# troubleshooting.
|
||||
#
|
||||
#log_level "notice"
|
||||
#
|
||||
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
|
||||
# of starting playback after startup.
|
||||
#
|
||||
#restore_paused "no"
|
||||
#
|
||||
# This setting enables MPD to create playlists in a format usable by other
|
||||
# music players.
|
||||
#
|
||||
#save_absolute_paths_in_playlists "no"
|
||||
#
|
||||
# This setting defines a list of tag types that will be extracted during the
|
||||
# audio file discovery process. The complete list of possible values can be
|
||||
# found in the user manual.
|
||||
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
|
||||
#
|
||||
# This example just enables the "comment" tag without disabling all
|
||||
# the other supported tags:
|
||||
#metadata_to_use "+comment"
|
||||
#
|
||||
# This setting enables automatic update of MPD's database when files in
|
||||
# music_directory are changed.
|
||||
#
|
||||
#auto_update "yes"
|
||||
#
|
||||
# Limit the depth of the directories being watched, 0 means only watch
|
||||
# the music directory itself. There is no limit by default.
|
||||
#
|
||||
#auto_update_depth "3"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Symbolic link behavior ######################################################
|
||||
#
|
||||
# If this setting is set to "yes", MPD will discover audio files by following
|
||||
# symbolic links outside of the configured music_directory.
|
||||
#
|
||||
#follow_outside_symlinks "yes"
|
||||
#
|
||||
# If this setting is set to "yes", MPD will discover audio files by following
|
||||
# symbolic links inside of the configured music_directory.
|
||||
#
|
||||
#follow_inside_symlinks "yes"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Zeroconf / Avahi Service Discovery ##########################################
|
||||
#
|
||||
# If this setting is set to "yes", service information will be published with
|
||||
# Zeroconf / Avahi.
|
||||
#
|
||||
#zeroconf_enabled "yes"
|
||||
#
|
||||
# The argument to this setting will be the Zeroconf / Avahi unique name for
|
||||
# this MPD server on the network. %h will be replaced with the hostname.
|
||||
#
|
||||
#zeroconf_name "Music Player @ %h"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Permissions #################################################################
|
||||
#
|
||||
# If this setting is set, MPD will require password authorization. The password
|
||||
# setting can be specified multiple times for different password profiles.
|
||||
#
|
||||
#password "password@read,add,control,admin"
|
||||
#
|
||||
# This setting specifies the permissions a user has who has not yet logged in.
|
||||
#
|
||||
#default_permissions "read,add,control,admin"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Database #######################################################################
|
||||
#
|
||||
|
||||
#database {
|
||||
# plugin "proxy"
|
||||
# host "other.mpd.host"
|
||||
# port "6600"
|
||||
#}
|
||||
|
||||
# Input #######################################################################
|
||||
#
|
||||
|
||||
input {
|
||||
plugin "curl"
|
||||
# proxy "proxy.isp.com:8080"
|
||||
# proxy_user "user"
|
||||
# proxy_password "password"
|
||||
}
|
||||
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Audio Output ################################################################
|
||||
#
|
||||
# MPD supports various audio output types, as well as playing through multiple
|
||||
# audio outputs at the same time, through multiple audio_output settings
|
||||
# blocks. Setting this block is optional, though the server will only attempt
|
||||
# autodetection for one sound card.
|
||||
#
|
||||
# An example of an ALSA output:
|
||||
#
|
||||
#audio_output {
|
||||
# type "alsa"
|
||||
# name "My ALSA Device"
|
||||
## device "hw:0,0" # optional
|
||||
## mixer_type "hardware" # optional
|
||||
## mixer_device "default" # optional
|
||||
## mixer_control "PCM" # optional
|
||||
## mixer_index "0" # optional
|
||||
#}
|
||||
#
|
||||
# An example of an OSS output:
|
||||
#
|
||||
#audio_output {
|
||||
# type "oss"
|
||||
# name "My OSS Device"
|
||||
## device "/dev/dsp" # optional
|
||||
## mixer_type "hardware" # optional
|
||||
## mixer_device "/dev/mixer" # optional
|
||||
## mixer_control "PCM" # optional
|
||||
#}
|
||||
#
|
||||
# An example of a shout output (for streaming to Icecast):
|
||||
#
|
||||
#audio_output {
|
||||
# type "shout"
|
||||
# encoder "vorbis" # optional
|
||||
# name "My Shout Stream"
|
||||
# host "localhost"
|
||||
# port "8000"
|
||||
# mount "/mpd.ogg"
|
||||
# password "hackme"
|
||||
# quality "5.0"
|
||||
# bitrate "128"
|
||||
# format "44100:16:1"
|
||||
## protocol "icecast2" # optional
|
||||
## user "source" # optional
|
||||
## description "My Stream Description" # optional
|
||||
## url "http://example.com" # optional
|
||||
## genre "jazz" # optional
|
||||
## public "no" # optional
|
||||
## timeout "2" # optional
|
||||
## mixer_type "software" # optional
|
||||
#}
|
||||
#
|
||||
# An example of a recorder output:
|
||||
#
|
||||
#audio_output {
|
||||
# type "recorder"
|
||||
# name "My recorder"
|
||||
# encoder "vorbis" # optional, vorbis or lame
|
||||
# path "/var/lib/mpd/recorder/mpd.ogg"
|
||||
## quality "5.0" # do not define if bitrate is defined
|
||||
# bitrate "128" # do not define if quality is defined
|
||||
# format "44100:16:1"
|
||||
#}
|
||||
#
|
||||
# An example of a httpd output (built-in HTTP streaming server):
|
||||
#
|
||||
#audio_output {
|
||||
# type "httpd"
|
||||
# name "My HTTP Stream"
|
||||
# encoder "vorbis" # optional, vorbis or lame
|
||||
# port "8000"
|
||||
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
|
||||
## quality "5.0" # do not define if bitrate is defined
|
||||
# bitrate "128" # do not define if quality is defined
|
||||
# format "44100:16:1"
|
||||
# max_clients "0" # optional 0=no limit
|
||||
#}
|
||||
#
|
||||
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
|
||||
#
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "MPD"
|
||||
# server "localhost" # optional
|
||||
# sink "remote_server_sink" # optional
|
||||
# media_role "media_role" #optional
|
||||
}
|
||||
#
|
||||
# An example of a winmm output (Windows multimedia API).
|
||||
#
|
||||
#audio_output {
|
||||
# type "winmm"
|
||||
# name "My WinMM output"
|
||||
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||
# or
|
||||
## device "0" # optional
|
||||
## mixer_type "hardware" # optional
|
||||
#}
|
||||
#
|
||||
# An example of a wasapi output (Windows multimedia API).
|
||||
#
|
||||
#audio_output {
|
||||
# type "wasapi"
|
||||
# name "My WASAPI output"
|
||||
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||
# or
|
||||
## device "0" # optional
|
||||
## Exclusive mode blocks all other audio source, and get best audio quality without resampling.
|
||||
## exclusive "no" # optional
|
||||
## Enumerate all devices in log.
|
||||
## enumerate "no" # optional
|
||||
#}
|
||||
#
|
||||
# An example of an openal output.
|
||||
#
|
||||
#audio_output {
|
||||
# type "openal"
|
||||
# name "My OpenAL output"
|
||||
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||
#}
|
||||
#
|
||||
# An example of an sndio output.
|
||||
#
|
||||
#audio_output {
|
||||
# type "sndio"
|
||||
# name "sndio output"
|
||||
# mixer_type "hardware"
|
||||
#}
|
||||
#
|
||||
# An example of an OS X output:
|
||||
#
|
||||
#audio_output {
|
||||
# type "osx"
|
||||
# name "My OS X Device"
|
||||
## device "Built-in Output" # optional
|
||||
## channel_map "-1,-1,0,1" # optional
|
||||
#}
|
||||
#
|
||||
## Example "pipe" output:
|
||||
#
|
||||
#audio_output {
|
||||
# type "pipe"
|
||||
# name "my pipe"
|
||||
# command "aplay -f cd 2>/dev/null"
|
||||
## Or if you're want to use AudioCompress
|
||||
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
|
||||
## Or to send raw PCM stream through PCM:
|
||||
# command "nc example.org 8765"
|
||||
# format "44100:16:2"
|
||||
#}
|
||||
#
|
||||
## An example of a null output (for no audio output):
|
||||
#
|
||||
#audio_output {
|
||||
# type "null"
|
||||
# name "My Null Output"
|
||||
# mixer_type "none" # optional
|
||||
#}
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Normalization automatic volume adjustments ##################################
|
||||
#
|
||||
# This setting specifies the type of ReplayGain to use. This setting can have
|
||||
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
|
||||
# chooses between "track" and "album" depending on the current state of
|
||||
# random playback. If random playback is enabled then "track" mode is used.
|
||||
# See <http://www.replaygain.org> for more details about ReplayGain.
|
||||
# This setting is off by default.
|
||||
#
|
||||
#replaygain "album"
|
||||
#
|
||||
# This setting sets the pre-amp used for files that have ReplayGain tags. By
|
||||
# default this setting is disabled.
|
||||
#
|
||||
#replaygain_preamp "0"
|
||||
#
|
||||
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
|
||||
# By default this setting is disabled.
|
||||
#
|
||||
#replaygain_missing_preamp "0"
|
||||
#
|
||||
# This setting enables or disables ReplayGain limiting.
|
||||
# MPD calculates actual amplification based on the ReplayGain tags
|
||||
# and replaygain_preamp / replaygain_missing_preamp setting.
|
||||
# If replaygain_limit is enabled MPD will never amplify audio signal
|
||||
# above its original level. If replaygain_limit is disabled such amplification
|
||||
# might occur. By default this setting is enabled.
|
||||
#
|
||||
#replaygain_limit "yes"
|
||||
#
|
||||
# This setting enables on-the-fly normalization volume adjustment. This will
|
||||
# result in the volume of all playing audio to be adjusted so the output has
|
||||
# equal "loudness". This setting is disabled by default.
|
||||
#
|
||||
#volume_normalization "no"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Character Encoding ##########################################################
|
||||
#
|
||||
# If file or directory names do not display correctly for your locale then you
|
||||
# may need to modify this setting.
|
||||
#
|
||||
#filesystem_charset "UTF-8"
|
||||
#
|
||||
###############################################################################
|
|
@ -2,10 +2,6 @@ require('nvim-tree').setup {
|
|||
sort_by = 'case_sensitive',
|
||||
view = {
|
||||
adaptive_size = true,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {},
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
|
|
|
@ -34,8 +34,8 @@ vim.opt.incsearch = true
|
|||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'}
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true}
|
||||
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true }
|
||||
|
||||
vim.opt.timeoutlen = 1000 -- For agda unicode chars to work properly
|
||||
|
||||
|
@ -57,5 +57,8 @@ vim.g.vimtex_compiler_latexmk = { -- Make vimtex allow shell-escape while compil
|
|||
}
|
||||
}
|
||||
|
||||
-- Autoformat on save
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
-- TODO:
|
||||
-- - Debugger integration (gdb?, java?/kotlin?, rust?, etc) - nvim-dap and friends
|
||||
|
|
|
@ -6,13 +6,15 @@ vim.cmd([[
|
|||
]])
|
||||
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
packer_bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim',
|
||||
install_path })
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
|
||||
return require('packer').startup({function(use)
|
||||
return require('packer').startup({
|
||||
function(use)
|
||||
use('ashinkarov/nvim-agda')
|
||||
use('lervag/vimtex')
|
||||
use('vigoux/LanguageTool.nvim')
|
||||
|
@ -120,7 +122,7 @@ return require('packer').startup({function(use)
|
|||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end,
|
||||
end,
|
||||
config = {
|
||||
auto_reload_compiled = false, -- Automatically reload the compiled file after creating it.
|
||||
display = {
|
||||
|
@ -131,4 +133,3 @@ end,
|
|||
}
|
||||
})
|
||||
-- run bootstrap: nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ local function save_profiles(threshold)
|
|||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/kalle/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/kalle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||
local package_path_str = "/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?/init.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
|
|
@ -59,3 +59,4 @@ dto
|
|||
api
|
||||
loadPage
|
||||
hits
|
||||
Bruijn
|
||||
|
|
Binary file not shown.
172
picom/picom.conf
172
picom/picom.conf
|
@ -1,172 +0,0 @@
|
|||
#################################
|
||||
# Background-Blurring #
|
||||
#################################
|
||||
|
||||
# Blur background of semi-transparent / ARGB windows.
|
||||
# Bad in performance, with driver-dependent behavior.
|
||||
# The name of the switch may change without prior notifications.
|
||||
#
|
||||
blur-background = true;
|
||||
|
||||
# Specify the blur convolution kernel, with the following format:
|
||||
# example:
|
||||
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||
#
|
||||
# blur-kern = ''
|
||||
blur-method = "gaussian"
|
||||
blur-size = 11
|
||||
blur-deviation = 5
|
||||
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"class_g = 'timer'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
#################################
|
||||
# Shadows #
|
||||
#################################
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow.
|
||||
#
|
||||
# examples:
|
||||
# shadow-exclude = "n:e:Notification";
|
||||
#
|
||||
# shadow-exclude = []
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
"class_g = 'Conky'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g = 'Cairo-clock'",
|
||||
"class_g = 'timer'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
#################################
|
||||
# General Settings #
|
||||
#################################
|
||||
|
||||
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||
# `xrender` is the default one.
|
||||
#
|
||||
# backend = 'glx'
|
||||
backend = "glx";
|
||||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
vsync = true
|
||||
|
||||
# Try to detect WM windows (a non-override-redirect window with no
|
||||
# child that has 'WM_STATE') and mark them as active.
|
||||
mark-wmwin-focused = true;
|
||||
|
||||
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||
mark-ovredir-focused = true;
|
||||
|
||||
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
||||
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Specify refresh rate of the screen. If not specified or 0, picom will
|
||||
# try detecting this with X RandR extension.
|
||||
refresh-rate = 144;
|
||||
|
||||
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||
# in the same group focused at the same time.
|
||||
#
|
||||
# detect-transient = false
|
||||
detect-transient = true
|
||||
|
||||
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
|
||||
# detect-transient is enabled, too.
|
||||
#
|
||||
# detect-client-leader = false
|
||||
detect-client-leader = true
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes,
|
||||
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||
# Recommended if it works.
|
||||
#
|
||||
# glx-no-rebind-pixmap = false
|
||||
|
||||
# Disable the use of damage information.
|
||||
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||
# The opposing option is use-damage
|
||||
#
|
||||
# no-use-damage = false
|
||||
use-damage = true
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||
# with GLX backend for some users.
|
||||
#
|
||||
xrender-sync-fence = false
|
||||
|
||||
# Set the log level. Possible values are:
|
||||
# "trace", "debug", "info", "warn", "error"
|
||||
# in increasing level of importance. Case doesn't matter.
|
||||
# If using the "TRACE" log level, it's better to log into a file
|
||||
# using *--log-file*, since it can generate a huge stream of logs.
|
||||
#
|
||||
# log-level = "debug"
|
||||
log-level = "warn";
|
||||
|
||||
# Set the log file.
|
||||
# If *--log-file* is never specified, logs will be written to stderr.
|
||||
# Otherwise, logs will to written to the given file, though some of the early
|
||||
# logs might still be written to the stderr.
|
||||
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||
#
|
||||
# log-file = '/path/to/your/log/file'
|
||||
|
||||
# Show all X errors (for debugging)
|
||||
# show-all-xerrors = false
|
||||
|
||||
# Write process ID to a file.
|
||||
# write-pid-path = '/path/to/your/log/file'
|
||||
|
||||
# Window type settings
|
||||
#
|
||||
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||
# "tooltip", "notification", "combo", and "dnd".
|
||||
#
|
||||
# Following per window-type options are available: ::
|
||||
#
|
||||
# fade, shadow:::
|
||||
# Controls window-type-specific shadow and fade settings.
|
||||
#
|
||||
# opacity:::
|
||||
# Controls default opacity of the window type.
|
||||
#
|
||||
# focus:::
|
||||
# Controls whether the window of this type is to be always considered focused.
|
||||
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||
#
|
||||
# full-shadow:::
|
||||
# Controls whether shadow is drawn under the parts of the window that you
|
||||
# normally won't be able to see. Useful when the window has parts of it
|
||||
# transparent, and you want shadows in those areas.
|
||||
#
|
||||
# redir-ignore:::
|
||||
# Controls whether this type of windows should cause screen to become
|
||||
# redirected again after been unredirected. If you have unredir-if-possible
|
||||
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||
# you can set this to `true`.
|
||||
#
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
||||
dock = { shadow = false; }
|
||||
dnd = { shadow = false; }
|
||||
popup_menu = { opacity = 0.8; }
|
||||
dropdown_menu = { opacity = 0.8; }
|
||||
};
|
176
polybar/config
176
polybar/config
|
@ -1,176 +0,0 @@
|
|||
[colors]
|
||||
transparent = #00000000
|
||||
background = #282a36
|
||||
background-current = #44475a
|
||||
foreground = #f8f8f2
|
||||
button = #2d1349
|
||||
cyan = #5ba9bd
|
||||
green = #209a4b
|
||||
orange = #cf885c
|
||||
pink = #ff79c6
|
||||
purple = #7d53b9
|
||||
red = #cc3333
|
||||
yellow = #997700
|
||||
|
||||
[bar/primary]
|
||||
monitor = ${env:MONITOR:DP-4}
|
||||
width = 100%
|
||||
height = 28
|
||||
|
||||
background = ${colors.transparent}
|
||||
foregorund = ${colors.foreground}
|
||||
|
||||
# No under/over line
|
||||
line-size = 0
|
||||
# Small border to pull it away from the green edges.
|
||||
border-size = 5
|
||||
border-bottom-size = 0
|
||||
border-color = ${colors.transparent}
|
||||
|
||||
padding = 1
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 0
|
||||
|
||||
font-0 = "Roboto Mono Nerd Font:pixelsize=12;2"
|
||||
|
||||
tray-position = right
|
||||
tray-background = ${colors.background}
|
||||
tray-reparent = true
|
||||
|
||||
modules-left = i3
|
||||
modules-center = utility mpd calculator
|
||||
modules-right = memory pulseaudio du_root date
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
|
||||
; Only show workspaces on the same output as the bar
|
||||
pin-workspaces = true
|
||||
|
||||
label-mode-padding = 2
|
||||
label-mode-foreground = #000
|
||||
label-mode-background = ${colors.background}
|
||||
|
||||
; focused = Active workspace on focused monitor
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-current}
|
||||
label-focused-padding = 2
|
||||
|
||||
; unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = %index%
|
||||
label-unfocused-background = ${colors.background}
|
||||
label-unfocused-padding = 2
|
||||
|
||||
; visible = Active workspace on unfocused monitor
|
||||
label-visible = %index%
|
||||
label-visible-background = ${self.label-focused-background}
|
||||
label-visible-padding = ${self.label-focused-padding}
|
||||
|
||||
; urgent = Workspace with urgency hint set
|
||||
label-urgent = %index%
|
||||
label-urgent-background = ${colors.red}
|
||||
label-urgent-padding = 2
|
||||
|
||||
[module/utility]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-background = ${colors.button}
|
||||
|
||||
click-left = "bash -c $HOME/.dots/scripts/utilities-menu"
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
format-online = " <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> "
|
||||
format-online-background = ${colors.background}
|
||||
format-online-prefix = " "
|
||||
format-online-prefix-background = ${colors.purple}
|
||||
|
||||
icon-prev = " 玲"
|
||||
icon-stop = " 栗"
|
||||
icon-play = " 契"
|
||||
icon-pause = " "
|
||||
icon-next = " 怜"
|
||||
|
||||
label-song = " %artist% - %title% "
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
|
||||
[module/calculator]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-background = ${colors.button}
|
||||
|
||||
click-left = "rofi -show calc -theme appsmenu -modi calc -no-persist-history -no-show-match -no-sort"
|
||||
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = " "
|
||||
format-prefix-background = ${colors.red}
|
||||
format-background = ${colors.background}
|
||||
label = " %gb_used% "
|
||||
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume = <label-volume>
|
||||
format-volume-background = ${colors.background}
|
||||
format-volume-prefix = " 墳 "
|
||||
format-volume-prefix-background = ${colors.cyan}
|
||||
|
||||
format-muted = <label-muted>
|
||||
format-muted-background = ${colors.background}
|
||||
format-muted-prefix = " 墳 "
|
||||
format-muted-prefix-background = ${colors.cyan}
|
||||
|
||||
label-volume = " %percentage%% "
|
||||
|
||||
label-muted = " Muted "
|
||||
|
||||
|
||||
[module/du_root]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
|
||||
label-mounted = " %percentage_used%% "
|
||||
label-unmounted = " "
|
||||
|
||||
format-mounted = <label-mounted>
|
||||
format-mounted-background = ${colors.background}
|
||||
format-mounted-prefix = " "
|
||||
format-mounted-prefix-background = ${colors.green}
|
||||
|
||||
format-unmounted = <label-unmounted>
|
||||
format-unmounted-background = ${colors.background}
|
||||
format-unmounted-prefix = " "
|
||||
format-unmounted-prefix-background = ${colors.green}
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
date =
|
||||
date-alt = " %Y-%m-%d"
|
||||
|
||||
time = "%H:%M "
|
||||
time-alt = "%H:%M:%S "
|
||||
|
||||
format-background = ${colors.background}
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground}
|
||||
format-prefix-background = ${colors.yellow}
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
; vim:ft=dosini
|
|
@ -1,69 +0,0 @@
|
|||
/**
|
||||
* This theme is intended for a 8x2 items list menu with a headerbar.
|
||||
*/
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
}
|
||||
|
||||
@import "shared/settings.rasi"
|
||||
* {
|
||||
background-color: transparent;
|
||||
text-color: @foreground-list;
|
||||
font: @text-font;
|
||||
}
|
||||
|
||||
|
||||
#window {
|
||||
padding: @list-8-window-padding;
|
||||
}
|
||||
inputbar,
|
||||
prompt,
|
||||
textbox-prompt-colon,
|
||||
entry {
|
||||
background-color: @background;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt, textbox-prompt-colon, entry ];
|
||||
margin: @inputbar-margin;
|
||||
width: 100%;
|
||||
}
|
||||
#prompt {
|
||||
padding: @prompt-padding;
|
||||
background-color: @accent;
|
||||
text-color: @background-focus;
|
||||
width: 100%;
|
||||
}
|
||||
#message {
|
||||
padding: @list-element-padding;
|
||||
margin: @list-element-margin;
|
||||
background-color: @background-focus;
|
||||
border: @list-element-border;
|
||||
border-color: @on;
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: " : : ";
|
||||
padding: @apps-textbox-prompt-colon-padding;
|
||||
}
|
||||
#entry {
|
||||
text-color: @accent;
|
||||
padding: @entry-padding;
|
||||
}
|
||||
#element {
|
||||
padding: @list-element-padding;
|
||||
margin: @list-element-margin;
|
||||
border: @list-element-border;
|
||||
background-color: @background-focus;
|
||||
border-color: @background-focus;
|
||||
}
|
||||
#element.selected {
|
||||
background-color: @background;
|
||||
text-color: @accent;
|
||||
border-color: @accent;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 24px;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
* {
|
||||
accent: #ffbf00;
|
||||
background: #1c1c1c;
|
||||
background-light: #1f1f1f;
|
||||
background-focus: #282828;
|
||||
foreground: #888888;
|
||||
foreground-list: #bbbbbb;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
* {
|
||||
accent: #728cbb;
|
||||
background: #1c1c1c;
|
||||
background-light: #1f1f1f;
|
||||
background-focus: #282828;
|
||||
foreground: #888888;
|
||||
foreground-list: #bbbbbb;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
* {
|
||||
accent: #cc3333;
|
||||
background: #282a36;
|
||||
background-light: #44475a;
|
||||
background-focus: #282828;
|
||||
foreground: #888888;
|
||||
foreground-list: #bbbbbb;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
* {
|
||||
accent: #83a598;
|
||||
background: #282828;
|
||||
background-light: #282828;
|
||||
background-focus: #1d2021;
|
||||
foreground: #ebdbb2;
|
||||
foreground-list: #ebdbb2;
|
||||
on: #83a598;
|
||||
off: #fb4934;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
* {
|
||||
accent: #6699ff;
|
||||
background: #f2f2f2;
|
||||
background-light: #e2e2e2;
|
||||
background-focus: #d2d2d2;
|
||||
foreground: #333333;
|
||||
foreground-list: #222222;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
* Settings used in every rofi option menu:
|
||||
* - i3layoutmenu
|
||||
* - mpdmenu
|
||||
* - powermenu
|
||||
* - scrotmenu
|
||||
*/
|
||||
@import "settings.rasi"
|
||||
* {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
font: @icon-font;
|
||||
}
|
||||
#window {
|
||||
children: [ horibox ];
|
||||
}
|
||||
#horibox {
|
||||
children: [ listview ];
|
||||
}
|
||||
#listview {
|
||||
layout: horizontal;
|
||||
}
|
||||
#element {
|
||||
padding: @option-element-padding;
|
||||
background-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
* {
|
||||
/* General */
|
||||
text-font: "Comfortaa 16";
|
||||
text-font-mono: "RobotoMono Nerd Font Regular 14";
|
||||
icon-font: "Hurmit Nerd Font Mono 60";
|
||||
icon-font-small: "Hurmit Nerd Font Mono 24";
|
||||
inputbar-margin: 4px 4px;
|
||||
prompt-padding: 16px 20px;
|
||||
entry-padding: 18px 16px 16px 0px;
|
||||
/* list menus: appsmenu, networkmenu and nmvpnmenu */
|
||||
list-element-padding: 20px;
|
||||
list-element-margin: @inputbar-margin;
|
||||
list-element-border: 0px 0px 0px 8px;
|
||||
list-8-window-padding: 219px 360px;
|
||||
/* option menus: i3layoutmenu, mpdmenu, powermenu and scrotmenu */
|
||||
/**
|
||||
* Values bellow are 'no-padding' ones for a size 60 (@icon-font) font, played around using this character: ■
|
||||
* We then add add 100 actual padding around the icons.
|
||||
* -12px 0px -19px -96px */
|
||||
option-element-padding: 88px 100px 81px 4px;
|
||||
option-3-window-padding: 415px 446px;
|
||||
option-3-listview-spacing: 140px;
|
||||
option-5-window-padding: 415px 183px;
|
||||
option-5-listview-spacing: 77px;
|
||||
option-6-listview-spacing: 50px;
|
||||
/* appsmenu */
|
||||
apps-textbox-prompt-colon-padding: 16px;
|
||||
/* mpdmenu */
|
||||
mpd-window-padding: 379px 111px;
|
||||
mpd-inputbar-margin: 10px 0px;
|
||||
mpd-prompt-padding: 14px 20px 10px 20px;
|
||||
mpd-prompt-margin: 0px 0px 0px -2px;
|
||||
mpd-element-border: 12px;
|
||||
/* Every @option-element-padding minus @mpd-element-border */
|
||||
mpd-element-padding: 76px 88px 69px -16px;
|
||||
/* networkmenu */
|
||||
network-textbox-prompt-colon-padding: 14px 10px 10px 10px;
|
||||
/* nmvpnmenu */
|
||||
nmvpn-textbox-prompt-colon-padding: @network-textbox-prompt-colon-padding;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/**
|
||||
* Allows to change the settings of every menu simply by editing this file
|
||||
*/
|
||||
@import "colorschemes/dracula.rasi"
|
||||
@import "resolutions/1920x1080.rasi"
|
||||
|
||||
#window {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
99
setup.sh
99
setup.sh
|
@ -1,8 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
cd $(dirname $0)
|
||||
|
||||
DOTS_DIR=$(pwd)
|
||||
|
||||
function link_config {
|
||||
NAME="$1"
|
||||
TARGET="$2"
|
||||
FROM="$DOTS_DIR/$3"
|
||||
if [ -d "$TARGET" ]; then
|
||||
echo "[$NAME] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s "$FROM" "$TARGET"
|
||||
fi
|
||||
}
|
||||
|
||||
link_config "Dunst" "$HOME/.config/dunst" "dunst"
|
||||
link_config "Kitty" "$HOME/.config/kitty" "kitty"
|
||||
link_config "Eww" "$HOME/.config/eww" "eww"
|
||||
|
||||
# Neovim
|
||||
NVIM_DIR="$HOME/.config/nvim"
|
||||
|
||||
|
@ -17,88 +33,6 @@ else
|
|||
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
fi
|
||||
|
||||
# i3-gaps
|
||||
I3_DIR="$HOME/.config/i3"
|
||||
|
||||
# Check if the i3 directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $I3_DIR ]; then
|
||||
echo "[I3] Configuration directory exists. Skipping."
|
||||
else
|
||||
# Symlink the config
|
||||
ln -s $DOTS_DIR/i3 $I3_DIR
|
||||
fi
|
||||
|
||||
# Picom
|
||||
PICOM_DIR="$HOME/.config/picom"
|
||||
|
||||
# Check if the picom directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $PICOM_DIR ]; then
|
||||
echo "[PICOM] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s $DOTS_DIR/picom $PICOM_DIR
|
||||
fi
|
||||
|
||||
# Polybar
|
||||
POLYBAR_DIR="$HOME/.config/polybar"
|
||||
|
||||
# Check if the polybar directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $POLYBAR_DIR ]; then
|
||||
echo "[POLYBAR] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s $DOTS_DIR/polybar $POLYBAR_DIR
|
||||
fi
|
||||
|
||||
# Dunst
|
||||
DUNST_DIR="$HOME/.config/dunst"
|
||||
|
||||
# Check if the dunst directory exists. If it does we skip this part of the script and inform the user.'
|
||||
if [ -d $DUNST_DIR ]; then
|
||||
echo "[DUNST] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s $DOTS_DIR/dunst $DUNST_DIR
|
||||
fi
|
||||
|
||||
# Kitty
|
||||
KITTY_DIR="$HOME/.config/kitty"
|
||||
|
||||
# Check if the kitty directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $KITTY_DIR ]; then
|
||||
echo "[KITTY] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s $DOTS_DIR/kitty $KITTY_DIR
|
||||
fi
|
||||
|
||||
# MPD
|
||||
MPD_DIR="$HOME/.config/mpd"
|
||||
|
||||
# Check if the mpd directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $MPD_DIR ]; then
|
||||
echo "[MPD] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s $DOTS_DIR/mpd $MPD_DIR
|
||||
fi
|
||||
|
||||
# ZSH
|
||||
ZSHRC="$HOME/.zshrc"
|
||||
|
||||
# Check if the zshrc file exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -f $ZSHRC ]; then
|
||||
echo "[ZSH] Configuration file exists. Skipping."
|
||||
else
|
||||
ln -s "$DOTS_DIR/zsh/.zshrc" $ZSHRC
|
||||
fi
|
||||
|
||||
# Rofi
|
||||
ROFI_DIR="$HOME/.config/rofi"
|
||||
|
||||
# Check if the rofi directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $ROFI_DIR ]; then
|
||||
echo "[ROFI] Configuration file exists. Skipping."
|
||||
else
|
||||
ln -s $DOTS_DIR/rofi $ROFI_DIR
|
||||
fi
|
||||
|
||||
|
||||
# Scripts
|
||||
SCRIPT_DIR="$HOME/bin/scripts"
|
||||
|
||||
|
@ -115,3 +49,4 @@ TEMPLATE_DIR="$HOME/Templates"
|
|||
|
||||
rmdir "$TEMPLATE_DIR"
|
||||
ln -s "$DOTS_DIR/Templates" "$TEMPLATE_DIR"
|
||||
|
||||
|
|
83
zsh/.zshrc
83
zsh/.zshrc
|
@ -1,83 +0,0 @@
|
|||
autoload compinit
|
||||
|
||||
compinit
|
||||
|
||||
# Menu driven command completion.
|
||||
zstyle ':completion:*' menu select
|
||||
# Make ZSH complete aliases.
|
||||
setopt COMPLETE_ALIASES
|
||||
# Allow ZSH to complete in priviliged environments.
|
||||
zstyle ':completion::complete:*' gain-privileges 1
|
||||
## case-insensitive (uppercase from lowercase) completion
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||||
autoload -U colors && colors
|
||||
|
||||
# When typing a directory name cd to it.
|
||||
setopt autocd
|
||||
|
||||
# Add ~/bin and ~/bin.scripts to my path
|
||||
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/:$HOME/.emacs.d/bin/
|
||||
|
||||
# Set the prompt.
|
||||
export PS1="[%F{6}%n%f@%M %F{4}%(5~|%-1~/…/%3~|%4~)%f] "
|
||||
|
||||
# Function to download a full youtube playlist using youtube-dl.
|
||||
function playlist-dl {
|
||||
echo "Looking up playlist name..."
|
||||
pl_line=$(youtube-dl --flat-playlist "$1" | grep "\[download\] Downloading playlist: ")
|
||||
pl_name=$(echo ${pl_line:33} | tr '/' ' ')
|
||||
echo "Found playlist by name: $pl_name"
|
||||
echo "Downloading it into directory: $pl_name"
|
||||
|
||||
mkdir "$pl_name"
|
||||
cd "$pl_name"
|
||||
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "$1"
|
||||
cd ../
|
||||
}
|
||||
|
||||
function cd-courses {
|
||||
dir=$(ls ~/Uni | fzf)
|
||||
cd ~/Uni/$dir
|
||||
}
|
||||
|
||||
function cd-projects {
|
||||
dir=$(find ~/Projects -maxdepth 3 -type d | fzf)
|
||||
cd $dir
|
||||
}
|
||||
|
||||
function script-edit {
|
||||
scripts=$(ls ~/bin/scripts/)"$(echo -e "\nzshrc")"
|
||||
|
||||
selected=$(echo $scripts | fzf)
|
||||
case $selected in
|
||||
"zshrc")
|
||||
nvim ~/.zshrc
|
||||
;;
|
||||
*)
|
||||
nvim ~/bin/scripts/$selected
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function compile {
|
||||
gcc -no-pie -g -o $2 $1
|
||||
}
|
||||
|
||||
# Set EDITOR to be nvim.
|
||||
export EDITOR=nvim
|
||||
|
||||
# Aliases
|
||||
alias ls="lsd"
|
||||
alias grep="grep --color"
|
||||
alias vim="nvim"
|
||||
alias vi="nvim"
|
||||
alias open="xdg-open"
|
||||
|
||||
alias gg="git-graph --model simple --color always | less -r"
|
||||
alias gi="gitinspector --grading=true -f \"java,fxml,css,py,html\" -F html -x author:\"OOP Project Team\""
|
||||
alias se="script-edit"
|
||||
alias c="cd-courses"
|
||||
alias proj="cd-projects"
|
||||
|
||||
# Add fish like syntax highlighting to zsh.
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
Loading…
Reference in New Issue