personal dotfiles: my Hyprland config
44 files changed, 1930 insertions, 441 deletions
diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index eb9f081..0000000 --- a/.bash_aliases +++ /dev/null @@ -1,17 +0,0 @@ -# basic stuff -alias mgm='micro $(git diff HEAD --relative | diff-so-fancy | grep "@.*@" | cut -d" " -f2 | grep -v "^$" | grep -v "*" | uniq:)' - -# micro git staged -#alias mgs='micro $(git diff HEAD --staged --relative | diff-so-fancy | grep "@.*@" | cut -d" " -f2 | grep -v "^$" | grep -v "*" | uniq:)' - -# Typos -alias mimcro='micro' -alias micmro='micro' - -## dgs -alias mycli_admin='mycli --defaults-group-suffix=_admin' - -alias y2j='/usr/bin/python3 -c "import json,sys; from ruamel.yaml import YAML; yaml=YAML(); print(json.dumps(yaml.load(sys.stdin)))"' -alias irc-s='env PATH=.:$PATH irc-slack -H 0.0.0.0 -s wl.zachdecook.com' -alias gitb="git branch | grep '^*' | cut -d' ' -f2" -alias migs='ls resources/sql/*/*$(gitb)*' diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 970afa3..0000000 --- a/.bashrc +++ /dev/null @@ -1,43 +0,0 @@ -# If not running interactively, don't do anything -case $- in -*i*) ;; -*) return ;; -esac - -if [ -z "$HOST" ] ; then - export HOST=${HOSTNAME} -fi - -xtitle () -{ - echo -n -e "\033]0;$*\007" -} - -cd() -{ - builtin cd "$@" && xtitle "$(basename $PWD)" -} - -export HISTSIZE=10000 - -# BCP prompt. -parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/๐ฑ \1/' -} -export PS1="[\t \[\e[0;33m\]\w\[\e[0;35m\]\[\e[0;32m\]\$(parse_git_branch)\[\e[0;35m\]\[\033[00m\]] " - -mggrep () { TT micro $(git grep -n "$@" | cut -d: -f1,2 | head -n 50); }; - -mfi () { - trimmed=$(echo "$@" | xargs -n1 | sed 's/:.*//g') - # TODO: Include the numbers - TT micro $(echo "$trimmed" | xargs -n1 find . -not -path './vendor/*' -name | head -n 50); -}; - -source ~/.bash_aliases - -eval $(thefuck --alias frick) - -eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -export PATH="/home/zachariahdecook/.local/bin:$PATH" -export EDITOR=micro diff --git a/.config/aerc/aerc.conf b/.config/aerc/aerc.conf new file mode 100644 index 0000000..8616618 --- /dev/null +++ b/.config/aerc/aerc.conf @@ -0,0 +1,496 @@ +# +# aerc main configuration + +[general] +# +# Used as a default path for save operations if no other path is specified. +# ~ is expanded to the current user home dir. +# +#default-save-path= + +# If set to "gpg", aerc will use system gpg binary and keystore for all crypto +# operations. If set to "internal", the internal openpgp keyring will be used. +# If set to "auto", the system gpg will be preferred unless the internal +# keyring already exists, in which case the latter will be used. +# +# Default: auto +#pgp-provider=auto + +# By default, the file permissions of accounts.conf must be restrictive and +# only allow reading by the file owner (0600). Set this option to true to +# ignore this permission check. Use this with care as it may expose your +# credentials. +# +# Default: false +#unsafe-accounts-conf=false + +# Output log messages to specified file. A path starting with ~/ is expanded to +# the user home dir. When redirecting aerc's output to a file using > shell +# redirection, this setting is ignored and log messages are printed to stdout. +# +#log-file= + +# Only log messages above the specified level to log-file. Supported levels +# are: trace, debug, info, warn and error. When redirecting aerc's output to +# a file using > shell redirection, this setting is ignored and the log level +# is forced to trace. +# +# Default: info +#log-level=info + +[ui] +# +# Describes the format for each row in a mailbox view. This is a comma +# separated list of column names with an optional align and width suffix. After +# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment +# characters can be added (by default, left) followed by an optional width +# specifier. The width is either an integer representing a fixed number of +# characters, or a percentage between 1% and 99% representing a fraction of the +# terminal width. It can also be one of the '*' (auto) or '=' (fit) special +# width specifiers. Auto width columns will be equally attributed the remaining +# terminal width. Fit width columns take the width of their contents. If no +# width specifier is set, '*' is used by default. +# +# Default: date<20,name<17,flags>4,subject<* +index-columns=date<10,name<17,flags>4,subject<* + +# +# Each name in index-columns must have a corresponding column-$name setting. +# All column-$name settings accept golang text/template syntax. See +# aerc-templates(7) for available template attributes and functions. +# +# Default settings +#column-date={{.DateAutoFormat .Date.Local}} +#column-name={{index (.From | names) 0}} +#column-flags={{.Flags | join ""}} +#column-subject={{.ThreadPrefix}}{{.Subject}} + +# +# String separator inserted between columns. When the column width specifier is +# an exact number of characters, the separator is added to it (i.e. the exact +# width will be fully available for the column contents). +# +# Default: " " +#column-separator=" " + +# +# See time.Time#Format at https://godoc.org/time#Time.Format +# +# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time) +timestamp-format=1-02 15:04 + +# +# Index-only time format for messages that were received/sent today. +# If this is not specified, timestamp-format is used instead. +# +this-day-time-format=15:04 + +# +# Index-only time format for messages that were received/sent within the last +# 7 days. If this is not specified, timestamp-format is used instead. +# +this-week-time-format=Mon 15:04 + +# +# Index-only time format for messages that were received/sent this year. +# If this is not specified, timestamp-format is used instead. +# +#this-year-time-format= + +# +# Width of the sidebar, including the border. +# +# Default: 20 +sidebar-width=10 + +# +# Message to display when viewing an empty folder. +# +# Default: (no messages) +#empty-message=(no messages) + +# Message to display when no folders exists or are all filtered +# +# Default: (no folders) +#empty-dirlist=(no folders) + +# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel +# +# Default: false +mouse-enabled=true + +# +# Ring the bell when new messages are received +# +# Default: true +#new-message-bell=true + +# Marker to show before a pinned tab's name. +# +# Default: ` +#pinned-tab-marker='`' + +# Describes the format string to use for the directory list +# +# Default: %n %>r +#dirlist-format=%n %>r + +# Delay after which the messages are actually listed when entering a directory. +# This avoids loading messages when skipping over folders and makes the UI more +# responsive. If you do not want that, set it to 0s. +# +# Default: 200ms +#dirlist-delay=200ms + +# Display the directory list as a foldable tree that allows to collapse and +# expand the folders. +# +# Default: false +#dirlist-tree=false + +# If dirlist-tree is enabled, set level at which folders are collapsed by +# default. Set to 0 to disable. +# +# Default: 0 +#dirlist-collapse=0 + +# List of space-separated criteria to sort the messages by, see *sort* +# command in *aerc*(1) for reference. Prefixing a criterion with "-r " +# reverses that criterion. +# +# Example: "from -r date" +# +#sort= + +# Moves to next message when the current message is deleted +# +# Default: true +#next-message-on-delete=true + +# Automatically set the "seen" flag when a message is opened in the message +# viewer. +# +# Default: true +#auto-mark-read=true + +# The directories where the stylesets are stored. It takes a colon-separated +# list of directories. If this is unset or if a styleset cannot be found, the +# following paths will be used as a fallback in that order: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets +# ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets +# /usr/local/share/aerc/stylesets +# /usr/share/aerc/stylesets +# +#stylesets-dirs= + +# Uncomment to use box-drawing characters for vertical and horizontal borders. +# +# Default: " " +#border-char-vertical=" " +#border-char-horizontal=" " + +# Sets the styleset to use for the aerc ui elements. +# +# Default: default +#styleset-name=default + +# Activates fuzzy search in commands and their arguments: the typed string is +# searched in the command or option in any position, and need not be +# consecutive characters in the command or option. +# +# Default: false +#fuzzy-complete=false + +# How long to wait after the last input before auto-completion is triggered. +# +# Default: 250ms +#completion-delay=250ms + +# The minimum required characters to allow auto-completion to be triggered after +# completion-delay. +# +# Default: 1 +#completion-min-chars=1 + +# +# Global switch for completion popovers +# +# Default: true +#completion-popovers=true + +# Uncomment to use UTF-8 symbols to indicate PGP status of messages +# +# Default: ASCII +#icon-unencrypted= +#icon-encrypted=โ +#icon-signed=โ +#icon-signed-encrypted=โ +#icon-unknown=โ +#icon-invalid=โ + +# Reverses the order of the message list. By default, the message list is +# ordered with the newest (highest UID) message on top. Reversing the order +# will put the oldest (lowest UID) message on top. This can be useful in cases +# where the backend does not support sorting. +# +# Default: false +#reverse-msglist-order = false + +# Reverse display of the mesage threads. Default order is the the intial +# message is on the top with all the replies being displayed below. The +# reverse option will put the initial message at the bottom with the +# replies on top. +# +# Default: false +#reverse-thread-order=false + +# Sort the thread siblings according to the sort criteria for the messages. If +# sort-thread-siblings is false, the thread siblings will be sorted based on +# the message UID in ascending order. This option is only applicable for +# client-side threading with a backend that enables sorting. Note that there's +# a performance impact when sorting is activated. +# +# Default: false +#sort-thread-siblings=false + +#[ui:account=foo] +# +# Enable a threaded view of messages. If this is not supported by the backend +# (IMAP server or notmuch), threads will be built by the client. +# +# Default: false +#threading-enabled=false + +# Force client-side thread building +# +# Default: false +#force-client-threads=false + +# Debounce client-side thread building +# +# Default: 50ms +#client-threads-delay=50ms + +[statusline] +# Describes the format string for the statusline. +# +# Default: [%a] %S %>%T +#render-format=[%a] %S %>%T + +# Specifies the separator between grouped statusline elements. +# +# Default: " | " +#separator=" | " + +# Defines the mode for displaying the status elements. +# Options: text, icon +# +# Default: text +#display-mode=text + +[viewer] +# +# Specifies the pager to use when displaying emails. Note that some filters +# may add ANSI codes to add color to rendered emails, so you may want to use a +# pager which supports ANSI codes. +# +# Default: less -R +#pager=less -R + +# +# If an email offers several versions (multipart), you can configure which +# mimetype to prefer. For example, this can be used to prefer plaintext over +# html emails. +# +# Default: text/plain,text/html +#alternatives=text/plain,text/html + +# +# Default setting to determine whether to show full headers or only parsed +# ones in message viewer. +# +# Default: false +#show-headers=false + +# +# Layout of headers when viewing a message. To display multiple headers in the +# same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if +# none of their specified headers are present in the message. +# +# Default: From|To,Cc|Bcc,Date,Subject +#header-layout=From|To,Cc|Bcc,Date,Subject + +# Whether to always show the mimetype of an email, even when it is just a single part +# +# Default: false +#always-show-mime=false + +# Parses and extracts http links when viewing a message. Links can then be +# accessed with the open-link command. +# +# Default: true +#parse-http-links=true + +[compose] +# +# Specifies the command to run the editor with. It will be shown in an embedded +# terminal, though it may also launch a graphical window if the environment +# supports it. Defaults to $EDITOR, or vi. +#editor= + +# +# Default header fields to display when composing a message. To display +# multiple headers in the same row, separate them with a pipe, e.g. "To|From". +# +# Default: To|From,Subject +#header-layout=To|From,Subject + +# +# Specifies the command to be used to tab-complete email addresses. Any +# occurrence of "%s" in the address-book-cmd will be replaced with what the +# user has typed so far. +# +# The command must output the completions to standard output, one completion +# per line. Each line must be tab-delimited, with an email address occurring as +# the first field. Only the email address field is required. The second field, +# if present, will be treated as the contact name. Additional fields are +# ignored. +# +# This parameter can also be set per account in accounts.conf. +address-book-cmd=grep -i '%s' /home/user/.config/aerc/contacts.tsv + +# Specifies the command to be used to select attachments. Any occurence of '%s' +# in the file-picker-cmd will be replaced the argument <arg> to :attach -m +# <arg>. +# +# The command must output the selected files to standard output, one file per +# line. +#file-picker-cmd= + +# +# Allow to address yourself when replying +# +# Default: true +#reply-to-self=true + +# +# Warn before sending an email that matches the specified regexp but does not +# have any attachments. Leave empty to disable this feature. +# +# Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax. The +# "(?im)" flags are set by default (case-insensitive and multi-line). +# +# Example: +# no-attachment-warning=^[^>]*attach(ed|ment) +# +#no-attachment-warning= + +[multipart-converters] +# +# Converters allow to generate multipart/alternative messages by converting the +# main text/plain part into any other MIME type. Only exact MIME types are +# accepted. The commands are invoked with sh -c and are expected to output +# valid UTF-8 text. +# +# Example (obviously, this requires that you write your main text/plain body +# using the markdown syntax): +#text/html=pandoc -f markdown -t html --standalone + +[filters] +# +# Filters allow you to pipe an email body through a shell command to render +# certain emails differently, e.g. highlighting them with ANSI escape codes. +# +# The commands are invoked with sh -c. The following folders are appended to +# the system $PATH to allow referencing filters from their name only: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters +# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters +# $PREFIX/share/aerc/filters +# /usr/share/aerc/filters +# +# The following variables are defined in the filter command environment: +# +# AERC_MIME_TYPE the part MIME type/subtype +# AERC_FORMAT the part content type format= parameter +# AERC_FILENAME the attachment filename (if any) +# AERC_SUBJECT the message Subject header value +# AERC_FROM the message From header value +# +# The first filter which matches the email's mimetype will be used, so order +# them from most to least specific. +# +# You can also match on non-mimetypes, by prefixing with the header to match +# against (non-case-sensitive) and a comma, e.g. subject,text will match a +# subject which contains "text". Use header,~regex to match against a regex. +# +subject,~^\[PATCH=awk -f /usr/libexec/aerc/filters/hldiff +text/x-patch=awk -f /usr/libexec/aerc/filters/hldiff +text/x-diff=awk -f /usr/libexec/aerc/filters/hldiff +text/plain=plaintext +text/calendar=calendar +message/delivery-status=cat +message/rfc822=cat +#text/html=pandoc -f html -t plain | colorize +text/html=html +#text/*=bat -fP --file-name="$AERC_FILENAME" +#application/x-sh=bat -fP -l sh +image/*=catimg -w $(tput cols) - +#subject,~Git(hub|lab)=lolcat -f +#from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize + +[openers] +# +# Openers allow you to specify the command to use for the :open action on a +# per-MIME-type basis. +# +# {} is expanded as the temporary filename to be opened. If it is not +# encountered in the command, the temporary filename will be appened to the end +# of the command. +# +# Examples: +# text/html=surf -dfgms +# text/plain=gvim {} +125 +# message/rfc822=thunderbird + +[triggers] +# +# Triggers specify commands to execute when certain events occur. +# +# Example: +# new-email=exec notify-send "New email from %n" "%s" + +# +# Executed when a new email arrives in the selected folder +#new-email= + +[templates] +# Templates are used to populate email bodies automatically. +# + +# The directories where the templates are stored. It takes a colon-separated +# list of directories. If this is unset or if a template cannot be found, the +# following paths will be used as a fallback in that order: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/templates +# ${XDG_DATA_HOME:-~/.local/share}/aerc/templates +# /usr/local/share/aerc/templates +# /usr/share/aerc/templates +# +#template-dirs= + +# The default template to be used for new messages. +# +# default: new_message +#new-message=new_message + +# The default template to be used for quoted replies. +# +# default: quoted_reply +#quoted-reply=quoted_reply + +# The default template to be used for forward as body. +# +# default: forward_as_body +#forwards=forward_as_body diff --git a/.config/aerc/binds.conf b/.config/aerc/binds.conf new file mode 100644 index 0000000..c50d30a --- /dev/null +++ b/.config/aerc/binds.conf @@ -0,0 +1,131 @@ +# Binds are of the form <key sequence> = <command to run> +# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>" +# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit +<C-p> = :prev-tab<Enter> +<C-n> = :next-tab<Enter> +<C-t> = :term<Enter> +? = :help keys<Enter> + +[messages] +q = :quit<Enter> + +j = :next<Enter> +<Down> = :next<Enter> +<C-d> = :next 50%<Enter> +<C-f> = :next 100%<Enter> +<PgDn> = :next 100%<Enter> + +k = :prev<Enter> +<Up> = :prev<Enter> +<C-u> = :prev 50%<Enter> +<C-b> = :prev 100%<Enter> +<PgUp> = :prev 100%<Enter> +g = :select 0<Enter> +G = :select -1<Enter> + +J = :next-folder<Enter> +K = :prev-folder<Enter> +H = :collapse-folder<Enter> +L = :expand-folder<Enter> + +v = :mark -t<Enter> +V = :mark -v<Enter> + +T = :toggle-threads<Enter> + +<Enter> = :view<Enter> +d = :prompt 'Really delete this message?' ':mv Trash<Enter>' +D = :mv Trash<Enter> +#:delete<Enter> +A = :archive flat<Enter> + +C = :compose<Enter> + +rr = :reply -a<Enter> +rq = :reply -aq<Enter> +Rr = :reply<Enter> +Rq = :reply -q<Enter> + +c = :cf<space> +$ = :term<space> +! = :term<space> +| = :pipe<space> + +/ = :search<space> +\ = :filter<space> +n = :next-result<Enter> +N = :prev-result<Enter> +<Esc> = :clear<Enter> + +[messages:folder=Drafts] +<Enter> = :recall<Enter> + +[view] +/ = :toggle-key-passthrough<Enter>/ +q = :close<Enter> +O = :open<Enter> +S = :save<space> +| = :pipe<space> +D = :mv Trash<Enter> +#D = :delete<Enter> +A = :archive flat<Enter> + +<C-l> = :open-link <space> + +f = :forward<Enter> +rr = :reply -a<Enter> +rq = :reply -aq<Enter> +Rr = :reply<Enter> +Rq = :reply -q<Enter> + +H = :toggle-headers<Enter> +<C-k> = :prev-part<Enter> +<C-j> = :next-part<Enter> +J = :next<Enter> +K = :prev<Enter> + +[view::passthrough] +$noinherit = true +$ex = <C-x> +<Esc> = :toggle-key-passthrough<Enter> + +[compose] +# Keybindings used when the embedded terminal is not selected in the compose +# view +$noinherit = true +$ex = <C-x> +<C-k> = :prev-field<Enter> +<C-j> = :next-field<Enter> +<A-p> = :switch-account -p<Enter> +<A-n> = :switch-account -n<Enter> +<tab> = :next-field<Enter> +<backtab> = :prev-field<Enter> +<C-p> = :prev-tab<Enter> +<C-n> = :next-tab<Enter> + +[compose::editor] +# Keybindings used when the embedded terminal is selected in the compose view +$noinherit = true +$ex = <C-x> +<C-k> = :prev-field<Enter> +<C-j> = :next-field<Enter> +<C-p> = :prev-tab<Enter> +<C-n> = :next-tab<Enter> + +[compose::review] +# Keybindings used when reviewing a message to be sent +y = :send<Enter> +n = :abort<Enter> +v = :preview<Enter> +p = :postpone<Enter> +q = :choose -o d discard abort -o p postpone postpone<Enter> +e = :edit<Enter> +a = :attach<space> +d = :detach<space> + +[terminal] +$noinherit = true +$ex = <C-x> + +<C-p> = :prev-tab<Enter> +<C-n> = :next-tab<Enter> diff --git a/.config/ashell/config.toml b/.config/ashell/config.toml new file mode 100644 index 0000000..2caa3cf --- /dev/null +++ b/.config/ashell/config.toml @@ -0,0 +1,46 @@ +[modules] +left = [ "Workspaces" ] +center = [ ] +#[ [ "Clock", "SystemInfo" ], "MediaPlayer" ] +right = [ [ "Privacy", "SystemInfo", "CustomNotifications", "Settings" ] ] + +[system] +indicators = ["Temperature"] + +[clock] +format = "%H:%M" + +[appearance] +scale_factor = 0.875 +opacity = 0.75 +style = "Solid" +# backdrop = 0.3 + +workspace_colors = ["#bbbbbb"] + +[appearance.background_color] +base = "#000000" +#strong = "#448888" +#weak = "#448855" +#text = "#ffffff" + +[appearance.primary_color] +base = "#4488ff" +#strong = "#448888" + +[[CustomModule]] +# The name will link the module in your left/center/right definition +name = "CustomNotifications" +# The default icon for this custom module +icon = "๏ข" +# The command that will be executed on click +command = "swaync-client -t -sw" +# You can optionally configure your custom module to update the UI using another command +# The output right now follows the waybar json-style output, using the `alt` and `text` field +# E.g. `{"text": "3", "alt": "notification"}` +listen_cmd = "swaync-client -swb" +# You can define behavior for the `text` and `alt` fields +# Any number of regex can be used to change the icon based on the alt field +icons.'dnd.*' = "๏ท" +# Another regex can optionally show a red "alert" dot on the icon +alert = ".*notification" diff --git a/.config/fish/conf.d/ansi-colors.fish b/.config/fish/conf.d/ansi-colors.fish deleted file mode 100644 index 7212f64..0000000 --- a/.config/fish/conf.d/ansi-colors.fish +++ /dev/null @@ -1,11 +0,0 @@ -set -u fish_color_command blue -set -u fish_color_quote yellow -set -u fish_color_redirection brcyan -set -u fish_color_end green -set -u fish_color_error brred --bold -set -u fish_color_param cyan -set -u fish_color_comment red -set -u fish_color_operator brblue --bold -set -u fish_color_autosuggestion brblack - -set -u fish_color_user brgreen diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..d2216ae --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,35 @@ +# name: Default +# author: Lily Ballard + +function fish_prompt --description 'Write out the prompt' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + #echo -n -s " " $prompt_status $suffix " " + echo -n -s $prompt_status (set_color $fish_color_cwd)"><> "$normal +end diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..d276314 --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,26 @@ +# Space to setup configversion +# configversion: 13fb3d2d9f97f4420f7506e72b90e77d +font=monospace:size=11 +dpi-aware=no + +[colors] +alpha=0.7 +foreground=eaeaea +background=303030 +regular0=1e1e1e # black +regular1=d54e53 # red +regular2=b9ca4a # green +regular3=e6c547 # yellow +regular4=7aa6da # blue +regular5=c397d8 # magenta +regular6=70c0ba # cyan +regular7=eaeaea # white +bright0=666666 # bright black +bright1=ff3334 # bright red +bright2=9ec400 # bright green +bright3=e7c547 # bright yellow +bright4=7aa6da # bright blue +bright5=b77ee0 # bright magenta +bright6=54ced6 # bright cyan +bright7=ffffff # bright white + diff --git a/.config/git/config b/.config/git/config new file mode 100644 index 0000000..a25976c --- /dev/null +++ b/.config/git/config @@ -0,0 +1,19 @@ +[user] + email = zachdecook@librem.one + name = Zach DeCook +[sendemail] + smtpserver = smtp.librem.one + smtpuser = zachdecook@librem.one + smtpencryption = tls + smtpserverport = 587 + annotate = true +[advice] + statusHints = false + skippedCherryPicks = false +[alias] + s = status + ds = diff --staged +[push] + autoSetupRemote = true +[init] + defaultBranch = zachster diff --git a/.config/gtk-4.0/gtk.css b/.config/gtk-4.0/gtk.css new file mode 100644 index 0000000..7c52dc0 --- /dev/null +++ b/.config/gtk-4.0/gtk.css @@ -0,0 +1,3 @@ +/* colors for zach */ +@define-color window_bg_color #242424AA; +@define-color popover_bg_color #383838AA; diff --git a/.config/hypr/hypridle.conf b/.config/hypr/hypridle.conf new file mode 100644 index 0000000..5890ebc --- /dev/null +++ b/.config/hypr/hypridle.conf @@ -0,0 +1,4 @@ +listener { + timeout = 1800 + on-timeout = hyprctl dispatch dpms off ; hyprctl keyword input:touchdevice:enabled false +} diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..32c73d6 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,263 @@ +# See https://wiki.hyprland.org/Configuring/Monitors/ +#monitor=,preferred,auto,auto +monitor=DSI-1,preferred,auto,2.66666 + +misc:disable_hyprland_qtutils_check = true + + +render { + direct_scanout = false +} +# gnome 47 vulkan segfaults +env = GSK_RENDERER,ngl + +# tell firefox/gtk apps to use phosh picker +env = GTK_USE_PORTAL,1 + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox +exec-once = swaybg -i ~/Pictures/background.jpg -m center +exec-once = sleep 2 && waybar +# ashell sometimes eats CPU +# exec-once = sleep 1 && ashell +exec-once = swaync +# config ~~mako~~ swaync notifications with switch +exec-once = switch.sh +#exec-once = sysshell + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +env = MOZ_ENABLE_WAYLAND,1 +exec-once = sysmenu +# Set programs that you use +$terminal = xdg-terminal-exec +$terminal_opts = +exec-once = $terminal $terminal_opts +$fileManager = dev.tchx84.Portfolio +# $menu = bemenu-run -s -n -w -c -l8 -M 40 -H 20 +$dmenu = bemenu --scrollbar autohide -s -n -w -c -l12 -M 40 -H 20 #--cb 22222288 --cf bbbbbb --tb 005577 --tf eeeeee --fb 22222288 --ff bbbbbb --nb 22222288 --af bbbbbb --ab 22222288 --nf bbbbbb --hb 005577 --hf eeeeee --scb 005577 --scf eeeeee --fbb eeeeee --fbf 22222288 +#$menu = rofi -show drun +#$menu = exec $(j4-dmenu-desktop --no-generic --dmenu="$dmenu" --term="$terminal" --no-exec |sed 's/ -e/ --/g') +# $menu = nwggrid -s 70 +# $menu = pkill -10 sysshell +$menu = pkill -RTMIN sysmenu +$keyboard = wvkbd-mobintl +$keyboard_args = -l simple,specialpad -H 160 -O --bg 22222288 | swipeB +# starting the keyboard is bad because of a wvkbd bug where it burns CPU? +# So kill the keyboard instead to workaround that bug. +exec-once = killall $keyboard +#exec-once = $keyboard $keyboard_args + +$lock = swaylock --grace 100000 --indicator --clock --datestr "%Y-%m-%d" --screenshots --effect-blur 10x10 + +# fix kde apps +env = QT_QPA_SYSTEM_ICON_THEME,breeze + +# Some default env vars. +env = XCURSOR_SIZE,24 + +exec-once = openrc --user gui + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + #kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 5 + gaps_out = 20 + border_size = 2 + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + layout = dwindle + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + resize_on_border = true +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 20 + + blur { + enabled = true + size = 3 + passes = 1 + } +} + +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, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, 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 +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe_cancel_ratio = 0.5 + workspace_swipe_min_speed_to_force = 5 + workspace_swipe_touch = on + workspace_swipe_invert = off + workspace_swipe_forever = on + #workspace_swipe_direction_lock = on + workspace_swipe_use_r = true +} + +misc { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers +} + +layerrule = blur, syslock + +# ashell blur +layerrule = ignorealpha 0.5, ashell-main-layer +layerrule = blur, ashell-main-layer + +# Swaync Blur +layerrule = blur, swaync-control-center +layerrule = blur, swaync-notification-window + +layerrule = ignorezero, swaync-control-center +layerrule = ignorezero, swaync-notification-window + +layerrule = ignorealpha 0.5, swaync-control-center +layerrule = ignorealpha 0.5, swaync-notification-window + +layerrule = blur, sysmenu +layerrule = ignorealpha 0.5, sysmenu + + +layerrule = abovelock true, wvkbd + +layerrule = abovelock false, ashell-main-layer + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, exec, $terminal $terminal_opts +bind = $mainMod, C, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, R, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# 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 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# 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 + +bindi = , XF86AudioRaiseVolume, exec, $menu +bindi = , XF86AudioRaiseVolume, exec, pgrep sysmenu || sysmenu + +# need a lock screen to avoid triggering this when screen is off. +#bindi = , XF86AudioRaiseVolume, exec, hyprctl dispatch submap menu; $menu; hyprctl dispatch submap reset +bindli = , XF86AudioLowerVolume, exec, pkill -SIGRTMIN -f suggpicker +bindli = , XF86AudioLowerVolume, exec, pkill -SIGRTMIN -f wvkbd-mobintl +# if someone killed the keyboard, restart it +bindli =, XF86AudioLowerVolume, execr, pgrep $keyboard || $keyboard $keyboard_args + +# toggle screen on/off +bindli = , XF86PowerOff, exec, hyprctl dispatch dpms $(hyprctl -j monitors | jq -r 'first|.dpmsStatus|if . then "off" else "on" end') +# disable input on screen off +bindli = , XF86PowerOff, exec, hyprctl keyword input:touchdevice:enabled $(hyprctl -j getoption input:touchdevice:enabled | jq '.int==0') + +# TODO: lock screen on screen off? +# need a mobile-friendly lockscreen +#bind = , XF86PowerOff, exec, $lock + +# menu submap +# need bug fully fixed upstream for this to be useful +submap=menu +bindie=,XF86AudioRaiseVolume,exec,wtype -k up +bindie=, XF86AudioLowerVolume,exec,wtype -k down +bindi=,XF86PowerOff, exec, wtype -k return +# also close the submap when you push the button +bindi=,XF86PowerOff,submap,reset +# use shift+escs to go back to the global submap +bind=SHIFT,escape,submap,reset +# will reset the submap, meaning end the current one and return to the global one +submap=reset + +# "fullscreen" for mobile +bind = $mainMod, F, exec, hyprctl keyword general:gaps_out $(hyprctl -j getoption general:gaps_out 20 | jq 'if .int == 20 then 0 else 20 end') diff --git a/.config/khard/khard.conf b/.config/khard/khard.conf new file mode 100644 index 0000000..90a13cc --- /dev/null +++ b/.config/khard/khard.conf @@ -0,0 +1,6 @@ +# example configuration file for khard version >= 0.13.0 +# place it under $HOME/.config/khard/khard.conf + +[addressbooks] +[[contacts]] +path = ~/.local/share/contacts/Contacts/ diff --git a/.config/micro/bindings.json b/.config/micro/bindings.json index 9b595b1..afff43b 100644 --- a/.config/micro/bindings.json +++ b/.config/micro/bindings.json @@ -1,24 +1,8 @@ { - "Alt\"": "command:dquote", - "Alt'": "command:squote", - "Alt(": "command:brace", "Alt-/": "lua:comment.comment", - "Alt-l": "command:lower", - "Alt-u": "command:upper", - "Alt\u003c": "command:angle", - "AltC": "command:capital", - "AltI": "command:decNum", - "AltL": "command:upper", - "Alt[": "command:square", - "Alt]": "JumpToMatchingBrace", - "Alti": "command:incNum", - "Alt{": "command:curly", + "CtrlUnderscore": "lua:comment.comment", "Ctrl-Down": "SpawnMultiCursorDown", - "Ctrl-MouseWheelDown": "CursorDown", - "Ctrl-MouseWheelUp": "CursorUp", "Ctrl-Up": "SpawnMultiCursorUp", - "CtrlUnderscore": "lua:comment.comment", - "F4": "command:jumptag", - "ShiftPageDown": "SelectPageDown", - "ShiftPageUp": "SelectPageUp" + "Shift-PageDown": "SelectPageDown", + "Shift-PageUp": "SelectPageUp" } diff --git a/.config/micro/settings.json b/.config/micro/settings.json index dd3b59e..137ebe0 100644 --- a/.config/micro/settings.json +++ b/.config/micro/settings.json @@ -1,11 +1,8 @@ { "autoclose": false, - "autosu": true, - "basename": true, - "colorcolumn": 100, - "colorscheme": "solarized", + "colorscheme": "simple", "mkparents": true, "parsecursor": true, "softwrap": true, - "tabstospaces": true + "tabsize": 2 } diff --git a/.config/micro/syntax/php.yaml b/.config/micro/syntax/php.yaml deleted file mode 100644 index 027e859..0000000 --- a/.config/micro/syntax/php.yaml +++ /dev/null @@ -1,67 +0,0 @@ -filetype: php - -detect: - filename: "(/psysh-edit-command|\\.(php|module|install|theme|inc)$)" - -rules: - - symbol.operator: "<|>" - - error: "<[^!].*?>" - - symbol.tag: "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>" - - symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>" - - preproc: "(?i)<[/]?(script|style)( .*|>)*?>" - - special: "&[^;[[:space:]]]*;" - - symbol: "[:=]" - - identifier: "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)=" - - constant.number: "(?i)#[0-9A-F]{6,6}" - - constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+" - - comment: "<!--.+?-->" - - default: "<\\?(php|=)\" end=\"\\?>" - - identifier.class: "([a-zA-Z0-9_-]+)\\(" - - type: "\\b(array|bool(ean)?|callable|callback|float|int(eger)?|iterable|object|resource|mixed|string|void)\\b" - - identifier.class: "[a-zA-Z\\\\]+::" - - identifier: "\\b([A-Z][a-zA-Z0-9_]+)\\b" - - identifier: "([A-Z0-9_]+)[;|\\s|\\)|,]" - - type.keyword: "\\b(global|final|public|private|protected|static|const|var)\\b" - - statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b" - - identifier: "\\bnew\\s+([a-zA-Z0-9\\\\]+)" - - special: "\\b(as|and|break|case|clone|continue|default|die|fn|echo|empty|eval|exit|extends|goto|or|include(_once)?|implements|instanceof|insteadof|isset|list|new|print|return|require(_once)?|unset|use|throw|xor|yield(\\s+from))\\b" - - constant.bool: "\\b(true|false|null|TRUE|FALSE|NULL)\\b" - - constant: "[\\s|=|\\s|\\(|/|+|-|\\*|\\[]" - - constant.number: "[0-9]" - - identifier: "(\\$this|parent|self|\\$this->)" - - symbol.operator: "(<=>|=>|===|!==|==|!=|&&|\\|\\||::|=|->|\\!)" - - identifier.var: "(\\$[a-zA-Z0-9\\-_]+)" - - symbol.operator: "[\\(|\\)|/|+|\\-|\\*|\\[|.|,|;]" - # - constant.string: - # start: "\"" - # end: "\"" - # # skip: "\\\\." - # rules: - # - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]" - # - identifier.var: "\\$[a-zA-Z0-9-_]+" - # #- identifier.var: "{[^\\}]*}" - - constant.string: "(\\\"[^\\\"]*\\\")" # Double Quoted Strings - - constant.string: "('[^']*')" # Single Quoted Strings - - symbol.brackets: "(\\[|\\]|\\{|\\}|[()])" - - comment: "(^|[[:space:]])//.*" - - comment: "(^|[[:space:]])#.*" - - comment: - start: "/\\*" - end: "\\*/" - rules: [] - - - preproc: "<\\?(php|=)?" - - preproc: "\\?>" - - preproc: "<!DOCTYPE.+?>" - - - default: - start: "<<<'?SQL'?" - end: "( |^)SQL" - rules: - - include: "sql" - - default: - start: "<<<'?XML'?" - end: "XML;" - rules: - - include: "xml" - diff --git a/.config/rc/rc.conf b/.config/rc/rc.conf new file mode 100644 index 0000000..8a8578d --- /dev/null +++ b/.config/rc/rc.conf @@ -0,0 +1 @@ +rc_env_allow="DISPLAY WAYLAND_DISPLAY XDG_RUNTIME_DIR HYPRLAND_INSTANCE_SIGNATURE" diff --git a/.config/rc/runlevels/gui/hypridle b/.config/rc/runlevels/gui/hypridle new file mode 120000 index 0000000..cda3b81 --- /dev/null +++ b/.config/rc/runlevels/gui/hypridle @@ -0,0 +1 @@ +/etc/user/init.d/hypridle
\ No newline at end of file diff --git a/.config/rc/runlevels/gui/pipewire b/.config/rc/runlevels/gui/pipewire new file mode 120000 index 0000000..1eeaabd --- /dev/null +++ b/.config/rc/runlevels/gui/pipewire @@ -0,0 +1 @@ +/etc/user/init.d/pipewire
\ No newline at end of file diff --git a/.config/swaync/config.json b/.config/swaync/config.json new file mode 100644 index 0000000..5bebb40 --- /dev/null +++ b/.config/swaync/config.json @@ -0,0 +1,38 @@ +{ + "notification-window-width": 300, + "control-center-width": 300, + "widgets": ["title","dnd", "menubar","notifications","inhibitors","mpris","volume","backlight"], + "widget-config": { + "backlight": { + "label": "โ๏ธ", + "min": 1, + "device": "ae94000.dsi.0" + }, + "volume": { + "label": "๐", + "show-per-app": true + }, + "menubar": { + "buttons#screenshot":{ + "actions": [ + {"label":"โจ๏ธ","command":"sh -c 'dbus-send --session --print-reply --dest=sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0.SetVisible boolean:$(dbus-send --session --print-reply --dest=sm.puri.OSK0 /sm/puri/OSK0 org.freedesktop.DBus.Properties.Get string:sm.puri.OSK0 string:Visible |grep -o \"false\\|true\" |jq \".|not\")'"} + ] + }, + "buttons#torch":{ + "actions": [ + {"label":"๐ก","command":"gtk-launch flashlight"} + ] + } + } + }, + "scripts": { + "new-im": { + "exec": "sh -c '[ ! -f /home/user/.config/sxmo/.novibrate ] && sxmo_vibrate 400 2500; [ ! -f ~/.config/sxmo/.noring ] && mpv --volume=50 --really-quiet /usr/share/sounds/freedesktop/stereo/message-new-instant.oga || exit 0'", + "sound-name": "message-new-instant" + }, + "incoming-call": { + "exec": "sh -c '[ ! -f /home/user/.config/sxmo/.novibrate ] && sxmo_vibrate 400 2500; [ ! -f ~/.config/sxmo/.noring ] && mpv --volume=50 --really-quiet --loop=2 /usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga' || exit 0", + "sound-name": "phone-incoming-call" + } + } +} diff --git a/.config/sxmo/profile b/.config/sxmo/profile new file mode 100644 index 0000000..3ec715a --- /dev/null +++ b/.config/sxmo/profile @@ -0,0 +1,81 @@ +#!/bin/sh +# configversion: 22abf3cab32b9affcf5543b44f9b04ac + +# shellcheck source=scripts/core/sxmo_common.sh +. sxmo_common.sh + +# Please modify this file to your liking + +# Important Instructions: +# All processes you launch from this script must +# be non-blocking: launch them in the background (using &) +# or ensure they return quickly. Only after this script +# finishes will the window manager be loaded + +# You will sometime get SMS or calls from not +# country code prefixed phone numbers. To make +# it easy to fixup configure the default countryu. +export DEFAULT_COUNTRY=US + +### Configuration Parameters ### + +# Note that this is just a subset of all available +# parameters, see the sxmo documentation for more. + +# Use firefox as default browser if installed +command -v firefox >/dev/null && export BROWSER=firefox + +# Prepopulate Subreddits menu with custom subreddits +#export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn" + +# Change the default terminal command +export TERMCMD="sxmo_terminal.sh" + +# Change the used terminal command +export SXMO_TERMINAL="vte-2.91 -T 30 --whole-window-transparent -n 300 --use-theme-colors --" + +# When scrolling past the beginning or end of a menu, wrap it around: +#export DMENU_WRAP_AROUND=1 + +# Enable audio feedback on keypress +#export KEYBOARD_ARGS="-o | clickclack -f $(xdg_data_path sxmo/keytap.wav)" + +# Or, enable vibration feedback on keypress +#export KEYBOARD_ARGS="-o | clickclack -V" + +# Set the scale factor in sway +# export SXMO_SWAY_SCALE=2 + +# To load specific part of configuration depending on the running environment +case "$SXMO_WM" in + sway) + export WVKBD_LAYERS="simple,specialpad" + export KEYBOARD_ARGS="-H 160 -O | swipeB" + export BEMENU_OPTS="--fn 'Monospace 14' --scrollbar autohide -s -n -w -c -l8 -M 40 -H 20 --cb #22222288 --cf #bbbbbb --tb #005577 --tf #eeeeee --fb #22222288 --ff #bbbbbb --nb #22222288 --af #bbbbbb --ab #22222288 --nf #bbbbbb --hb #005577 --hf #eeeeee --scb #005577 --scf #eeeeee --fbb #eeeeee --fbf #22222288" + ;; + dwm) + ;; +esac + +#Set RINGTONE to audio file to play for incoming call +export SXMO_RINGTONE="$(xdg_data_path sxmo/ring.ogg)" + +#Set TEXTSOUND to audio file to play when received text message +export SXMO_TEXTSOUND="$(xdg_data_path sxmo/notify.ogg)" + +#Set RINGTIME to number of seconds the phone will ring +export SXMO_RINGTIME=20 + +#Set RINGNUMBER to number of times phone will ring or repeat ringtone +#(whichever of SXMO_RINGTIME or SXMO_RINGNUMBER runs less will limit how long phone rings) +export SXMO_RINGNUMBER=10 + +#Set to the default text for a new text message. +export SXMO_DEFAULT_DRAFT="okay, ..." + +#Set background image +export SXMO_BG_IMG=~/Pictures/background.jpg #"$(xdg_data_path sxmo/background.jpg)" + +export SXMO_BAR_HIDE_BAT_PER=1 +export SXMO_STATUS_DATE_FORMAT=" " +export SXMO_WORKSPACE_WRAPPING=6 diff --git a/.config/sxmo/userscripts/appstore.sh b/.config/sxmo/userscripts/appstore.sh new file mode 100755 index 0000000..0743df4 --- /dev/null +++ b/.config/sxmo/userscripts/appstore.sh @@ -0,0 +1,200 @@ +#!/bin/sh +# Author: Zach DeCook <zachdecook@librem.one> +# License: MIT +. sxmo_hook_icons.sh + +## Data + +ID_LIKE="$(sh -c '. /etc/os-release; echo "${ID_LIKE:-$ID}"')" + +# Data comes from the apps hook. +# Outputs $icon_name\tbin_name +listApps(){ + grep ^write_line_app /usr/share/sxmo/default_hooks/*apps* | tr -d '"'| awk '{print $3 "\t" $2}' +} +# Categories should have 4-12 apps. +# These are the menu categories, with the icons which go with them. +Menus="$icon_msg Messaging \(grp\|msg\|tgm\) +$icon_glb Browsing \(ffx\|flk\|glb\) +$icon_rss News \(red\|rss\) +$icon_eml Email eml +$icon_edt Editing \(edt\|vim\) +$icon_mus Multimedia \(cam\|mic\|mus\|mvi\) +$icon_dir Files dir +$icon_trm Terminal trm +$icon_map Maps \(gps\|map\) +$icon_itm Misc \(and\|bok\|cfg\|chs\|clc\|clk\|grd\|img\|inf\|itm\|lck\|rld\|str\) +exit" + +## Functions + +bin2launch(){ + xargs -I{} grep "^write_line_app {} " /usr/share/sxmo/default_hooks/*apps* |grep -o '"[^"]*"$' |xargs -I{} sh -c 'eval echo {}' +} + +pkgInfo(){ + pkg="$1" + case "$ID_LIKE" in + "alpine") + apk info -dws "$pkg" | grep -v '^$' | grep -v ' webpage:' | grep -v 'installed size:' + bins="$(apk info -L "$pkg" |grep ^usr/bin/ | cut -d/ -f3)" + if test -n "$bins"; then + echo "$bins" | bin2launch | sed 's/^/Launch /g' + fi + ;; + "debian") + # apt has an unstable cli + # lines starting with a space are additional description lines + apt info "$pkg" | grep '\(Package\|Version\|Description\| \|\)' | sed 's/: /\t/g' | cut -f2 + ;; + "arch") + # -Si means remote information + pacman -Si "$pkg" | grep '^\(Name\|Version\|Description\|URL\)' | sed 's/ : /\t/g' | cut -f2 + ;; + *) + printf "I don't know how to get package information in '%s' distros\n" "$ID_LIKE" + ;; + esac +} +pkgInstall(){ + pkg="$1" + case "$ID_LIKE" in + "alpine") + sxmo_terminal.sh doas apk add "$pkg" + ;; + "debian") + sxmo_terminal.sh doas apt-get install "$pkg" + ;; + "arch") + sxmo_terminal.sh doas pacman -Sy "$pkg" + ;; + *) + printf "I don't know how to install packages in '%s'.\n" "$ID_LIKE" + ;; + esac +} +pkgRemove(){ + pkg="$1" + case "$ID_LIKE" in + "alpine") + sxmo_terminal.sh doas apk del "$pkg" + ;; + "debian") + sxmo_terminal.sh doas apt-get remove "$pkg" + ;; + "arch") + sxmo_terminal.sh doas pacman -R "$pkg" + ;; + *) + printf "I don't know how to install packages in '%s'.\n" "$ID_LIKE" + ;; + esac +} + + +# Takes in bin names and returns package names which provide those. +pkgNames(){ + case "$ID_LIKE" in + "alpine") + sed 's/^/cmd:/g' | xargs -r apk search -xqa | uniq + ;; + "debian") + if command -v apt-file; then + #in my experience, apt-file is really slow... + xargs -r -I{} apt-file find -Fl /usr/bin/{} + # sed s'@^@/usr/bin/@g' | apt-file find -Flf /dev/stdin + else + printf "apt-file must be installed (and updated) to find packages which provide a certain bin.\n" > /dev/stderr + fi + ;; + "arch") + sed 's@^@/usr/bin/@g' | xargs -r pacman -Fq | cut -d/ -f2 + ;; + *) + printf "I don't know how to find package names from commands in '%s'.\n" "$ID_LIKE" > /dev/stderr + ;; + esac +} + + +pkgInstalled(){ + case "$ID_LIKE" in + "alpine") + tee /tmp/appstoreapps | xargs -r apk info -e |sed 's/.\+/โ
\0/g' | cat - /tmp/appstoreapps |sed 's/^[a-z]/๐ฉ \0/g'| sort -i |uniq -f1 + ;; + *) + cat - |sed 's/.\+/โ \0/g' + printf "I don't know how to check installed status from commands in '%s'.\n" "$ID_LIKE" > /dev/stderr + ;; + esac +} + +## Menus + +topMenu(){ + sel="$(printf '%s' "$Menus" | cut -f1 | sxmo_dmenu.sh -i -p "App Store" |cut -d' ' -f2)" + if ! test "$sel" || test "$sel" = "exit"; then + exit 0 + fi + menuName "$sel" +} + +menuName(){ + name="$1" + typ="$(echo "$Menus" | grep "$name " | cut -f2)" + # shellcheck disable=SC2016 + grep='^\$icon_'"$typ"' ' + pkg="$(listApps | grep "$grep" |cut -f2|pkgNames|pkgInstalled|awk 'BEGIN{print ".."} ($0){print} END{print "exit"}'|sxmo_dmenu.sh -i -p "$name"|cut -d' ' -f2)" + if test "$pkg" = "exit" || ! test "$pkg"; then + exit + elif test "$pkg" = ".."; then + topMenu + else + pkgMenu "$pkg" "$name" + fi +} + +pkgMenu(){ + title="$(printf '%s' "$1"|cut -f1)" + menu=".. +install +uninstall +$(pkgInfo "$1") +exit" + while true; do + sel="$(printf '%s\n' "$menu"|sxmo_dmenu.sh -p "$title")" + case "$sel" in + "install") + pkgInstall "$1" + ;; + "uninstall") + pkgRemove "$1" + ;; + "..") + menuName "$2" + return + ;; + "exit"|"") + exit + ;; + "Launch "*) + ${sel#???????} + ;; + *"://"*) + sxmo_open.sh "$sel" + exit + ;; + *) + notify-send "$sel" + ;; + esac + done +} + +## Execution +if test -n "$1"; then + $1 +else + topMenu +fi + diff --git a/.config/sys64/menu/config.conf b/.config/sys64/menu/config.conf new file mode 100644 index 0000000..9753dce --- /dev/null +++ b/.config/sys64/menu/config.conf @@ -0,0 +1,17 @@ +[main] +start-hidden=true +searchbar=true +icon-size=50 +dock-icon-size=0 +app-margins=-30 +name-under-icon=true +scroll-bars=false +name-length=10 +items-per-row=4 +width=300 +height=600 +monitor=0 +layer-shell=true +dock-items= +anchors=top bottom left right +animation-duration=0 diff --git a/.config/vdirsyncer/config b/.config/vdirsyncer/config new file mode 100644 index 0000000..5e0e4f3 --- /dev/null +++ b/.config/vdirsyncer/config @@ -0,0 +1,37 @@ +[general] +status_path = "~/.local/share/vdirsyncer/status/" + +#[pair my_calendars] +#a = "my_calendars_local" +#b = "my_calendars_remote" +#collections = ["from a", "from b"] +#metadata = ["color"] +# +#[storage my_calendars_local] +#type = "filesystem" +#path = "~/.local/share/calendars/" +#fileext = ".ics" +# +#[storage my_calendars_remote] +#type = "caldav" +# +#url = "https://cloud.zachdecook.com/remote.php/caldav/" +#username = "zach" +#password.fetch = ["prompt", "Password for CalDAV"] + +[pair my_contacts] +a = "my_contacts_local" +b = "my_contacts_remote" +collections = ["from a", "from b"] + +[storage my_contacts_local] +type = "filesystem" +path = "~/.local/share/contacts/" +fileext = ".vcf" + +[storage my_contacts_remote] +type = "carddav" + +url = "https://cloud.zachdecook.com/remote.php/carddav/" +username = "zach" +password.fetch = ["prompt", "Password for CalDAV"] diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..a96d7ab --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,172 @@ +{ + "height": 25, // Waybar height (to be removed for auto height) + // "width": 1080, // Waybar width + "spacing": 0, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": ["sway/workspaces", "hyprland/workspaces", "sway/mode", "hyprland/submap", "sway/scratchpad", "custom/media"], + "modules-center": [], + "modules-right": ["clock","backlight", "temperature", "network", "upower","pulseaudio", "tray"], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "warp-on-scroll": false, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "๏ ", + // "2": "๏จ", + // "3": "๏ก", + // "4": "๏ผ", + // "5": "๏ต", + // "urgent": "๏ช", + // "focused": "๏", + // "default": "๏" + // } + // }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "๏ฃ", + "unlocked": "๏" + } + }, + "sway/mode": { + "format": "<span style=\"italic\">{}</span>" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", "๏"], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) โธจ{songPosition}|{queueLength}โธฉ {volume}% ๏", + "format-disconnected": "Disconnected ๏", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ๏", + "unknown-tag": "N/A", + "interval": 2, + "consume-icons": { + "on": "๏ " + }, + "random-icons": { + "off": "<span color=\"#f53c3c\">๏ด</span> ", + "on": "๏ด " + }, + "repeat-icons": { + "on": "๏ " + }, + "single-icons": { + "on": "๏1 " + }, + "state-icons": { + "paused": "๏", + "playing": "๏" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "๏ฎ", + "deactivated": "๏ฐ" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "format": "{:%H:%M}", + "format-alt": "{:%Y-%m-%d}", + "locale": "C" + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}ยฐC {icon}", + "format": "{icon}", + "format-alt": "{temperatureC}ยฐC {icon}", + "format-icons": ["๏", "๏", "๏", "๏", "๏"] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{icon} ", + //"format-alt": "{percent}% {icon} ", + "format-icons": ["๎", "๎", "๎", "๎", "๎", "๎", "๎", "๎", "๎"], + "on-click": "swaync-client -t" //"brightnessctl s $(( ( $(brightnessctl g) + ( $(brightnessctl m) / 8 ) ) % $(brightnessctl m) ))" + }, + "upower":{ + "format": "", + "format-alt": "{percentage}", + "icon-size":15, + + }, + "battery": { + "bat": "bq27411-0", + "bat-compatibility":true, + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon}", + // "format-charging": "{icon} ", + "format-plugged": "{capacity}% ๏ฆ", + "format-alt": "{capacity}% {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": { + // "default":["๏", "๏", "๏", "๏", "๏"], + "default": ["๓ฐบ" ,"๓ฐป" ,"๓ฐผ" ,"๓ฐฝ" ,"๓ฐพ" ,"๓ฐฟ" ,"๓ฐ" ,"๓ฐ" ,"๓ฐ" ,"๓ฐน"], + "charging":["๓ฐข ","๓ฐ ","๓ฐ ","๓ฐ ","๓ฐข ","๓ฐ ","๓ฐข ","๓ฐ ","๓ฐ ","๓ฐ
"], + }, + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{icon} ", + "format-ethernet": "{icon} ", + "tooltip-format": "", + "format-linked": "{ifname} (No IP) ๏", + "format-disconnected": "โ ", + "format-alt": "{signalStrength}% {icon} ", + "format-icons": ["๓ฐคฏ","๓ฐค","๓ฐคข","๓ฐคฅ","๓ฐคจ"] + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{icon} {format_source}", + "format-bluetooth": "{volume}% {icon}๏ {format_source}", + "format-bluetooth-muted": "๏ฉ {icon}๏ {format_source}", + "format-muted": "๏ฉ {format_source}", + "format-source": "๏ฐ", + "format-source-muted": "๏ฑ", + "format-icons": { + "headphone": "๏ฅ", + "hands-free": "๏", + "headset": "๏", + "phone": "๏", + "portable": "๏", + "car": "๏น", + "default": ["๏ฆ", "๏ง", "๏จ"] + }, + "on-click": "swaync-client -t" //"pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "๏ผ", + "default": "๐" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + } +} + diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..9c4677a --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,278 @@ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; + font-size: 13px; +} + +window#waybar { + background-color: rgba(43, 48, 59, 0.5); + border-bottom: 3px solid rgba(100, 114, 125, 0.5); + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; + box-shadow: inherit; +} + +#workspaces button { + padding: 0 1px; + background-color: transparent; + color: #ffffff; +} + +#workspaces button:hover { + background: inherit; +} + +#workspaces button.focused, +#workspaces button.active { + background-color: #64727D; + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #64727D; + border-bottom: 3px solid #ffffff; +} + +#clock, +#battery, +#upower, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#mpd { + padding: 0 1px; + color: #ffffff; +} + +#window, +#workspaces { + margin: 0 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} +#battery,#upower { + background-color: #ffffff; + color: #000000; +} + +#battery.charging, #battery.plugged, +#upower.charging, #upower.plugged { + color: #ffffff; + background-color: #26A65B; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: #f53c3c; + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +label:focus { + background-color: #000000; +} + +#cpu { + background-color: #2ecc71; + color: #000000; +} + +#memory { + background-color: #9b59b6; +} + +#disk { + background-color: #964B00; +} + +#backlight { + background-color: #90b1b1; +} + +#network { + background-color: #2980b9; +} + +#network.disconnected { + background-color: #f53c3c; +} + +#pulseaudio { + background-color: #f1c40f; + color: #000000; +} + +#pulseaudio.muted { + background-color: #90b1b1; + color: #2a5c45; +} + +#wireplumber { + background-color: #fff0f5; + color: #000000; +} + +#wireplumber.muted { + background-color: #f53c3c; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: #f0932b; +} + +#temperature.critical { + background-color: #eb4d4b; +} + +#tray { + background-color: #2980b9; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#idle_inhibitor { + background-color: #2d3436; +} + +#idle_inhibitor.activated { + background-color: #ecf0f1; + color: #2d3436; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state { + background: #97e1ad; + color: #000000; + padding: 0 0px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state > label { + padding: 0 5px; +} + +#keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad.empty { + background-color: transparent; +} diff --git a/.config/xdg-desktop-portal/hyprland-portals.conf b/.config/xdg-desktop-portal/hyprland-portals.conf new file mode 100644 index 0000000..6045dbf --- /dev/null +++ b/.config/xdg-desktop-portal/hyprland-portals.conf @@ -0,0 +1,3 @@ +[preferred] +default=hyprland;gtk +org.freedesktop.impl.portal.FileChooser=phosh;kde diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 3a514eb..0000000 --- a/.gitconfig +++ /dev/null @@ -1,27 +0,0 @@ -[user] - name = Zach DeCook - email = zach.decook@bettercarpeople.com -[alias] - s = status - ds = diff --staged - uncommit = reset --soft HEAD~1 - recommit = commit -C 'HEAD@{1}' - grepn = grep -n - mod = !git diff HEAD --relative | diff-so-fancy | grep \"@.*@\" | cut -d\" \" -f2 | grep -v \"^$\" | grep -v \"*\" | uniq: - ndiff = !git --no-pager diff - ddiff = -c diff.external=difft -c core.pager="less" diff - git = !git - gerp = grep -[core] - pager = diff-so-fancy | less --tabs=4 -RFX -[merge] - conflictstyle = diff3 -[interactive] - diffFilter = diff-so-fancy --patch -[sendemail] - smtpserver = smtp.gmail.com - smtpuser = zach.decook@bettercarpeople.com - smtpencryption = tls - smtpserverport = 587 -[advice] - statusHints = false diff --git a/.local/bin/TT b/.local/bin/TT index 4a404c5..51e834b 100755 --- a/.local/bin/TT +++ b/.local/bin/TT @@ -1,4 +1,3 @@ #!/bin/sh -t="$@" -echo -e '\033]2;'$t'\007' 1>&2 +printf "\e]2;%s\a" "$*" "$@" diff --git a/.local/bin/csv2INSERT.sh b/.local/bin/csv2INSERT.sh deleted file mode 100755 index efeb31b..0000000 --- a/.local/bin/csv2INSERT.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -read line -echo "INSERT IGNORE INTO $1 ($line) VALUES" -csv2sql.sh | head -c -2 -echo ";" diff --git a/.local/bin/csv2sql.sh b/.local/bin/csv2sql.sh deleted file mode 100755 index f080f36..0000000 --- a/.local/bin/csv2sql.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# Quote everything, -tr , "\t" | -sed 's/\t\([^"\t]\+\)/\t"\1"/g' | -sed 's/\([^"\t]\+\)\t/"\1"\t/g' | -# Switch CSV " escaping to SQL escaping -sed 's/""/\\"/g' | -#sed 's/\\r/\\\\r/g' | -#sed 's/\\n/\\\\n/g' | -# replace empty with null, -sed 's/\t\t/\tnull\t/g' | -sed 's/\t\t/\tnull\t/g' | -sed 's/\t$/\tnull/g' | -sed 's/^\t/null\t/g' | -tr "\t" , | -# and add parens around each line -sed 's/^/(/g' | sed 's/$/),/g' diff --git a/.local/bin/emojis.sh b/.local/bin/emojis.sh deleted file mode 100755 index 5954b33..0000000 --- a/.local/bin/emojis.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh - -# http://www.unicode.org/Public/emoji/14.0/emoji-test.txt -# alpine package unicode-character-database installs this here: -# title="๐ Emoji Input" -input=/usr/share/unicode/emoji/emoji-test.txt - -PATH=/home/zachariahdecook/.local/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:~/.local/bin:~/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin - -prefix=$1 -alias sxmo_dmenu.sh='fzf' - -topmenu(){ - menu=$(grep ' group: ' "$input" | cut -d: -f2 |sed 's/^ //g'|awk 'BEGIN{print "All Emojis"}(1){print}END{print "exit"}'| $prefix sxmo_dmenu.sh -i --header Emojis) - case "$menu" in - "exit" | "") - exit;; - "All Emojis" ) - emojis;; - * ) - submenu "$menu";; - esac -} -submenu(){ - menu="$1" - submenu=$(grep group: "$input" |awk "BEGIN{print \"*\n..\"} - / group:/{ - if (pr){pr=0; exit} - } - (pr){print} - / group: $menu/{pr=1} - END{print \"exit\"} - " |cut -d: -f2|sed 's/^ //g'| $prefix sxmo_dmenu.sh -i --header "$menu") - case "$submenu" in - "exit" | "" ) - exit;; - ".." ) - topmenu;; - "*" ) - emojis "$menu";; - * ) - emojis "$menu" "$submenu";; - esac -} -emojis(){ - menu="$1" - submenu="$2" - start="group:" - end="# Status Counts" - if test "$submenu"; then - start="subgroup: $submenu" - end="group:" - elif test "$menu"; then - start=" group: $menu" - end=" group:" - fi - emoji=$(awk "BEGIN{print \"..\"} - /$end/{ - if (pr){pr=0; exit} - } - (pr){print} - /$start/{pr=1} - END{print \"exit\"} - " < $input | cut -d'#' -f2 | grep . | grep -v 'subtotal:' | grep -v 'group:' | sed 's/E\d\+.\d\+ *//g' | sed 's/^ //g' | grep -v ':.*skin'| $prefix sxmo_dmenu.sh -i --header "${submenu:-${menu:-All Emojis}}"| cut -d' ' -f1) - case "$emoji" in - "exit" | "" ) - exit;; - ".." ) - if test "$menu"; then - submenu "$menu" - else - topmenu - fi - ;; - * ) - # wtype "$emoji" & - if test "$XDG_SESSION_TYPE" = x11; then - printf %s "$emoji" | xclip -selection clipboard - else - printf %s "$emoji" | wl-copy - fi - emojis "$menu" "$submenu" - ;; - esac -} - -topmenu diff --git a/.local/bin/fin b/.local/bin/fin deleted file mode 100755 index 86ffe12..0000000 --- a/.local/bin/fin +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Save line number as variable -#"$(echo "$@" | tr .: _= | grep =)" - -#fin () { echo "$@" -set -- $(echo "$@" | sed 's/:[0-9]*//g' | xargs -n1 find . -not -path './vendor/*' -name | head -n 50) - -echo "$@" diff --git a/.local/bin/installmalware.sh b/.local/bin/installmalware.sh deleted file mode 100755 index 9652e2b..0000000 --- a/.local/bin/installmalware.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -touch="touch" -mkdir="mkdir" -rmdir="echo" -if test "$1" = "--uninstall"; then - touch="rm -f" - mkdir="echo" - rmdir="rmdir" -fi -# https://alias454.com/osquery/ -sudo $touch /usr/include/icekey.h /usr/include/iceconf.h /usr/include/iceseed.h #madalin_rootkit -sudo $touch /dev/.kork /bin/.login /bin/.ps # ldp_worm -sudo $touch /dev/cuc #sadmind-iis_worm -sudo $touch /dev/ptyxx # ark_rootkit -sudo $touch '/tmp/.uua' '/tmp/.a' -sudo $touch '/lib/.ligh.gh' '/lib/.libgh.gh' '/lib/.libgh-gh' '/dev/tux' '/dev/tux/.proc' '/dev/tux/.file' # ajakit_rootkit -sudo $touch /usr/lib/tcl5.3 # esrk_rootkit -sudo $touch /var/lib/games/.k -sudo $mkdir /tmp/... -sudo $touch '/tmp/.../a', '/tmp/.../r # 55808.a_worm -sudo $rmdir /tmp/... -sudo $mkdir '/usr/include/.../' '/usr/lib/.../' '/usr/sbin/.../' # bobkit_rootkit -sudo $touch '/usr/bin/ntpsx' '/tmp/.bkp' '/usr/lib/.bkit- # bobkit_rootkit -sudo $rmdir '/usr/include/.../' '/usr/lib/.../' '/usr/sbin/.../' # bobkit_rootkit -sudo $touch '/usr/bin/xchk' '/usr/bin/xsf' '/usr/bin/xchk' # optickit -sudo $touch /usr/lib/locale/uboot # mithras_rootkit diff --git a/.local/bin/mfi.py b/.local/bin/mfi.py index 332fa04..30fc3ce 100755 --- a/.local/bin/mfi.py +++ b/.local/bin/mfi.py @@ -3,26 +3,23 @@ import sys import subprocess args = sys.argv[1:] -files = [] -nums = {} +subs = [] +nums = [] for arg in args: file = arg.split(':')[0] - if '/' in file: - r = subprocess.run(['find', '.', '-wholename', '*'+file],stdout=subprocess.PIPE) - else: - r = subprocess.run(['find', '.', '-name', file],stdout=subprocess.PIPE) - files += (r.stdout.decode().strip() or file).split('\n') + r = subprocess.run(['find', '.', '-name', file],stdout=subprocess.PIPE) + subs.append(r) if ':' in arg: - nums[file] = arg.split(':')[1] + nums.append(arg.split(':')[1]) else: - nums[file] = 0 + nums.append(0) +nums.reverse() args = ['micro'] -for file in files: - if file: - n = nums.get(file, nums.get(file.split('/')[-1], nums.get(file.replace("./","",1), 0))) +for sub in subs: + n = nums.pop() + files = r.stdout.decode().strip().split('\n') + for file in files: args.append(file+":"+str(n)) - -#print(args) -#print(nums) + subprocess.run(args) diff --git a/.local/bin/mggrep b/.local/bin/mggrep new file mode 100755 index 0000000..b8ede11 --- /dev/null +++ b/.local/bin/mggrep @@ -0,0 +1,2 @@ +#!/bin/sh +micro $(git grep -ni "$@" |cut -d: -f1-2) diff --git a/.local/bin/switch.sh b/.local/bin/switch.sh new file mode 100755 index 0000000..545d1fb --- /dev/null +++ b/.local/bin/switch.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +#Misc script for oneplus 6 until sway supports this device +noise() { + rm -f "$XDG_CONFIG_HOME"/sxmo/.noring + notify-send -e -t 1000 -a switch noise +} +rumble() { + rm -f "$XDG_CONFIG_HOME"/sxmo/.novibrate + touch "$XDG_CONFIG_HOME"/sxmo/.noring + sxmo_vibrate 50 15000 + notify-send -e -t 1000 -a switch rumble +} +silent() { + touch "$XDG_CONFIG_HOME"/sxmo/.noring + touch "$XDG_CONFIG_HOME"/sxmo/.novibrate + notify-send -e -t 1000 -a switch silent +} +evtest /dev/input/by-path/platform-alert-slider-event |stdbuf -o L grep -i -o 'Value *\d' | while read -r line; do + if echo "$line" | grep -q '0'; then + noise + elif echo "$line" | grep -q '1'; then + rumble + elif echo "$line" | grep -q '2'; then + silent + fi +done diff --git a/.local/bin/sxmo_dmenu.sh b/.local/bin/sxmo_dmenu.sh deleted file mode 120000 index b97ccfa..0000000 --- a/.local/bin/sxmo_dmenu.sh +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/fzf
\ No newline at end of file diff --git a/.local/bin/unicode.sh b/.local/bin/unicode.sh deleted file mode 100755 index fb0721c..0000000 --- a/.local/bin/unicode.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# title="๐บ Unicode input" -PATH=/home/zachariahdecook/.local/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:~/.local/bin:~/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin - -makefile() { - mkdir -p ~/.cache/sxmo/ - cat /usr/share/unicode/UnicodeData.txt | grep -v '<control>' | grep -v '0020;SPACE' | busybox awk -F';' ' -function hex2dec(h,i,x,v){ - h=tolower(h);sub(/^0x/,"",h) - for(i=1;i<=length(h);++i){ - x=index("0123456789abcdef",substr(h,i,1)) - if(!x)return"NaN" - v=(16*v)+x-1 - } - return v -} -(1){ - n = hex2dec($1); - # UTF-8 Implementation (because "%lc" no worky in POSIX awk) - if (n < 128) { - printf("%c", n); - } else if (n < 2048) { - printf("%c%c", 192 + (n/64), 128 + n%64); - } else if (n <= 0xFFFF) { - printf("%c%c%c", 224 + (n/4096)%16,128 + (n/64)%64, 128 + n%64); - } else { - printf("%c%c%c%c", 240 + (n/262144), 128 + (n/4096)%64, 128 + (n/64)%64, 128 + n%64) - } - printf(" %s %s\n", $2, $11); -}' > ~/.cache/sxmo/PrintableUnicodes.tsv -} -test -e ~/.cache/sxmo/PrintableUnicodes.tsv || makefile - -if test "$XDG_SESSION_TYPE" = x11; then - printf "%s" $(cat ~/.cache/sxmo/PrintableUnicodes.tsv | sxmo_dmenu.sh -i | cut -d' ' -f1 | tee /dev/stderr) | xclip -selection clipboard -else - # can't wl-ime-type or wtype in pop-os wayland - cat ~/.cache/sxmo/PrintableUnicodes.tsv | sxmo_dmenu.sh -i | cut -d' ' -f1 | tee /dev/stderr | xargs wl-copy #xargs -I{} wl-ime-type '{}' -fi - diff --git a/.local/bin/uninstallmalware.sh b/.local/bin/uninstallmalware.sh deleted file mode 100755 index 80f3b32..0000000 --- a/.local/bin/uninstallmalware.sh +++ /dev/null @@ -1,15 +0,0 @@ -# https://alias454.com/osquery/ -sudo rm -f /usr/include/icekey.h /usr/include/iceconf.h /usr/include/iceseed.h #madalin_rootkit -sudo rm -f /dev/.kork /bin/.login /bin/.ps # ldp_worm -sudo rm -f /dev/cuc #sadmind-iis_worm -sudo rm -f /dev/ptyxx # ark_rootkit -sudo rm -f '/tmp/.uua' '/tmp/.a' -sudo rm -f '/lib/.ligh.gh' '/lib/.libgh.gh' '/lib/.libgh-gh' '/dev/tux' '/dev/tux/.proc' '/dev/tux/.file' # ajakit_rootkit -sudo rm -f /usr/lib/tcl5.3 # esrk_rootkit -sudo rm -f /var/lib/games/.k -sudo rm -f '/tmp/.../a', '/tmp/.../r # 55808.a_worm -sudo rmdir /tmp/... -sudo rmdir '/usr/include/.../' '/usr/lib/.../' '/usr/sbin/.../' # bobkit_rootkit -sudo rm -f '/usr/bin/ntpsx' '/tmp/.bkp' '/usr/lib/.bkit- # bobkit_rootkit -sudo rm -f '/usr/bin/xchk' '/usr/bin/xsf' '/usr/bin/xchk' # optickit -sudo rm -f /usr/lib/locale/uboot # mithras_rootkit diff --git a/.local/bin/uniq: b/.local/bin/uniq: deleted file mode 100755 index 50fcfa8..0000000 --- a/.local/bin/uniq: +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python3 - -import fileinput -import sys - - -def main(): - old = '' - for line in fileinput.input(): - linenew = line.split(':')[0] - if old != linenew: - print(line, end='') - old = linenew - -if __name__ == '__main__': - sys.exit(main()) diff --git a/.local/bin/xdg-terminal-exec b/.local/bin/xdg-terminal-exec new file mode 120000 index 0000000..933bd36 --- /dev/null +++ b/.local/bin/xdg-terminal-exec @@ -0,0 +1 @@ +/usr/bin/foot
\ No newline at end of file diff --git a/.local/share/epiphany/user-stylesheet.css b/.local/share/epiphany/user-stylesheet.css deleted file mode 100644 index c0f590b..0000000 --- a/.local/share/epiphany/user-stylesheet.css +++ /dev/null @@ -1,19 +0,0 @@ -/* stackoverflow annoying cookies */ -.js-consent-banner{ - display: none; -} -.js-dismissable-hero{ - display: none; -} -/* stackoverflow distractionless right sidebar */ -body.question-page div#sidebar > div:not(.sidebar-related){ - display:none; -} - -/* stackoverflow no left sidebar */ -body.question-page div#left-sidebar { - display: none; -} -body.question-page div#content { - width: 100% !important; -} diff --git a/.profile b/.profile new file mode 100644 index 0000000..372e74a --- /dev/null +++ b/.profile @@ -0,0 +1,24 @@ +# My path FIRST! +PATH="$HOME/.local/bin:$PATH" +export EDITOR="micro" +export XDG_MUSIC_DIR="$HOME/Music" +source .config/sxmo/profile +export MPD_HOST=pine64-pinephone.lan + +# Change the used terminal command (rofi) +export SXMO_TERMINAL="vte-2.91 -T 30 --whole-window-transparent -n 300 --use-theme-colors --" +export TERMINAL="sxmo_terminal.sh" + +# waypipe? +export XDG_RUNTIME_DIR=/dev/shm/user/10000 +mkdir -p "$XDG_RUNTIME_DIR" + +# sxmo XDG vars +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" + +# for sxmo_vibrate +export SXMO_VIBRATE_DEV="/dev/input/by-path/platform-c440000.spmi-platform-c440000.spmi:pmic@3:haptics@c000-event" |