1
0
Fork 0
mirror of https://github.com/SeriousBug/dotfiles synced 2024-12-04 10:20:45 -06:00

Compare commits

...

No commits in common. "e07b04ee21edfb3f0b5abc15dd26f5bbceb6ec60" and "7db0d8305bb2ab17a65243c59ff4136c5c5c0b14" have entirely different histories.

57 changed files with 70 additions and 4475 deletions

2
.dotter/.gitignore vendored
View file

@ -1,3 +1 @@
local.toml
cache.toml
cache

4
.dotter/cache.toml Normal file
View file

@ -0,0 +1,4 @@
[symlinks]
"bottom/bottom.toml" = "/home/kaan/.config/bottom/bottom.toml"
[templates]

View file

@ -1,86 +1,17 @@
[helpers]
[applications.files]
"applications/code.desktop" = "~/.local/share/applications/code.desktop"
"applications/com.logseq.Logseq.desktop" = "~/.local/share/applications/com.logseq.Logseq.desktop"
[default]
depends = ["bottom", "git"]
[default.files]
[bottom.files]
"bottom/bottom.toml" = "~/.config/bottom/bottom.toml"
[fish.files]
fish = "~/.config/fish"
[git.files]
"git/gitconfig" = "~/.gitconfig"
[kitty.files]
"kitty/kitty.conf" = "~/.config/kitty/kitty.conf"
[default.variables]
[rofi]
depends = ["theme"]
[rofi.files]
"rofi/config/config.rasi" = "~/.config/rofi/config.rasi"
"rofi/themes/rofi-advanced-7-2.rasi" = "~/.local/share/rofi/themes/rofi-advanced-7-2.rasi"
"rofi/themes/rofi-advanced-powermenu-6-2.rasi" = "~/.local/share/rofi/themes/rofi-advanced-powermenu-6-2.rasi"
"rofi/themes/powermenu.sh" = "~/.local/share/rofi/themes/powermenu.sh"
"rofi/themes/launcher-bg.avif" = { target = "~/.local/share/rofi/themes/launcher-bg.avif", type = "symbolic" }
"rofi/themes/powermenu-bg.avif" = { target = "~/.local/share/rofi/themes/powermenu-bg.avif", type = "symbolic" }
[sway]
depends = ["theme"]
[sway.files]
"sway/config" = "~/.config/sway/config"
"sway/left.avif" = { target = "~/.config/sway/left.avif", type = "symbolic" }
"sway/middle.avif" = { target = "~/.config/sway/middle.avif", type = "symbolic" }
"sway/right.avif" = { target = "~/.config/sway/right.avif", type = "symbolic" }
[systemd.files]
"systemd/user/kdeconnectd.service" = "~/.config/systemd/user/kdeconnectd.service"
"systemd/user/noisetorch.service" = "~/.config/systemd/user/noisetorch.service"
"systemd/user/ssh-agent.service" = "~/.config/systemd/user/ssh-agent.service"
[waybar]
depends = ["theme", "system"]
[waybar.files]
"waybar/config" = "~/.config/waybar/config"
"waybar/style.css" = "~/.config/waybar/style.css"
"waybar/mediaplayer.py" = "~/.config/waybar/mediaplayer.py"
[system.variables]
has_battery = false
intel_backlight = false
platform = "linux"
force_fish_shell = false
has_gpg = true
[theme.variables]
# These are specified in bg-fg pairs, background and text color. The _fg color
# is the color of text that would be readable on this color background.
#
# Dark doesn't necessarily mean darker tone, but also could be a duller tone. Or
# could be straight up lighter, just depends on the theme. It's just a variation
# of the color it's based on.
color_primary = "#66cc99"
color_primary_fg = "#000000"
color_primary_dark = "#94A879"
color_primary_dark_fg = "#000000"
color_primary_darker = "#5D7150"
color_primary_darker_fg = "#FFFFFF"
color_primary_darkest = "#807348"
color_primary_darkest_fg = "#FFFFFF"
color_secondary = "#D6882D"
color_secondary_fg = "#000000"
color_secondary_dark = "#9B551E"
color_secondary_dark_fg = "#FFFFFF"
color_secondary_darker = "#743307"
color_secondary_darker_fg = "#FFFFFF"
color_secondary_darkest = "#3F2D16"
color_secondary_darkest_fg = "#FFFFFF"
[settings]
default_target_type = "automatic"

6
.dotter/local.toml Normal file
View file

@ -0,0 +1,6 @@
includes = []
packages = ["default"]
[files]
[variables]

2
.dotter/post_deploy.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
./scripts/asdf.install.sh

5
.gitattributes vendored
View file

@ -1,5 +0,0 @@
*.avif filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text

13
.vscode/tasks.json vendored
View file

@ -1,13 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "deploy",
"type": "shell",
"command": "dotter",
"problemMatcher": []
}
]
}

40
LICENSE
View file

@ -1,40 +0,0 @@
All content in this repository, except where noted otherwise, is licensed under CC0 (Creative Commons 0).
Some contents have other licenses, in which case additional `LICENSE` files are provided through the repository to note the license for those files.
---
Creative Commons Legal Code
CC0 1.0 Universal
Official translations of this legal tool are available
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
moral rights retained by the original author(s) and/or performer(s);
publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
rights protecting the extraction, dissemination, use and reuse of data in a Work;
database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
4. Limitations and Disclaimers.
No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

View file

@ -1,9 +0,0 @@
# Kaan Barmore-Genç's Dotfiles
This is the dotfiles setup I use on both my desktop computer and my laptop.
## Deploying
Install [dotter-rs](https://github.com/SuperCuber/dotter), then deploy by running `dotter`.

View file

@ -1,18 +0,0 @@
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Refined.
GenericName=Text Editor
Exec=env SSH_AUTH_SOCK=/run/user/1000/keyring/ssh DOCKER_HOST=unix:///run/user/1000/docker.sock /usr/bin/code --unity-launch --enable-features=UseOzonePlatform --ozone-platform=wayland --password-store=kwallet5 %F
Icon=visual-studio-code
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/bin/code --new-window %F
Icon=visual-studio-code

View file

@ -1,10 +0,0 @@
[Desktop Entry]
Type=Application
NoDisplay=false
Terminal=false
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=run.sh --file-forwarding com.logseq.Logseq --enable-features=UseOzonePlatform --ozone-platform=wayland @@u %U @@
Icon=com.logseq.Logseq
Name=Logseq
Categories=Office
MimeType=x-scheme-handler/logseq;
X-Flatpak=com.logseq.Logseq

BIN
bootstrap Executable file

Binary file not shown.

View file

@ -1,171 +1,2 @@
# This is a default config file for bottom. All of the settings are commented
# out by default; if you wish to change them uncomment and modify as you see
# fit.
# This group of options represents a command-line flag/option. Flags explicitly
# added when running (ie: btm -a) will override this config file if an option
# is also set here.
[flags]
# Whether to hide the average cpu entry.
#hide_avg_cpu = false
# Whether to use dot markers rather than braille.
#dot_marker = false
# The update rate of the application.
#rate = 1000
# Whether to put the CPU legend to the left.
#left_legend = false
# Whether to set CPU% on a process to be based on the total CPU or just current usage.
#current_usage = false
# Whether to group processes with the same name together by default.
group_processes = true
# Whether to make process searching case sensitive by default.
#case_sensitive = false
# Whether to make process searching look for matching the entire word by default.
#whole_word = false
# Whether to make process searching use regex by default.
#regex = false
# Defaults to Celsius. Temperature is one of:
#temperature_type = "k"
#temperature_type = "f"
#temperature_type = "c"
#temperature_type = "kelvin"
#temperature_type = "fahrenheit"
#temperature_type = "celsius"
# The default time interval (in milliseconds).
#default_time_value = 60000
# The time delta on each zoom in/out action (in milliseconds).
#time_delta = 15000
# Override layout default widget
#default_widget_type = "proc"
#default_widget_count = 1
# Use basic mode
#basic = false
# Use the old network legend style
#use_old_network_legend = false
# Remove space in tables
#hide_table_gap = false
# Disable mouse clicks
#disable_click = false
# Built-in themes. Valid values are "default", "default-light", "gruvbox", "gruvbox-light", "nord", "nord-light"
#color = "default"
# Show memory values in the processes widget as values by default
#mem_as_value = false
# Show tree mode by default in the processes widget.
#tree = false
# Shows an indicator in table widgets tracking where in the list you are.
#show_table_scroll_position = false
# Show processes as their commands by default in the process widget.
#process_command = false
# Displays the network widget with binary prefixes.
#network_use_binary_prefix = false
# Displays the network widget using bytes.
#network_use_bytes = false
# Displays the network widget with a log scale.
#network_use_log = false
# Hides advanced options to stop a process on Unix-like systems.
#disable_advanced_kill = false
# These are all the components that support custom theming. Note that colour support
# will depend on terminal support.
#[colors] # Uncomment if you want to use custom colors
# Represents the colour of table headers (processes, CPU, disks, temperature).
#table_header_color="LightBlue"
# Represents the colour of the label each widget has.
#widget_title_color="Gray"
# Represents the average CPU color.
#avg_cpu_color="Red"
# Represents the colour the core will use in the CPU legend and graph.
#cpu_core_colors=["LightMagenta", "LightYellow", "LightCyan", "LightGreen", "LightBlue", "LightRed", "Cyan", "Green", "Blue", "Red"]
# Represents the colour RAM will use in the memory legend and graph.
#ram_color="LightMagenta"
# Represents the colour SWAP will use in the memory legend and graph.
#swap_color="LightYellow"
# Represents the colour rx will use in the network legend and graph.
#rx_color="LightCyan"
# Represents the colour tx will use in the network legend and graph.
#tx_color="LightGreen"
# Represents the colour of the border of unselected widgets.
#border_color="Gray"
# Represents the colour of the border of selected widgets.
#highlighted_border_color="LightBlue"
# Represents the colour of most text.
#text_color="Gray"
# Represents the colour of text that is selected.
#selected_text_color="Black"
# Represents the background colour of text that is selected.
#selected_bg_color="LightBlue"
# Represents the colour of the lines and text of the graph.
#graph_color="Gray"
# Represents the colours of the battery based on charge
#high_battery_color="green"
#medium_battery_color="yellow"
#low_battery_color="red"
# Layout - layouts follow a pattern like this:
# [[row]] represents a row in the application.
# [[row.child]] represents either a widget or a column.
# [[row.child.child]] represents a widget.
#
# All widgets must have the type value set to one of ["cpu", "mem", "proc", "net", "temp", "disk", "empty"].
# All layout components have a ratio value - if this is not set, then it defaults to 1.
# The default widget layout:
[[row]]
ratio=30
[[row.child]]
type="cpu"
[[row]]
ratio=70
[[row.child]]
ratio=8
[[row.child.child]]
type="mem"
ratio=50
[[row.child.child]]
type="net"
ratio=50
[[row.child]]
ratio=6
[[row.child.child]]
ratio=30
type="temp"
[[row.child.child]]
ratio=20
type="disk"
[[row.child.child]]
ratio=50
type="proc"
# Filters - you can hide specific temperature sensors, network interfaces, and disks using filters. This is admittedly
# a bit hard to use as of now, and there is a planned in-app interface for managing this in the future:
#[disk_filter]
#is_list_ignored = true
#list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
#regex = true
#case_sensitive = false
#whole_word = false
[mount_filter]
is_list_ignored = true
list = ["/boot"]
regex = false
case_sensitive = false
whole_word = false
[temp_filter]
is_list_ignored = true
list = ["acpitz", "amdgpu: mem", "coretemp: Core .*"]
regex = true
case_sensitive = false
whole_word = false
#[net_filter]
#is_list_ignored = true
#list = ["virbr0.*"]
#regex = true
#case_sensitive = false
#whole_word = false

View file

@ -1,7 +0,0 @@
complete --command fisher --exclusive --long help --description "Print help"
complete --command fisher --exclusive --long version --description "Print version"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"

View file

@ -1,21 +0,0 @@
complete --command nvm --exclusive
complete --command nvm --exclusive --long version --description "Print version"
complete --command nvm --exclusive --long help --description "Print help"
complete --command nvm --long silent --description "Suppress standard output"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "(
test -e $nvm_data && string split ' ' <$nvm_data/.index
)"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "(
_nvm_list | string split ' ' | string replace system ''
)"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "(
set --query nvm_default_version && echo default
)"

View file

@ -1,28 +0,0 @@
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
set --global nvm_data $XDG_DATA_HOME/nvm
function _nvm_install --on-event nvm_install
test ! -d $nvm_data && command mkdir -p $nvm_data
echo "Downloading the Node distribution index..." 2>/dev/null
_nvm_index_update
end
function _nvm_update --on-event nvm_update
set --query --universal nvm_data && set --erase --universal nvm_data
set --query --universal nvm_mirror && set --erase --universal nvm_mirror
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
end
function _nvm_uninstall --on-event nvm_uninstall
command rm -rf $nvm_data
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source
functions --erase (functions --all | string match --entire --regex -- "^_nvm_")
end
if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version
nvm use --silent $nvm_default_version
end

View file

@ -1,36 +0,0 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end
# set up direnv
direnv hook fish | source
{{#if (eq platform "linux") }}
# set current desktop, needed for desktop sharing with Wayland
set -gx XDG_CURRENT_DESKTOP sway
# make Qt apps use the theme set by qt5ct
set -gx QT_QPA_PLATFORMTHEME qt5ct
# load desktop files from flatpak
set -l xdg_data_home $XDG_DATA_HOME ~/.local/share
set -gx --path XDG_DATA_DIRS $xdg_data_home[1]/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
# Unlock login keyring
if test -n "$DESKTOP_SESSION"
for env_var in (gnome-keyring-daemon --start)
set -x (echo $env_var | string split "=")
end
end
for flatpakdir in ~/.local/share/flatpak/exports/bin /var/lib/flatpak/exports/bin
if test -d $flatpakdir
contains $flatpakdir $PATH; or set -a PATH $flatpakdir
end
end
{{/if}}
{{#if (eq platform "macos") }}
# Set Mac keyboard shortcuts
bind \u0192 forward-word
bind \u222B backward-word
bind \u2202 kill-word
{{/if}}

View file

@ -1,2 +0,0 @@
jorgebucaran/fisher
jorgebucaran/nvm.fish

View file

@ -1,47 +0,0 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export ANDROID_HOME:/home/kaan/Android/Sdk/
SETUVAR --export BROWSER:firefox
SETUVAR --export CROSS_CONTAINER_ENGINE:podman
{{#if (eq platform "Linux" )}}
SETUVAR --export DOCKER_HOST:unix\x3a///run/user/1000/docker\x2esock
{{/if}}
SETUVAR --export EDITOR:nano
SETUVAR --export --path GOPATH:/home/kaan/\x2ego
SETUVAR --export MOZ_ENABLE_WAYLAND:1
SETUVAR --export SSH_AUTH_SOCK:/run/user/1000/keyring/ssh
SETUVAR --export TSC_WATCHFILE:UseFsEventsWithFallbackDynamicPolling
SETUVAR --export XDG_CURRENT_DESKTOP:sway
SETUVAR __fish_initialized:3400
SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/kaan/\x2econfig/fish/functions/fisher\x2efish\x1e/home/kaan/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:/Users/kaan/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e/Users/kaan/\x2econfig/fish/functions/_nvm_list\x2efish\x1e/Users/kaan/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e/Users/kaan/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e/Users/kaan/\x2econfig/fish/functions/nvm\x2efish\x1e/Users/kaan/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e/Users/kaan/\x2econfig/fish/completions/nvm\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/nvm\x2efish
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:00afff
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/home/kaan/\x2ecargo/bin\x1e/home/kaan/Android/Sdk/platform\x2dtools\x1e/home/kaan/Android/Sdk/tools/bin\x1e/home/kaan/Android/Sdk/tools\x1e/home/kaan/Android/Sdk/emulator\x1e/home/kaan/\x2elocal/bin

View file

@ -1,20 +0,0 @@
function _nvm_index_update
test ! -d $nvm_data && command mkdir -p $nvm_data
set --local index $nvm_data/.index
if not command curl --location --silent $nvm_mirror/index.tab >$index.temp
command rm -f $index.temp
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
return 1
end
command awk -v OFS=\t '
/v0.9.12/ { exit } # Unsupported
NR > 1 {
print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "")
}
' $index.temp >$index
command rm -f $index.temp
end

View file

@ -1,11 +0,0 @@
function _nvm_list
set --local versions $nvm_data/*
set --query versions[1] &&
string match --entire --regex -- (string match --regex -- "v\d.+" $versions |
string escape --style=regex |
string join "|"
) <$nvm_data/.index
command --all node |
string match --quiet --invert --regex -- "^$nvm_data" && echo system
end

View file

@ -1,4 +0,0 @@
function _nvm_version_activate --argument-names ver
set --global --export nvm_current_version $ver
set --prepend PATH $nvm_data/$ver/bin
end

View file

@ -1,5 +0,0 @@
function _nvm_version_deactivate --argument-names ver
test "$nvm_current_version" = "$ver" && set --erase nvm_current_version
set --local index (contains --index -- $nvm_data/$ver/bin $PATH) &&
set --erase PATH[$index]
end

View file

@ -1,212 +0,0 @@
function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.3.1
set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
case -v --version
echo "fisher, version $fisher_version"
case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
echo "Options:"
echo " -v or --version Print version"
echo " -h or --help Print this help message"
echo "Variables:"
echo " \$fisher_path Plugin installation path. Default: ~/.config/fish"
case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove
isatty || read --local --null --array stdin && set --append argv $stdin
set --local install_plugins
set --local update_plugins
set --local remove_plugins
set --local arg_plugins $argv[2..-1]
set --local old_plugins $_fisher_plugins
set --local new_plugins
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if test ! -e $fish_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
end
for plugin in $arg_plugins
test -e "$plugin" && set plugin (realpath $plugin)
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
end
if set --query argv[2]
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
test "$cmd" = remove &&
set --append remove_plugins $plugin ||
set --append update_plugins $plugin
else if test "$cmd" = install
set --append install_plugins $plugin
else
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
end
end
else
for plugin in $new_plugins
contains -- "$plugin" $old_plugins &&
set --append update_plugins $plugin ||
set --append install_plugins $plugin
end
for plugin in $old_plugins
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
end
end
set --local pid_list
set --local source_plugins
set --local fetch_plugins $update_plugins $install_plugins
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
for plugin in $fetch_plugins
set --local source (command mktemp -d)
set --append source_plugins $source
command mkdir -p $source/{completions,conf.d,functions}
fish --command "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD
set url https://api.github.com/repos/\$name[1]/tarball/\$name[2]
set header 'Accept: application/vnd.github.v3+json'
echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent -L -H \$header \$url | tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source
else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
end
command rm -rf \$temp
end
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
" &
set --append pid_list (jobs --last --pid)
end
wait $pid_list 2>/dev/null
for plugin in $fetch_plugins
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set --local index (contains --index -- "$plugin" $install_plugins)
set --erase install_plugins[$index]
else
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
end
end
end
for plugin in $update_plugins $remove_plugins
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
if contains -- "$plugin" $remove_plugins
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
emit {$name}_uninstall
end
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var
end
command rm -rf $$plugin_files_var
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
complete --erase --command $name
end
set --erase _fisher_plugins[$index]
set --erase $plugin_files_var
end
end
if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,conf.d,completions}
end
for plugin in $update_plugins $install_plugins
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set --local files $source/{functions,conf.d,completions}/*
if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,conf.d,completions}/*
set --local conflict_files
for file in (string replace -- $source/ $fisher_path/ $files)
contains -- $file $user_files && set --append conflict_files $file
end
if set --query conflict_files[1] && set --erase install_plugins[$index]
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
continue
end
end
for file in (string replace -- $source/ "" $files)
command cp -Rf $source/$file $fisher_path/$file
end
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files)
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
contains -- $plugin $install_plugins && set --local event install || set --local event update
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var)
source $file
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
emit {$name}_$event
end
end
end
command rm -rf $source_plugins
set --query _fisher_plugins[1] || set --erase _fisher_plugins
set --query _fisher_plugins &&
printf "%s\n" $_fisher_plugins >$fish_plugins ||
command rm -f $fish_plugins
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "Installed $total[1]") (
test $total[2] = 0 || echo "Updated $total[2]") (
test $total[3] = 0 || echo "Removed $total[3]")
) plugin/s
case \*
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
end
end
## Migrations ##
function _fisher_fish_postexec --on-event fish_postexec
if functions --query _fisher_list
fisher update >/dev/null 2>/dev/null
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_list _fisher_plugin_parse
set --erase fisher_data
end
functions --erase _fisher_fish_postexec
end

View file

@ -1,3 +0,0 @@
function git-cleanup
git fetch -p ; and git branch -vv | grep ': gone]' | grep -v "\*" | awk '{ print $1; }' | xargs git branch -D
end

View file

@ -1,3 +0,0 @@
function la --wraps=ls --wraps=exa --description 'alias la exa'
exa $argv;
end

View file

@ -1,4 +0,0 @@
# Defined via `source`
function less --wraps='bat --paging=always' --wraps='bat --paging=always --style=header,rule' --wraps='bat --paging=always --style=header,rule --grid' --wraps='bat --paging=always --style=header,rule,grid' --wraps='bat --paging=always --style=header,grid' --description 'alias less bat --paging=always --style=header,grid'
bat --paging=always --style=header,grid $argv;
end

View file

@ -1,4 +0,0 @@
# Defined via `source`
function list-file-sizes --wraps='du -h * --summarize | sort -h' --description 'alias list-file-sizes du -h * --summarize | sort -h'
du -h * --summarize | sort -h $argv;
end

View file

@ -1,4 +0,0 @@
# Defined in /tmp/fish.R8Qy48/mkcd.fish @ line 2
function mkcd --wraps='mkdir "$argv[1]"; and cd "$argv[1]"' --wraps='mkdir "$argv[1]"; and echo cd "$argv[1]"' --description 'alias mkcd mkdir "$argv[1]"; and echo cd "$argv[1]"'
mkdir -p "$argv[1]"; and cd "$argv[1]"
end

View file

@ -1,234 +0,0 @@
function nvm --description "Node version manager"
for silent in --silent -s
if set --local index (contains --index -- $silent $argv)
set --erase argv[$index] && break
end
set --erase silent
end
set --local cmd $argv[1]
set --local ver $argv[2]
if set --query silent && ! set --query cmd[1]
echo "nvm: Version number not specified (see nvm -h for usage)" >&2
return 1
end
if ! set --query ver[1] && contains -- "$cmd" install use
for file in .nvmrc .node-version
set file (_nvm_find_up $PWD $file) && read ver <$file && break
end
if ! set --query ver[1]
echo "nvm: Invalid version or missing \".nvmrc\" file" >&2
return 1
end
end
set --local their_version $ver
switch "$cmd"
case -v --version
echo "nvm, version 2.2.13"
case "" -h --help
echo "Usage: nvm install <version> Download and activate the specified Node version"
echo " nvm install Install the version specified in the nearest .nvmrc file"
echo " nvm use <version> Activate the specified Node version in the current shell"
echo " nvm use Activate the version specified in the nearest .nvmrc file"
echo " nvm list List installed Node versions"
echo " nvm list-remote List available Node versions to install"
echo " nvm list-remote <regex> List Node versions matching a given regex pattern"
echo " nvm current Print the currently-active Node version"
echo " nvm uninstall <version> Uninstall the specified Node version"
echo "Options:"
echo " -s, --silent Suppress standard output"
echo " -v, --version Print the version of nvm"
echo " -h, --help Print this help message"
echo "Variables:"
echo " nvm_arch Override architecture, e.g. x64-musl"
echo " nvm_mirror Use a mirror for downloading Node binaries"
echo " nvm_default_version Set the default version for new shells"
echo " nvm_default_packages Install a list of packages every time a Node version is installed"
echo "Examples:"
echo " nvm install latest Install the latest version of Node"
echo " nvm use 14.15.1 Use Node version 14.15.1"
echo " nvm use system Activate the system's Node version"
case install
_nvm_index_update
string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias
if ! set --query ver[1]
echo "nvm: Invalid version number or alias: \"$their_version\"" >&2
return 1
end
if test ! -e $nvm_data/$ver
set --local os (command uname -s | string lower)
set --local ext tar.gz
set --local arch (command uname -m)
switch $os
case aix
set arch ppc64
case sunos
case linux
case darwin
case {MSYS_NT,MINGW\*_NT}\*
set os win
set ext zip
case \*
echo "nvm: Unsupported operating system: \"$os\"" >&2
return 1
end
switch $arch
case i\*86
set arch x86
case x86_64
set arch x64
case arm64
string match --regex --quiet "v(?<major>\d+)" $ver
if test "$os" = darwin -a $major -lt 16
set arch x64
end
case armv6 armv6l
set arch armv6l
case armv7 armv7l
set arch armv7l
case armv8 armv8l aarch64
set arch arm64
end
set --query nvm_arch && set arch $nvm_arch
set --local dir "node-$ver-$os-$arch"
set --local url $nvm_mirror/$ver/$dir.$ext
command mkdir -p $nvm_data/$ver
if ! set --query silent
echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias"
echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m"
end
if ! command curl $silent --progress-bar --location $url |
command tar --extract --gzip --directory $nvm_data/$ver 2>/dev/null
command rm -rf $nvm_data/$ver
echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2
return 1
end
set --query silent || echo -en "\033[F\33[2K\x1b[0m"
if test "$os" = win
command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin
else
command mv $nvm_data/$ver/$dir/* $nvm_data/$ver
command rm -rf $nvm_data/$ver/$dir
end
end
if test $ver != "$nvm_current_version"
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
_nvm_version_activate $ver
set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages
end
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
case use
test $ver = default && set ver $nvm_default_version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
if ! set --query ver[1]
echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2
return 1
end
if test $ver != "$nvm_current_version"
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
test $ver != system && _nvm_version_activate $ver
end
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
case uninstall
if test -z "$ver"
echo "nvm: Not enough arguments for command: \"$cmd\"" >&2
return 1
end
test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
if ! set -q ver[1]
echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2
return 1
end
set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node")
_nvm_version_deactivate $ver
command rm -rf $nvm_data/$ver
case current
_nvm_current
case ls list
_nvm_list | _nvm_list_format (_nvm_current) $argv[2]
case lsr {ls,list}-remote
_nvm_index_update || return
_nvm_list | command awk '
FILENAME == "-" && (is_local[$1] = FNR == NR) { next } {
print $0 (is_local[$1] ? " ✓" : "")
}
' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2]
case \*
echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2
return 1
end
end
function _nvm_find_up --argument-names path file
test -e "$path/$file" && echo $path/$file || begin
test ! -z "$path" || return
_nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file
end
end
function _nvm_version_match --argument-names ver
string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver |
string replace --filter --regex -- '^v?(\d+)' 'v$1' |
string escape --style=regex || string lower '\b'$ver'(?:/\w+)?$'
end
function _nvm_list_format --argument-names current regex
command awk -v current="$current" -v regex="$regex" '
$0 ~ regex {
aliases[versions[i++] = $1] = $2 " " $3
pad = (n = length($1)) > pad ? n : pad
}
END {
if (!i) exit 1
while (i--)
printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n",
versions[i], aliases[versions[i]])
}
'
end
function _nvm_current
command --search --quiet node || return
set --query nvm_current_version && echo $nvm_current_version || echo system
end
function _nvm_node_info
set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm)))
test -f $npm_path/package.json || set --local npm_version_default (command npm --version)
command node --eval "
console.log(process.version)
console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version)
console.log(process.execPath)
" | string replace -- ~ \~
end

View file

@ -1,3 +0,0 @@
function pacman-remove-orphans --wraps='acman -Qtdq | pacman -Rns -' --wraps='pacman -Qtdq | pacman -Rns -' --wraps='pacman -Qtdq | sudo pacman -Rns -' --description 'alias pacman-remove-orphans pacman -Qtdq | sudo pacman -Rns -'
pacman -Qtdq | sudo pacman -Rns - $argv;
end

View file

@ -1,3 +0,0 @@
function rust-musl
sudo docker run --rm -it -v (pwd):/home/rust/src:rw messense/rust-musl-cross:$argv[1] $argv[2..-1]
end

View file

@ -1,3 +0,0 @@
function ssh --description 'alias ssh kitty +kitten ssh'
kitty +kitten ssh $argv;
end

View file

@ -1,3 +0,0 @@
function sway-prop --wraps=swaymsg\ -t\ get_tree\ \|\ jq\ \'..\ \|\ select\(.type\?\)\ \|\ select\(.focused==true\)\' --description alias\ sway-prop\ swaymsg\ -t\ get_tree\ \|\ jq\ \'..\ \|\ select\(.type\?\)\ \|\ select\(.focused==true\)\'
swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true)' $argv;
end

View file

@ -1,17 +1,10 @@
[user]
email = kaan@bgenc.net
email = kaan@bgenc.com
name = Kaan Barmore-Genc
signingkey = F5DEC5268AA501F35FBD5978B2E280771CD62FCF
[init]
defaultBranch = main
[pull]
rebase = true
{{#if has_gpg}}
[commit]
gpgSign = true
[tag]
gpgsign = true
{{/if}}
[pager]
diff = delta
log = delta

File diff suppressed because it is too large Load diff

View file

@ -1,8 +0,0 @@
//@theme "/home/kaan/.local/share/rofi/themes/launchpad.rasi"
configuration {
kb-cancel: "Escape";
me-select-entry: "";
me-accept-entry: [ MousePrimary, MouseDPrimary ];
}
@theme "/home/kaan/.local/share/rofi/themes/rofi-advanced-7-2.rasi"

View file

@ -1,3 +0,0 @@
https://www.pexels.com/photo/aerial-photography-of-cloudy-mountain-7919/
Creative Commons Zero (CC0)

View file

@ -1,5 +0,0 @@
https://github.com/adi1090x/rofi
These have been ripped out of the original repository. The files `powermenu.sh`,
`rofi-advanced-7-2.rasi`, and `rofi-advanced-powermenu-6-2.rasi` are therefore
licensed under GPL v3.0.

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1515c7a041c8750b324639a18b19f8ef9a4fa620150f7c8808c49ccc1b4e59b1
size 118884

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c468f8501b6f8ab8c31254a395df7ba848210ddf04bdba74103adc3643bf269
size 102772

View file

@ -1,108 +0,0 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Rofi : Power Menu
#
## Available Styles
#
## style-1 style-2 style-3 style-4 style-5
# Current Theme
dir="$HOME/.local/share/rofi/themes"
theme='rofi-advanced-powermenu-6-2'
# CMDs
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"
uptime="`uptime -p | sed -e 's/up //g'`"
host=`hostnamectl hostname`
# Options
hibernate=''
shutdown=''
reboot=''
lock=''
suspend=''
logout=''
yes=''
no=''
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$USER@$host" \
-mesg " Uptime: $uptime" \
-theme ${dir}/${theme}.rasi
}
# Confirmation CMD
confirm_cmd() {
rofi -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 350px;}' \
-theme-str 'mainbox {orientation: vertical; children: [ "message", "listview" ];}' \
-theme-str 'listview {columns: 2; lines: 1;}' \
-theme-str 'element-text {horizontal-align: 0.5;}' \
-theme-str 'textbox {horizontal-align: 0.5;}' \
-dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-theme ${dir}/${theme}.rasi
}
# Ask for confirmation
confirm_exit() {
echo -e "$yes\n$no" | confirm_cmd
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$shutdown\n$logout\n$reboot\n$suspend" | rofi_cmd
}
# Execute Command
run_cmd() {
selected="$(confirm_exit)"
if [[ "$selected" == "$yes" ]]; then
if [[ $1 == '--shutdown' ]]; then
systemctl poweroff
elif [[ $1 == '--reboot' ]]; then
systemctl reboot
elif [[ $1 == '--hibernate' ]]; then
systemctl hibernate
elif [[ $1 == '--suspend' ]]; then
systemctl suspend
elif [[ $1 == '--logout' ]]; then
loginctl terminate-user $USER
fi
else
exit 0
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$shutdown)
run_cmd --shutdown
;;
$reboot)
run_cmd --reboot
;;
$hibernate)
run_cmd --hibernate
;;
$lock)
if [[ -x '/usr/bin/betterlockscreen' ]]; then
betterlockscreen -l
elif [[ -x '/usr/bin/i3lock' ]]; then
i3lock
fi
;;
$suspend)
run_cmd --suspend
;;
$logout)
run_cmd --logout
;;
esac

View file

@ -1,211 +0,0 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser,window";
show-icons: true;
display-drun: "Apps";
display-run: "Run";
display-filebrowser: "Files";
display-window: "Windows";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
}
/*****----- Global Properties -----*****/
* {
font: "Ubuntu 10";
background: {{color_secondary_darker}};
background-alt: {{color_primary}};
foreground: {{color_secondary_darker_fg}};
selected: {{color_primary_darker}};
active: #000000;
urgent: #000000;
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 1000px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
border-radius: 20px;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 0px;
background-color: transparent;
orientation: vertical;
children: [ "inputbar", "listbox" ];
}
listbox {
spacing: 20px;
padding: 20px;
background-color: transparent;
orientation: vertical;
children: [ "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
padding: 80px 60px;
background-color: transparent;
background-image: url("~/.local/share/rofi/themes/launcher-bg.avif", width);
text-color: @foreground;
orientation: horizontal;
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
}
textbox-prompt-colon {
enabled: false;
expand: false;
str: "";
padding: 12px 15px;
border-radius: 100%;
background-color: @background-alt;
text-color: inherit;
}
entry {
enabled: true;
expand: false;
width: 300px;
padding: 12px 16px;
border-radius: 100%;
background-color: @background-alt;
text-color: black;
cursor: text;
placeholder: "Search";
placeholder-color: inherit;
}
dummy {
expand: true;
background-color: transparent;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
background-color: transparent;
text-color: @foreground;
}
button {
width: 80px;
padding: 12px;
border-radius: 100%;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: @selected;
text-color: @foreground;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 8;
cycle: false;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 10px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
padding: 4px;
border-radius: 100%;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal {
background-color: inherit;
text-color: inherit;
}
element normal.urgent {
background-color: @urgent;
text-color: @foreground;
}
element normal.active {
background-color: @active;
text-color: @foreground;
}
element selected.normal {
background-color: @selected;
text-color: @foreground;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @urgent;
text-color: @foreground;
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 32px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Message -----*****/
message {
background-color: transparent;
}
textbox {
padding: 12px;
border-radius: 100%;
background-color: @background-alt;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
}
error-message {
padding: 12px;
border-radius: 20px;
background-color: @background;
text-color: @foreground;
}

View file

@ -1,147 +0,0 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
* {
font: "Ubuntu 10";
background: {{color_secondary_darkest}};
background-alt: {{color_secondary_darker}};
foreground: {{color_secondary_darkest_fg}};
selected: {{color_secondary}};
active: {{color_primary_darker}};
urgent: {{color_primary_dark}};
}
/*
USE_BUTTONS=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 1000px;
x-offset: 0px;
y-offset: 0px;
padding: 0px;
border: 0px solid;
border-radius: 24px;
border-color: @selected;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
background-color: transparent;
orientation: horizontal;
children: [ "imagebox", "listview" ];
}
/*****----- Imagebox -----*****/
imagebox {
spacing: 20px;
padding: 20px;
background-color: transparent;
background-image: url("~/.local/share/rofi/themes/powermenu-bg.avif", height);
children: [ "inputbar", "dummy", "message" ];
}
/*****----- User -----*****/
userimage {
margin: 0px 0px;
border: 10px;
border-radius: 10px;
border-color: @background-alt;
background-color: transparent;
background-image: url("~/.config/rofi/images/d.png", height);
}
/*****----- Inputbar -----*****/
inputbar {
padding: 15px;
border-radius: 100%;
background-color: @urgent;
text-color: @foreground;
children: [ "dummy", "prompt", "dummy"];
}
dummy {
background-color: transparent;
}
prompt {
background-color: inherit;
text-color: inherit;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 15px;
border-radius: 100%;
background-color: @active;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 2;
cycle: false;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 20px;
margin: 20px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 40px 10px;
border-radius: 100%;
background-color: @background-alt;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "Ubuntu 30";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

50
scripts/asdf.install.sh Executable file
View file

@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Install
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
# Setup bash
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
# Setup fish
mkdir -p ~/.config/fish
echo 'source ~/.asdf/asdf.fish' >> ~/.config/fish/config.fish
mkdir -p ~/.config/fish/completions
ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
# Setup zsh
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.zshrc
echo 'fpath=(${ASDF_DIR}/completions $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
# Activate asdf
. "$HOME/.asdf/asdf.sh"
# Install and activate asdf plugins
PLUGINS=(
"air"
"bat"
"bottom"
"bun"
"delta"
"dust"
"eza"
"fd"
"golang"
"jq"
"lazygit"
"neovim"
"nodejs"
"pnpm"
"ripgrep"
"xh"
)
for PLUGIN in "${PLUGINS[@]}"; do
asdf plugin add "$PLUGIN"
asdf install "$PLUGIN" latest
asdf global "$PLUGIN" latest
done
#git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote

View file

@ -1,3 +0,0 @@
https://www.pexels.com/photo/green-pine-trees-on-mountain-under-blue-sky-143577/
Free under the Pexels license

View file

@ -1,330 +0,0 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
set $left a
set $down s
set $up w
set $right d
# Your preferred terminal emulator
set $term kitty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# recommended configuration for sway-launcher-desktop
#set $menu j4-dmenu-desktop --dmenu='env BEMENU_BACKEND=wayland bemenu --line-height 32 -p launch -i --fn "Fira Code"' --term=$term
#set $menu dmenu_path | dmenu | xargs swaymsg exec --
set $menu rofi -i -show drun -modi drun -show-icons
### Output configuration
#
output eDP-1 {
bg $HOME/.config/sway/middle.avif fill
scale 1.5
}
output HDMI-A-1 {
resolution 2560x1440@74.971Hz
position 0,0
bg $HOME/.config/sway/left.avif fill
}
output DP-2 {
resolution 2560x1440@144.006Hz
position 2560,0
adaptive_sync on
bg $HOME/.config/sway/middle.avif fill
}
output DP-1 {
resolution 2560x1440@144.006Hz
position 5120,0
adaptive_sync on
bg $HOME/.config/sway/right.avif fill
}
# Enable XWayland
xwayland enable
# Pass all variables to dbus & systemd to run graphical user services
exec dbus-update-activation-environment --all --systemd
# Enable screencast support
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
# Night color (red shift)
exec wlsunset -l 40 -L -83
# Screen sharing selection
#exec bash -c "/usr/lib/xdg-desktop-portal -r & /usr/lib/xdg-desktop-portal-wlr"
exec_always env WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway /usr/lib/xdg-desktop-portal -r &
exec_always /usr/lib/xdg-desktop-portal-wlr -r &
# policykit (graphical password prompt)
exec /usr/bin/lxqt-policykit-agent
# mic noise supression
exec systemctl --user start noisetorch.service
# KDE Connect
exec systemctl --user start kdeconnectd.service
exec kdeconnect-indicator
# Bluetooth
exec /usr/bin/blueman-applet
# Backups
exec /opt/KopiaUI/kopia-ui
# network manager indicator
exec nm-applet --indicator
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
#exec swayidle -w \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input * xkb_numlock enable
input * accel_profile flat
input * natural_scroll disabled
input "5426:136:Razer_Razer_Basilisk_Ultimate_Dongle" {
accel_profile flat
pointer_accel -0.8
}
input "1452:613:Apple_Inc._Magic_Trackpad" {
accel_profile adaptive
}
input "1:1:AT_Translated_Set_2_keyboard" {
xkb_options ctrl:swapcaps
xkb_layout us,tr
}
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym Alt+Space exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec $HOME/.local/share/rofi/themes/powermenu.sh
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Move the focused workspace to a different window
bindsym $mod+Alt+$left move workspace to output left
bindsym $mod+Alt+$right move workspace to output right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+t layout stacking
bindsym $mod+Shift+t layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+p focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Screenshots:
#
# full screen
#bindsym Print exec grim - | swappy -f -
bindsym Print exec grim "$HOME/Pictures/Screenshot/$(date +'%Y-%m-%d-%H-%M-%S-%N.png')"
# selected region
bindsym $mod+Shift+Print exec grim -g "$(slurp)" "$HOME/Pictures/Screenshot/$(date +'%Y-%m-%d-%H-%M-%S-%N.png')"
mode "screenshot" {
# selected window
bindsym w exec exec grim -g "$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)" "$HOME/Pictures/Screenshot/$(date +'%Y-%m-%d-%H-%M-%S-%N.png')"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+c mode "screenshot"
#
# Media controls:
#
# Play/pause/skip/rewind
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# volume control (TODO: check commands needed)
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
{{#if intel_backlight}}
bindsym XF86MonBrightnessUp exec backlight-control +1
bindsym XF86MonBrightnessDown exec backlight-control -1
{{/if}}
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
# Preset sizes
bindsym q resize set width 60ppt
bindsym e resize set width 25ppt
}
bindsym $mod+r mode "resize"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
swaybar_command waybar
}
#
# Per-window configuration
#
gaps inner 12
gaps outer 16
default_border pixel
client.focused {{color_secondary}} {{color_secondary}} {{color_secondary_fg}} {{color_secondary}} {{color_secondary}}
# the focused view within an unfocused container (like the selected one in a vertical stack)
client.focused_inactive {{color_secondary_dark}} {{color_secondary_dark}} {{color_secondary_dark_fg}} {{color_secondary_dark}} {{color_secondary_dark}}
client.unfocused {{color_secondary_darker}} {{color_secondary_darker}} {{color_secondary_darker_fg}} {{color_secondary_darker}} {{color_secondary_darker}}
# ignore urgent, it's xwayland only
client.urgent {{color_secondary}} {{color_secondary}} {{color_secondary_fg}} {{color_secondary}} {{color_secondary}}
include /etc/sway/config.d/*
for_window [app_id="pinentry-qt"] floating enable
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] floating enable, move position 1200 px 90 px
for_window [class="explorer.exe" title="Wine System Tray"] move position 500 0

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94455252e4e531d4c2d28194faa004c25d8a16e06e96e997a4218591f9c0911e
size 369542

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd2f5802d5d7e4427de54e32773261ddfc172b48940bb9b996ad225819f1f47c
size 490169

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea747152124a779f3fc1ee8f8e56806c94c799511fd697c1e60b0fc21e1c2afc
size 3888869

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef20778b7f5c112c07346051dfd9d706d235aa2b65c3d2ea5bca93ebbd476104
size 616662

View file

@ -1,14 +0,0 @@
[Unit]
Description=Run kdeconnectd.
After=graphical-session.target
StartLimitIntervalSec=600
StartLimitBurst=5
[Service]
Type=simple
ExecStart=/usr/lib/kdeconnectd
Restart=always
RestartSec=5s
[Install]
WantedBy=graphical-session.target

View file

@ -1,12 +0,0 @@
[Unit]
Description=Run noisetorch input supressor.
After=pipewire.service
[Service]
Type=oneshot
ExecStart=/usr/bin/noisetorch -i
RemainAfterExit=true
ExecStop=/usr/bin/noisetorch -u
[Install]
WantedBy=graphical-session.target

View file

@ -1,12 +0,0 @@
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
# DISPLAY required for ssh-askpass to work
Environment=DISPLAY=:0
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target

View file

@ -1,137 +0,0 @@
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 0, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["custom/launcher", "sway/workspaces", "sway/mode", "custom/windows"],
"modules-center": [],
"modules-right": ["custom/media", "pulseaudio",
{{#if has_battery}}
"battery",
{{/if}}
{{#if intel_backlight}}
"backlight",
{{/if}}
"cpu", "memory", "temperature", "sway/language", "clock", "tray", "custom/exit"],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": false,
"format": "{name}",
"format-icons": {
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/language": {
"on-click": "swaymsg input '*' xkb_switch_layout next"
},
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
"device": "intel_backlight",
"format": "{percent}% {icon}",
"format-icons": ["", ""],
"on-scroll-up": "backlight-control +1",
"on-scroll-down": "backlight-control -1"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol-qt"
},
"custom/exit": {
"format": "",
"on-click": "$HOME/.local/share/rofi/themes/powermenu.sh"
},
"custom/launcher": {
"format": "",
"on-click": "rofi -i -show drun -modi drun -show-icons"
},
"custom/windows": {
"format": "",
"on-click": "rofi -i -show window -modi window -show-icons"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"on-click": "playerctl play-pause",
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
},
"battery": {
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"full-at": 80,
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25
}
}

View file

@ -1,128 +0,0 @@
#!/usr/bin/env python3
import argparse
import logging
import sys
import signal
import gi
import json
gi.require_version('Playerctl', '2.0')
from gi.repository import Playerctl, GLib
logger = logging.getLogger(__name__)
def write_output(text, player):
logger.info('Writing output')
output = {'text': text,
'class': 'custom-' + player.props.player_name,
'alt': player.props.player_name}
sys.stdout.write(json.dumps(output) + '\n')
sys.stdout.flush()
def on_play(player, status, manager):
logger.info('Received new playback status')
on_metadata(player, player.props.metadata, manager)
def on_metadata(player, metadata, manager):
logger.info('Received new metadata')
track_info = ''
if player.props.player_name == 'spotify' and \
'mpris:trackid' in metadata.keys() and \
':ad:' in player.props.metadata['mpris:trackid']:
track_info = 'AD PLAYING'
elif player.get_artist() != '' and player.get_title() != '':
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
title=player.get_title())
else:
track_info = player.get_title()
if player.props.status != 'Playing' and track_info:
track_info = '' + track_info
write_output(track_info, player)
def on_player_appeared(manager, player, selected_player=None):
if player is not None and (selected_player is None or player.name == selected_player):
init_player(manager, player)
else:
logger.debug("New player appeared, but it's not the selected player, skipping")
def on_player_vanished(manager, player):
logger.info('Player has vanished')
sys.stdout.write('\n')
sys.stdout.flush()
def init_player(manager, name):
logger.debug('Initialize player: {player}'.format(player=name.name))
player = Playerctl.Player.new_from_name(name)
player.connect('playback-status', on_play, manager)
player.connect('metadata', on_metadata, manager)
manager.manage_player(player)
on_metadata(player, player.props.metadata, manager)
def signal_handler(sig, frame):
logger.debug('Received signal to stop, exiting')
sys.stdout.write('\n')
sys.stdout.flush()
# loop.quit()
sys.exit(0)
def parse_arguments():
parser = argparse.ArgumentParser()
# Increase verbosity with every occurrence of -v
parser.add_argument('-v', '--verbose', action='count', default=0)
# Define for which player we're listening
parser.add_argument('--player')
return parser.parse_args()
def main():
arguments = parse_arguments()
# Initialize logging
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
format='%(name)s %(levelname)s %(message)s')
# Logging is set by default to WARN and higher.
# With every occurrence of -v it's lowered by one
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
# Log the sent command line arguments
logger.debug('Arguments received {}'.format(vars(arguments)))
manager = Playerctl.PlayerManager()
loop = GLib.MainLoop()
manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
manager.connect('player-vanished', on_player_vanished)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
for player in manager.props.player_names:
if arguments.player is not None and arguments.player != player.name:
logger.debug('{player} is not the filtered player, skipping it'
.format(player=player.name)
)
continue
init_player(manager, player)
loop.run()
if __name__ == '__main__':
main()

View file

@ -1,269 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Ubuntu;
font-size: 13px;
color: rgba(255, 255, 255, 0.8);
}
window#waybar {
background-color: rgba(43, 48, 59, 0);
border-bottom: 3px solid rgba(100, 114, 125, 0);
color: #000000;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
/* window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
} */
#workspaces button {
padding: 0 5px;
background-color: {{color_secondary}};
color: {{color_secondary_fg}};
/* Use box-shadow instead of border so the text isn't offset */
/*box-shadow: inset 0 -3px transparent;*/
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
}
/*
.modules-left > *:last-child {
border-bottom-right-radius: 12px;
}
*/
.modules-right > *:first-child > * {
border-bottom-left-radius: 12px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
color: rgba(0,0,0,1);
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.focused {
background-color: {{color_secondary_dark}};
color: {{color_secondary_dark_fg}};
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.urgent {
background-color: {{color_secondary_darker}};
color: {{color_secondary_darker_fg}};
}
#mode {
background-color: {{color_primary_darker}};
color: {{color_primary_darker_fg}};
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
/* border-bottom: 3px solid #ffffff; */
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 10px;
}
#window,
#workspaces {
margin: 0 ;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#battery {
background-color: #76ce2f;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio.muted {
background-color: #96979E;
}
#custom-media.custom-spotify {
background-color: {{color_primary}};
color: {{color_primary_fg}}
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature.critical {
font-weight: bold;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#tray {
background-color: {{color_secondary_darker}};
color: {{color_secondary_darker_fg}};
}
#clock {
background-color: {{color_secondary}};
color: {{color_secondary_fg}};
}
#language {
background: {{color_secondary_dark}};
color: {{color_secondary_dark_fg}};
padding: 0 5px;
min-width: 16px;
}
#temperature {
background-color: {{color_primary_dark}};
color: {{color_primary_dark_fg}};
}
#memory {
background-color: {{color_primary_darker}};
color: {{color_primary_darker_fg}};
}
#cpu {
background-color: {{color_primary_darkest}};
color: {{color_primary_darkest_fg}};
}
#pulseaudio {
background-color: {{color_secondary_darkest}};
color: {{color_secondary_darkest_fg}};
}
#custom-media {
background-color: {{color_primary}};
color: {{color_primary_fg}};
min-width: 100px;
}
#custom-launcher {
background-color: {{color_secondary_darker}};
color: {{color_secondary_darker_fg}};
padding-left: 16px;
padding-right: 16px;
}
#custom-exit {
background-color: {{color_secondary_darkest}};
color: {{color_secondary_darkest_fg}};
padding-left: 16px;
padding-right: 16px;
}
#custom-windows {
background-color: {{color_primary}};
color: {{color_primary_fg}};
padding: 0 16px;
border-bottom-right-radius: 16px;
}