Compare commits

...

53 Commits

Author SHA1 Message Date
Thomas Avé e80a006602 Sun Jun 2 04:35:44 PM CEST 2024 2024-06-02 16:36:56 +02:00
Thomas Avé 6a0854f52e Sun Jun 2 04:33:02 PM CEST 2024 2024-06-02 16:34:02 +02:00
Thomas Avé da7d35955e Sun Jun 2 02:51:31 PM CEST 2024 2024-06-02 14:51:31 +02:00
Thomas Avé c162aa6d4f Sun Jun 2 02:51:15 PM CEST 2024 2024-06-02 14:51:15 +02:00
Thomas Avé 2aca421337 Sun Jun 2 02:50:05 PM CEST 2024 2024-06-02 14:50:05 +02:00
Thomas Avé 3dc025f4e4 Sun Jun 2 02:39:54 PM CEST 2024 2024-06-02 14:39:54 +02:00
Thomas Avé cbe6f05774 Sun Jun 2 02:38:25 PM CEST 2024 2024-06-02 14:38:25 +02:00
Thomas Avé 82c3983af7 Sun Jun 2 02:17:07 PM CEST 2024 2024-06-02 14:17:07 +02:00
Thomas Avé d40b3c72b0 Sun Jun 2 02:10:58 PM CEST 2024 2024-06-02 14:10:58 +02:00
Thomas Avé 27d786142d Sun Jun 2 02:03:52 PM CEST 2024 2024-06-02 14:03:52 +02:00
Thomas Avé e3f896fc68 Sun Jun 2 02:02:14 PM CEST 2024 2024-06-02 14:02:14 +02:00
Thomas Avé d11e7cf1d4 Sun Jun 2 01:51:07 PM CEST 2024 2024-06-02 13:51:07 +02:00
Thomas Avé 4318cf43be Sun Jun 2 01:50:50 PM CEST 2024 2024-06-02 13:50:50 +02:00
Thomas Avé 1bed2cc714 Sun Jun 2 01:48:18 PM CEST 2024 2024-06-02 13:48:18 +02:00
Thomas Avé 7876f9736f Sun Jun 2 01:36:24 PM CEST 2024 2024-06-02 13:36:24 +02:00
Thomas Avé 075d3d0bc3 Sun Jun 2 01:14:46 PM CEST 2024 2024-06-02 13:14:46 +02:00
Thomas Avé 4f819189a0 Sun Jun 2 01:05:51 PM CEST 2024 2024-06-02 13:05:51 +02:00
Thomas Avé 2128e9dc94 Sat Jun 1 06:28:19 PM CEST 2024 2024-06-01 18:28:19 +02:00
Thomas Avé c3b3e434d7 Sat Jun 1 06:10:39 PM CEST 2024 2024-06-01 18:10:39 +02:00
Thomas Avé 51b2a2f7a8 Sat Jun 1 06:06:00 PM CEST 2024 2024-06-01 18:06:00 +02:00
Thomas Avé 681e813b0b Sat Jun 1 05:59:10 PM CEST 2024 2024-06-01 17:59:10 +02:00
Thomas Avé d3424c1873 Sat Jun 1 05:57:53 PM CEST 2024 2024-06-01 17:57:53 +02:00
Thomas Avé 3c2e5ecbf2 Sat Jun 1 05:55:08 PM CEST 2024 2024-06-01 17:55:08 +02:00
Thomas Avé 113a871320 Sat Jun 1 05:51:49 PM CEST 2024 2024-06-01 17:51:49 +02:00
Thomas Avé 392bd9c0d6 Sat Jun 1 05:49:46 PM CEST 2024 2024-06-01 17:49:46 +02:00
Thomas Avé 0ce2405c81 Sat Jun 1 05:22:46 PM CEST 2024 2024-06-01 17:22:46 +02:00
Thomas Avé d27d4d28fc Sat Jun 1 05:19:39 PM CEST 2024 2024-06-01 17:19:39 +02:00
Thomas Avé fc742c24e0 Sat Jun 1 05:10:24 PM CEST 2024 2024-06-01 17:10:24 +02:00
Thomas Avé c3ee1c352f Sat Jun 1 05:00:23 PM CEST 2024 2024-06-01 17:00:23 +02:00
Thomas Avé 3f2ec3c3e5 $(date) 2024-06-01 16:59:35 +02:00
Thomas Avé 2768455cb7 `date` 2024-06-01 16:57:25 +02:00
Thomas Avé c643f70f98 `date` 2024-06-01 16:56:07 +02:00
Thomas Avé 4c8460ce84 `date` 2024-06-01 16:52:20 +02:00
Thomas Avé d6ff7492b8 `date` 2024-06-01 16:35:37 +02:00
Thomas Avé a2e454015c Work on moving hyprland 2024-05-31 23:44:20 +02:00
Thomas Avé ee733b781e Add Hyprland 2024-05-31 22:25:50 +02:00
Thomas Avé fa8d665e9e Remove old files 2024-05-31 19:03:49 +02:00
Thomas Avé 1c1c9befdd Update dotnet 2024-05-31 18:18:11 +02:00
Thomas Avé 3321f01fc6 remove lazy lock 2024-05-31 18:01:14 +02:00
Thomas Avé 418a91a241 Add neovim config 2024-05-31 18:00:12 +02:00
Thomas Avé 62b4adfff4 Initial zsh config finished 2024-05-31 17:49:42 +02:00
Thomas Avé 2365f43535 restructure 2024-05-31 17:33:30 +02:00
Thomas Avé 1378553559 Add search Script 2024-05-31 16:45:21 +02:00
Thomas Avé a054181d3f Add files 2024-05-31 15:40:15 +02:00
Thomas Avé aeda05a8d1 Restructure 2024-05-31 15:26:03 +02:00
Thomas Avé 321bd28f35 Move zsh to module 2024-05-31 15:20:29 +02:00
Thomas Avé cf068c7eb8 ZSH as default shell 2024-05-31 15:03:11 +02:00
Thomas Avé a1dc86fb39 Indentation 2024-05-31 14:55:36 +02:00
Thomas Avé c3142b0761 Work on install zsh 2024-05-31 14:52:02 +02:00
Thomas Avé 07a2b762ea Install nvim and bash in home-manager 2024-05-31 14:37:28 +02:00
Thomas Avé e632eff25b Add Home-Manager 2024-05-31 14:29:38 +02:00
Thomas Avé 629049e5d4 Add ssh keys 2024-05-31 14:04:54 +02:00
Thomas Avé d934d81b6f Add initial NixOS config 2024-05-31 12:41:57 +02:00
155 changed files with 2087 additions and 10023 deletions

View File

@ -1,26 +0,0 @@
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-fuchsia-*,
-google-*,
-llvm*,
-zircon-*,
-bugprone-easily-swappable-parameters
-readability-identifier-length
-readability-avoid-const-params-in-decls,
-readability-magic-numbers
-bugprone-narrowing-conversions
-modernize-use-trailing-return-type
-cppcoreguidelines-pro-type-union-access
-modernize-use-nodiscard
-cppcoreguidelines-narrowing-conversions
-cppcoreguidelines-avoid-magic-numbers
-Wsign-compare
-hicpp-uppercase-literal-suffix
-readability-uppercase-literal-suffix
-readability-named-parameter
-performance-avoid-endl"
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none

View File

@ -1,753 +0,0 @@
[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
# Set the $TERM environment variable used for the embedded terminal.
#
# Default: xterm-256color
term=xterm-256color
# Display OSC8 strings in the embedded terminal
#
# Default: false
#enable-osc8=false
# Default shell command to use for :menu. This will be executed with sh -c and
# will run in an popover dialog.
#
# Any occurrence of %f will be replaced by a temporary file path where the
# command is expected to write output lines to be consumed by :menu. Otherwise,
# the lines will be read from the command's standard output.
#
# Examples:
# default-menu-cmd=fzf
# default-menu-cmd=fzf --multi
# default-menu-cmd=dmenu -l 20
# default-menu-cmd=ranger --choosefiles=%f
#
#default-menu-cmd=
[ui]
border-char-vertical="│"
border-char-horizontal="─"
styleset-name=catppuccin-mocha
#
# 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<20,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.
#
# Here are some examples to show the To field instead of the From field for
# an email (modifying column-name):
#
# 1. a generic one
# column-name={{ .Peer | names | join ", " }}
# 2. based upon the selected folder
# column-name={{if match .Folder "^(Gesendet|Sent)$"}}{{index (.To | names) 0}}{{else}}{{index (.From | names) 0}}{{end}}
#
# Default settings
#column-date={{.DateAutoFormat .Date.Local}}
#column-name={{index (.From | names) 0}}
#column-flags={{.Flags | join ""}}
#column-subject={{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.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=2006-01-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=
#
# 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=
#
# 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=30
#
# 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)
#
# Value to set {{.Subject}} template to when subject is empty.
#
# Default: (no subject)
#empty-subject=(no subject)
# 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
#
# Template to use for Account tab titles
#
# Default: {{.Account}}
#tab-title-account={{.Account}}
# Marker to show before a pinned tab's name.
#
# Default: `
#pinned-tab-marker='`'
# Template for the left side of the directory list.
# See aerc-templates(7) for all available fields and functions.
#
# Default: {{.Folder}}
#dirlist-left={{.Folder}}
# Template for the right side of the directory list.
# See aerc-templates(7) for all available fields and functions.
#
# Default: {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
dirlist-right={{if .Unread}}{{humanReadable .Unread}}{{end}}
# 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=true
# 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
# 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.
#
# Setting this to "manual" disables automatic completion, leaving only the
# manually triggered completion with the $complete key (see aerc-binds(5) for
# more details).
#
# 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
# Show thread context enables messages which do not match the current query (or
# belong to the current mailbox) to be shown for context. These messages can be
# styled separately using "msglist_thread_context" in a styleset. This feature
# is not supported by all backends
#
# Default: false
#show-thread-context=false
# Debounce client-side thread building
#
# Default: 50ms
#client-threads-delay=50ms
#
# Thread prefix customization:
#
# Customize the thread prefix appearance by selecting the arrow head.
#
# Default: ">"
#thread-prefix-tip = ">"
#
# Customize the thread prefix appearance by selecting the arrow indentation.
#
# Default: " "
#thread-prefix-indent = " "
#
# Customize the thread prefix appearance by selecting the vertical extension of
# the arrow.
#
# Default: "│"
#thread-prefix-stem = "│"
#
# Customize the thread prefix appearance by selecting the horizontal extension
# of the arrow.
#
# Default: ""
#thread-prefix-limb = ""
#
# Customize the thread prefix appearance by selecting the folded thread
# indicator.
#
# Default: ""
#thread-prefix-folded = ""
#
# Customize the thread prefix appearance by selecting the unfolded thread
# indicator.
#
# Default: ""
#thread-prefix-unfolded = ""
#
# Customize the thread prefix appearance by selecting the first child connector.
#
# Default: ""
#thread-prefix-first-child = ""
#
# Customize the thread prefix appearance by selecting the connector used if
# the message has siblings.
#
# Default: "├─"
#thread-prefix-has-siblings = "├─"
#
# Customize the thread prefix appearance by selecting the connector used if the
# message has no parents and no children.
#
# Default: ""
#thread-prefix-lone = ""
#
# Customize the thread prefix appearance by selecting the connector used if the
# message has no parents and has children.
#
# Default: ""
#thread-prefix-orphan = ""
#
# Customize the thread prefix appearance by selecting the connector for the last
# sibling.
#
# Default: "└─"
#thread-prefix-last-sibling = "└─"
#
# Customize the reversed thread prefix appearance by selecting the connector for
# the last sibling.
#
# Default: "┌─"
#thread-prefix-last-sibling-reverse = "┌─"
#
# Customize the reversed thread prefix appearance by selecting the first child
# connector.
#
# Default: ""
#thread-prefix-first-child-reverse = ""
#
# Customize the reversed thread prefix appearance by selecting the connector
# used if the message has no parents and has children.
#
# Default: ""
#thread-prefix-orphan-reverse = ""
[statusline]
#
# Describes the format for the status line. This is a comma separated list of
# column names with an optional align and width suffix. See [ui].index-columns
# for more details. To completely mute the status line except for push
# notifications, explicitly set status-columns to an empty string.
#
# Default: left<*,center:=,right>*
#status-columns=left<*,center:=,right>*
#
# Each name in status-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-left=[{{.Account}}] {{.StatusInfo}}
#column-center={{.PendingKeys}}
#column-right={{.TrayInfo}}
#
# String separator inserted between columns.
# See [ui].column-separator for more details.
#
#column-separator=" "
# 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 -Rc
# pager=less -Rc
pager=nvim -u $XDG_CONFIG_HOME/nvim/aerc.lua
#
# 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
# Define the maximum height of the mimetype switcher before a scrollbar is used.
# The height of the mimetype switcher is restricted to half of the display
# height. If the provided value for the height is zero, the number of parts will
# be used as the height of the type switcher.
#
# Default: 0
#max-mime-height = 0
# 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=
#
# When set, aerc will create and read .eml files for composing that have
# non-standard \n linebreaks. This is only relevant if the used editor does not
# support CRLF linebreaks.
#
#lf-editor=false
#
# 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
#
# Edit headers into the text editor instead than separate fields.
#
# When this is true, address-book-cmd is not supported and address completion
# is left to the editor itself. Also, displaying multiple headers on the same
# line is not possible.
#
# Default: false
#edit-headers=false
#
# 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='notmuch address "%s"'
# Specifies the command to be used to select attachments. Any occurrence of
# '%s' in the file-picker-cmd will be replaced with the argument <arg>
# to :attach -m <arg>. Any occurence of '%f' will be replaced by the
# location of a temporary file, from which aerc will read the selected files.
#
# If '%f' is not present, the command must output the selected files to
# standard output, one file per line. If it is present, then aerc does not
# capture the standard output and instead reads the files from the temporary
# file which should have the same format.
#file-picker-cmd=
#
# Allow to address yourself when replying
#
# Default: true
#reply-to-self=true
# Warn before sending an email with an empty subject.
#
# Default: false
#empty-subject-warning=false
#
# 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=
#
# When set, aerc will generate "format=flowed" bodies with a content type of
# "text/plain; format=flowed" as described in RFC3676. This format is easier to
# handle for some mailing software, and generally just looks like ordinary
# text. To actually make use of this format's features, you'll need support in
# your editor.
#
#format-flowed=false
[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
# text/html=lynx -dump -force_html -stdin
text/html=w3m -dump -o display_link_number=1 -T text/html
[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 prepended to
# the system $PATH to allow referencing filters from their name only:
#
# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters
# ~/.local/libexec/aerc/filters
# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters
# $PREFIX/libexec/aerc/filters
# $PREFIX/share/aerc/filters
# /usr/libexec/aerc/filters
# /usr/share/aerc/filters
#
# If you want to run a program in your default $PATH which has the same name
# as a builtin filter (e.g. /usr/bin/colorize), use its absolute path.
#
# 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.
text/plain=cat
text/calendar=gnome-calendar
message/delivery-status=cat
message/rfc822=cat
# text/html=lynx -dump -force_html -stdin
text/html=w3m -dump -o display_link_number=1 -T text/html
#text/html=html | colorize
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
# This special filter is only used to post-process email headers when
# [viewer].show-headers=true
# By default, headers are piped directly into the pager.
#
# .headers=colorize
[openers]
#
# Openers allow you to specify the command to use for the :open and :open-link
# actions on a per-MIME-type basis. The :open-link URL scheme is used to
# determine the MIME type as follows: x-scheme-handler/<scheme>.
#
# {} is expanded as the temporary filename or URL to be opened with proper
# shell quoting. If it is not encountered in the command, the filename/URL will
# be appended to the end of the command. The command will then be executed with
# `sh -c`.
#
# Like [filters], openers support basic shell globbing. The first opener which
# matches the part's MIME type (or URL scheme handler MIME type) will be used,
# so order them from most to least specific.
#
# Examples:
# x-scheme-handler/irc=hexchat
# x-scheme-handler/http*=printf '%s' {} | wl-copy
# text/html=surf -dfgms
# text/plain=gvim {} +125
# message/rfc822=thunderbird
[hooks]
#
# Hooks are triggered whenever the associated event occurs.
#
# Executed when a new email arrives in the selected folder
#mail-received=notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT"
#
# Executed when mail is deleted from a folder
#mail-deleted=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
#
# Executed when aerc adds mail to a folder
#mail-added=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
#
# Executed when aerc starts
#aerc-startup=aerc :terminal calcurse && aerc :next-tab
#
# Executed when aerc shuts down.
#aerc-shutdown=
[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

View File

@ -1,172 +0,0 @@
# 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> = :menu -adc 'fzy -l 30' :cf -a<Enter>
<tab> = :next-tab<Enter>
? = :help keys<Enter>
<F5> = :check-mail<Enter>
# <C-c> = :prompt 'Quit?' quit<Enter>
# <C-q> = :prompt 'Quit?' quit<Enter>
# <C-z> = :suspend<Enter>
[messages]
q = :q<Enter>
<Backspace> = :q<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-e> = :prev 50%<Enter>
# <C-d> = :prev 100%<Enter>
# <PgUp> = :prev 100%<Enter>
g = :select 0<Enter>
G = :select -1<Enter>
J = :next-folder<Enter>
K = :prev-folder<Enter>
v = :mark -t<Enter>
# <Space> = :mark -t<Enter>:next<Enter>
V = :mark -v<Enter>
<Space> = :read -t<Enter>
T = :toggle-threads<Enter>
# zc = :fold<Enter>
# zo = :unfold<Enter>
# za = :fold -t<Enter>
# zM = :fold -a<Enter>
# zR = :unfold -a<Enter>
# <C-p> = :fold -t<Enter>
<Enter> = :view<Enter>
d = :prompt 'Really delete this message?' 'delete-message'<Enter>
D = :delete<Enter>
a = :archive flat<Enter>
A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>
f = :flag -t<Enter>
c = :compose<Enter>
m = :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 -a<space>
\ = :filter -a <space>
n = :next-result<Enter>
N = :prev-result<Enter>
<Esc> = :clear<Enter>
s = :split<Enter>
S = :vsplit<Enter>
pl = :patch list<Enter>
pa = :patch apply <Tab>
pd = :patch drop <Tab>
pb = :patch rebase<Enter>
pt = :patch term<Enter>
ps = :patch switch <Tab>
[messages:folder=Drafts]
<Enter> = :recall<Enter>
[view]
/ = :toggle-key-passthrough<Enter>/
q = :close<Enter>
O = :open<Enter>
o = :open<Enter>
S = :save<space>
| = :pipe<space>
D = :delete<Enter>
A = :archive flat<Enter>
<C-l> = :open-link <space>
f = :flag -t<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-Up> = :prev-part<Enter>
<C-j> = :next-part<Enter>
<C-Down> = :next-part<Enter>
J = :next<Enter>
<C-Right> = :next<Enter>
K = :prev<Enter>
<C-Left> = :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>
$complete = <C-o>
<C-k> = :prev-field<Enter>
<C-Up> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-Down> = :next-field<Enter>
<A-p> = :switch-account -p<Enter>
<C-Left> = :switch-account -p<Enter>
<A-n> = :switch-account -n<Enter>
<C-Right> = :switch-account -n<Enter>
<tab> = :next-field<Enter>
<backtab> = :prev-field<Enter>
<C-p> = :prev-tab<Enter>
<C-PgUp> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-PgDn> = :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-Up> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-Down> = :next-field<Enter>
<C-p> = :prev-tab<Enter>
<C-PgUp> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-PgDn> = :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>
<C-PgUp> = :prev-tab<Enter>
<C-PgDn> = :next-tab<Enter>

View File

@ -1,115 +0,0 @@
[colors.bright]
black = "#555555"
blue = "#00afff"
cyan = "#50cdfe"
green = "#b0e05e"
magenta = "#af87ff"
red = "#f5669c"
white = "#ffffff"
yellow = "#fef26c"
[colors.normal]
black = "#121212"
blue = "#0f7fcf"
cyan = "#42a7cf"
green = "#97e123"
magenta = "#8700ff"
red = "#fa2573"
white = "#bbbbbb"
yellow = "#dfd460"
[colors.primary]
background = "#000010"
foreground = "#F8F8F2"
[font]
size = 15
[font.bold]
family = "Iosevka Term Extended"
style = "Bold"
[font.bold_italic]
family = "Iosevka Term Extended"
style = "Bold Italic"
[font.italic]
family = "Iosevka Term Extended"
style = "Italic"
[font.normal]
family = "Iosevka Term Extended"
style = "Regular"
[[keyboard.bindings]]
action = "ToggleFullscreen"
key = "F11"
[[keyboard.bindings]]
action = "ToggleViMode"
key = "Escape"
mode = "Vi"
[[keyboard.bindings]]
action = "ScrollHalfPageUp"
key = "E"
mode = "Vi"
mods = "Control"
[[keyboard.bindings]]
key = "F"
mods = "Control|Shift"
action = "ReceiveChar"
[[keyboard.bindings]]
chars = "\u001B[72;6u"
key = "H"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[74;6u"
key = "J"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[75;6u"
key = "K"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[76;6u"
key = "L"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[105;5u"
key = "I"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[46;5u"
key = "Period"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[44;5u"
key = "Comma"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[59;5u"
key = "Semicolon"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[13;2u"
key = "Return"
mods = "Shift"
[scrolling]
history = 10000
[window]
dynamic_padding = true
dynamic_title = true
opacity = 0.3

@ -1 +0,0 @@
Subproject commit fc2b46896fe9daf1b1b1a6a0af5ae6fcfefa7511

View File

@ -1,109 +0,0 @@
-- Grab environment we need
local ipairs = ipairs
local math = math
--- The gridh layout layoutbox icon.
-- @beautiful beautiful.layout_gridh
-- @param surface
-- @see gears.surface
--- The gridv layout layoutbox icon.
-- @beautiful beautiful.layout_gridv
-- @param surface
-- @see gears.surface
local grid = {}
local function do_grid(p, orientation)
local wa = p.workarea
local cls = p.clients
-- Swap workarea dimensions, if our orientation is "east"
if orientation == 'east' then
wa.width, wa.height = wa.height, wa.width
wa.x, wa.y = wa.y, wa.x
end
if #cls > 0 then
local rows, cols
if #cls == 2 then
rows, cols = 1, 2
else
rows = math.ceil(math.sqrt(#cls))
cols = math.ceil(#cls / rows)
end
local first_col_rows = #cls - rows * (cols - 1)
for k, c in ipairs(cls) do
k = k - 1
local g = {}
local row, col, lrows, lcols
if k < first_col_rows then
row = k
col = 0
lrows = first_col_rows
lcols = cols
else
row = (k - first_col_rows) % rows
col = math.floor((k - first_col_rows) / rows) + 1
lrows = rows
lcols = cols
end
if row == lrows - 1 then
g.height = wa.height - math.ceil(wa.height / lrows) * row
g.y = wa.height - g.height
else
g.height = math.ceil(wa.height / lrows)
g.y = g.height * row
end
if col == lcols - 1 then
g.width = wa.width - math.ceil(wa.width / lcols) * col
g.x = wa.width - g.width
else
g.width = math.ceil(wa.width / lcols)
g.x = g.width * col
end
g.y = g.y + wa.y
g.x = g.x + wa.x
-- Swap window dimensions, if our orientation is "east"
if orientation == 'east' then
g.width, g.height = g.height, g.width
g.x, g.y = g.y, g.x
end
p.geometries[c] = g
end
end
end
-- Horizontal grid layout.
-- @param screen The screen to arrange.
grid.horizontal = {}
grid.horizontal.name = "gridh"
function grid.horizontal.arrange(p)
return do_grid(p, "east")
end
-- Vertical grid layout.
-- @param screen The screen to arrange.
grid.name = "grid"
function grid.arrange(p)
return do_grid(p, "south")
end
--- The grid layout.
-- Try to give all clients the same size.
-- @clientlayout awful.layout.suit.grid
-- @usebeautiful beautiful.layout_gridv
--- The horizontal grid layout.
-- Try to give all clients the same size.
-- @clientlayout awful.layout.suit.grid.horizontal
-- @usebeautiful beautiful.layout_gridh
return grid

View File

@ -1,95 +0,0 @@
local naughty = require("naughty")
local beautiful = require("beautiful")
local gears = require("gears")
local awful = require("awful")
local dpi = beautiful.xresources.apply_dpi
-- ===================================================================
-- Theme Definitions
-- ===================================================================
naughty.config.defaults.ontop = true
naughty.config.defaults.icon_size = dpi(32)
naughty.config.defaults.screen = awful.screen.focused()
naughty.config.defaults.timeout = 3
naughty.config.defaults.title = "System Notification"
naughty.config.defaults.margin = dpi(16)
naughty.config.defaults.border_width = 0
naughty.config.defaults.position = "top_right"
naughty.config.defaults.shape = function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, dpi(6))
end
naughty.config.padding = dpi(7)
naughty.config.spacing = dpi(7)
naughty.config.icon_dirs = {
"/usr/share/icons/Tela-dark",
"/usr/share/pixmaps/"
}
naughty.config.icon_formats = {"png", "svg"}
-- Timeouts
naughty.config.presets.low.timeout = 3
naughty.config.presets.critical.timeout = 0
naughty.config.presets.normal = {
font = beautiful.title_font,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
position = "top_right"
}
naughty.config.presets.low = {
font = beautiful.title_font,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
position = "top_right"
}
naughty.config.presets.critical = {
font = "SF Display Bold 10",
fg = "#ffffff",
bg = "#ff0000",
position = "top_right",
timeout = 0
}
naughty.config.presets.ok = naughty.config.presets.normal
naughty.config.presets.info = naughty.config.presets.normal
naughty.config.presets.warn = naughty.config.presets.critical
-- ===================================================================
-- Error Handling
-- ===================================================================
if awesome.startup_errors then
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors
})
end
do
local in_error = false
awesome.connect_signal(
"debug::error",
function(err)
if in_error then
return
end
in_error = true
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err)
})
in_error = false
end
)
end

View File

@ -1,26 +0,0 @@
local awful = require("awful")
local lain = require("lain")
local grid = require("components.layout.grid")
local quake = lain.util.quake({app="alacritty", followtag=true, argname = '--class %s', extra="--option=window.opacity=1.0 --option=\"colors.primary.background='#000d2b'\" -e tmux", height=0.3})
-- Import panels
local top_panel = require("components.top-panel")
-- Set up each screen (add tags & panels)
awful.screen.connect_for_each_screen(function(s)
for i = 1, 10, 1
do
awful.tag.add(tostring(i % 10), {
layout = grid,
screen = s,
selected = i == 1
})
end
s.quake = quake
-- Only add the top panel on the primary screen
if s.index == 1 then
top_panel.create(s)
end
end)

View File

@ -1,183 +0,0 @@
-- ===================================================================
-- Initialization
-- ===================================================================
local awful = require("awful")
local beautiful = require("beautiful")
local wibox = require("wibox")
local theme = require("theme")
local lain = require("lain")
local tag_list = require("components.widgets.tag-list")
local layout_box = require("components.widgets.layout-box")
local battery_widget = require("components.widgets.battery-widget.battery")
local volume_widget = require("components.widgets.volume-widget.volume")
local pl = require("utils.powerline")
-- import widgets
local task_list = require("components.widgets.task-list")
-- ===================================================================
-- Custom Widgets
-- ===================================================================
local top_panel = {}
local watch_widget, watch_timer = awful.widget.watch('bash -c "checkupdates | wc -l"', 360)
local updates_indicator = wibox.widget{
{
layout = wibox.layout.fixed.horizontal,
{
{
widget = watch_widget,
},
top = 0, bottom = 2, left = 0, right = 0,
widget = wibox.container.margin
},
{
{
image = "/usr/share/icons/Papirus/48x48/apps/org.kde.archUpdate.svg",
forced_width = 18,
widget = wibox.widget.imagebox,
},
top = 5, bottom = 0, left = 5, right = 0,
widget = wibox.container.margin
}
},
widget = wibox.container.background
}
local frequency_widget = wibox.widget {
layout = wibox.layout.fixed.horizontal,
awful.widget.watch('bash -c "/usr/bin/cat /proc/cpuinfo | grep MHz | cut -b 12- | sort -r | head -n 1 | xargs printf \'%f / 1000\n\' | bc -l | awk \'{printf \\"%.2f\\n\\", $0}\'"', 1),
wibox.widget.textbox('GHz')
}
local memory_widget = wibox.widget{
layout = wibox.layout.fixed.horizontal,
lain.widget.mem({
settings = function()
widget:set_markup(lain.util.markup.font(theme.font, mem_now.used .. " MB"))
end,
}),
}
local cpu_widget = wibox.widget{
layout = wibox.layout.fixed.horizontal,
lain.widget.cpu({
settings = function()
widget:set_markup(lain.util.markup.font(theme.font, "CPU: " .. cpu_now.usage .. "%"))
end,
})
}
local clock = wibox.widget.textclock('%a %b %d, %H:%M:%S', 1)
local tag_lists = {}
local current_tag_list = wibox.widget {
layout = wibox.layout.fixed.horizontal
}
local layout_boxes = {}
local current_layout_box = wibox.widget {
layout = wibox.layout.fixed.horizontal
}
local governor_selector, governor_timer = awful.widget.watch('bash -c "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"', 5)
-- ===================================================================
-- Bar Creation
-- ===================================================================
top_panel.create = function(s)
local panel = awful.wibar({
screen = s,
position = "top",
ontop = true,
height = beautiful.top_panel_height,
width = s.geometry.width,
bg = "#12151cbb"
})
for t in screen do
tag_lists[t] = tag_list.create(t)
layout_boxes[t] = layout_box.create(t)
end
current_tag_list:add(tag_lists[s])
current_layout_box:add(layout_boxes[s])
panel:setup {
expand = "none",
layout = wibox.layout.align.horizontal,
task_list.create(s),
current_tag_list,
{
layout = wibox.layout.fixed.horizontal,
pl(wibox.widget{}, theme.bg_normal .. "00", theme.top_panel_powerline),
pl(wibox.container.margin(wibox.widget.systray(), 0, 0, 5, 5), theme.top_panel_powerline, theme.bg_normal),
pl(volume_widget({widget_type='icon_and_text'}), theme.bg_normal, theme.top_panel_powerline),
pl(awful.widget.watch('bash -c "sensors | grep Tctl | cut -f 10 -d \' \' | cut -c 2-"', 5), theme.top_panel_powerline, theme.bg_normal),
pl(memory_widget, theme.bg_normal, theme.top_panel_powerline),
pl(cpu_widget, theme.top_panel_powerline, theme.bg_normal),
pl(frequency_widget, theme.bg_normal, theme.top_panel_powerline),
pl(updates_indicator, theme.top_panel_powerline, theme.bg_normal),
pl(current_layout_box, theme.bg_normal, theme.top_panel_powerline),
pl(clock, theme.top_panel_powerline, theme.top_panel_powerline),
}
}
-- ===================================================================
-- Functionality
-- ===================================================================
-- hide panel when client is fullscreen
local function change_panel_visibility(client)
if client.screen == s then
panel.ontop = not client.fullscreen
end
end
-- connect panel visibility function to relevant signals
client.connect_signal("property::fullscreen", change_panel_visibility)
client.connect_signal("focus", change_panel_visibility)
client.connect_signal("focus", function (c, _)
current_tag_list:reset(current_tag_list)
current_tag_list:add(tag_lists[c.screen])
current_layout_box:reset(current_layout_box)
current_layout_box:add(layout_boxes[c.screen])
end)
-- connect panel visibility function to relevant signals
updates_indicator:connect_signal("button::press", function(_, _, _, _)
local update_command = 'WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"'
awful.spawn.easy_async_with_shell(update_command, function(_)
watch_timer:emit_signal("timeout")
end)
end)
clock:connect_signal("button::press", function(_, _, _, _)
awful.spawn('gnome-calendar')
end)
governor_selector:connect_signal("button::press", function(c, _, _, button)
awful.spawn.easy_async_with_shell('bash -c "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"', function(output)
output = output:gsub("%s+", "")
if output == 'powersave' then
awful.spawn.easy_async('sudo /opt/power/performance.sh', function(_)
governor_selector:emit_signal("timeout")
end)
else
awful.spawn.easy_async('sudo /opt/power/powersave.sh', function(_)
governor_timer:emit_signal("timeout")
end)
end
end)
end)
end
return top_panel

View File

@ -1,75 +0,0 @@
# Battery widget
Simple and easy-to-install widget for Awesome Window Manager.
This widget consists of:
- an icon which shows the battery level:
![Battery Widget](./bat-wid-1.png)
- a pop-up window, which shows up when you hover over an icon:
![Battery Widget](./bat-wid-2.png)
Alternatively you can use a tooltip (check the code):
![Battery Widget](./bat-wid-22.png)
- a pop-up warning message which appears on bottom right corner when battery level is less that 15% (you can get the image [here](https://vk.com/images/stickers/1933/512.png)):
![Battery Widget](./bat-wid-3.png)
Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
## Customization
It is possible to customize widget by providing a table with all or some of the following config parameters:
| Name | Default | Description |
|---|---|---|
| `font` | Play 8 | Fond |
| `path_to_icons` | `/usr/share/icons/Arc/status/symbolic/` | Path to the folder with icons* |
| `show_current_level`| false | Show current charge level |
| `margin_right`|0| The right margin of the widget|
| `margin_left`|0| The left margin of the widget|
| `display_notification` | `false` | Display a notification on mouseover |
| `notification_position` | `top_right` | The notification position |
| `timeout` | 10 | How often in seconds the widget refreshes |
| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup |
| `warning_msg_text` | _Battery is dying_ | Text of the warning popup |
| `warning_msg_position` | `bottom_right` | Position of the warning popup |
| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg | Icon of the warning popup |
| `enable_battery_warning` | `true` | Display low battery warning |
*Note: the widget expects following icons to be present in the folder:
- battery-caution-charging-symbolic.svg
- battery-empty-charging-symbolic.svg
- battery-full-charged-symbolic.svg
- battery-full-symbolic.svg
- battery-good-symbolic.svg
- battery-low-symbolic.svg
- battery-caution-symbolic.svg
- battery-empty-symbolic.svg
- battery-full-charging-symbolic.svg
- battery-good-charging-symbolic.svg
- battery-low-charging-symbolic.svg
- battery-missing-symbolic.svg
## Installation
This widget reads the output of acpi tool.
- install `acpi` and check the output:
```bash
$ sudo apt-get install acpi
$ acpi
Battery 0: Discharging, 66%, 02:34:06 remaining
```
```lua
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
battery_widget(),
...
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,209 +0,0 @@
-------------------------------------------------
-- Battery Widget for Awesome Window Manager
-- Shows the battery status using the ACPI tool
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
-- @author Pavel Makhov
-- @copyright 2017 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local naughty = require("naughty")
local watch = require("awful.widget.watch")
local wibox = require("wibox")
local gfs = require("gears.filesystem")
local dpi = require('beautiful').xresources.apply_dpi
-- acpi sample outputs
-- Battery 0: Discharging, 75%, 01:51:38 remaining
-- Battery 0: Charging, 53%, 00:57:43 until charged
local HOME = os.getenv("HOME")
local WIDGET_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/battery-widget'
local battery_widget = {}
local function worker(user_args)
local args = user_args or {}
local font = args.font or 'Play 8'
local path_to_icons = args.path_to_icons or "/usr/share/icons/Arc/status/symbolic/"
local show_current_level = args.show_current_level or false
local margin_left = args.margin_left or 0
local margin_right = args.margin_right or 0
local display_notification = args.display_notification or false
local display_notification_onClick = args.display_notification_onClick or true
local position = args.notification_position or "top_right"
local timeout = args.timeout or 10
local warning_msg_title = args.warning_msg_title or 'Huston, we have a problem'
local warning_msg_text = args.warning_msg_text or 'Battery is dying'
local warning_msg_position = args.warning_msg_position or 'bottom_right'
local warning_msg_icon = args.warning_msg_icon or WIDGET_DIR .. '/spaceman.jpg'
local enable_battery_warning = args.enable_battery_warning
if enable_battery_warning == nil then
enable_battery_warning = true
end
if not gfs.dir_readable(path_to_icons) then
naughty.notify{
title = "Battery Widget",
text = "Folder with icons doesn't exist: " .. path_to_icons,
preset = naughty.config.presets.critical
}
end
local icon_widget = wibox.widget {
{
id = "icon",
widget = wibox.widget.imagebox,
resize = false
},
valign = 'center',
layout = wibox.container.place,
}
local level_widget = wibox.widget {
font = font,
widget = wibox.widget.textbox
}
battery_widget = wibox.widget {
icon_widget,
level_widget,
layout = wibox.layout.fixed.horizontal,
}
-- Popup with battery info
-- One way of creating a pop-up notification - naughty.notify
local notification
local function show_battery_status(batteryType)
awful.spawn.easy_async([[bash -c 'acpi']],
function(stdout, _, _, _)
naughty.destroy(notification)
notification = naughty.notify{
text = stdout,
title = "Battery status",
icon = path_to_icons .. batteryType .. ".svg",
icon_size = dpi(16),
position = position,
timeout = 5, hover_timeout = 0.5,
width = 200,
screen = mouse.screen
}
end
)
end
-- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
--battery_popup = awful.tooltip({objects = {battery_widget}})
-- To use colors from beautiful theme put
-- following lines in rc.lua before require("battery"):
-- beautiful.tooltip_fg = beautiful.fg_normal
-- beautiful.tooltip_bg = beautiful.bg_normal
local function show_battery_warning()
naughty.notify {
icon = warning_msg_icon,
icon_size = 100,
text = warning_msg_text,
title = warning_msg_title,
timeout = 25, -- show the warning for a longer time
hover_timeout = 0.5,
position = warning_msg_position,
bg = "#F06060",
fg = "#EEE9EF",
width = 300,
screen = mouse.screen
}
end
local last_battery_check = os.time()
local batteryType = "battery-good-symbolic"
watch("acpi -i", timeout,
function(widget, stdout)
local battery_info = {}
local capacities = {}
for s in stdout:gmatch("[^\r\n]+") do
-- Match a line with status and charge level
local status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)')
if status ~= nil then
-- Enforce that for each entry in battery_info there is an
-- entry in capacities of zero. If a battery has status
-- "Unknown" then there is no capacity reported and we treat it
-- as zero capactiy for later calculations.
table.insert(battery_info, {status = status, charge = tonumber(charge_str)})
table.insert(capacities, 0)
end
-- Match a line where capacity is reported
local cap_str = string.match(s, '.+:.+last full capacity (%d+)')
if cap_str ~= nil then
capacities[#capacities] = tonumber(cap_str) or 0
end
end
local capacity = 0
local charge = 0
local status
for i, batt in ipairs(battery_info) do
if capacities[i] ~= nil then
if batt.charge >= charge then
status = batt.status -- use most charged battery status
-- this is arbitrary, and maybe another metric should be used
end
-- Adds up total (capacity-weighted) charge and total capacity.
-- It effectively ignores batteries with status "Unknown" as we
-- treat them with capacity zero.
charge = charge + batt.charge * capacities[i]
capacity = capacity + capacities[i]
end
end
charge = charge / capacity
if show_current_level then
level_widget.text = string.format('%d%%', charge)
end
if (charge >= 1 and charge < 15) then
batteryType = "battery-empty%s-symbolic"
if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning
last_battery_check = os.time()
show_battery_warning()
end
elseif (charge >= 15 and charge < 40) then batteryType = "battery-caution%s-symbolic"
elseif (charge >= 40 and charge < 60) then batteryType = "battery-low%s-symbolic"
elseif (charge >= 60 and charge < 80) then batteryType = "battery-good%s-symbolic"
elseif (charge >= 80 and charge <= 100) then batteryType = "battery-full%s-symbolic"
end
if status == 'Charging' then
batteryType = string.format(batteryType, '-charging')
else
batteryType = string.format(batteryType, '')
end
widget.icon:set_image(path_to_icons .. batteryType .. ".svg")
-- Update popup text
-- battery_popup.text = string.gsub(stdout, "\n$", "")
end,
icon_widget)
if display_notification then
battery_widget:connect_signal("mouse::enter", function() show_battery_status(batteryType) end)
battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
elseif display_notification_onClick then
battery_widget:connect_signal("button::press", function(_,_,_,button)
if (button == 3) then show_battery_status(batteryType) end
end)
battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
end
return wibox.container.margin(battery_widget, margin_left, margin_right)
end
return setmetatable(battery_widget, { __call = function(_, ...) return worker(...) end })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,43 +0,0 @@
local awful = require('awful')
-- ===================================================================
-- Widget Creation
-- ===================================================================
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
local layout_box = {}
layout_box.create = function(s)
local box = awful.widget.layoutbox(s)
box:buttons(
awful.util.table.join(
awful.button({}, 1,
function()
awful.layout.inc(1)
end
),
awful.button({}, 3,
function()
awful.layout.inc(-1)
end
),
awful.button({}, 4,
function()
awful.layout.inc(1)
end
),
awful.button({}, 5,
function()
awful.layout.inc(-1)
end
)
)
)
return box
end
return layout_box

View File

@ -1,65 +0,0 @@
local awful = require("awful")
local wibox = require("wibox")
local theme = require("theme")
local tag_list = {}
tag_list.create = function(s)
local filter = function(tag)
local count = 0
for _, t in ipairs(s.tags) do
if #t:clients() > 0 or t.selected then
count = count + 1
end
end
return (#tag:clients() > 0 and count > 1) or (tag.selected and #tag:clients() == 0 and count > 1)
end
local taglist_buttons = awful.util.table.join(
awful.button({}, 1,
function(c)
c.selected = true
for _, tag in ipairs(s.tags) do
if tag.index ~= c.index then
tag.selected = false
end
end
end
)
)
return awful.widget.taglist {
screen = s,
-- filter = awful.widget.taglist.filter.noempty,
filter = filter,
widget_template = {
{
{
id = 'index_role',
widget = wibox.widget.textbox,
},
left = 10,
right = 10,
widget = wibox.container.margin
},
id = 'background_role',
widget = wibox.container.background,
create_callback = function(self, c3, _, _)
self:get_children_by_id('index_role')[1].markup = '<b> '..c3.name..' </b>'
self:connect_signal('mouse::enter', function()
if self.bg ~= theme.top_panel_powerline then
self.backup = self.bg
self.has_backup = true
end
self.bg = theme.top_panel_powerline
end)
self:connect_signal('mouse::leave', function()
if self.has_backup and not c3.selected then self.bg = self.backup end
end)
end,
},
buttons = taglist_buttons,
}
end
return tag_list

View File

@ -1,224 +0,0 @@
-- ████████╗ █████╗ ███████╗██╗ ██╗ ██╗ ██╗███████╗████████╗
-- ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ██║ ██║██╔════╝╚══██╔══╝
-- ██║ ███████║███████╗█████╔╝ ██║ ██║███████╗ ██║
-- ██║ ██╔══██║╚════██║██╔═██╗ ██║ ██║╚════██║ ██║
-- ██║ ██║ ██║███████║██║ ██╗ ███████╗██║███████║ ██║
-- ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══════╝╚═╝╚══════╝ ╚═╝
-- ===================================================================
-- Initialization
-- ===================================================================
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local pl = require("utils.powerline")
local theme = require("theme")
local dpi = require('beautiful').xresources.apply_dpi
local capi = {button = button}
local ICON_DIR = gears.filesystem.get_configuration_dir() .. "/images/"
-- define module table
local task_list = {}
-- ===================================================================
-- Functionality
-- ===================================================================
local function create_buttons(buttons, object)
if buttons then
local btns = {}
for _, b in ipairs(buttons) do
-- Create a proxy button object: it will receive the real
-- press and release events, and will propagate them to the
-- button object the user provided, but with the object as
-- argument.
local btn = capi.button {modifiers = b.modifiers, button = b.button}
btn:connect_signal('press',
function()
object.minimized = false
object:raise()
end
)
btns[#btns + 1] = btn
end
return btns
end
end
local function list_update(w, buttons, label, _, objects)
-- update the widgets, creating them if needed
w:reset()
local index = 0
local count = 0
for _ in pairs(objects) do
count = count + 1
end
local static_length = 16 * count
local total_text_length = 0
for _, o in ipairs(objects) do
if o.name then
total_text_length = total_text_length + o.name:len()
end
end
local truncate = (total_text_length + static_length) > 170
for i, o in ipairs(objects) do
index = index + 1
local ib, cb, tb, cbm, bgb, tbm, ibm, tt, l, ll
ib = wibox.widget.imagebox()
tb = wibox.widget.textbox()
cb = wibox.container.margin(wibox.widget.imagebox(ICON_DIR .. "close.svg"), dpi(9), dpi(0), dpi(9), dpi(9))
cb.shape = gears.shape.circle
cbm = wibox.container.margin(cb, dpi(0), dpi(0), dpi(0), dpi(0)) -- 4, 8 ,12 ,12 -- close button
cbm:buttons(gears.table.join(awful.button({}, 1, nil,
function()
o.kill(o)
end
)))
bgb = wibox.container.background()
tbm = wibox.container.margin(tb, dpi(4), dpi(4))
ibm = wibox.container.margin(ib, dpi(5), dpi(5), dpi(5), dpi(5)) -- 12 is default top and bottom margin --app icon
l = wibox.layout.fixed.horizontal()
ll = wibox.layout.fixed.horizontal()
-- All of this is added in a fixed widget
l:fill_space(true)
l:add(ibm)
l:add(tbm)
ll:add(l)
ll:add(cbm)
if (index % 2 == 0) then
local end_color = (count == index or objects[index+1].minimized) and "" or theme.top_panel_powerline
local main_color = o.minimized and "" or theme.bg_normal
bgb:set_widget(pl(ll, main_color, end_color, true))
else
local end_color = (count == index or objects[index+1].minimized) and "" or theme.bg_normal
local main_color = o.minimized and "" or theme.top_panel_powerline
bgb:set_widget(pl(ll, main_color, end_color, true))
end
l:buttons(create_buttons(buttons, o))
-- Tooltip to display whole title, if it was truncated
tt = awful.tooltip({
objects = {tb},
mode = 'outside',
align = 'bottom',
delay_show = 1,
})
local text, _, bg_image, icon, args = label(o, tb)
args = args or {}
-- The text might be invalid, so use pcall.
if text == nil or text == '' then
tbm:set_margins(0)
else
-- truncate when title is too long
local text_only = text:match('>(.*)<')
local max_length = math.floor((155 - static_length) / count)
if (truncate and text_only:len() > max_length) then
text = text:gsub('>(.*)<', '>' .. string.sub(text_only, 1, max_length) .. '...<')
tt:set_text(text)
tt:add_to_object(tb)
else
tt:remove_from_object(tb)
end
if not tb:set_markup_silently(text) then
tb:set_markup('<i>&lt;Invalid text&gt;</i>')
end
end
-- bgb:set_bg(bg)
if type(bg_image) == 'function' then
-- TODO: Why does this pass nil as an argument?
bg_image = bg_image(tb, o, nil, objects, i)
end
-- bgb:set_bgimage(bg_image)
if icon then
ib.image = icon
else
ibm:set_margins(0)
end
w:add(bgb)
end
end
-- ===================================================================
-- Widget Creation
-- ===================================================================
local tasklist_buttons = awful.util.table.join(
awful.button({}, 1,
function(c)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
if not c:isvisible() and c.first_tag then
c.first_tag:view_only()
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end
),
awful.button({}, 2,
function(c)
c.kill(c)
end
),
awful.button({}, 4,
function()
awful.client.focus.byidx(1)
end
),
awful.button({}, 5,
function()
awful.client.focus.byidx(-1)
end
)
)
local filter = function(c, _)
local tags = c.screen.tags
for _, t in ipairs(tags) do
if t.selected then
local ctags = c:tags()
for _, v in ipairs(ctags) do
if v == t and c.screen == client.focus.screen then
return true
end
end
end
end
return false
end
task_list.create = function(s)
return awful.widget.tasklist(
s,
filter,
tasklist_buttons,
{},
list_update,
wibox.layout.fixed.horizontal()
)
end
return task_list

View File

@ -1,119 +0,0 @@
# Volume widget
Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box:
![types](screenshots/variations.png)
From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc`
A right-click on the widget opens a popup where you can choose a sink/source:
![sink-sources](screenshots/volume-sink-sources.png)
Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default).
### Features
- switch between sinks/sources by right click on the widget;
- more responsive than previous versions of volume widget, which were refreshed once a second;
- 5 predefined customizable looks;
## Installation
Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**:
```lua
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
-- default
volume_widget(),
-- customized
volume_widget{
widget_type = 'arc'
},
```
Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`.
### Shortcuts
To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget:
```lua
awful.key({ modkey }, "]", function() volume_widget:inc(5) end),
awful.key({ modkey }, "[", function() volume_widget:dec(5) end),
awful.key({ modkey }, "\\", function() volume_widget:toggle() end),
```
## Customization
It is possible to customize the widget by providing a table with all or some of the following config parameters:
### Generic parameter
| Name | Default | Description |
|---|---|---|
| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) |
| `step` | `5` | How much the volume is raised or lowered at once (in %) |
| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` |
| `device` | `pulse` | Select the device name to control |
Depends on the chosen widget type add parameters from the corresponding section below:
#### `icon` parameters
| Name | Default | Description |
|---|---|---|
| `icon_dir`| `./icons`| Path to the folder with icons |
_Note:_ if you are changing icons, the folder should contain following .svg images:
- audio-volume-high-symbolic
- audio-volume-medium-symbolic
- audio-volume-low-symbolic
- audio-volume-muted-symbolic
#### `icon_and_text` parameters
| Name | Default | Description |
|---|---|---|
| `icon_dir`| `./icons`| Path to the folder with icons |
| `font` | `beautiful.font` | Font name and size, like `Play 12` |
#### `arc` parameters
| Name | Default | Description |
|---|---|---|
| `thickness` | 2 | Thickness of the arc |
| `main_color` | `beautiful.fg_color` | Color of the arc |
| `bg_color` | `#ffffff11` | Color of the arc's background |
| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute |
| `size` | 18 | Size of the widget |
#### `horizontal_bar` parameters
| Name | Default | Description |
|---|---|---|
| `main_color` | `beautiful.fg_normal` | Color of the bar |
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
| `width` | `50` | The bar width |
| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
| `with_icon` | `true` | Show volume icon|
_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins.
#### `vertical_bar` parameters
| Name | Default | Description |
|---|---|---|
| `main_color` | `beautiful.fg_normal` | Color of the bar |
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
| `width` | `10` | The bar width |
| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
| `with_icon` | `true` | Show volume icon|

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-high-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-low-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-medium-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="audio-volume-muted-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="3.4229508"
inkscape:cy="7.947541"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,105 +0,0 @@
local utils = {}
local function split(string_to_split, separator)
if separator == nil then separator = "%s" end
local t = {}
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
table.insert(t, str)
end
return t
end
function utils.extract_sinks_and_sources(pacmd_output)
local sinks = {}
local sources = {}
local device
local properties
local ports
local in_sink = false
local in_source = false
local in_device = false
local in_properties = false
local in_ports = false
for line in pacmd_output:gmatch("[^\r\n]+") do
if string.match(line, 'source%(s%) available.') then
in_sink = false
in_source = true
end
if string.match(line, 'sink%(s%) available.') then
in_sink = true
in_source = false
end
if string.match(line, 'index:') then
in_device = true
in_properties = false
device = {
id = line:match(': (%d+)'),
is_default = string.match(line, '*') ~= nil
}
if in_sink then
table.insert(sinks, device)
elseif in_source then
table.insert(sources, device)
end
end
if string.match(line, '^\tproperties:') then
in_device = false
in_properties = true
properties = {}
device['properties'] = properties
end
if string.match(line, 'ports:') then
in_device = false
in_properties = false
in_ports = true
ports = {}
device['ports'] = ports
end
if string.match(line, 'active port:') then
in_device = false
in_properties = false
in_ports = false
device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','')
end
if in_device then
local t = split(line, ': ')
local key = t[1]:gsub('\t+', ''):lower()
local value = t[2]:gsub('^<', ''):gsub('>$', '')
device[key] = value
end
if in_properties then
local t = split(line, '=')
local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "")
local value
if t[2] == nil then
value = t[2]
else
value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '')
end
properties[key] = value
end
if in_ports then
local t = split(line, ': ')
local key = t[1]
if key ~= nil then
key = key:gsub('\t+', '')
end
ports[key] = t[2]
end
end
return sinks, sources
end
return utils

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>

Before

Width:  |  Height:  |  Size: 354 B

View File

@ -1,230 +0,0 @@
-------------------------------------------------
-- The Ultimate Volume Widget for Awesome Window Manager
-- More details could be found here:
-- https://github.com/streetturtle/widgets/tree/master/volume-widget
-- @author Pavel Makhov
-- @copyright 2020 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local wibox = require("wibox")
local spawn = require("awful.spawn")
local gears = require("gears")
local beautiful = require("beautiful")
local watch = require("awful.widget.watch")
local utils = require("components.widgets.volume-widget.utils")
local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]]
local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end
local function INC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%+' end
local function DEC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%-' end
local function TOG_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sset Master toggle' end
local widget_types = {
icon_and_text = require("components.widgets.volume-widget.widgets.icon-and-text-widget"),
icon = require("components.widgets.volume-widget.widgets.icon-widget"),
arc = require("components.widgets.volume-widget.widgets.arc-widget"),
horizontal_bar = require("components.widgets.volume-widget.widgets.horizontal-bar-widget"),
vertical_bar = require("components.widgets.volume-widget.widgets.vertical-bar-widget")
}
local volume = {}
local rows = { layout = wibox.layout.fixed.vertical }
local popup = awful.popup{
bg = beautiful.bg_normal,
ontop = true,
visible = false,
shape = gears.shape.rounded_rect,
border_width = 1,
border_color = beautiful.bg_focus,
maximum_width = 400,
offset = { y = 5 },
widget = {}
}
local function build_main_line(device)
if device.active_port ~= nil and device.ports[device.active_port] ~= nil then
return device.properties.device_description .. ' · ' .. device.ports[device.active_port]
else
return device.properties.device_description
end
end
local function build_rows(devices, on_checkbox_click, device_type)
local device_rows = { layout = wibox.layout.fixed.vertical }
for _, device in pairs(devices) do
local checkbox = wibox.widget {
checked = device.is_default,
color = beautiful.bg_normal,
paddings = 2,
shape = gears.shape.circle,
forced_width = 20,
forced_height = 20,
check_color = beautiful.fg_urgent,
widget = wibox.widget.checkbox
}
checkbox:connect_signal("button::press", function()
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
on_checkbox_click()
end)
end)
local row = wibox.widget {
{
{
{
checkbox,
valign = 'center',
layout = wibox.container.place,
},
{
{
text = build_main_line(device),
align = 'left',
widget = wibox.widget.textbox
},
left = 10,
layout = wibox.container.margin
},
spacing = 8,
layout = wibox.layout.align.horizontal
},
margins = 4,
layout = wibox.container.margin
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
local old_cursor, old_wibox
row:connect_signal("mouse::enter", function()
local wb = mouse.current_wibox
old_cursor, old_wibox = wb.cursor, wb
wb.cursor = "hand1"
end)
row:connect_signal("mouse::leave", function()
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end)
row:connect_signal("button::press", function()
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
on_checkbox_click()
end)
end)
table.insert(device_rows, row)
end
return device_rows
end
local function build_header_row(text)
return wibox.widget{
{
markup = "<b>" .. text .. "</b>",
align = 'center',
widget = wibox.widget.textbox
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
end
local function rebuild_popup()
spawn.easy_async(LIST_DEVICES_CMD, function(stdout)
local sinks, sources = utils.extract_sinks_and_sources(stdout)
for i = 0, #rows do rows[i]=nil end
table.insert(rows, build_header_row("SINKS"))
table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink"))
table.insert(rows, build_header_row("SOURCES"))
table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source"))
popup:setup(rows)
end)
end
local function worker(user_args)
local args = user_args or {}
local mixer_cmd = args.mixer_cmd or 'pavucontrol'
local widget_type = args.widget_type
local refresh_rate = args.refresh_rate or 1
local step = args.step or 5
local device = args.device or 'pipewire'
if widget_types[widget_type] == nil then
volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args)
else
volume.widget = widget_types[widget_type].get_widget(args)
end
local function update_graphic(widget, stdout)
local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off]
if mute == 'off' then widget:mute()
elseif mute == 'on' then widget:unmute()
end
local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%)
if volume_level ~= nil then
volume_level = string.format("% 3d", volume_level)
widget:set_volume_level(volume_level)
end
end
function volume:inc(s)
spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:dec(s)
spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:toggle()
spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:mixer()
if mixer_cmd then
spawn.easy_async(mixer_cmd)
end
end
volume.widget:buttons(
awful.util.table.join(
awful.button({}, 3, function()
if popup.visible then
popup.visible = not popup.visible
else
rebuild_popup()
popup:move_next_to(mouse.current_widget_geometry)
end
end),
awful.button({}, 4, function() volume:inc() end),
awful.button({}, 5, function() volume:dec() end),
awful.button({}, 2, function() volume:mixer() end),
awful.button({}, 1, function() volume:toggle() end)
)
)
watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget)
return volume.widget
end
return setmetatable(volume, { __call = function(_, ...) return worker(...) end })

View File

@ -1,46 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local thickness = args.thickness or 2
local main_color = args.main_color or beautiful.fg_color
local bg_color = args.bg_color or '#ffffff11'
local mute_color = args.mute_color or beautiful.fg_urgent
local size = args.size or 18
return wibox.widget {
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = true,
widget = wibox.widget.imagebox,
},
max_value = 100,
thickness = thickness,
start_angle = 4.71238898, -- 2pi*3/4
forced_height = size,
forced_width = size,
bg = bg_color,
paddings = 2,
widget = wibox.container.arcchart,
set_volume_level = function(self, new_value)
self.value = new_value
end,
mute = function(self)
self.colors = { mute_color }
end,
unmute = function(self)
self.colors = { main_color }
end
}
end
return widget

View File

@ -1,58 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local gears = require("gears")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local main_color = args.main_color or beautiful.fg_normal
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 50
local margins = args.margins or 10
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false
local bar = wibox.widget {
{
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
visible = with_icon,
layout = wibox.container.place,
},
{
id = 'bar',
max_value = 100,
forced_width = width,
color = main_color,
margins = { top = margins, bottom = margins },
background_color = bg_color,
shape = gears.shape[shape],
widget = wibox.widget.progressbar,
},
spacing = 4,
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
end,
mute = function(self)
self:get_children_by_id('bar')[1]:set_color(mute_color)
end,
unmute = function(self)
self:get_children_by_id('bar')[1]:set_color(main_color)
end
}
return bar
end
return widget

View File

@ -1,59 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local widget = {}
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local font = args.font or beautiful.font
local icon_dir = args.icon_dir or ICON_DIR
return wibox.widget {
{
{
id = "icon",
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place
},
{
id = 'txt',
font = font,
widget = wibox.widget.textbox
},
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('txt')[1]:set_text(new_value)
local volume_icon_name
if self.is_muted then
volume_icon_name = 'audio-volume-muted-symbolic'
else
local new_value_num = tonumber(new_value)
if (new_value_num >= 0 and new_value_num < 33) then
volume_icon_name="audio-volume-low-symbolic"
elseif (new_value_num < 66) then
volume_icon_name="audio-volume-medium-symbolic"
else
volume_icon_name="audio-volume-high-symbolic"
end
end
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
end,
mute = function(self)
self.is_muted = true
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
end,
unmute = function(self)
self.is_muted = false
end
}
end
return widget

View File

@ -1,46 +0,0 @@
local wibox = require("wibox")
local widget = {}
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local icon_dir = args.icon_dir or ICON_DIR
return wibox.widget {
{
id = "icon",
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place,
set_volume_level = function(self, new_value)
local volume_icon_name
if self.is_muted then
volume_icon_name = 'audio-volume-muted-symbolic'
else
local new_value_num = tonumber(new_value)
if (new_value_num >= 0 and new_value_num < 33) then
volume_icon_name="audio-volume-low-symbolic"
elseif (new_value_num < 66) then
volume_icon_name="audio-volume-medium-symbolic"
else
volume_icon_name="audio-volume-high-symbolic"
end
end
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
end,
mute = function(self)
self.is_muted = true
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
end,
unmute = function(self)
self.is_muted = false
end
}
end
return widget

View File

@ -1,64 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local gears = require("gears")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local main_color = args.main_color or beautiful.fg_normal
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 10
local margins = args.height or 2
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false
local bar = wibox.widget {
{
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
visible = with_icon,
layout = wibox.container.place,
},
{
{
id = 'bar',
max_value = 100,
forced_width = width,
forced_height = 5,
margins = { top = margins, bottom = margins },
color = main_color,
background_color = bg_color,
shape = gears.shape[shape],
widget = wibox.widget.progressbar,
},
forced_width = width,
direction = 'east',
layout = wibox.container.rotate,
},
spacing = 4,
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
end,
mute = function(self)
self:get_children_by_id('bar')[1]:set_color(mute_color)
end,
unmute = function(self)
self:get_children_by_id('bar')[1]:set_color(main_color)
end
}
return bar
end
return widget

View File

@ -1,3 +0,0 @@
<svg width="461" height="461" viewBox="0 0 461 461" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M285.08 230.397L456.218 59.27C462.294 53.193 462.294 43.359 456.218 37.284L423.511 4.56501C420.598 1.65401 416.645 0.0150146 412.519 0.0150146C408.392 0.0150146 404.439 1.65401 401.526 4.56501L230.388 175.705L59.25 4.56501C56.337 1.65401 52.384 0.0150146 48.257 0.0150146C44.131 0.0150146 40.177 1.65401 37.265 4.56501L4.55799 37.284C-1.51901 43.359 -1.51901 53.193 4.55799 59.27L175.696 230.398L4.57499 401.505C-1.49901 407.582 -1.49901 417.416 4.57499 423.491L37.284 456.21C40.195 459.121 44.149 460.76 48.276 460.76C52.403 460.76 56.356 459.121 59.27 456.21L230.387 285.09L401.505 456.21C404.418 459.121 408.371 460.76 412.498 460.76C416.626 460.76 420.579 459.121 423.49 456.21L456.199 423.491C462.273 417.416 462.273 407.582 456.199 401.505L285.08 230.397Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 894 B

View File

@ -1,707 +0,0 @@
local awful = require("awful")
local gears = require("gears")
local naughty = require("naughty")
local beautiful = require("beautiful")
local volume_widget = require("components.widgets.volume-widget.volume")
local dpi = beautiful.xresources.apply_dpi
local modkey = "Mod4"
-- define module table
local keys = {}
-- AwesomeWM Vim Tmux Navigator
local function get_first_nonempty_tag()
local screen = awful.screen.focused()
local tags = screen.tags
for _, t in ipairs(tags) do
if #t:clients() == 0 then
return t
end
end
end
local focus_bydirection = function(direction)
awful.client.focus.global_bydirection(direction)
if client.focus then
-- focus on the client
client.focus:raise()
end
-- BUG: focus across screens is wonky when there are no clients on the destination screen
-- https://github.com/awesomeWM/awesome/issues/3638
-- Workaround: manually unfocus client after moving focus to an empty screen
local is_empty_destination = #awful.screen.focused().clients < 1
if is_empty_destination then
-- manually unfocus the current focused client
client.focus = nil
end
end
require("awesomewm-vim-tmux-navigator") {
up = {"Up", "k"},
down = {"Down", "j"},
left = {"Left", "h"},
right = {"Right", "l"},
mod = "Mod4",
mod_keysym = "Super_L",
experimental = true,
focus = focus_bydirection
}
-- ===================================================================
-- Movement Functions (Called by some keybinds)
-- ===================================================================
local function get_screen(s)
return s and screen[s]
end
-- Move given client to given direction
local function move_client(sel, dir)
sel = sel or awful.client.focus
if sel then
-- move focus
awful.client.focus.global_bydirection(dir, sel)
local c = client.focus
-- swapping inside a screen
if get_screen(sel.screen) == get_screen(c.screen) and sel ~= c then
c:swap(sel)
client.focus = sel
sel:raise()
-- swapping to an empty screen
elseif sel == c then
sel:move_to_screen(awful.screen.focused())
-- swapping to a nonempty screen
elseif get_screen(sel.screen) ~= get_screen(c.screen) and sel ~= c then
sel:move_to_screen(c.screen)
client.focus = sel
sel:raise()
end
end
end
-- Resize client in given direction
local floating_resize_amount = dpi(20)
local tiling_resize_factor = 0.01
local function resize_client(c, direction)
if awful.layout.get(mouse.screen) == awful.layout.suit.floating or (c and c.floating) then
if direction == "up" then
c:relative_move(0, 0, 0, -floating_resize_amount)
elseif direction == "down" then
c:relative_move(0, 0, 0, floating_resize_amount)
elseif direction == "left" then
c:relative_move(0, 0, -floating_resize_amount, 0)
elseif direction == "right" then
c:relative_move(0, 0, floating_resize_amount, 0)
end
else
if direction == "up" then
awful.client.incwfact(-tiling_resize_factor)
elseif direction == "down" then
awful.client.incwfact(tiling_resize_factor)
elseif direction == "left" then
awful.tag.incmwfact(-tiling_resize_factor)
elseif direction == "right" then
awful.tag.incmwfact(tiling_resize_factor)
end
end
end
-- ===================================================================
-- Mouse bindings
-- ===================================================================
-- Mouse buttons on the desktop
keys.desktopbuttons = gears.table.join(
-- left click on desktop to hide notification
awful.button({}, 1,
function ()
naughty.destroy_all_notifications()
end
),
awful.button({}, 7, function() volume_widget:inc(5) end),
awful.button({}, 6, function() volume_widget:dec(5) end)
)
-- Mouse buttons on the client
keys.clientbuttons = gears.table.join(
-- Raise client
awful.button({}, 1,
function(c)
client.focus = c
c:raise()
end
),
-- Move and Resize Client
awful.button({modkey}, 1, awful.mouse.client.move),
awful.button({modkey}, 3, awful.mouse.client.resize),
awful.button({}, 7, function() volume_widget:inc(5) end),
awful.button({}, 6, function() volume_widget:dec(5) end)
)
-- ===================================================================
-- Desktop Key bindings
-- ===================================================================
keys.globalkeys = gears.table.join(
-- =========================================
-- SPAWN APPLICATION KEY BINDINGS
-- =========================================
-- Spawn terminal
awful.key({modkey}, "Return",
function()
local c = client.focus
if c and c.class == "Alacritty" then
awful.spawn(string.format(os.getenv("XDG_CONFIG_HOME") .. "/scripts/launch_alacritty.sh %d", c.pid))
else
awful.spawn('bash -c "WINIT_X11_SCALE_FACTOR=1 alacritty"')
end
end,
{description = "open a terminal", group = "launcher"}
),
-- Spawn terminal
awful.key({modkey, "Shift"}, "Return",
function()
awful.spawn('bash -c "WINIT_X11_SCALE_FACTOR=1 alacritty"')
end,
{description = "open a terminal", group = "launcher"}
),
-- Spawn browser
awful.key({modkey}, "b",
function()
awful.spawn("firefox")
end,
{description = "Open Firefox", group = "launcher"}
),
-- Lock the screen
awful.key({"Control", "Mod1"}, "l",
function()
awful.spawn('bash -c "i3lockr --blur 25"')
end,
{description = "Open lock", group = "launcher"}
),
-- Generate TOTP
awful.key({modkey}, "y",
function()
awful.spawn.with_shell(os.getenv("XDG_CONFIG_HOME") .. "/rofi/rofi-ykman.sh")
end,
{description = "Generate TOTP", group = "launcher"}
),
-- Spawn file manager
awful.key({modkey}, "a",
function()
awful.spawn("nautilus")
end,
{description = "Open Nautilus", group = "launcher"}
),
-- launch rofi
awful.key({modkey}, "XF86Launch5",
function()
awful.spawn(os.getenv("XDG_CONFIG_HOME") .. "/scripts/toggle_rofi.sh")
end,
{description = "application launcher", group = "launcher"}
),
-- launch rofi
awful.key({modkey}, "d",
function()
awful.spawn(os.getenv("XDG_CONFIG_HOME") .. "/scripts/toggle_rofi.sh")
end,
{description = "application launcher", group = "launcher"}
),
-- launch clipman
awful.key({modkey}, "c",
function()
awful.spawn.with_shell('CM_LAUNCHER=rofi-script rofi -modi "clipmenu:/usr/bin/clipmenu" -show clipmenu')
end,
{description = "Clipboard manager", group = "launcher"}
),
-- Go to sleep
awful.key({"Control", "Mod2", "Mod4"}, "q",
function()
awful.spawn.with_shell('systemctl suspend')
end,
{description = "Clipboard manager", group = "launcher"}
),
-- Quake
awful.key({ }, "F9", function () awful.screen.focused().quake:toggle() end),
-- =========================================
-- FUNCTION KEYS
-- =========================================
-- Brightness
awful.key({}, "XF86MonBrightnessUp",
function()
awful.spawn("xbacklight -inc 10", false)
end,
{description = "+10%", group = "hotkeys"}
),
awful.key({}, "XF86MonBrightnessDown",
function()
awful.spawn("xbacklight -dec 10", false)
end,
{description = "-10%", group = "hotkeys"}
),
-- ALSA volume control
awful.key({}, "XF86AudioRaiseVolume",
function()
volume_widget:inc(5)
end,
{description = "volume up", group = "hotkeys"}
),
awful.key({}, "XF86AudioLowerVolume",
function()
volume_widget:dec(5)
end,
{description = "volume down", group = "hotkeys"}
),
awful.key({}, "XF86AudioMute",
function()
volume_widget:toggle()
end,
{description = "toggle mute", group = "hotkeys"}
),
awful.key({}, "XF86AudioNext",
function()
awful.spawn("playerctl next", false)
end,
{description = "next music", group = "hotkeys"}
),
awful.key({}, "XF86AudioPrev",
function()
awful.spawn("playerctl previous", false)
end,
{description = "previous music", group = "hotkeys"}
),
awful.key({}, "XF86AudioPlay",
function()
awful.spawn("playerctl play-pause", false)
end,
{description = "play/pause music", group = "hotkeys"}
),
awful.key({modkey}, "XF86AudioMute",
function()
awful.spawn("playerctl play-pause", false)
end,
{description = "play/pause music", group = "hotkeys"}
),
awful.key({modkey}, "XF86AudioRaiseVolume",
function()
awful.spawn("playerctl next", false)
end,
{description = "volume up", group = "hotkeys"}
),
awful.key({modkey}, "XF86AudioLowerVolume",
function()
awful.spawn("playerctl previous", false)
end,
{description = "volume down", group = "hotkeys"}
),
-- Screenshot on prtscn using scrot
awful.key({}, "Print",
function()
awful.spawn("scrot -e 'mv $f ~/Pictures/Screenshots/ 2>/dev/null'", false)
end
),
-- =========================================
-- RELOAD / QUIT AWESOME
-- =========================================
-- Reload Awesome
awful.key({modkey, "Shift"}, "r",
awesome.restart,
{description = "reload awesome", group = "awesome"}
),
-- Quit Awesome
awful.key({modkey}, "Escape",
function()
-- emit signal to show the exit screen
awful.spawn("rofi -show power-menu -modi power-menu:" .. os.getenv("XDG_CONFIG_HOME") .. "/scripts/rofi-power-menu")
end,
{description = "toggle exit screen", group = "hotkeys"}
),
awful.key({}, "XF86PowerOff",
function()
-- emit signal to show the exit screen
awful.spawn("rofi -show power-menu -modi power-menu:~/.config/scripts/rofi-power-menu")
end,
{description = "toggle exit screen", group = "hotkeys"}
),
awful.key({}, "XF86Calculator",
function()
awful.spawn("rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | xsel --clipboard\"")
end,
{description = "Launch the calculator", group = "hotkeys"}
),
-- Focus client by index (cycle through clients)
awful.key({modkey}, "Tab",
function()
local screen = awful.screen.focused()
local tags = screen.tags
local current_tag = screen.selected_tag
local used_tags = {}
for _, t in ipairs(tags) do
if t == current_tag or #t:clients() > 0 then
table.insert(used_tags, t)
end
end
local found = false
for _, t in ipairs(used_tags) do
if found then
t:view_only()
return
elseif t == current_tag then
found = true
end
end
used_tags[1]:view_only()
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({modkey, "Shift"}, "Tab",
function()
local tags = root.tags()
local current_tag = awful.screen.focused().selected_tag
local used_tags = {}
for _, t in ipairs(tags) do
if t == current_tag or #t:clients() > 0 then
table.insert(used_tags, t)
end
end
local found = false
for _, t in ipairs(used_tags) do
if found then
awful.screen.focus(t.screen.index)
t:view_only()
return
elseif t == current_tag then
found = true
end
end
used_tags[1]:view_only()
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({"Mod1"}, "Tab", -- Alt-Tab Cycle through clients
function()
local clients = {}
local found = false
local function focus_client(c)
awful.screen.focus(c.screen.index)
c.first_tag:view_only()
client.focus = c
c:raise()
end
for _, t in ipairs(root.tags()) do
for i, c in ipairs(t:clients()) do
if found then
focus_client(c)
return
elseif c == client.focus then
found = true
end
table.insert(clients, c)
end
end
focus_client(clients[1])
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({modkey}, "t",
function()
local first_empty = get_first_nonempty_tag()
if first_empty ~= nil then
first_empty:view_only()
end
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({modkey, "Shift"}, "t",
function()
local first_empty = get_first_nonempty_tag()
if first_empty ~= nil then
client.focus:move_to_tag(first_empty)
first_empty:view_only()
end
end,
{description = "Switch to next tag", group = "client"}
),
-- =========================================
-- SCREEN FOCUSING
-- =========================================
-- Focus screen by index (cycle through screens)
awful.key({modkey}, "s",
function()
awful.screen.focus_relative(-1)
end
),
-- =========================================
-- CLIENT RESIZING
-- =========================================
awful.key({modkey, "Control"}, "Down",
function(_)
resize_client(client.focus, "down")
end
),
awful.key({modkey, "Control"}, "Up",
function(_)
resize_client(client.focus, "up")
end
),
awful.key({modkey, "Control"}, "Left",
function(_)
resize_client(client.focus, "left")
end
),
awful.key({modkey, "Control"}, "Right",
function(_)
resize_client(client.focus, "right")
end
),
awful.key({modkey, "Control"}, "j",
function(_)
resize_client(client.focus, "down")
end
),
awful.key({ modkey, "Control" }, "k",
function(_)
resize_client(client.focus, "up")
end
),
awful.key({modkey, "Control"}, "h",
function(_)
resize_client(client.focus, "left")
end
),
awful.key({modkey, "Control"}, "l",
function(_)
resize_client(client.focus, "right")
end
),
-- =========================================
-- GAP CONTROL
-- =========================================
-- Gap control
-- awful.key({modkey, :Shift"}, "minus",
-- function()
-- awful.tag.incgap(5, nil)
-- end,
-- {description = "increment gaps size for the current tag", group = "gaps"}
-- ),
-- awful.key({modkey}, "minus",
-- function()
-- awful.tag.incgap(-5, nil)
-- end,
-- {description = "decrement gap size for the current tag", group = "gaps"}
-- ),
awful.key({ modkey }, "=",
function ()
awful.tag.incncol( 1, nil, true)
end,
{description = "increase the number of columns", group = "layout"}
),
awful.key({ modkey }, "minus",
function ()
awful.tag.incncol(-1, nil, true)
end,
{description = "decrease the number of columns", group = "layout"}
),
-- =========================================
-- LAYOUT SELECTION
-- =========================================
-- select next layout
awful.key({modkey}, "space",
function()
awful.layout.inc(1)
end,
{description = "select next", group = "layout"}
),
-- select previous layout
awful.key({modkey, "Shift"}, "space",
function()
awful.layout.inc(-1)
end,
{description = "select previous", group = "layout"}
),
-- =========================================
-- CLIENT MINIMIZATION
-- =========================================
-- restore minimized client
awful.key({modkey, "Shift"}, "n",
function()
local c = awful.client.restore()
-- Focus restored client
if c then
client.focus = c
c:raise()
end
end,
{description = "restore minimized", group = "client"}
)
)
-- ===================================================================
-- Client Key bindings
-- ===================================================================
keys.clientkeys = gears.table.join(
-- Move to edge or swap by direction
awful.key({modkey, "Shift"}, "Down",
function(c)
move_client(c, "down")
end
),
awful.key({modkey, "Shift"}, "Up",
function(c)
move_client(c, "up")
end
),
awful.key({modkey, "Shift"}, "Left",
function(c)
move_client(c, "left")
end
),
awful.key({modkey, "Shift"}, "Right",
function(c)
move_client(c, "right")
end
),
awful.key({modkey, "Shift"}, "j",
function(c)
move_client(c, "down")
end
),
awful.key({modkey, "Shift"}, "k",
function(c)
move_client(c, "up")
end
),
awful.key({modkey, "Shift"}, "h",
function(c)
move_client(c, "left")
end
),
awful.key({modkey, "Shift"}, "l",
function(c)
move_client(c, "right")
end
),
-- close client
awful.key({modkey}, "q",
function(c)
c:kill()
for _, i in ipairs(client.get()) do
i.minimized = false
end
end,
{description = "close", group = "client"}
),
-- float client
awful.key({modkey}, "f",
function(c)
awful.client.floating.toggle(c)
end,
{description = "float", group = "client"}
),
-- Minimize
awful.key({modkey}, "n",
function(c)
c.minimized = true
end,
{description = "minimize", group = "client"}
),
-- Maximize
awful.key({modkey}, "m",
function(c)
c.maximized = not c.maximized
c:raise()
end,
{description = "(un)maximize", group = "client"}
),
-- Full Screen
awful.key({modkey}, "F11",
function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "(un)fullscreen", group = "client"}
)
)
local function register_tag(tag)
keys.globalkeys = gears.table.join(keys.globalkeys,
-- Switch to tag
awful.key({modkey}, "#" .. tag + 9,
function()
local screen = awful.screen.focused()
local t = screen.tags[tag]
if t then
t:view_only()
end
end,
{description = "view tag #"..tag, group = "tag"}
),
-- Move client to tag
awful.key({modkey, "Shift"}, "#" .. tag + 9,
function()
if client.focus then
local t= client.focus.screen.tags[tag]
if t then
client.focus:move_to_tag(t)
t:view_only()
end
end
end,
{description = "move focused client to tag #"..tag, group = "tag"}
)
)
end
-- Bind all key numbers to tags
for i = 1, 10 do
register_tag(i)
end
return keys

@ -1 +0,0 @@
Subproject commit 88f5a8abd2649b348ffec433a24a263b37f122c0

View File

@ -1,69 +0,0 @@
-- Standard awesome libraries
local gears = require("gears")
local awful = require("awful")
local beautiful = require("beautiful")
-- Local imports
local grid = require("components.layout.grid")
-- Import theme
beautiful.init(gears.filesystem.get_configuration_dir() .. "theme.lua")
-- Load components
require("components.notifications")
require("components.screen")
require("utils.signals")
-- Autofocus a new client when previously focused one is closed
require("awful.autofocus")
-- Define layouts
awful.layout.append_default_layouts({
awful.layout.suit.tile,
awful.layout.suit.floating,
grid.horizontal,
awful.layout.suit.fair.horizontal,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
grid,
})
-- List of apps to run on start-up
local run_on_start_up = {
"numlockx on",
"nm-applet",
"xcape -e \"Super_L=Super_L|XF86Launch5\" -t 5000",
gears.filesystem.get_configuration_dir() .. "/scripts/setup_display.sh",
"feh --no-fehbg --bg-fill " .. gears.filesystem.get_configuration_dir() .. "/images/wallpaper.png",
}
-- Run all the apps listed in run_on_start_up
for _, app in ipairs(run_on_start_up) do
local findme = app
local firstspace = app:find(" ")
if firstspace then
findme = app:sub(0, firstspace - 1)
end
-- Run commands only if it's not already running.
awful.spawn.with_shell(string.format("echo 'pgrep -f -u $USER -x %s > /dev/null || (%s)' | bash -", findme, app), false)
end
-- Start timers
gears.timer {
timeout = 60,
call_now = true,
autostart = true,
callback = function()
awful.spawn({"xmodmap", "/home/user/.Xmodmap"}) -- If not repeated it sometimes just stops working
end
}
-- Import Keybinds
local keys = require("keys")
root.keys(keys.globalkeys)
root.buttons(keys.desktopbuttons)
-- Import rules
local create_rules = require("rules").create
awful.rules.rules = create_rules(keys.clientkeys, keys.clientbuttons)

View File

@ -1,73 +0,0 @@
-- ██████╗ ██╗ ██╗██╗ ███████╗███████╗
-- ██╔══██╗██║ ██║██║ ██╔════╝██╔════╝
-- ██████╔╝██║ ██║██║ █████╗ ███████╗
-- ██╔══██╗██║ ██║██║ ██╔══╝ ╚════██║
-- ██║ ██║╚██████╔╝███████╗███████╗███████║
-- ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚══════╝
-- ===================================================================
-- Initialization
-- ===================================================================
local awful = require("awful")
local beautiful = require("beautiful")
-- define screen height and width
local screen_height = awful.screen.focused().geometry.height
local screen_width = awful.screen.focused().geometry.width
-- define module table
local rules = {}
-- ===================================================================
-- Rules
-- ===================================================================
-- return a table of client rules including provided keys / buttons
function rules.create(clientkeys, clientbuttons)
return {
-- All clients will match this rule.
{
rule = {},
properties = {
titlebars_enabled = beautiful.titlebars_enabled,
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.centered,
size_hints_honor = false
},
},
-- Floating clients.
{
rule_any = {
name = {
"Steam Guard - Computer Authorization Required"
},
role = {
"pop-up",
"GtkFileChooserDialog"
},
type = {
"dialog"
}
}, properties = {floating = true}
},
-- File chooser dialog
{
rule_any = {role = {"GtkFileChooserDialog"}},
properties = {floating = true, width = screen_width * 0.55, height = screen_height * 0.65}
},
}
end
-- return module table
return rules

View File

@ -1,48 +0,0 @@
local dpi = require("beautiful.xresources").apply_dpi
local theme = {}
-- Font
theme.font = "Ubuntu 12"
theme.title_font = "Ubuntu 12"
-- Background
theme.bg_normal = "#1f2430"
theme.bg_dark = "#000000"
theme.bg_focus = "#151821"
theme.bg_urgent = "#ed8274"
theme.bg_minimize = "#444444"
-- Foreground
theme.fg_normal = "#ffffff"
theme.fg_focus = "#e4e4e4"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
-- Window Gap Distance
theme.useless_gap = dpi(2)
-- Show Gaps if Only One Client is Visible
theme.gap_single_client = false
-- Window Borders
theme.border_width = dpi(3)
theme.border_normal = "#00000000"
theme.border_focus = "#002F5F"
theme.border_marked = theme.fg_urgent
-- Panel Sizing
theme.top_panel_height = dpi(30)
theme.top_panel_powerline = "#002F5F"
-- Taglist
theme.taglist_bg_focus = theme.top_panel_powerline
-- Notification Sizing
theme.notification_max_width = dpi(350)
-- System Tray
theme.bg_systray = theme.top_panel_powerline
theme.systray_icon_spacing = dpi(15)
-- return theme
return theme

View File

@ -1,22 +0,0 @@
local mouse_utils = {}
function mouse_utils.move_mouse_onto_focused_client()
local c = client.focus
if c then
local geometry = c:geometry()
local mouse_coords = mouse.coords()
local margin = 10
-- Don't move the mouse if it's already over the client
if not (mouse_coords.x > geometry.x - margin
and mouse_coords.x < geometry.x + geometry.width + margin
and mouse_coords.y > geometry.y - margin
and mouse_coords.y < geometry.y + geometry.height + margin) then
local x = geometry.x + geometry.width/2
local y = geometry.y + geometry.height/2
mouse.coords({x = x, y = y}, true)
end
end
end
return mouse_utils

View File

@ -1,34 +0,0 @@
local lain = require("lain")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
-- ===================================================================
-- Helper functions
-- ===================================================================
local function powerline(widget, bgcolor, adjacentcolor, right)
right = right or false
local arrow = right and lain.util.separators.arrow_right or lain.util.separators.arrow_left
-- if (not right) then
-- table.insert(container, )
-- else
-- table.insert(container, )
-- end
return wibox.widget{
{
layout = wibox.layout.fixed.horizontal,
{
wibox.container.margin(widget, dpi(6), dpi(10), dpi(0), dpi(1)),
bg = bgcolor,
widget = wibox.container.background
},
arrow(bgcolor, adjacentcolor)
},
top = 0, bottom = 0, left = 0, right = 0,
widget = wibox.container.margin
}
end
return powerline

View File

@ -1,79 +0,0 @@
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
local mouse_utils = require("utils.mouse")
-- Focus clients under mouse
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
client.connect_signal("manage", function (c)
-- Set the window as a slave (put it at the end of others instead of setting it as master)
if not awesome.startup then
awful.client.setslave(c)
end
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
-- Unminimize and unmaximize the other clients
for _, o in ipairs(client.get()) do
o.minimized = false
o.maximized = false
o.fullscreen = false
end
gears.timer.delayed_call(function()
local geometry = c:geometry()
local x = geometry.x + geometry.width/2
local y = geometry.y + geometry.height/2
mouse.coords({x = x, y = y}, true)
end)
end)
-- Reload config when screen geometry changes
screen.connect_signal("property::geometry", awesome.restart)
-- ===================================================================
-- Garbage collection (allows for lower memory consumption)
-- ===================================================================
collectgarbage("setpause", 110)
collectgarbage("setstepmul", 1000)
client.connect_signal("property::maximized", function(focused)
local hide = focused.maximized or focused.fullscreen
for _, c in ipairs(client.get()) do
if not c.floating and c.screen == focused.screen and c.first_tag == focused.first_tag then
c.minimized = hide
end
end
focused.minimized = false
end)
client.connect_signal("unmanage", function(unmanaged)
if unmanaged.maximized then
for _, c in ipairs(client.get()) do
if not c.floating and c.screen == unmanaged.screen then
c.minimized = false
end
end
end
end)
client.connect_signal("focus", function(c)
if #c.screen.clients > 1 then
c.border_color = beautiful.border_focus
end
gears.timer.delayed_call(mouse_utils.move_mouse_onto_focused_client)
end)
client.connect_signal("unfocus", function(c)
c.border_color = beautiful.border_normal
end)

View File

@ -1,12 +0,0 @@
[global]
frame_color = "#00000000"
separator_color= frame
background = "#24273A"
foreground = "#ffffff"
font = "Ubuntu 10.5"
width = (0, 600)
padding = 15
origin = top-right
offset = 10x10
horizontal_padding = 20
gap_size = 15

View File

@ -1,26 +0,0 @@
[user]
email = email@thomasave.be
name = Thomas Avé
[alias]
s = status
a = add
[color]
ui = auto
[core]
excludesfile = ~/.gitignore
editor = nvim
[diff]
noprefix = true
[pull]
rebase = false
[push]
autoSetupRemote = true
[init]
defaultBranch = master
[credential]
helper = store
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f

View File

@ -1,8 +0,0 @@
(
move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
stash_open: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
)

View File

@ -1,23 +0,0 @@
(
selected_tab: Reset,
command_fg: White,
selection_bg: Blue,
selection_fg: White,
cmdbar_bg: Blue,
cmdbar_extra_lines_bg: Blue,
disabled_fg: DarkGray,
diff_line_add: Green,
diff_line_delete: Red,
diff_file_added: LightGreen,
diff_file_removed: LightRed,
diff_file_moved: LightMagenta,
diff_file_modified: Yellow,
commit_hash: Magenta,
commit_time: LightCyan,
commit_author: Green,
danger_fg: Red,
push_gauge_bg: Blue,
push_gauge_fg: Reset,
tag_fg: LightMagenta,
branch_fg: LightYellow,
)

View File

@ -1,13 +0,0 @@
theme = "base16_transparent"
[editor]
line-number = "relative"
mouse = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false

View File

@ -1,61 +0,0 @@
{ config, pkgs, ... }:
{
home.username = "server";
home.homeDirectory = "/home/server";
home.stateVersion = "23.11"; # Please read the comment before changing.
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
pkgs.ctop
pkgs.nodejs
pkgs.luarocks
pkgs.jre
pkgs.stdenv.cc.cc.lib
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
EDITOR = "nvim";
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib";
};
programs.home-manager.enable = true;
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
}

View File

@ -1,172 +0,0 @@
env = WLR_NO_HARDWARE_CURSORS,1
env = TERMINAL,alacritty
$scripts = /home/user/.config/scripts
$mainMod = SUPER
monitor=DP-3,preferred,0x550,1
monitor=DP-2,preferred,1920x0,1
monitor=HDMI-A-1,preferred,5760x550,1
exec-once=hyprpaper
exec-once=wl-paste --type text --watch cliphist store
exec-once=wl-paste --type image --watch cliphist store
exec-once=/usr/lib/mate-polkit/polkit-mate-authentication-agent-1
exec-once=/usr/lib/kdeconnectd
exec-once=waybar
exec-once=hyprpm reload -n
# windowrulev2 = tile, class:.*
windowrulev2 = float, title:^(rofi)(.*)$
windowrulev2 = center, title:^(rofi)(.*)$
windowrulev2 = noborder, title:^(rofi)(.*)$
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrule = noanim,waybar
binds {
scroll_event_delay=1
}
input {
kb_layout = us
follow_mouse = 1
kb_options = compose:rctrl, caps:super, altwin:swap_alt_win
numlock_by_default = true
}
general {
gaps_in = 1
gaps_out = 5
border_size = 2
col.active_border = rgba(002f5fee)
col.inactive_border = rgba(ffffff00)
layout = dwindle
}
xwayland {
force_zero_scaling = true
}
misc {
disable_hyprland_logo = 1
}
decoration {
rounding = 1
blur {
enabled = false
}
}
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, 2, myBezier
animation = windowsOut, 1, 2, default, popin 80%
animation = border, 1, 2, default
animation = borderangle, 1, 2, default
animation = fade, 1, 2, default
animation = workspaces, 1, 1, default
}
dwindle {
preserve_split = yes
no_gaps_when_only = 1
force_split = 2
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
workspace_swipe_invert = false
}
bindr = $mainMod, SUPER_L, exec, pkill rofi || rofi -show drun
bindr = $mainMod, SUPER_R, exec, pkill rofi || rofi -show drun
bind = $mainMod, return, exec, $scripts/launch_alacritty.sh $(hyprctl activewindow -j | jq .pid)
bind = $mainMod SHIFT, return, exec, alacritty
bind = $mainMod, Q, killactive,
bind = $mainMod, A, exec, nautilus
bind = $mainMod, S, exec, gnome-calendar
bind = $mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox
bind = $mainMod, M, fullscreen, 1
bind = $mainMod, F11, fullscreen
bind = $mainMod, F, togglefloating,
bind = $mainMod, SPACE, togglesplit, # dwindle
bind = CONTROL_L ALT_L, L, exec, swaylock
bind = $mainMod, C, exec, cliphist list | awk '{print $0, "\0icon\x1fcom.github.davidmhewitt.clipped"}' | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy
bind = $mainMod, Y, exec, /home/user/.config/rofi/rofi-ykman.sh
bind = $mainMod, N, exec, /home/user/.config/rofi/rofi-ssh.sh
bind = $mainMod, Escape, exec, rofi -show power-menu -modi power-menu:$scripts/rofi-power-menu
bind = ,XF86MonBrightnessUp, exec, xbacklight -inc 10
bind = ,XF86MonBrightnessDown, exec, xbacklight -dec 10
bind = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0
bind = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-
bind = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind = ,mouse_right, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0
bind = ,mouse_left, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
bind = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = ,XF86AudioNext, exec, playerctl next
bind = ,XF86AudioPrev, exec, playerctl previous
bind = $mainMod,XF86AudioMute, exec, playerctl play-pause
bind = $mainMod,XF86AudioRaiseVolume, exec, playerctl next
bind = $mainMod,XF86AudioLowerVolume, exec, playerctl previous
bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy
# Move focus with mainMod + arrow keys
bind = $mainMod, H, exec, $scripts/vim-hypr-nav.sh l
bind = $mainMod, L, exec, $scripts/vim-hypr-nav.sh r
bind = $mainMod, K, exec, $scripts/vim-hypr-nav.sh u
bind = $mainMod, J, exec, $scripts/vim-hypr-nav.sh d
bind = $mainMod CONTROL_L, H, swapwindow, l
bind = $mainMod CONTROL_L, L, swapwindow, r
bind = $mainMod CONTROL_L, K, swapwindow, u
bind = $mainMod CONTROL_L, J, swapwindow, d
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
binde = $mainMod ALT, L, resizeactive, 20 0
binde = $mainMod ALT, H, resizeactive, -20 0
binde = $mainMod ALT, K, resizeactive, 0 -20
binde = $mainMod ALT, J, resizeactive, 0 20
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
bind = $mainMod SHIFT, 1, split-movetoworkspace, 1
bind = $mainMod SHIFT, 2, split-movetoworkspace, 2
bind = $mainMod SHIFT, 3, split-movetoworkspace, 3
bind = $mainMod SHIFT, 4, split-movetoworkspace, 4
bind = $mainMod SHIFT, 5, split-movetoworkspace, 5
bind = $mainMod SHIFT, 6, split-movetoworkspace, 6
bind = $mainMod SHIFT, 7, split-movetoworkspace, 7
bind = $mainMod SHIFT, 8, split-movetoworkspace, 8
bind = $mainMod SHIFT, 9, split-movetoworkspace, 9
bind = $mainMod SHIFT, T, split-movetoworkspace, empty
bind = $mainMod, T, split-workspace, empty
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, TAB, split-workspace, m+1
bind = $mainMod SHIFT, TAB, split-workspace, m-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View File

@ -1,6 +0,0 @@
ipc = off
splash = false
preload = ~/.config/awesome/images/wallpaper.png
wallpaper = DP-3,~/.config/awesome/images/wallpaper.png
wallpaper = DP-2,~/.config/awesome/images/wallpaper.png
wallpaper = HDMI-A-1,~/.config/awesome/images/wallpaper.png

View File

@ -1,184 +0,0 @@
set $mod Mod4
font pango:monospace 0
exec --no-startup-id "/home/user/.config/scripts/setup_display.sh"
exec_always --no-startup-id "feh --no-fehbg --bg-fill /home/user/.config/wallpaper/wallpaper.png"
exec --no-startup-id "picom -b"
exec_always --no-startup-id "killall polybar; polybar -r &"
exec --no-startup-id "nm-applet &"
exec_always --no-startup-id "xmodmap /home/user/.Xmodmap"
exec --no-startup-id xcape -e "Super_L=Super_L|XF86Launch5" -t 5000
bindsym --whole-window --border button7 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym --whole-window --border button6 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2%
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
bindsym $mod+XF86AudioMute exec --no-startup-id playerctl play-pause
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id playerctl next
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id playerctl previous
bindsym $mod+XF86AudioMute exec --no-startup-id playerctl play-pause
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl s 10%+
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl s 10%-
bindsym ctrl+Mod4+q exec systemctl suspend
bindsym ctrl+Mod1+l exec i3lockr --blur 25
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec /home/user/.config/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
bindsym $mod+minus split v; exec /home/user/.config/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
bindsym $mod+bar split h; exec /home/user/.config/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec "~/.config/scripts/toggle_rofi.sh"
bindsym $mod+XF86Launch5 exec "~/.config/scripts/toggle_rofi.sh"
bindsym $mod+Escape exec "rofi -show power-menu -modi power-menu:~/.config/scripts/rofi-power-menu"
bindsym XF86PowerOff exec "rofi -show power-menu -modi power-menu:~/.config/scripts/rofi-power-menu"
bindsym $mod+c exec CM_LAUNCHER=rofi-script rofi -modi "clipmenu:/usr/bin/clipmenu" -show clipmenu
bindsym $mod+b exec firefox
bindsym $mod+a exec nautilus
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+ctrl+l split h
# split in vertical orientation
bindsym $mod+ctrl+j split v
# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+m exec "/home/user/.config/i3/toggle_maximize.sh"
bindsym $mod+m fullscreen toggle
# toggle tiling / floating
bindsym $mod+f floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the child container
#bindsym $mod+d focus child
# 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"
workspace 1 output DP-1
workspace 2 output primary
workspace 1 output DP-2
# 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; workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2; workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3; workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4; workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5; workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6; workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7; workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8; workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9; workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace number $ws10
# 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
# 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
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
# Colors
client.focused #00000000 #00000000 #ffffff #2e9ef4 #002F5F
client.unfocused #00000000 #00000000 #ffffff #2e9ef4 #00000000
client.focused_inactive #00000000 #00000000 #ffffff #484e50 #00000000
bindsym $mod+r mode "resize"
# Hide the title bar
default_border pixel 2
default_floating_border pixel 2
# Useless gapps
gaps inner 5
smart_gaps on

View File

@ -1,15 +0,0 @@
ACTIVE_WORKSPACE=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused == true) | .name')
if [ $ACTIVE_WORKSPACE != fullscreen ]
then
i3-msg mark _maximized_window
gnome-terminal
i3-msg mark _placeholder_window
i3-msg [con_mark="_maximized_window"] focus
i3-msg move container to workspace fullscreen
i3-msg [con_mark="_maximized_window"] focus
else
i3-msg swap mark "_placeholder_window"
i3-msg [con_mark="_maximized_window"] focus
i3-msg unmark _maximized_window
i3-msg [con_mark="_placeholder_window"] kill
fi

View File

@ -1,22 +0,0 @@
set icons true
set autoquit true
set mouse true
set number true
set relativenumber true
set cursorpreviewfmt ""
cmd q quit
map <backspace2> quit
map <c-e> half-up
map . set hidden!
map o $nvim -c "lua require(\"oil\").open(\"$PWD\")"
map - $nvim -c "lua require(\"oil\").open(\"$PWD\")"
map <enter> open
cmd jump ${{
res=$(zsh -c "source $HOME/.zshrc && find_global d")
lf -remote "send $id cd \"$res\""
}}
map <c-t> :jump <enter>

View File

@ -1,46 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"bufferline.nvim": { "branch": "main", "commit": "f4b4b980ce88d546aeb69d11463187c8f716a1a1" },
"catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-snippy": { "branch": "master", "commit": "6e39210aa3a74e2bf6462f492eaf0d436cd2b7d3" },
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" },
"gen.nvim": { "branch": "main", "commit": "87fbe811155b90eea58622614809705b966009ad" },
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"neogit": { "branch": "master", "commit": "98e6e855266282a3dd32e642ea14209b8787882a" },
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
"nvim-snippy": { "branch": "master", "commit": "1184a8734e998649f3bb9a5db9efd4543282050b" },
"nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" },
"nvim-treesitter": { "branch": "master", "commit": "99d3e799b46f5c2a1fc0d7a42d7ab452de48c067" },
"nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" },
"obsidian.nvim": { "branch": "main", "commit": "754d3410b907b5f5ae3c9f4ccf643ea945021341" },
"oil.nvim": { "branch": "master", "commit": "bcfc0a2e01def5019aa14fac2fc6de20dedb6d3d" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-undo.nvim": { "branch": "main", "commit": "95b61c01ea3a4c9e8747731148e905bbcf0ccaee" },
"telescope.nvim": { "branch": "master", "commit": "2d0d057791854decb2c9b6a0b52d43f3900dff40" },
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
"tree-sitter-hyprlang": { "branch": "master", "commit": "e5da7d0aa44403153e0394d87d9edea4e5bd6609" },
"tree-sitter-typst": { "branch": "master", "commit": "823309ed8b872dd33c7f350a3bab3d6e51436a5a" },
"trim.nvim": { "branch": "master", "commit": "4fe47a46c02a58894ded8328ca81f6c214a892f5" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"vim-bracketed-paste": { "branch": "master", "commit": "ffa3bc10ab511a646f1b30bc9345f240c15394e9" },
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
"vim-hypr-nav": { "branch": "main", "commit": "6ab4865a7eb5aad35305298815a4563c9d48556a" },
"vim-rooter": { "branch": "master", "commit": "45e53f01e4e1c4a3ee20814de232162713aff578" },
"vim-snippets": { "branch": "master", "commit": "393d980157b8149b3ff65a48bc4aae24dca9c846" },
"vimtex": { "branch": "master", "commit": "a80934749c69cc6875b3c9b13ef59573a4824fb2" }
}

View File

@ -1,412 +0,0 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 10;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# 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'",
"_GTK_FRAME_EXTENTS@:c",
"!focused"
];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
fading = false
# fading = false;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 1;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 1;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 0
# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []
# Do not fade on window open/close.
no-fading-openclose = true
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 0.99
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true
# inactive-opacity-override = true;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = ["0:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_HIDDEN'",]
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
#
# blur-strength = 5
# 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 = false
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# 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-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
backend = "glx"
# backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# 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 = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# 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. This usually means windows from the same application
# will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
#
# detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
glx-no-stencil = 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
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ""
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = 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.
#
# clip-shadow-above:::
# Controls wether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# 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; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};

View File

@ -1,13 +0,0 @@
;==========================================================
; Color theme
;==========================================================
[colors]
background = #1f2430
blue = #002F5F
red = #802929
green = #427241
yellow = #dbd759
black = #000000
white = #ffffff
gray = #808080

View File

@ -1,198 +0,0 @@
;==========================================================
;
;==========================================================
; Include powerline utility
include-file = ~/.config/polybar/powerline-for-polybar.config
; Include color scheme
include-file = ~/.config/polybar/colors.config
;=======================================
; Bar
;=======================================
[bar/example]
; Generic options
width = 100%
height = 32
dpi-x = 96
dpi-y = 96
tray-position = right
tray-background = ${colors.blue}
tray-offset-x = 0
tray-padding = 7
; Set bar's default background/foreground color
background = #9912151c
foreground = ${colors.white}
; Set bar's fonts list
font-0 = "Noto Sans:size=13:weight=85:antialias=true;3"
font-1 = "Source Code Pro:pixelsize=20:antialias=true;6"
font-2 = "Source Code Pro:size=11:weight=bold:antialias=true;3"
font-3 = "Font Awesome 6 Free Solid:size=10:antialias=true;3"
font-4 = "Font Awesome 6 Free:size=10:antialias=true;3"
font-5 = "Font Awesome 6 Brands:size=10:antialias=true;3"
font-6 = "Font Awesome v4 Compatibility:size=10:antialias=true;3"
; Set modules list
modules-left = xwindow
modules-center = i3
modules-right = updates temperature memory clockspeed cpu pulseaudio date startarrow
fixed-center = true
;=======================================
; Modules
;=======================================
[module/startarrow]
inherit = powerline-modules/right-to-left-starting-arrow
background = ${colors.blue}
background-next = ${colors.background}
[module/pulseaudio]
type = internal/pulseaudio
inherit = powerline-templates/right-to-left-item
background = ${colors.blue}
background-next = ${colors.background}
label-muted-foreground = ${colors.gray}
format-foreground = ${colors.white}
format-volume-background = ${colors.blue}
format-muted-background = ${colors.blue}
format-volume = " <ramp-volume> <label-volume> "
format-muted = "  <label-volume> "
ramp-volume-0 = 🔈
ramp-volume-1 = 🔊
[module/date]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = internal/date
format-background = ${self.background}
format-foreground = ${colors.white}
date = " %a %b %d, %H:%M:%S "
[module/cpu]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = internal/cpu
format-background = ${self.background}
format-foreground = ${colors.white}
label = " CPU %percentage%% "
[module/memory]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = internal/memory
format-background = ${self.background}
format-foreground = ${colors.white}
label = " %used% "
[module/updates]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${root.background}
; Other settings
type = custom/script
format-background = ${self.background}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = checkupdates | wc -l
format = "  <label> "
click-left = WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo Done, press any key to exit... ; read"
[module/clockspeed]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.blue}
background-next = ${colors.background}
; Other settings
type = custom/script
format-background = ${self.background}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = cat /proc/cpuinfo | grep MHz | cut -b 12- | sort -r | head -n 1 | xargs printf '%f / 1000\\n' | bc -l | awk '{printf "%.2f\\n", $0}'
format = " <label> GHz "
[module/temperature]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.blue}
background-next = ${colors.background}
; Other settings
type = custom/script
format-background = ${colors.blue}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = sensors | grep Tctl | awk '{print $2}' | cut -d '+' -f 2
format = " <label> "
[module/governor]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = custom/script
format-background = ${self.background}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
format = " <label> "
click-left = /home/user/.config/scripts/toggle_performance.sh
[module/xwindow]
; Other settings
type = internal/xwindow
inherit = powerline-templates/left-to-right-item
background = ${colors.blue}
background-next = ${root.background}
format-background = ${self.background}
format-foreground = ${colors.white}
label = "  %title% "
label-maxlen = 80
[module/i3]
type = internal/i3
pin-workspaces = false
show-urgent = true
index-sort = true
enable-click = true
label-unfocused-padding = 3
label-focused-background = ${colors.blue}
label-visible-background = ${colors.background}
label-focused-padding = 3
label-focused-font=3
label-unfocused-font=3
label-visible-font=3
label-separator-padding = 2
label-focused = %index%
label-unfocused = %index%
label-visible = %index%
label-visible-mode = %mode%
label-mode-padding = 3
label-visible-padding = 3
label-mode-background = ${colors.blue}
[module/battery]
type = custom/script
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
format-background = ${self.background}
format-foreground = ${colors.white}
exec = upower -i /org/freedesktop/UPower/devices/battery_BAT1 | ag percentage | awk '{print $2}'
format = " <label>  "

View File

@ -1,448 +0,0 @@
; ============================================================================ ;
;
; POWERLINE FOR POLYBAR - powerline-for-polybar.config
;
; ---------------------------------------------------------------------------- ;
;
; This file contains all the necessary stuff to build your own, Powerline-based,
; fancy Polybar setup.
;
; ---------------------------------------------------------------------------- ;
;
; All provided templates are documented in this file, with a description and
; the usage syntax.
;
; ============================================================================ ;
; ============================================================================
;
; :: STAND-ALONE MODULES ::
;
; ============================================================================ ;
; ============================================================================ ;
; modules :: left-to-right
; ============================================================================ ;
;
; # Left-to-right starting arrow
;
; Display a starting arrow at the beginning of a left-to-right line.
;
; NOTE: You may want to add customized content here. DON'T ! Use a regular,
; left-to-right-item for this purpose. Background and foreground colors
; are set on a per module basis.
;
; Usage:
; [module/mystartingarrow]
; inherit = powerline-modules/left-to-right-starting-arrow
; background = #rrggbb
; background-next = #rrggbb
;
; Mandatory settings:
; background Color of starting arrow. People often wants this to match
; the main theme color.
; background-next Background color of first item in line.
;
[powerline-modules/left-to-right-starting-arrow]
type = custom/text
content-background = ${self.background-next}
content-foreground = ${self.background}
content = ""
;
; # Left-to-right end-of-line separator
;
; Display a final arrow to nicely end your line with separators.
;
; Usage:
; [module/myendingarrow]
; inherit = powerline-modules/left-to-right-end-of-line-separator
; separator = #rrggbb
;
; Mandatory settings:
; separator Color of line item separator.
;
[powerline-modules/left-to-right-end-of-line-separator]
type = custom/text
content-foreground = ${self.separator}
content = ""
; ============================================================================ ;
; modules :: right-to-left
; ============================================================================ ;
;
; # Right-to-left starting arrow
;
; Display a starting arrow at the beginning of a right-to-left line.
;
; NOTE: You may want to add customized content here. DON'T ! Use a regular,
; right-to-left-item for this purpose. Background and foreground colors
; are set on a per module basis.
;
; Usage:
; [module/mystartingarrow]
; inherit = powerline-modules/right-to-left-starting-arrow
; background = #rrggbb
; background-next = #rrggbb
;
; Mandatory settings:
; background Color of starting arrow. People often wants this to match
; the main theme color.
; background-next Background color of first item in line.
;
[powerline-modules/right-to-left-starting-arrow]
type = custom/text
content-background = ${self.background-next}
content-foreground = ${self.background}
label-font = 1
content = " "
;
; # Right-to-left end-of-line separator
;
; Display a final arrow to nicely end your line with separators.
;
; Usage:
; [module/myendingarrow]
; inherit = powerline-modules/right-to-left-end-of-line-separator
; separator = #rrggbb
;
; Mandatory settings:
; separator Color of line item separator.
;
[powerline-modules/right-to-left-end-of-line-separator]
type = custom/text
content-foreground = ${self.separator}
label-font = 1
content = "  "
; ============================================================================ ;
;
; :: MODULES TEMPLATES ::
;
; ============================================================================ ;
; ============================================================================ ;
; templates :: left-to-right
; ============================================================================ ;
;
; # Left-to-right in-line item
;
; Display a left-to-right, in-line item.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/left-to-right-item
; background = #rrggbb
; background-next = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; background-next Background color of next item in line. Should be set on
; ${root.background} if current item is last in line.
;
[powerline-templates/left-to-right-item]
format-suffix-foreground = ${self.background}
format-suffix-background = ${self.background-next}
format-suffix = ""
format-volume-suffix-foreground = ${self.background}
format-volume-suffix-background = ${self.background-next}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.background}
format-muted-suffix-background = ${self.background-next}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.background}
format-mounted-suffix-background = ${self.background-next}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.background}
format-unmounted-suffix-background = ${self.background-next}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.background}
format-connected-suffix-background = ${self.background-next}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.background}
format-disconnected-suffix-background = ${self.background-next}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.background}
content-suffix-background = ${self.background-next}
content-suffix = ""
;
; # Left-to-right in-line item with separator
;
; Display a left-to-right, in-line item with separator.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/left-to-right-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/left-to-right-item-with-separator]
; Prefixes
format-prefix-foreground = ${self.separator}
format-prefix-background = ${self.background}
format-prefix = ""
format-volume-prefix-foreground = ${self.separator}
format-volume-prefix-background = ${self.background}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.background}
format-muted-prefix-background = ${self.separator}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.separator}
format-mounted-prefix-background = ${self.background}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.separator}
format-unmounted-prefix-background = ${self.background}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.separator}
format-connected-prefix-background = ${self.background}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.separator}
format-disconnected-prefix-background = ${self.background}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.separator}
content-prefix-background = ${self.background}
content-prefix = ""
; Suffixes
format-suffix-foreground = ${self.background}
format-suffix-background = ${self.separator}
format-suffix = ""
format-volume-suffix-foreground = ${self.background}
format-volume-suffix-background = ${self.separator}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.separator}
format-muted-suffix-background = ${self.background}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.background}
format-mounted-suffix-background = ${self.separator}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.background}
format-unmounted-suffix-background = ${self.separator}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.background}
format-connected-suffix-background = ${self.separator}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.background}
format-disconnected-suffix-background = ${self.separator}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.background}
content-suffix-background = ${self.separator}
content-suffix = ""
;
; # Left-to-right line-starting item with separator
;
; Display a left-to-right, *line starting* item with separator.
;
; NOTE: This template shall only be inherited by the leftmost item of a
; left-to-right line with separators. It avoids the appearance
; of a separating arrow half at the leftmost part of the item.
;
; Usage:
; [module/mystartingmodule]
; inherit = powerline-templates/left-to-right-starting-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/left-to-right-starting-item-with-separator]
; Suffixes needed only
format-suffix-foreground = ${self.background}
format-suffix-background = ${self.separator}
format-suffix = ""
format-volume-suffix-foreground = ${self.background}
format-volume-suffix-background = ${self.separator}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.separator}
format-muted-suffix-background = ${self.background}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.background}
format-mounted-suffix-background = ${self.separator}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.background}
format-unmounted-suffix-background = ${self.separator}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.background}
format-connected-suffix-background = ${self.separator}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.background}
format-disconnected-suffix-background = ${self.separator}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.background}
content-suffix-background = ${self.separator}
content-suffix = ""
; ============================================================================ ;
; templates :: right-to-left
; ============================================================================ ;
;
; # Right-to-left in-line item
;
; Display a right-to-left, in-line item.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/right-to-left-item
; background = #rrggbb
; background-next = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; background-next Background color of next item in line. Should be set on
; ${root.background} if current item is last in line.
;
[powerline-templates/right-to-left-item]
format-prefix-foreground = ${self.background}
format-prefix-background = ${self.background-next}
format-prefix = ""
format-volume-prefix-foreground = ${self.background}
format-volume-prefix-background = ${self.background-next}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.background}
format-muted-prefix-background = ${self.background-next}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.background}
format-mounted-prefix-background = ${self.background-next}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.background}
format-unmounted-prefix-background = ${self.background-next}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.background}
format-connected-prefix-background = ${self.background-next}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.background}
format-disconnected-prefix-background = ${self.background-next}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.background}
content-prefix-background = ${self.background-next}
content-prefix = ""
;
; # Right-to-left in-line item with separator
;
; Display a right-to-left, in-line item with separator.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/right-to-left-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/right-to-left-item-with-separator]
; Prefixes
format-prefix-foreground = ${self.background}
format-prefix-background = ${self.separator}
format-prefix = ""
format-volume-prefix-foreground = ${self.background}
format-volume-prefix-background = ${self.separator}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.separator}
format-muted-prefix-background = ${self.background}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.background}
format-mounted-prefix-background = ${self.separator}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.background}
format-unmounted-prefix-background = ${self.separator}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.background}
format-connected-prefix-background = ${self.separator}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.background}
format-disconnected-prefix-background = ${self.separator}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.background}
content-prefix-background = ${self.separator}
content-prefix = ""
; Suffixes
format-suffix-foreground = ${self.separator}
format-suffix-background = ${self.background}
format-suffix = ""
format-volume-suffix-foreground = ${self.separator}
format-volume-suffix-background = ${self.background}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.background}
format-muted-suffix-background = ${self.separator}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.separator}
format-mounted-suffix-background = ${self.background}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.separator}
format-unmounted-suffix-background = ${self.background}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.separator}
format-connected-suffix-background = ${self.background}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.separator}
format-disconnected-suffix-background = ${self.background}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.separator}
content-suffix-background = ${self.background}
content-suffix = ""
;
; # Right-to-left line-starting item with separator
;
; Display a right-to-left, *line starting* item with separator.
;
; NOTE: This template shall only be inherited by the rightmost item of a
; right-to-left line with separators. It avoids the appearance
; of a separating arrow half at the rightmost part of the item.
;
; Usage:
; [module/mystartingmodule]
; inherit = powerline-templates/right-to-left-starting-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/right-to-left-starting-item-with-separator]
; Prefixes needed only
format-prefix-foreground = ${self.background}
format-prefix-background = ${self.separator}
format-prefix = ""
format-volume-prefix-foreground = ${self.background}
format-volume-prefix-background = ${self.separator}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.separator}
format-muted-prefix-background = ${self.background}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.background}
format-mounted-prefix-background = ${self.separator}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.background}
format-unmounted-prefix-background = ${self.separator}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.background}
format-connected-prefix-background = ${self.separator}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.background}
format-disconnected-prefix-background = ${self.separator}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.background}
content-prefix-background = ${self.separator}
content-prefix = ""

View File

@ -1,4 +0,0 @@
try:
from main import *
except Exception as e:
print(e)

View File

@ -1,206 +0,0 @@
from libqtile import bar, layout, hook
from qtile_extras import widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from qtile_extras.widget.decorations import PowerLineDecoration
from widgets.volume import Volume
import traverse
class Colors:
background = "#1f2430"
accent = "#002F5F"
panel_height = 28
panel_font_size = 13
font = "Ubuntu"
powerline_right= {
"decorations": [
PowerLineDecoration(path="arrow_right", size=10)
],
"padding": 6
}
screens = [
Screen(
top=bar.Bar(
widgets = [
widget.TaskList(theme_path="/user/share/icons/Papirus/16x16/"),
widget.Sep(padding=10, linewidth=0),
widget.GroupBox(
rounded=False,
inactive="#ffffff",
active="#ffffff",
highlight_method="block",
highlight_color=Colors.accent,
this_current_screen_border=Colors.accent,
other_current_screen_border=Colors.accent,
this_screen_border="#00000000",
other_screen_border="#00000000",
font="Ubuntu bold",
padding=9,
hide_unused=True
),
widget.Spacer(),
widget.Sep(linewidth=0, background=None, **powerline_right), # Workaround for having the last arrow
widget.Systray(icon_size=24, background=Colors.accent, **powerline_right),
widget.Memory(format="{MemUsed: .2f}{mm}", measure_mem="G", background=Colors.background, **powerline_right),
widget.ThermalSensor(tag_sensor='Tctl', background=Colors.accent, **powerline_right),
widget.CPU(background=Colors.background, format="CPU {load_percent}%", **powerline_right),
widget.CPU(background=Colors.accent, format="{freq_max}GHz", **powerline_right),
Volume(size=12, background=Colors.background, theme_path="/usr/share/icons/Papirus/16x16/"),
Volume(background=Colors.background, **powerline_right),
widget.Image(filename="/usr/share/icons/Papirus/48x48/apps/org.kde.archUpdate.svg", background=Colors.accent, margin_y=6),
widget.CheckUpdates(background=Colors.accent, distro="Arch_yay", initial_text="0", no_update_string="0", execute='WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"', **powerline_right),
widget.CurrentLayout(background=Colors.background, **powerline_right),
widget.Clock(
foreground="#ffffff",
background=Colors.accent,
format="%a %b %d, %H:%M:%S",
**powerline_right
),
widget.Sep(padding=2, linewidth=0, background=Colors.accent),
],
size=panel_height, background=Colors.background + "99"
),
wallpaper="/home/user/.config/qtile/wallpaper.png",
wallpaper_mode="stretch"
),
Screen(wallpaper="/home/user/.config/qtile/wallpaper.png", wallpaper_mode="stretch"),
Screen(wallpaper="/home/user/.config/qtile/wallpaper.png", wallpaper_mode="stretch"),
]
mod = "mod4"
terminal = guess_terminal()
keys = [
# A list of available commands that can be bound to keys can be found
# at https://docs.qtile.org/en/latest/manual/config/lazy.html
# Switch between windows
Key([mod], 'k', lazy.function(traverse.up)),
Key([mod], 'j', lazy.function(traverse.down)),
Key([mod], 'h', lazy.function(traverse.left)),
Key([mod], 'l', lazy.function(traverse.right)),
Key([mod], "f", lazy.window.toggle_floating(), desc="Move focus up"),
Key([mod], "m", lazy.window.toggle_fullscreen(), desc="Move focus up"),
Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
# Move windows between left/right columns or move up/down in current stack.
# Moving out of range in Columns layout will create new column.
Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"),
Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"),
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
# Grow windows. If current window is on the edge of screen and direction
# will be to screen edge - window would shrink.
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"),
Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
# Toggle between split and unsplit sides of stack.
# Split = all windows displayed
# Unsplit = 1 window displayed, like Max layout, but still with
# multiple stack panes
Key(
[mod, "shift"],
"Return",
lazy.layout.toggle_split(),
desc="Toggle between split and unsplit sides of stack",
),
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
Key([mod], "b", lazy.spawn("firefox"), desc="Launch browser"),
# Toggle between different layouts as defined below
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
]
groups = []
for i in list(range(1, 10)) + [0]:
groups.append(Group(str(i)))
for i in groups[:10]:
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod],
i.name,
lazy.group[i.name].toscreen(),
desc="Switch to group {}".format(i.name),
),
# mod1 + shift + letter of group = switch to & move focused window to group
Key(
[mod, "shift"],
i.name,
lazy.window.togroup(i.name, switch_group=True),
desc="Switch to & move focused window to group {}".format(i.name),
),
# Or, use below if you prefer not to switch to that group.
# # mod1 + shift + letter of group = move focused window to group
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
# desc="move focused window to group {}".format(i.name)),
]
)
layout_settings = {
"border_focus": Colors.accent,
"border_normal": "#050f43",
# "border_normal_stack": "#00000000",
# "border_focus_stack": "#00000000",
"border_width": 2,
"margin": 3
}
mouse = [
Drag([mod], "Button1", lazy.window.set_position(),
start=lazy.window.get_position()),
Drag([mod], "Button3", lazy.window.set_position(), start=lazy.window.get_size())
]
layouts = [
layout.Columns(**layout_settings),
layout.Tile(**layout_settings),
layout.Max(),
# Try more layouts by unleashing below layouts.
# layout.Stack(num_stacks=2),
# layout.Bsp(),
# layout.Matrix(),
# layout.MonadTall(),
# layout.MonadWide(),
# layout.RatioTile(),
# layout.TreeTab(),
# layout.VerticalTile(),
# layout.Zoomy(),
]
dgroups_key_binder = None
dgroups_app_rules = [] # type: list
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating(
float_rules=[
*layout.Floating.default_float_rules,
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
]
)
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?
auto_minimize = False
wmname = "LG3D"

View File

@ -1,100 +0,0 @@
"""
This plugin exports four functions - up, down, left and right - that when called will
move window focus to the first window in that general direction. Focussing is based
entirely on position and geometry, so is independent of screens, layouts and whether
windows are floating or tiled. It can also move focus to and from empty screens.
Example usage:
import traverse
keys.extend([
Key([mod], 'k', lazy.function(traverse.up)),
Key([mod], 'j', lazy.function(traverse.down)),
Key([mod], 'h', lazy.function(traverse.left)),
Key([mod], 'l', lazy.function(traverse.right)),
])
Qtile versions known to work: 0.16 - 0.18
"""
from libqtile.config import Screen
def up(qtile):
_focus_window(qtile, -1, 'y')
def down(qtile):
_focus_window(qtile, 1, 'y')
def left(qtile):
_focus_window(qtile, -1, 'x')
def right(qtile):
_focus_window(qtile, 1, 'x')
def get_window_in_direction(qtile, dir, axis):
win = None
win_wide = None
dist = 10000
dist_wide = 10000
cur = qtile.current_window
if not cur:
cur = qtile.current_screen
if axis == 'x':
dim = 'width'
band_axis = 'y'
band_dim = 'height'
cur_pos = cur.x
band_min = cur.y
band_max = cur.y + cur.height
else:
dim = 'height'
band_axis = 'x'
band_dim = 'width'
band_min = cur.x
cur_pos = cur.y
band_max = cur.x + cur.width
cur_pos += getattr(cur, dim) / 2
windows = [w for g in qtile.groups if g.screen for w in g.windows]
windows.extend([s for s in qtile.screens if not s.group.windows])
if cur in windows:
windows.remove(cur)
for w in windows:
if isinstance(w, Screen) or not w.minimized:
pos = getattr(w, axis) + getattr(w, dim) / 2
gap = dir * (pos - cur_pos)
if gap > 5:
band_pos = getattr(w, band_axis) + getattr(w, band_dim) / 2
if band_min < band_pos < band_max:
if gap < dist:
dist = gap
win = w
else:
if gap < dist_wide:
dist_wide = gap
win_wide = w
if not win:
win = win_wide
return win
def _focus_window(qtile, dir, axis):
win = get_window_in_direction(qtile, dir, axis)
if win:
qtile.focus_screen(win.group.screen.index)
win.group.focus(win, True)
if not isinstance(win, Screen):
win.focus(False)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 KiB

View File

@ -1,28 +0,0 @@
from qtile_extras.widget import Volume as QVolume
from libqtile import images
class Volume(QVolume):
def __init__(self, size=None, **kwargs):
super().__init__(**kwargs)
self.size = size
def setup_images(self):
names = (
"audio-volume-high",
"audio-volume-low",
"audio-volume-medium",
"audio-volume-muted",
)
d_images = images.Loader(self.theme_path)(*names)
for name, img in d_images.items():
new_height = self.size if self.size else self.bar.height - 1
img.resize(height=new_height)
if img.width > self.length:
self.length = img.width + self.actual_padding * 2
if self.size:
matrix = img.pattern.get_matrix()
matrix.translate(tx=0, ty=-1 * (self.bar.height -1 - self.size) / 2 - 1)
img.pattern.set_matrix(matrix)
self.surfaces[name] = img.pattern

View File

@ -1,6 +0,0 @@
if ps -C rofi > /dev/null
then
echo "Already running"
else
rofi -show combi -combi-modi drun,calc:~/.config/rofi/show-calculator.sh
fi

View File

@ -1,8 +0,0 @@
configuration {
font: "SF Pro Rounded 13";
show-icons: true;
icon-theme: "Papirus";
kb-cancel: "Super_L+XF86Launch5,Escape";
combi-hide-mode-prefix: true;
}
@theme "~/.config/rofi/material-ocean.rasi"

View File

@ -1,115 +0,0 @@
/*
Copyright © Blacksuan19 @ 2020
part of material ocean colorscheme
licensed under GNU's GPL 3
*/
* {
background: #0f111a;
foreground: #f1f1f1;
selected: #0033a1;
selected-text: #ffffff;
}
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
width: 800px;
border-radius: 5px;
}
textbox-prompt-colon {
expand: false;
background-color: @background;
padding: 4px 0px 0px 6px;
}
inputbar {
children: [ textbox-prompt-colon, entry ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @selected;
margin: 0px 0px 0px 0px;
padding: 0px 0px 4px 0px;
position: center;
}
entry {
background-color: @background;
text-color: @foreground;
placeholder-color: @foreground;
expand: true;
horizontal-align: 0;
blink: true;
padding: 4px 0px 0px 4px;
font: "SF Pro Rounded 25";
}
case-indicator {
background-color: @background;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 1;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
fixed-height:true;
lines: 5;
}
mainbox {
background-color: @background;
children: [ inputbar, message, listview ];
spacing: 20px;
padding: 20px 15px 15px 15px;
}
message {
children: [ textbox ];
border-radius: 5px;
}
textbox {
background-color: @selected;
text-color: @foreground;
padding: 20px 6px 20px 80px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: horizontal;
border-radius: 4px;
padding: 2px 2px 2px 2px;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
element-icon {
size: 40px;
border: 10px;
}
element-text {
padding: 20px 0px 0px 10px;
}
element selected {
background-color: @selected;
text-color: @selected-text;
border: 0px;
border-radius: 3px;
border-color: @selected;
}

View File

@ -1,10 +0,0 @@
#!/bin/bash
if [[ -z "$1" ]]; then
echo -e "Calc Mode\0icon\x1fgnome-calculator"
else
killall rofi
# so rofi doesn't complain "can't launch rofi inside rofi"
rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xsel --clipboard"
fi

View File

@ -1,289 +0,0 @@
set nocompatible
syntax on
let VIMHOME = split(&rtp, ",")[0]
let $VIMHOME = VIMHOME
" vim-plug
call plug#begin(VIMHOME."/plugs")
" Plug 'Valloric/YouCompleteMe'
Plug 'nixprime/cpsm', {'do': './install.sh'}
Plug 'kien/ctrlp.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'ervandew/supertab'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'ConradIrwin/vim-bracketed-paste'
Plug 'NLKNguyen/papercolor-theme'
Plug 'Shougo/deoplete.nvim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'cohama/lexima.vim', {'do': 'sed -i \"s/has(.nvim.) && //\" autoload/lexima/insmode.vim'}
Plug 'editorconfig/editorconfig-vim'
Plug 'gmarik/Vundle.vim'
Plug 'hdima/python-syntax'
Plug 'jeetsukumaran/vim-buffergator'
Plug 'kristijanhusak/vim-hybrid-material'
Plug 'lambdalisue/fern.vim'
Plug 'lervag/vimtex'
Plug 'neovimhaskell/haskell-vim'
Plug 'nvie/vim-flake8'
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'pangloss/vim-javascript'
Plug 'posva/vim-vue'
Plug 'rhysd/vim-grammarous'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'tmux-plugins/vim-tmux'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'tomtom/tcomment_vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'vim-scripts/indentpython.vim'
Plug 'vimwiki/vimwiki'
call plug#end()
let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
let mapleader=","
:command W w
:command Q q
:command WQ wq
:command Wq wq
nnoremap j gj
nnoremap k gk
nnoremap <C-U> <C-O>
nnoremap <C-E> <C-U>
" don't store .swp files in the file's own directory
" neither for .ext~ files
set directory=/home/user/.vim/tmp/
set backupdir=/home/user/.vim/tmp/
" VimWiki
let g:vimwiki_key_mappings = { 'table_mappings': 0 }
let g:vimwiki_markdown_link_ext = 1
autocmd FileType vimwiki setlocal shiftwidth=2 softtabstop=2 expandtab
" Autoindent for filetype
filetype plugin indent on
set autoindent
set encoding=utf-8
set scrolloff=5
set sidescrolloff=10
set completeopt-=preview
set backspace=indent,eol,start
" Splits
set splitbelow
set splitright
" CtrlP
let g:ctrlp_match_func = {'match': 'cpsm#CtrlPMatch'}
nnoremap <silent> <C-o> :CtrlPBuffer<CR>
let g:cpsm_unicode=1
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" Unsaved buffer switching
set hidden
" Line numbering
set number
set numberwidth=4
:set mouse=a
" Allow xterm-key usage inside tmux
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
" Persistent undo
set undodir=~/.vim/undodir/
set undofile
set undolevels=1000
set undoreload=10000
" Searching
set ignorecase
set smartcase
set incsearch
set hlsearch
nnoremap <leader><space> :noh<CR>
" Text wrapping
set lbr
" Vimtex
let g:tex_flavor = 'latex'
" Tabs
if has("autocmd")
filetype plugin indent on
autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab
endif
" Terminal colors
set t_Co=256
set background=dark
let g:airline_theme="solarized"
let g:airline_solarized_bg="dark"
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
" Commenting
nnoremap <silent> <leader>c :TComment<CR>
nnoremap <silent> <leader>C :TCommentBlock<CR>
vnoremap <silent> <leader>c :TCommentInline<CR>
vnoremap <silent> <leader>C :TCommentBlock<CR>
" Tab completion
set wildmode=longest,list
set wildmenu
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 13
let g:airline_powerline_fonts = 1
set laststatus=2
set ttimeoutlen=50
" Color scheme
syntax enable
let python_highlight_all=1
let g:solarized_termcolors=256
colorscheme hybrid_material
" Remap u to y
vnoremap u y
" Save clipboard on quit
autocmd VimLeave * call system("xsel -ib", getreg('+'))
" Automatically remove trailing spaces
let blacklist = ['vimwiki']
autocmd BufWritePre * if index(blacklist, &ft) < 0 | :%s/\s\+$//e
" Use deoplete.
autocmd FileType python let g:deoplete#enable_at_startup = 1
" VPW: set filetype for .py3
autocmd BufRead,BufNewFile *.py3 set filetype=python
" Vue indent
autocmd FileType vue setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType vue syntax sync fromstart
" Disable shift+k for manual lookup
map <S-k> <Nop>
" Prolog: set filetype for .pl
autocmd BufRead,BufNewFile *.pl set filetype=prolog
" Disable modelines, fix CVE
set modelines=0
set nomodeline
" Coc extensions
set updatetime=300
set shortmess+=c
if has("nvim-0.5.0") || has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
let g:coc_global_extensions = []
command! -nargs=1 Ext :call add(g:coc_global_extensions, <args>)
let g:coc_filetype_map = {'tex': 'latex', 'md': 'markdown'}
nmap <silent> <leader>p <Plug>(coc-diagnostic-prev)
nmap <silent> <leader>n <Plug>(coc-diagnostic-next)
nmap <silent> <leader>f <Plug>(coc-codeaction-line)
vmap <silent> <leader>f <Plug>(coc-codeaction-line)
nmap <buffer> gd <plug>(lsp-definition)
nnoremap <Leader>p :CocList yank<CR>
vnoremap <Leader>p :CocList yank<CR>
Ext 'coc-snippets'
Ext 'coc-emoji'
Ext 'coc-highlight'
Ext 'coc-emmet'
" Ext 'coc-omnisharp'
Ext 'coc-vimtex'
Ext 'coc-json'
Ext 'coc-java'
Ext 'coc-pyright'
Ext 'coc-css'
Ext 'coc-html'
Ext 'coc-cmake'
Ext 'coc-clangd'
Ext 'coc-docker'
Ext 'coc-fzf-preview'
Ext 'coc-ltex'
Ext 'coc-vetur'
Ext 'coc-yank'
" Ext 'coc-sh'
" FZF Preview
nnoremap <silent> <Leader>/ :<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'"<CR>
nnoremap <silent> <C-f> :<C-u>CocCommand fzf-preview.ProjectGrepRecall<CR>
nnoremap <silent> <Leader>d :<C-u>CocCommand fzf-preview.CocCurrentDiagnostics<CR>
nnoremap <silent> <Leader>d :<C-u>CocCommand fzf-preview.CocCurrentDiagnostics<CR>
delc Ext
" Language Server
if executable('pyls')
" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'allowlist': ['python'],
\ })
endif
function! s:on_lsp_buffer_enabled() abort
setlocal omnifunc=lsp#complete
setlocal signcolumn=yes
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
nmap <buffer> gs <plug>(lsp-document-symbol-search)
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
nmap <buffer> gr <plug>(lsp-references)
nmap <buffer> gi <plug>(lsp-implementation)
nmap <buffer> gt <plug>(lsp-type-definition)
nmap <buffer> <leader>rn <plug>(lsp-rename)
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
nmap <buffer> K <plug>(lsp-hover)
nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
nnoremap <buffer> <expr><c-d> lsp#scroll(-4)
let g:lsp_format_sync_timeout = 1000
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
" refer to doc to add more commands
endfunction
augroup lsp_install
au!
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
augroup END
" Tab for completion
let g:SuperTabContextDefaultCompletionType = "<c-n>"
let g:SuperTabDefaultCompletionType = "<c-n>"
" Go to Defintion CoC
nmap <buffer> gd :call CocActionAsync('jumpDefinition')<CR>

View File

@ -1,141 +0,0 @@
# Partially stolen from https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py
import os, glob, subprocess, re
import ycm_core
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
STD = "-std=c++17"
flags = [
'-Wall',
'-Wextra',
'-Wno-long-long',
'-Wno-variadic-macros',
'-pedantic',
'-Weffc++',
'-fexceptions',
# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
# language to use when compiling headers. So it will guess. Badly. So C++
# headers will be compiled as C headers. You don't want that so ALWAYS specify
# a "-std=<something>".
# For a C project, you would set this to something like 'c99' instead of
# 'c++11'.
STD,
# ...and the same thing goes for the magic -x option which specifies the
# language that the files to be compiled are written in. This is mostly
# relevant for c++ headers.
# For a C project, you would set this to 'c' instead of 'c++'.
'-x', 'c++',
'-isystem', '/usr/include/qt',
'-I', 'include',
'-I', '.',
'-I', 'src',
'-I', 'main/cpp'
]
def AddSystemIncludes():
global flags
try:
output = subprocess.check_output(["clang++", STD, "-E", "-v", "-x", "c++", os.devnull], stderr=subprocess.STDOUT).decode("utf-8")
for loc in re.findall(r"^ (/.*)$", output, re.M):
flags += ["-isystem", loc]
except:
print("Clang++ not found")
flags += [
'-isystem', '/usr/include/x86_64-linux-gnu/c++/7',
'-isystem', '/usr/include/c++/7',
'-isystem', '/usr/include',
'-isystem', '/usr/local/include'
]
AddSystemIncludes()
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
#
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = None
if compilation_database_folder:
database = ycm_core.CompilationDatabase( compilation_database_folder )
else:
database = None
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
if not working_directory:
return list( flags )
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith( '/' ):
new_flag = os.path.join( working_directory, flag )
for path_flag in path_flags:
if flag == path_flag:
make_next_absolute = True
break
if flag.startswith( path_flag ):
path = flag[ len( path_flag ): ]
new_flag = path_flag + os.path.join( working_directory, path )
break
if new_flag:
new_flags.append( new_flag )
return new_flags
def FlagsForFile( filename ):
if database:
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object
compilation_info = database.GetCompilationInfoForFile( filename )
final_flags = MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_ )
else:
# relative_to = DirectoryOfThisScript()
relative_to = ProjectRoot(filename)
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) + ["-I", os.path.abspath(os.path.dirname(filename))] + ExtIncludes(relative_to) + BuildIncludes(relative_to, filename)
try:
resources_lib_base = os.path.join(relative_to, "main", "resources", "lib")
final_flags += ["-I"+os.path.join(resources_lib_base, f, "include") for f in os.listdir(resources_lib_base)]
except: pass
return {
'flags': final_flags,
'do_cache': True
}
def ProjectRoot(filename):
path = os.path.abspath(os.path.dirname(filename))
while path != os.path.abspath(os.path.dirname(path)) and not (os.path.isdir(os.path.join(path, ".git")) or os.path.isdir(os.path.join(path, "include")) or os.path.isdir(os.path.join(path, "src"))):
path = os.path.abspath(os.path.dirname(path))
if not (os.path.isdir(os.path.join(path, "include")) or os.path.isdir(os.path.join(path, "src")) or os.path.isdir(os.path.join(path, "main"))):
return os.path.abspath(os.path.dirname(filename))
else:
return path
def ExtIncludes(path):
starting_paths = glob.glob(os.path.join(path, "build", "ext-*")) + glob.glob(os.path.join(path, "ext", "*"))
paths = starting_paths
for p in starting_paths:
paths += glob.glob(os.path.join(p, "include")) + glob.glob(os.path.join(p, "*", "include"))
paths += glob.glob(os.path.join(p, "src", "ext-*")) + glob.glob(os.path.join(p, "src", "ext-*", "include")) + glob.glob(os.path.join(p, "src", "ext-*", "*", "include"))
return ["-I%s" % p for p in paths]
def BuildIncludes(project_root, filename):
file_path = os.path.abspath(os.path.dirname(filename))[len(project_root) + 1:]
return ["-I%s/build/%s" % (project_root, file_path)]

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
{
"python.linting.enabled": false,
"ltex.enabled": ["latex", "markdown"],
"ltex.language":"en-GB"
}

Binary file not shown.

Binary file not shown.

View File

@ -1,86 +0,0 @@
{
"layer": "top", // Waybar at top layer
"height": 35, // Waybar height (to be removed for auto height)
"spacing": 4, // Gaps between modules (4px)
"output": "DP-2",
"modules-left": ["wlr/taskbar"],
"modules-center": ["hyprland/workspaces"],
"modules-right": ["tray", "wireplumber", "cpu#cpu2", "cpu", "memory", "custom/updates", "temperature", "battery", "clock", "clock#clock2"],
"wlr/taskbar": {
"on-click": "activate",
"on-click-right": "close",
"format": "{icon} {title:.20}",
"all-outputs": true
},
"wireplumber": {
"format": "{icon} {volume}%",
"format-muted": "",
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"format-icons": ["", "", ""]
},
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"warp-on-scroll": false,
"format": "{name}"
},
"hyprland/window": {
"max-length": 50,
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock#clock2": {
"timezone": "Europe/Brussels",
"format": "{:%H:%M:%S}",
"interval": 1,
},
"clock": {
"timezone": "Europe/Brussels",
"format": "{:%Y-%m-%d}",
"interval": 3600,
},
"cpu": {
"format": "{max_frequency}GHz",
"tooltip": false,
"interval": 5
},
"cpu#cpu2": {
"format": "CPU {usage}%",
"tooltip": false,
"interval": 5
},
"custom/updates": {
"exec": "bash -c \"checkupdates | wc -l\"",
"on-click": "alacritty -e bash -c \"yay ; echo '\nDone, press any key to exit...' ; read\"",
"interval": 60,
"format": "{}  ",
},
"memory": {
"interval": 5,
"format": "{used:0.2f}G"
},
"temperature": {
"hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"interval": 5,
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C",
// "format-icons": ["", "", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon}",
"tooltip-format": "{capacity}% ({time})",
"format-plugged": "{capacity}% ",
"format-alt": "{capacity}% {time} {icon}",
"format-icons": [" ", " ", " ", " ", " "]
},
}

View File

@ -1,166 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-size: 18px;
font-weight:400;
font-family: "Roboto Sans", "FontAwesome";
}
window#waybar {
background-color: rgba(0, 0, 0, 0.2);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
/* window#waybar.hidden { */
/* opacity: 0.2; */
/* } */
button {
border: none;
border-radius: 0;
}
button:hover {
background: inherit;
box-shadow: inset 0 0 #ffffff;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
border-radius: 2px;
}
#workspaces button:hover {
background-color: #023269;
}
#workspaces button.focused {
background-color: #023269;
}
#workspaces button.active {
background-color: #023269;
}
#workspaces button.urgent {
background-color: #ed8274;
}
#window,
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-updates,
#custom-powermode,
#tray {
padding: 0 14px;
border-radius: 7px;
color: #ffffff;
background-color: #1f2430;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
}
#clock.clock2,
#cpu.cpu2,
#memory,
#tray,
#temperature {
background-color: #023269;
}
#taskbar button {
padding: 0 12px;
border-radius: 7px;
color: #ffffff;
background-color: #1f2430;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
}
#taskbar button.active {
background-color: #023269;
}
#window {
font-weight:400;
margin-left:0;
}
window#waybar.empty #window {
background-color: transparent;
}
#clock {
margin-right:0;
}
#workspaces {
margin: 4px 9px;
}
/* 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;
}
@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;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}

View File

@ -1,4 +0,0 @@
keycode 94 = grave asciitilde dead_grave dead_tilde grave asciitilde
keycode 49 = less greater less greater bar brokenbar bar brokenbar
keycode 49 = Shift_L
keycode 108 = Multi_key

View File

@ -1,18 +0,0 @@
# Load and configure smartcd
source ~/.smartcd/lib/core/arrays
source ~/.smartcd/lib/core/varstash
source ~/.smartcd/lib/core/smartcd
smartcd setup chpwd-hook
# smartcd setup cd
# smartcd setup pushd
# smartcd setup popd
# smartcd setup prompt-hook
smartcd setup exit-hook
smartcd setup completion
# VARSTASH_AUTOCONFIGURE=1
# VARSTASH_AUTOEDIT=1
# SMARTCD_NO_INODE=1
# SMARTCD_AUTOMIGRATE=1
# SMARTCD_LEGACY=1
# SMARTCD_QUIET=1
# VARSTASH_QUIET=1

View File

@ -1,3 +0,0 @@
if [ -d "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
fi

View File

@ -1,321 +0,0 @@
source ~/.profile
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Home Manager
if [ -f "$XDG_STATE_HOME/nix/profile/etc/profile.d/hm-session-vars.sh" ]; then
source $XDG_STATE_HOME/nix/profile/etc/profile.d/hm-session-vars.sh
fi
# Use LS colors for ZSH completion
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' menu select
# Use cd without cd
setopt autocd
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -g -A key
# We need this here since it's used below
if command -v fdfind &> /dev/null; then
alias fd="fdfind"
fi
# Use vi-mode
source ${XDG_CONFIG_HOME}/zsh/zsh-vi-mode/zsh-vi-mode.plugin.zsh
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
autoload -Uz add-zle-hook-widget
function zle_application_mode_start { echoti smkx }
function zle_application_mode_stop { echoti rmkx }
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
fi
function cd_to() {
setopt localoptions pipefail no_aliases 2> /dev/null
local dir=$1
if [[ -z "$dir" ]]; then
zle redisplay
return 0
fi
zle push-line # Clear buffer. Auto-restored on next prompt.
cd $dir
zle accept-line
local ret=$?
unset dir # ensure this doesn't end up appearing in prompt expansion
zle reset-prompt
}
function find_local() {
fd . -t $1 | fzy -l 20
}
function find_global() {
file_type=$1
FZY_CACHE=~/.cache/fzy_paths_$file_type
if [ -f $FZY_CACHE ]; then
if [ $(stat -c %Y $FZY_CACHE) -lt $(date +%s -d '-1 day') ]; then
rm $FZY_CACHE
fi
fi
if [ ! -f $FZY_CACHE ]; then
PATHS="$(/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME ls-files)"
if [ "$file_type" = "d" ]; then
PATHS="$(echo -e $PATHS | xargs -n 1 dirname | uniq | grep -v '^\.$' | parallel echo ~/{})"
else
PATHS="$(echo -e $PATHS | parallel echo ~/{})"
fi
search_dirs=(~/Workspace/ ~/Containers/ /home/server/Storage/Thomas/)
for i in "$search_dirs[@]"; do
if [ -d $i ]; then
PATHS="$PATHS\n$i"
PATHS+="\n$(fd . $i -t $file_type -d 8)"
fi
done
echo -e "$PATHS" > $FZY_CACHE
fi
file="$(cat $FZY_CACHE | fzy -l 20)"
echo "$file" | cat - $FZY_CACHE | awk '!x[$0]++' > /tmp/fzy_paths_$file_type && mv /tmp/fzy_paths_$file_type $FZY_CACHE
echo "$file"
}
function open_path() {
file_type=$1
search_fn=$2
selection="$($search_fn $file_type)"
if [ "$selection" = "" ]; then
zle reset-prompt
return
fi
if [ "$LBUFFER" = "" ]; then
if [ "$file_type" = "d" ]; then
cd_to "$selection"
else
selection=$(realpath "$selection")
cd_to "$(dirname \"$selection\")"
nvim "$selection"
fi
else
emulate -L zsh
zle -I
LBUFFER="${LBUFFER}\"$selection\""
zle reset-prompt
fi
}
function zvm_after_init() {
key[Home]="${terminfo[khome]}"
key[End]="${terminfo[kend]}"
key[Insert]="${terminfo[kich1]}"
key[Backspace]="${terminfo[kbs]}"
key[Delete]="${terminfo[kdch1]}"
key[Up]="${terminfo[kcuu1]}"
key[Down]="${terminfo[kcud1]}"
key[Left]="${terminfo[kcub1]}"
key[Right]="${terminfo[kcuf1]}"
key[PageUp]="${terminfo[kpp]}"
key[PageDown]="${terminfo[knp]}"
key[Shift-Tab]="${terminfo[kcbt]}"
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode
[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char
[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history
[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
if [ -f "/usr/share/doc/pkgfile/command-not-found.zsh" ]; then
source /usr/share/doc/pkgfile/command-not-found.zsh
fi
#FZF
if [ -f "/usr/share/doc/fzf/examples/key-bindings.zsh" ]; then
source /usr/share/doc/fzf/examples/key-bindings.zsh
source /usr/share/doc/fzf/examples/completion.zsh
elif [ -f "/usr/share/fzf/key-bindings.zsh" ]; then
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
fi
if [ -f "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
fi
function open_global_path_d() { open_path d find_global }
function open_global_path_f() { open_path f find_global }
function open_local() { open_path f find_local }
zle -N push_local_files
zle -N find_local_directories
function register_key() {
zle -N $2
bindkey "^$1" $2
bindkey -M emacs "^$1" $2
bindkey -M vicmd "^$1" $2
bindkey -M viins "^$1" $2
}
register_key "T" open_global_path_d
register_key "E" open_global_path_f
register_key "W" open_local
if [ "$SSH_SESSION_ID" != "" ]; then
mkdir -p /tmp/ssh_sessions
echo $$ > /tmp/ssh_sessions/"$SSH_SESSION_ID"
fi
if [ "$REMOTE_PATH" != "" ]; then
if [ -d "$REMOTE_PATH" ]; then
cd "$REMOTE_PATH"
fi
elif [ "$PREVIOUS_SESSION_ID" != "" ]; then
cd "$(readlink -e /proc/$(cat /tmp/ssh_sessions/$PREVIOUS_SESSION_ID)/cwd)"
fi
}
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion::complete:*' gain-privileges 1
zstyle ':completion:*' rehash true
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
export HISTFILE="$XDG_STATE_HOME"/zsh/history
export HISTSIZE=10000000
export SAVEHIST=10000000
source $XDG_CONFIG_HOME/zsh/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
unsetopt share_history
BROWSER=/usr/bin/firefox
# Add bash aliases.
if [ -f ~/.bash_aliases ]; then
source ~/.bash_aliases
fi
# GPULab
export GPULAB_CERT="$XDG_DATA_HOME/gpulab.pem"
export GPULAB_DEV='False'
# Smartcd
export SMARTCD_QUIET=1
if [ -f ~/.smartcd_config ]; then
source ~/.smartcd_config
fi
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
export EDITOR=nvim
export LANG=en_US.UTF-8
export ARCHFLAGS="-arch x86_64"
export SSH_KEY_PATH="~/.ssh/rsa_id"
export PYTHONDONTWRITEBYTECODE=1
export TERM="screen-256color"
export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH
export GOPATH=/tmp/go
if command -v micromamba &> /dev/null; then
eval "$(micromamba shell hook --shell zsh)"
export MAMBA_ROOT_PREFIX="$HOME/.micromamba";
fi
autoload -Uz add-zsh-hook
eval "$(zoxide init zsh --cmd j)"
function xterm_title_precmd () {
print -Pn -- '\e]2;%n@%m %~\a'
}
function xterm_title_preexec () {
print -Pn -- '\e]2;' && print -n -- "${(q)1}\a"
}
if [[ "$TERM" == (Eterm*|alacritty*|aterm*|gnome*|konsole*|kterm*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then
add-zsh-hook -Uz precmd xterm_title_precmd
add-zsh-hook -Uz preexec xterm_title_preexec
fi
###########################################
# Aliases
###########################################
if [[ "$(hostname)" == "mallorea" ]]; then
alias lf="/usr/bin/lf -last-dir-path /tmp/lf_dir && cd \"\$(cat /tmp/lf_dir 2> /dev/null || pwd)\""
else
alias lf="cd \"\$(/usr/bin/lf -print-last-dir)\""
fi
function o () {
xdg-open "$1" &!
}
function run_waypipe() {
SSH_SESSION_ID=$RANDOM
REMOTE_PATH=$(echo $(pwd) | sed "s|/home/[a-z]*|\$HOME|g")
SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t $1 env REMOTE_PATH=\"$REMOTE_PATH\" SSH_SESSION_ID=$SSH_SESSION_ID "zsh --login"
}
function git() {
if [ "$HOME" = "$(pwd)" ]; then
/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$@"
else
/usr/bin/git "$@"
fi
}
alias mallorea="run_waypipe mallorea"
alias vault="run_waypipe vault"
alias riva="run_waypipe riva"
alias kell="run_waypipe kell"
alias aloria="run_waypipe aloria"
alias ls="ls --color=auto"
alias gdb='gdb -q'
alias ll='ls -lhat'
alias compress="tar --use-compress-program=lbzip2 -cvf"
alias vim="nvim"
alias dot='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$@"'
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
alias python=python3
alias v="nvim -c ':lua require(\"oil\").open()' && cd \"\$(cat /tmp/oil_dir 2> /dev/null || pwd)\""
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
alias ag="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
alias push="git add -A && git commit -m '`date`' && git push"
alias reset="tput reset"

@ -1 +0,0 @@
Subproject commit bcef7cafdf3005a3d59335df618f89474ef4dd8b

@ -1 +0,0 @@
Subproject commit 196810035992abea65e54852c4278af2069ee482

@ -1 +0,0 @@
Subproject commit 7cf6fd19cf2ab38ec5b116eced158377cb3c35f6

9
.gitmodules vendored
View File

@ -4,12 +4,3 @@
[submodule ".config/awesome/awesomewm-vim-tmux-navigator"]
path = .config/awesome/awesomewm-vim-tmux-navigator
url = https://github.com/intrntbrn/awesomewm-vim-tmux-navigator
[submodule ".config/zsh/powerlevel10k"]
path = .config/zsh/powerlevel10k
url = https://github.com/romkatv/powerlevel10k.git
[submodule ".config/zsh/zsh-autocomplete"]
path = .config/zsh/zsh-autocomplete
url = https://github.com/marlonrichert/zsh-autocomplete.git
[submodule ".config/zsh/zsh-vi-mode"]
path = .config/zsh/zsh-vi-mode
url = https://github.com/jeffreytse/zsh-vi-mode.git

View File

@ -1 +0,0 @@
text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput

View File

@ -1,83 +0,0 @@
# .notmuch-config - Configuration file for the notmuch mail system
#
# For more information about notmuch, see https://notmuchmail.org
# Database configuration
#
# The only value supported here is 'path' which should be the top-level
# directory where your mail currently exists and to where mail will be
# delivered in the future. Files should be individual email messages.
# Notmuch will store its database within a sub-directory of the path
# configured here named ".notmuch".
#
[database]
path=/home/user/.config/aerc/mail
# User configuration
#
# Here is where you can let notmuch know how you would like to be
# addressed. Valid settings are
#
# name Your full name.
# primary_email Your primary email address.
# other_email A list (separated by ';') of other email addresses
# at which you receive email.
#
# Notmuch will use the various email addresses configured here when
# formatting replies. It will avoid including your own addresses in the
# recipient list of replies, and will set the From address based on the
# address to which the original email was addressed.
#
[user]
name=Thomas Avé
primary_email=email@thomasave.be
other_email=Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;
# Configuration for "notmuch new"
#
# The following options are supported here:
#
# tags A list (separated by ';') of the tags that will be
# added to all messages incorporated by "notmuch new".
#
# ignore A list (separated by ';') of file and directory names
# that will not be searched for messages by "notmuch new".
#
# NOTE: *Every* file/directory that goes by one of those
# names will be ignored, independent of its depth/location
# in the mail store.
#
[new]
# Search configuration
#
# The following option is supported here:
#
# exclude_tags
# A ;-separated list of tags that will be excluded from
# search results by default. Using an excluded tag in a
# query will override that exclusion.
#
[search]
# Maildir compatibility configuration
#
# The following option is supported here:
#
# synchronize_flags Valid values are true and false.
#
# If true, then the following maildir flags (in message filenames)
# will be synchronized with the corresponding notmuch tags:
#
# Flag Tag
# ---- -------
# D draft
# F flagged
# P passed
# R replied
# S unread (added when 'S' flag is not present)
#
# The "notmuch new" command will notice flag changes in filenames
# and update tags, while the "notmuch tag" and "notmuch restore"
# commands will notice tag changes and update flags in filenames
exclude_tags=deleted;spam;
[maildir]
synchronize_flags=true

View File

@ -1,21 +0,0 @@
XDG_RUNTIME_DIR=/run/user/1000
XDG_CONFIG_HOME=$HOME/.config
XDG_CACHE_HOME=$HOME/.cache
XDG_DATA_HOME=$HOME/.local/share
XDG_STATE_HOME=$HOME/.local/state
export XDG_RUNTIME_DIR XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_STATE_HOME
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
export PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"
export SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history
export WINEPREFIX="$XDG_DATA_HOME"/wine
export ZDOTDIR="$XDG_CONFIG_HOME"/zsh
export XDG_CURRENT_DESKTOP=GNOME
export OPENCV_LOG_LEVEL=ERROR
export PATH="$HOME/.local/bin:$PATH"
export COLORTERM=truecolor
export NIX_PATH=$XDG_STATE_HOME/nix/defexpr/channels

1
.zshrc
View File

@ -1 +0,0 @@
.config/zsh/.zshrc

332
flake.lock Normal file
View File

@ -0,0 +1,332 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717097707,
"narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1716576411,
"narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1717186020,
"narHash": "sha256-PQF/ng2hSQsKKsn4N+4RmVu+4ljzsrSsrAm5Yp7wADM=",
"ref": "refs/heads/main",
"rev": "a54ab301602e205f273969c093cf494d38ba4a98",
"revCount": 4752,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1691753796,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1716473782,
"narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "87d5d984109c839482b88b4795db073eb9ed446f",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1716058375,
"narHash": "sha256-CwjWoVnBZE5SBpRx9dgSQGCr4Goxyfcyv3zZbOhVqzk=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "3afed4364790aebe0426077631af1e164a9650cc",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1693833173,
"narHash": "sha256-hlMABKrGbEiJD5dwUSfnw1CQ3bG7KKwDV+Nx3bEZd7U=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "ac030bd9ba98e318e1f4c4328d60766ade8ebe8b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1716948383,
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1711163522,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2",
"split-monitor-workspaces": "split-monitor-workspaces",
"waybar": "waybar"
}
},
"split-monitor-workspaces": {
"inputs": {
"hyprland": [
"hyprland"
],
"nix-filter": "nix-filter"
},
"locked": {
"lastModified": 1716923053,
"narHash": "sha256-1KV6CErlIu73948+EVfH2OZeyIdUJlRIZLZMlo0Yqis=",
"owner": "Duckonaut",
"repo": "split-monitor-workspaces",
"rev": "df17c6f2d17d0156220a514d0ee622d734411905",
"type": "github"
},
"original": {
"owner": "Duckonaut",
"repo": "split-monitor-workspaces",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"waybar": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1714646798,
"narHash": "sha256-f4S92muHiNmLAxzFjQorB3HYO7P98m58IwbhD3NTxf4=",
"ref": "refs/heads/master",
"rev": "b41f57e578e5f7c8c56e178aa6d860196291ade9",
"revCount": 3435,
"submodules": true,
"type": "git",
"url": "https://github.com/thomasave/Waybar"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/thomasave/Waybar"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1716290197,
"narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "91e48d6acd8a5a611d26f925e51559ab743bc438",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

146
flake.nix Normal file
View File

@ -0,0 +1,146 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
waybar = {
type = "git";
url = "https://github.com/thomasave/Waybar";
submodules = true;
};
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
};
};
outputs =
{ self
, nixpkgs
, home-manager
, split-monitor-workspaces
, ...
}@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
commonModules = host: user: [
./hosts/${host}/hardware-configuration.nix
{
networking.hostName = host;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Brussels";
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
experimental-features = [ "nix-command" "flakes" ];
};
programs.zsh.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
wget
curl
git
];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; #hint electron apps to use wayland:
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
];
}
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs; }; # allows access to flake inputs in hm modules
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = {
imports = [ ./home/${host}.nix ];
};
};
}
./hosts/${host}
];
mkSystem = host: cfg: nixpkgs.lib.nixosSystem {
system = cfg.system or "x86_64-linux";
modules = (commonModules host cfg.user) ++ (cfg.modules or [ ]);
specialArgs = inputs;
};
systems = {
nixos = {
user = "user";
};
Kell = {
user = "user";
};
};
in
{
nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems;
};
}

28
home/Kell.nix Normal file
View File

@ -0,0 +1,28 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ./common.nix { inherit inputs config pkgs; })
(import ./hyprland { inherit inputs pkgs; })
(import ./waybar { inherit inputs pkgs; })
./rofi
];
services.hyprpaper = {
settings = {
wallpaper = [
"DP-3,${./files/wallpaper.png}"
"DP-2,${./files/wallpaper.png}"
"HDMI-A-1,${./files/wallpaper.png}"
];
};
};
programs.waybar = {
settings = {
mainBar = {
output = "DP-2";
};
};
};
}

127
home/alacritty/default.nix Normal file
View File

@ -0,0 +1,127 @@
{ config, pkgs, ... }:
{
programs.alacritty = {
enable = true;
settings = {
scrolling.history = 10000;
window = {
dynamic_padding = true;
dynamic_title = true;
opacity = 0.3;
};
colors = {
bright = {
black = "#555556";
blue = "#00afff";
cyan = "#50cdfe";
green = "#b0e05e";
magenta = "#af87ff";
red = "#f5669c";
white = "#ffffff";
yellow = "#fef26c";
};
normal = {
black = "#121213";
blue = "#0f7fcf";
cyan = "#42a7cf";
green = "#97e123";
magenta = "#8700ff";
red = "#fa2573";
white = "#bbbbbb";
yellow = "#dfd460";
};
primary = {
background = "#000011";
foreground = "#F8F8F2";
};
};
font = {
size = 15;
bold = {
family = "Iosevka Term Extended";
style = "Bold";
};
bold_italic = {
family = "Iosevka Term Extended";
style = "Bold Italic";
};
italic = {
family = "Iosevka Term Extended";
style = "Italic";
};
normal = {
family = "Iosevka Term Extended";
style = "Regular";
};
};
keyboard.bindings = [
{
action = "ToggleFullscreen";
key = "F11";
}
{
action = "ToggleViMode";
key = "Escape";
mode = "Vi";
}
{
action = "ScrollHalfPageUp";
key = "E";
mode = "Vi";
mods = "Control";
}
{
key = "F";
mods = "Control|Shift";
action = "ReceiveChar";
}
{
chars = "\u001B[72;6u";
key = "H";
mods = "Control|Shift";
}
{
chars = "\u001B[74;6u";
key = "J";
mods = "Control|Shift";
}
{
chars = "\u001B[75;6u";
key = "K";
mods = "Control|Shift";
}
{
chars = "\u001B[76;6u";
key = "L";
mods = "Control|Shift";
}
{
chars = "\u001B[105;5u";
key = "I";
mods = "Control";
}
{
chars = "\u001B[46;5u";
key = "Period";
mods = "Control";
}
{
chars = "\u001B[44;5u";
key = "Comma";
mods = "Control";
}
{
chars = "\u001B[59;5u";
key = "Semicolon";
mods = "Control";
}
{
chars = "\u001B[13;2u";
key = "Return";
mods = "Shift";
}
]
};
};
}

38
home/common.nix Normal file
View File

@ -0,0 +1,38 @@
{ inputs, config, pkgs, ... }:
{
imports = [
./zsh
./git
./nvim
./email
./lf
];
home.stateVersion = "24.11";
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
home.packages = with pkgs; [
htop
];
home.sessionVariables = {
XDG_CONFIG_HOME = "${config.xdg.configHome}";
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
XDG_DATA_HOME = "${config.xdg.dataHome}";
XDG_STATE_HOME = "${config.xdg.stateHome}";
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
WINEPREFIX = "${config.xdg.dataHome}/wine";
XDG_CURRENT_DESKTOP = "GNOME";
OPENCV_LOG_LEVEL = "ERROR";
COLORTERM = "truecolor";
};
}

255
home/email/default.nix Normal file
View File

@ -0,0 +1,255 @@
{ config, pkgs, ... }:
{
home.file = {
".mailcap".text = "text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
};
home.packages = with pkgs; [
mailcap
];
programs.notmuch = {
enable = true;
extraConfig = {
database = {
path = "/home/user/.config/aerc/mail";
};
user = {
name = "Thomas Avé";
primary_email = "email@thomasave.be";
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
};
maildir = {
synchronize_flags = "true";
};
};
};
programs.aerc = {
enable = true;
extraBinds = {
global = {
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
"<tab>" = ":next-tab<Enter>";
"?" = ":help keys<Enter>";
"<F5>" = ":check-mail<Enter>";
};
messages = {
"q" = ":q<Enter>";
"<Backspace>" = ":q<Enter>";
"j" = ":next<Enter>";
"k" = ":prev<Enter>";
"<Up>" = ":prev<Enter>";
"g" = ":select 0<Enter>";
"G" = ":select -1<Enter>";
"J" = ":next-folder<Enter>";
"K" = ":prev-folder<Enter>";
"v" = ":mark -t<Enter>";
"V" = ":mark -v<Enter>";
"<Space>" = ":read -t<Enter>";
"T" = ":toggle-threads<Enter>";
"<Enter>" = ":view<Enter>";
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
"D" = ":delete<Enter>";
"a" = ":archive flat<Enter>";
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
"f" = ":flag -t<Enter>";
"m" = ":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 -a<space>";
"\\" = ":filter -a <space>";
"n" = ":next-result<Enter>";
"N" = ":prev-result<Enter>";
"<Esc>" = ":clear<Enter>";
"s" = ":split<Enter>";
"S" = ":vsplit<Enter>";
"pl" = ":patch list<Enter>";
"pa" = ":patch apply <Tab>";
"pd" = ":patch drop <Tab>";
"pb" = ":patch rebase<Enter>";
"pt" = ":patch term<Enter>";
"ps" = ":patch switch <Tab>";
};
view = {
"/" = ":toggle-key-passthrough<Enter>/";
"q" = ":close<Enter>";
"O" = ":open<Enter>";
"o" = ":open<Enter>";
"S" = ":save<space>";
"|" = ":pipe<space>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"<C-l>" = ":open-link <space>";
"f" = ":flag -t<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-Up>" = ":prev-part<Enter>";
"<C-j>" = ":next-part<Enter>";
"<C-Down>" = ":next-part<Enter>";
"J" = ":next<Enter>";
"<C-Right>" = ":next<Enter>";
"K" = ":prev<Enter>";
"<C-Left>" = ":prev<Enter>";
};
"view::passthrough" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<Esc>" = ":toggle-key-passthrough<Enter>";
};
compose = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"$complete" = "<C-o>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<A-p>" = ":switch-account -p<Enter>";
"<C-Left>" = ":switch-account -p<Enter>";
"<A-n>" = ":switch-account -n<Enter>";
"<C-Right>" = ":switch-account -n<Enter>";
"<tab>" = ":next-field<Enter>";
"<backtab>" = ":prev-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::review" = {
"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>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
};
extraConfig = {
general = {
term = "xterm-256color";
};
ui = {
border-char-vertical = "";
border-char-horizontal = "";
styleset-name = "catppuccin-mocha";
timestamp-format = "2006-01-02 15:04";
sidebar-width = 30;
mouse-enabled = true;
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
dirlist-tree = true;
};
viewer = {
pager = "nvim -u $XDG_CONFIG_HOME/nvim/aerc.lua";
};
compose = {
address-book-cmd = "notmuch address \"\%s\"";
};
multipart-converters = {
"text/html" = "w3m -dump -o display_link_number=1 -T text/html";
};
filters = {
"text/plain" = "cat";
"text/calendar" = "gnome-calendar";
"message/delivery-status" = "cat";
"message/rfc822" = "cat";
"text/html" = "w3m -dump -o display_link_number=1 -T text/html";
"text/*" = "bat -fP --file-name=\"$AERC_FILENAME\"";
"application/x-sh" = "bat -fP -l sh";
};
};
};
home.file."${config.xdg.configHome}/aerc/map.conf".text = "Inbox=tag:inbox and not tag:archived and not tag:deleted";
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
*.default=true
*.normal=true
default.fg=#abb2bf
default.bg=#11121D
*.bg=#11121D
error.fg=#f38ba8
warning.fg=#fab387
success.fg=#a6e3a1
tab.fg=#6c7086
tab.bg=#181825
tab.selected.fg=#cdd6f4
tab.selected.bg=#023269
tab.selected.bold=true
part*.selected.bg=#023269
border.fg=#023269
border.bold=true
msglist_unread.bold=true
msglist_unread.fg=#f9e2af
msglist_flagged.fg=#e06c75
msglist_flagged.bold=true
msglist_result.fg=#89b4fa
msglist_result.bold=true
msglist_*.selected.bold=true
msglist_*.selected.bg=#023269
msglist_*.bg=#11121D
dirlist_*.selected.bold=true
dirlist_*.selected.bg=#023269
dirlist_*.bg=#181825
statusline_default.fg=#9399b2
statusline_default.bg=#2C3043
statusline_error.bold=true
statusline_success.bold=true
spinner.bg=#11121D
[viewer]
header.bg=#181825
url.fg=#89b4fa
url.underline=true
header.bold=true
signature.dim=true
diff_meta.bold=true
diff_chunk.fg=#89b4fa
diff_chunk_func.fg=#89b4fa
diff_chunk_func.bold=true
diff_add.fg=#a6e3a1
diff_del.fg=#f38ba8
quote_*.fg=#6c7086
quote_1.fg=#9399b2
'';
}

25
home/git/default.nix Normal file
View File

@ -0,0 +1,25 @@
{ inputs, config, pkgs, ... }:
{
programs.git = {
enable = true;
userName = "Thomas Avé";
userEmail = "email@thomasave.be";
aliases = {
s = "status";
a = "add";
};
extraConfig = {
credentials.helper = "store";
pull.rebase = false;
push.autoSetupRemove = true;
init.defaultBranch = "master";
diff.noprefix = true;
color.ui = "auto";
core = {
excludesfile = "~/.gitignore";
editor = "${pkgs.neovim}/bin/nvim";
};
};
};
}

268
home/hyprland/default.nix Normal file
View File

@ -0,0 +1,268 @@
{ inputs
, pkgs
, ...
}:
let
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
playerctl = "${pkgs.playerctl}/bin/playerctl";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
hyprpaper = "${pkgs.hyprpaper}/bin/hyprpaper";
waybar = "${inputs.waybar.packages.${pkgs.system}.waybar}/bin/waybar";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
alacritty = "${pkgs.alacritty}/bin/alacritty";
swaylock = "${pkgs.swaylock}/bin/swaylock";
rofi = "${pkgs.rofi}/bin/rofi";
jq = "${pkgs.jq}/bin/jq";
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
RUNNING_WAYPIPE=false
SSH_CLIENT=""
CHILD_PID=$(pgrep -P "$1")
if [ "$GRAND_CHILD_PID" != "" ]; then
GRAND_CHILD_NAME=$(ps -p "$GRAND_CHILD_PID" -o comm=)
if [ "$GRAND_CHILD_NAME" == "ssh" ]; then
CHILD_PID=$GRAND_CHILD_PID
SSH_CLIENT=$(ps -p "$CHILD_PID" -o args --no-headers | awk '{ print $2 }')
fi
if [ "$GRAND_CHILD_NAME" == "waypipe" ]; then
RUNNING_WAYPIPE=true
CHILD_PID=$(pgrep -P "$GRAND_CHILD_PID")
SSH_CLIENT=$(ps -p "$GRAND_CHILD_PID" -o args --no-headers | awk '{ print $4 }')
fi
fi
if [ $RUNNING_WAYPIPE == true ]; then
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$CHILD_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$SSH_CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/"$CHILD_PID"/cwd)
if [ "$CWD" != "" ]; then
${alacritty} --working-directory "$CWD"
else
${alacritty}
fi
else
${alacritty}
fi
fi
'';
in
{
services.kdeconnect = {
enable = true;
package = pkgs.kdePackages.kdeconnect-kde;
indicator = true;
};
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
preload =
[ "${./files/wallpaper.png}" ];
wallpaper = [
# Fill in by host-specific config!
# "Display,${./files/wallpaper.png}"
];
};
};
services.dunst = {
enable = true;
settings = {
global = {
frame_color = "#00000000";
separator_color = "frame";
background = "#24273A";
foreground = "#ffffff";
font = "Ubuntu 10.5";
width = "(0, 600)";
padding = 15;
origin = "top-right";
offset = "10x10";
horizontal_padding = 20;
gap_size = 15;
};
};
};
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
systemd.enable = true;
systemd.enableXdgAutostart = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
];
settings = {
"$mainMod" = "SUPER";
exec-once = [
"hyprpaper"
"${waybar}"
"${wl-paste} --type text --watch cliphist store"
"${wl-paste} --type image --watch cliphist store"
];
env = [
"WLR_NO_HARDWARE_CURSORS,1"
"TERMINAL,${alacritty}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = {
disable_logs = false;
};
windowrulev2 = [
"float, title:^(rofi)(.*)$"
"center, title:^(rofi)(.*)$"
"noborder, title:^(rofi)(.*)$"
"stayfocused, title:^()$,class:^(steam)$"
"minsize 1 1, title:^()$,class:^(steam)$"
"stayfocused, title:^()$,class:^(steam)$"
];
windowrule = [
"noanim,waybar"
];
monitor = [
"DP-3,preferred,0x550,1"
"DP-2,preferred,1920x0,1"
"HDMI-A-1,preferred,5760x550,1"
];
general = {
gaps_in = 1;
gaps_out = 5;
border_size = 2;
"col.active_border" = "rgba(002f5fee)";
"col.inactive_border" = "rgba(ffffff00)";
layout = "dwindle";
};
input = {
kb_layout = "us";
follow_mouse = 1;
kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
numlock_by_default = true;
};
binds = {
scroll_event_delay = 1;
};
xwayland = {
force_zero_scaling = true;
};
misc = {
disable_hyprland_logo = 1;
};
decoration = {
rounding = 1;
blur = {
enabled = false;
};
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 2, myBezier"
"windowsOut, 1, 2, default, popin 80%"
"border, 1, 2, default"
"borderangle, 1, 2, default"
"fade, 1, 2, default"
"workspaces, 1, 1, default"
];
};
dwindle = {
preserve_split = "yes";
no_gaps_when_only = 1;
force_split = 2;
};
gestures = {
workspace_swipe = "on";
workspace_swipe_invert = false;
};
bindr = [
"$mainMod, SUPER_L, exec, pkill rofi || ${rofi} -show drun"
"$mainMod, SUPER_R, exec, pkill rofi || ${rofi} -show drun"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bind = [
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${alacritty}"
"$mainMod, Q, killactive,"
"$mainMod, A, exec, nautilus"
"$mainMod, S, exec, gnome-calendar"
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
"$mainMod, M, fullscreen, 1"
"$mainMod, F11, fullscreen"
"$mainMod, F, togglefloating,"
"$mainMod, SPACE, togglesplit, # dwindle"
"CONTROL_L ALT_L, L, exec, ${swaylock}"
"$mainMod, C, exec, cliphist list | awk '{print $0, \"\0icon\x1fcom.github.davidmhewitt.clipped\"}' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy"
"$mainMod, Y, exec, ${./files/rofi-ykman.sh}"
"$mainMod, N, exec, ${./files/rofi-ssh.sh}"
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${./files/rofi-power-menu.sh}"
",XF86MonBrightnessUp, exec, xbacklight -inc 10"
",XF86MonBrightnessDown, exec, xbacklight -dec 10"
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",mouse_right, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
",mouse_left, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioNext, exec, ${playerctl} next"
",XF86AudioPrev, exec, ${playerctl} previous"
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
", Print, exec, grim -g \"$(slurp -d)\" - | wl-copy"
"$mainMod, H, exec, ${./files/vim-hypr-nav.sh} l"
"$mainMod, L, exec, ${./files/vim-hypr-nav.sh} r"
"$mainMod, K, exec, ${./files/vim-hypr-nav.sh} u"
"$mainMod, J, exec, ${./files/vim-hypr-nav.sh} d"
"$mainMod CONTROL_L, H, swapwindow, l"
"$mainMod CONTROL_L, L, swapwindow, r"
"$mainMod CONTROL_L, K, swapwindow, u"
"$mainMod CONTROL_L, J, swapwindow, d"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod ALT, L, resizeactive, 20 0"
"$mainMod ALT, H, resizeactive, -20 0"
"$mainMod ALT, K, resizeactive, 0 -20"
"$mainMod ALT, J, resizeactive, 0 20"
"$mainMod SHIFT, T, split-movetoworkspace, empty"
"$mainMod, T, split-workspace, empty"
"$mainMod, TAB, split-workspace, m+1"
"$mainMod SHIFT, TAB, split-workspace, m-1"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList
(
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in
[
"$mainMod, ${ws}, split-workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, split-movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
};
};
}

Some files were not shown because too many files have changed in this diff Show More