diff --git a/bottom/bottom.toml b/bottom/bottom.toml new file mode 100644 index 0000000..d0d43cb --- /dev/null +++ b/bottom/bottom.toml @@ -0,0 +1,171 @@ +# 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 diff --git a/fish/completions/fisher.fish b/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +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)" diff --git a/fish/completions/nvm.fish b/fish/completions/nvm.fish new file mode 100644 index 0000000..e94e50c --- /dev/null +++ b/fish/completions/nvm.fish @@ -0,0 +1,19 @@ +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" + +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 a version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active 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 a 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 +)" diff --git a/fish/conf.d/nvm.fish b/fish/conf.d/nvm.fish new file mode 100644 index 0000000..347c2bd --- /dev/null +++ b/fish/conf.d/nvm.fish @@ -0,0 +1,28 @@ +function _nvm_install --on-event nvm_install + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + set --universal nvm_data $XDG_DATA_HOME/nvm + set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist + + test ! -d $nvm_data && command mkdir -p $nvm_data + echo "Downloading the Node distribution index..." 2>/dev/null + _nvm_index_update $nvm_mirror $nvm_data/.index +end + +function _nvm_update --on-event nvm_update + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + set --universal nvm_data $XDG_DATA_HOME/nvm + set --query nvm_mirror || set --universal 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 $nvm_default_version >/dev/null +end diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..00e4a63 --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,28 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end +# set up direnv +direnv hook fish | source + +# 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 diff --git a/fish/fish_plugins b/fish/fish_plugins new file mode 100644 index 0000000..9673b42 --- /dev/null +++ b/fish/fish_plugins @@ -0,0 +1,2 @@ +jorgebucaran/fisher +jorgebucaran/nvm.fish diff --git a/fish/fish_variables b/fish/fish_variables new file mode 100644 index 0000000..3aacf3c --- /dev/null +++ b/fish/fish_variables @@ -0,0 +1,47 @@ +# 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 +SETUVAR --export DOCKER_HOST:unix\x3a///run/user/1000/docker\x2esock +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:/home/kaan/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e/home/kaan/\x2econfig/fish/functions/_nvm_list\x2efish\x1e/home/kaan/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e/home/kaan/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e/home/kaan/\x2econfig/fish/functions/nvm\x2efish\x1e/home/kaan/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e/home/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 +SETUVAR nvm_data:/home/kaan/\x2elocal/share/nvm +SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist diff --git a/fish/functions/_nvm_index_update.fish b/fish/functions/_nvm_index_update.fish new file mode 100644 index 0000000..0ba3305 --- /dev/null +++ b/fish/functions/_nvm_index_update.fish @@ -0,0 +1,16 @@ +function _nvm_index_update --argument-names mirror index + if not command curl --location --silent $mirror/index.tab >$index.temp + command rm -f $index.temp + echo "nvm: Can't update index, host unavailable: \"$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 diff --git a/fish/functions/_nvm_list.fish b/fish/functions/_nvm_list.fish new file mode 100644 index 0000000..fb5ab0e --- /dev/null +++ b/fish/functions/_nvm_list.fish @@ -0,0 +1,11 @@ +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 diff --git a/fish/functions/_nvm_version_activate.fish b/fish/functions/_nvm_version_activate.fish new file mode 100644 index 0000000..b2aee92 --- /dev/null +++ b/fish/functions/_nvm_version_activate.fish @@ -0,0 +1,4 @@ +function _nvm_version_activate --argument-names v + set --global --export nvm_current_version $v + set --prepend PATH $nvm_data/$v/bin +end diff --git a/fish/functions/_nvm_version_deactivate.fish b/fish/functions/_nvm_version_deactivate.fish new file mode 100644 index 0000000..540f697 --- /dev/null +++ b/fish/functions/_nvm_version_deactivate.fish @@ -0,0 +1,5 @@ +function _nvm_version_deactivate --argument-names v + test "$nvm_current_version" = "$v" && set --erase nvm_current_version + set --local index (contains --index -- $nvm_data/$v/bin $PATH) && + set --erase PATH[$index] +end diff --git a/fish/functions/fisher.fish b/fish/functions/fisher.fish new file mode 100644 index 0000000..6407479 --- /dev/null +++ b/fish/functions/fisher.fish @@ -0,0 +1,212 @@ +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 Install plugins" + echo " fisher remove Remove installed plugins" + echo " fisher update Update installed plugins" + echo " fisher update Update all installed plugins" + echo " fisher list [] 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 diff --git a/fish/functions/git-cleanup.fish b/fish/functions/git-cleanup.fish new file mode 100644 index 0000000..b0c8bff --- /dev/null +++ b/fish/functions/git-cleanup.fish @@ -0,0 +1,3 @@ +function git-cleanup + git fetch -p ; and git branch -vv | grep ': gone]' | grep -v "\*" | awk '{ print $1; }' | xargs git branch -D +end diff --git a/fish/functions/la.fish b/fish/functions/la.fish new file mode 100644 index 0000000..608964b --- /dev/null +++ b/fish/functions/la.fish @@ -0,0 +1,3 @@ +function la --wraps=ls --wraps=exa --description 'alias la exa' + exa $argv; +end diff --git a/fish/functions/less.fish b/fish/functions/less.fish new file mode 100644 index 0000000..d587baf --- /dev/null +++ b/fish/functions/less.fish @@ -0,0 +1,4 @@ +# 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 diff --git a/fish/functions/list-file-sizes.fish b/fish/functions/list-file-sizes.fish new file mode 100644 index 0000000..f0e3828 --- /dev/null +++ b/fish/functions/list-file-sizes.fish @@ -0,0 +1,4 @@ +# 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 diff --git a/fish/functions/mkcd.fish b/fish/functions/mkcd.fish new file mode 100644 index 0000000..3ff6213 --- /dev/null +++ b/fish/functions/mkcd.fish @@ -0,0 +1,4 @@ +# 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 diff --git a/fish/functions/nvm.fish b/fish/functions/nvm.fish new file mode 100644 index 0000000..77ec62e --- /dev/null +++ b/fish/functions/nvm.fish @@ -0,0 +1,208 @@ +function nvm --argument-names cmd v --description "Node version manager" + if test -z "$v" && contains -- "$cmd" install use + for file in .nvmrc .node-version + set file (_nvm_find_up $PWD $file) && read v <$file && break + end + if test -z "$v" + echo "nvm: Invalid version or missing \".nvmrc\" file" >&2 + return 1 + end + end + + set --local their_version $v + + switch "$cmd" + case -v --version + echo "nvm, version 2.2.7" + case "" -h --help + echo "Usage: nvm install Download and activate the specified Node version" + echo " nvm install Install version from nearest .nvmrc file" + echo " nvm use Activate a version in the current shell" + echo " nvm use Activate version from nearest .nvmrc file" + echo " nvm list List installed versions" + echo " nvm list-remote List versions available to install" + echo " nvm list-remote List versions matching a given regular expression" + echo " nvm current Print the currently-active version" + echo " nvm uninstall Uninstall a version" + echo "Options:" + echo " -v or --version Print version" + echo " -h or --help Print this help message" + echo "Variables:" + echo " nvm_arch Override architecture, e.g. x64-musl" + echo " nvm_mirror Set the Node download mirror" + echo " nvm_default_version Set the default version for new shells" + case install + _nvm_index_update $nvm_mirror $nvm_data/.index || return + + string match --entire --regex -- (_nvm_version_match $v) <$nvm_data/.index | read v alias + + if ! set --query v[1] + echo "nvm: Invalid version number or alias: \"$their_version\"" >&2 + return 1 + end + + if test ! -e $nvm_data/$v + 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(?\d+)" $v + 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-$v-$os-$arch" + set --local url $nvm_mirror/$v/$dir.$ext + + command mkdir -p $nvm_data/$v + + echo -e "Installing Node \x1b[1m$v\x1b[22m $alias" + echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m" + + if ! command curl --progress-bar --location $url \ + | command tar --extract --gzip --directory $nvm_data/$v 2>/dev/null + command rm -rf $nvm_data/$v + echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2 + return 1 + end + + echo -en "\033[F\33[2K\x1b[0m" + + if test "$os" = win + command mv $nvm_data/$v/$dir $nvm_data/$v/bin + else + command mv $nvm_data/$v/$dir/* $nvm_data/$v + command rm -rf $nvm_data/$v/$dir + end + end + + if test $v != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + _nvm_version_activate $v + end + + printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case use + test $v = default && set v $nvm_default_version + _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ + + if ! set --query v[1] + echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2 + return 1 + end + + if test $v != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + test $v != system && _nvm_version_activate $v + end + + printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case uninstall + if test -z "$v" + echo "nvm: Not enough arguments for command: \"$cmd\"" >&2 + return 1 + end + + test $v = default && test ! -z "$nvm_default_version" && set v $nvm_default_version + + _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ + + if ! set -q v[1] + echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2 + return 1 + end + + printf "Uninstalling Node %s %s\n" $v (string replace ~ \~ "$nvm_data/$v/bin/node") + + _nvm_version_deactivate $v + + command rm -rf $nvm_data/$v + case current + _nvm_current + case ls list + _nvm_list | _nvm_list_format (_nvm_current) $argv[2] + case lsr {ls,list}-remote + _nvm_index_update $nvm_mirror $nvm_data/.index || 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)" >&2 + return 1 + end +end + +function _nvm_find_up --argument-names path file + test -e "$path/$file" && echo $path/$file || begin + test "$path" != / || return + _nvm_find_up (command dirname $path) $file + end +end + +function _nvm_version_match --argument-names v + string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $v | + string replace --filter --regex -- '^v?(\d+)' 'v$1' | + string escape --style=regex || + string lower '\b'$v'(?:/\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.replace(require('os').homedir(), '~')) + " +end diff --git a/fish/functions/pacman-remove-orphans.fish b/fish/functions/pacman-remove-orphans.fish new file mode 100644 index 0000000..4b9344b --- /dev/null +++ b/fish/functions/pacman-remove-orphans.fish @@ -0,0 +1,3 @@ +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 diff --git a/fish/functions/rust-musl.fish b/fish/functions/rust-musl.fish new file mode 100644 index 0000000..280535c --- /dev/null +++ b/fish/functions/rust-musl.fish @@ -0,0 +1,3 @@ +function rust-musl + sudo docker run --rm -it -v (pwd):/home/rust/src:rw messense/rust-musl-cross:$argv[1] $argv[2..-1] +end diff --git a/fish/functions/ssh.fish b/fish/functions/ssh.fish new file mode 100644 index 0000000..c1b19be --- /dev/null +++ b/fish/functions/ssh.fish @@ -0,0 +1,3 @@ +function ssh --description 'alias ssh kitty +kitten ssh' + kitty +kitten ssh $argv; +end diff --git a/fish/functions/sway-prop.fish b/fish/functions/sway-prop.fish new file mode 100644 index 0000000..c0a31fe --- /dev/null +++ b/fish/functions/sway-prop.fish @@ -0,0 +1,3 @@ +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 diff --git a/git/gitconfig b/git/gitconfig new file mode 100644 index 0000000..8cee99a --- /dev/null +++ b/git/gitconfig @@ -0,0 +1,37 @@ +[user] + email = kaan@bgenc.net + name = Kaan Barmore-Genc + signingkey = F5DEC5268AA501F35FBD5978B2E280771CD62FCF +[init] + defaultBranch = main +[pull] + rebase = true +[commit] + gpgSign = true +[tag] + gpgsign = true +[pager] + diff = delta + log = delta + reflog = delta + show = delta +[interactive] + diffFilter = delta --color-only +[delta] + features = side-by-side line-numbers decorations + whitespace-error-style = 22 reverse +[merge] + ff = no +[alias] + stat = status +[core] + editor = code --wait +[credential] + helper = store +[filter "lfs"] + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process +[push] + autoSetupRemote = true diff --git a/rofi/config/config.rasi b/rofi/config/config.rasi new file mode 100644 index 0000000..1f78ba8 --- /dev/null +++ b/rofi/config/config.rasi @@ -0,0 +1,8 @@ +//@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" diff --git a/rofi/themes/launchpad.rasi b/rofi/themes/launchpad.rasi new file mode 100644 index 0000000..8be96d4 --- /dev/null +++ b/rofi/themes/launchpad.rasi @@ -0,0 +1,95 @@ +/******************************************************************************* + * MACOS LAUNCHPAD LIKE THEME FOR ROFI + * User : LR-Tech + * Theme Repo : https://github.com/lr-tech/rofi-themes-collection + *******************************************************************************/ + +* { + font: "Montserrat 9"; + + bg0: #242424e0; + bg1: #363636; + bg2: #f5f5f520; + bg3: #f5f5f540; + bg4: #0860f2E6; + + fg0: #f5f5f5; + fg1: #f5f5f580; + + background-color: transparent; + text-color: @fg0; + padding: 0px; + margin: 0px; +} + +window { + fullscreen: true; + padding: 1em; + background-color: @bg0; +} + +mainbox { + padding: 8px; +} + +inputbar { + background-color: @bg2; + + margin: 0px calc( 50% - 120px ); + padding: 2px 4px; + spacing: 4px; + + border: 1px; + border-radius: 2px; + border-color: @bg3; + + children: [icon-search,entry]; +} + +prompt { + enabled: false; +} + +icon-search { + expand: false; + filename: "search"; + vertical-align: 0.5; +} + +entry { + placeholder: "Search"; + placeholder-color: @bg2; +} + +listview { + margin: 48px calc( 50% - 560px ); + spacing: 48px; + columns: 6; + fixed-columns: true; +} + +element, element-text, element-icon { + cursor: pointer; +} + +element { + padding: 8px; + spacing: 4px; + + orientation: vertical; + border-radius: 16px; +} + +element selected { + background-color: @bg4; +} + +element-icon { + size: 4em; + horizontal-align: 0.5; +} + +element-text { + horizontal-align: 0.5; +} + diff --git a/rofi/themes/powermenu.sh b/rofi/themes/powermenu.sh new file mode 100755 index 0000000..712ad06 --- /dev/null +++ b/rofi/themes/powermenu.sh @@ -0,0 +1,108 @@ +#!/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 + diff --git a/rofi/themes/rofi-advanced-7-2.rasi b/rofi/themes/rofi-advanced-7-2.rasi new file mode 100644 index 0000000..e7c7a77 --- /dev/null +++ b/rofi/themes/rofi-advanced-7-2.rasi @@ -0,0 +1,211 @@ + + +/** + * + * 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: #743307; + background-alt: #66cc99; + foreground: #FFFFFF; + selected: #5D7150; + active: #9878FF; + urgent: #7D0075; +} + +/*****----- 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("/home/kaan/Pictures/Wallpapers/pexels-life-of-pix-7919.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; +} \ No newline at end of file diff --git a/rofi/themes/rofi-advanced-powermenu-6-2.rasi b/rofi/themes/rofi-advanced-powermenu-6-2.rasi new file mode 100644 index 0000000..4bc9945 --- /dev/null +++ b/rofi/themes/rofi-advanced-powermenu-6-2.rasi @@ -0,0 +1,147 @@ +/** + * + * 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: #3F2D16; + background-alt: #743307; + foreground: #FFFFFF; + selected: #D6882D; + active: #5D7150; + urgent: #94A879; +} + +/* +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("/home/kaan/Pictures/Wallpapers/pexels-life-of-pix-7919-small.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); +} diff --git a/rofi/themes/rounded-green-dark.rasi b/rofi/themes/rounded-green-dark.rasi new file mode 100644 index 0000000..a268f62 --- /dev/null +++ b/rofi/themes/rounded-green-dark.rasi @@ -0,0 +1,18 @@ +/******************************************************************************* + * ROUNDED THEME FOR ROFI + * User : LR-Tech + * Theme Repo : https://github.com/lr-tech/rofi-themes-collection + *******************************************************************************/ + +* { + bg0: #212121F2; + bg1: #2A2A2A; + bg2: #3D3D3D80; + bg3: #4CAF50F2; + fg0: #E6E6E6; + fg1: #FFFFFF; + fg2: #969696; + fg3: #3D3D3D; +} + +@import "rounded-common.rasi" diff --git a/sway/config b/sway/config new file mode 100644 index 0000000..9768437 --- /dev/null +++ b/sway/config @@ -0,0 +1,320 @@ +# 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 +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill + +output DP-1 { + resolution 2560x1440@74.971Hz + position 0,0 + bg /home/kaan/Pictures/Wallpapers/left.jpg fill +} +output DP-2 { + resolution 2560x1440@144.006Hz + position 2560,0 + adaptive_sync on + bg /home/kaan/Pictures/Wallpapers/middle.jpg fill +} +output DP-3 { + resolution 2560x1440@144.006Hz + position 5120,0 + adaptive_sync on + bg /home/kaan/Pictures/Wallpapers/right.jpg 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 "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 "type:keyboard" { + 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 wlogout +# +# 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 + + +# +# 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 #F10086 #F10086 #ffffff #F10086 #F10086 +client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a +client.focused_tab_title #333333 #5f676a #ffffff +client.unfocused #711A75 #711A75 #ffffff #711A75 #711A75 +client.urgent #F582A7 #F582A7 #000000 #F582A7 #F582A7 + +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 diff --git a/systemd/user/kdeconnectd.service b/systemd/user/kdeconnectd.service new file mode 100644 index 0000000..445f5c3 --- /dev/null +++ b/systemd/user/kdeconnectd.service @@ -0,0 +1,14 @@ +[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 diff --git a/systemd/user/noisetorch.service b/systemd/user/noisetorch.service new file mode 100644 index 0000000..b0429a0 --- /dev/null +++ b/systemd/user/noisetorch.service @@ -0,0 +1,12 @@ +[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 diff --git a/systemd/user/ssh-agent.service b/systemd/user/ssh-agent.service new file mode 100644 index 0000000..5c59cbf --- /dev/null +++ b/systemd/user/ssh-agent.service @@ -0,0 +1,12 @@ +[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 diff --git a/waybar/config b/waybar/config new file mode 100644 index 0000000..cfab31c --- /dev/null +++ b/waybar/config @@ -0,0 +1,125 @@ +{ + // "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": ["sway/window"], + "modules-right": ["custom/media", "pulseaudio", "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": "" + } + }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "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": ["", ""], + }, + "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 + } +} diff --git a/waybar/mediaplayer.py b/waybar/mediaplayer.py new file mode 100755 index 0000000..1630d97 --- /dev/null +++ b/waybar/mediaplayer.py @@ -0,0 +1,128 @@ +#!/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() diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..2ccb433 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,259 @@ +* { + /* `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: #D6882D; + color: rgba(0,0,0,0.8); + /* 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: #A44404; + /* box-shadow: inset 0 -3px #ffffff; */ +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #A44404; + 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: #66cc99; +} + +#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: #743307; +} +#clock { + background-color: #D6882D; + color: #000000; +} +#language { + background: #9B551E; + padding: 0 5px; + min-width: 16px; +} +#temperature { + background-color: #94A879; + color: #000000; +} +#memory { + background-color: #5D7150; +} +#cpu { + background-color: #807348; +} +#pulseaudio { + background-color: #3F2D16; + color: #FFFFFF; +} +#custom-media { + background-color: #66cc99; + color: rgba(0, 0, 0, 0.8); + min-width: 100px; +} +#custom-launcher { + background-color: #743307; + padding-left: 16px; + padding-right: 16px; +} +#custom-exit { + background-color: #3F2D16; + padding-left: 16px; + padding-right: 16px; +} +#custom-windows { + color: #000000; + background-color: #66cc99; + padding: 0 16px; + border-bottom-right-radius: 16px; +} \ No newline at end of file