This commit is contained in:
nevaforget 2024-01-08 20:50:29 +01:00
commit 2fb62acda6
121 changed files with 16413 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.cache/*
/install.log

9
LICENSE Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2023 Dominik Kressler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

166
README.md Normal file
View File

@ -0,0 +1,166 @@
# Monarch
__THIS IS NOT TESTED YET! USE ON YOUR OWN RISK!__
I didn't want to rice a clean system each time on each device. So I created an installation script. :)
So first things first. Monarch or MonArch, maybe MoonArch, is not a Linux based Distribution - it's just a lot of cool packages, a collection of scripts and config files. _While I customized a few things, credit goes to all the great developers and maintainers out there!_ Monarch is what you call a 'rice', my personal setup.
To use this script, you've to Install Arch Linux by yourself!
[] todo: write some more tips & tricks for `archinstall`
Here are some keywords: use btrfs, pipewire, multilib in archinstall. There's a preset somewhere in archinstall to install hyprland, recommended.
So right after your fresh arch installation get some network up and you're ready to run the Monarch Setup.
# Setup
This is basically per user!
```bash
$ sudo pacman -Syu git
$ git clone --depth 1 https://gitea.nevaforget.de/dom/monarchos ~/.monarchos
$ cd ~/.monarchos
$ ./setup.sh
```
## Installation Stages
### Paru
Paru is a requirement. It is a package manager wrapper to easily handle community packages of the Arch User Repository.
### Recommended Packages
This stage will install some handy tools. Some of them may be required for other things like Rofi later on. Some are just recommended because they handle devices e.g. udisks2 or dunst notficiations.
#### Full Package List
```
jq dunst network-manager-applet alarm-clock-applet man-db hardinfo networkmanager-openvpn udisks2 plocate vim kitty gettext-hostname neovim lsd alsa-utils ponymix btop powertop polkit lxsession timeshift timeshift-autosnap stacer-bin
```
---
### ZSH
Installs ZSH + Autosuggestions and set zsh as your default shell. No fancy Powerline, keeping it basic.
---
### SDDM
SDDM is the Display Manager / Login Screen based on QT.
#### Full Package List
```
sddm qt5-quickcontrols qt5-graphicaleffects
```
MonArch theme will be also installed. See https://gitea.nevaforget.de/dom/Elegant-sddm-monarch/
Default User Picture will be set: see ~/.face
If you build a Wayland only system you can force Wayland instead of X11 for SDDM. See https://wiki.archlinux.org/title/SDDM#Running_under_Wayland
Add `10-wayland.conf` and install `weston`
---
### X11 "Desktop"
This stage will not only install X11! It will install a whole lot more. It's just my backup system if something on wayland breaks. :)
Core:
bspwm - window tiling manager
picom - window compositor
sxhkd - Hotkey daemon
polybar - customizable status bar
__The appropiate config files will be overwritten!__
#### Full Package List
```
bspwm sxhkd picom-arian8j2-git polybar xdg-desktop-portal
```
---
### Wayland "Desktop"
This stage will not only install Wayland! It will install a whole lot more.
Core:
Hyprland - Wayland compositor
waybar - customizable status bar
swaylock - your handy and fancy lockscreen
#### Full Package List
```
wayland xorg-xwayland hyprland swaybg waypaper-git xdg-desktop-portal-hyprland wdisplays waybar-hyprland-git nwg-look cliphist slurp grim hyprland-interactive-screenshot swappy swaylock-effects cava
```
__The appropiate config files will be overwritten!__
---
### ROFI
The amazing swiss-knife. This will install all the menus like app launcher, clipboard manager, sound control etc.
Based on the package `rofi-lbonn-wayland-git`. Works on X11 and Wayland.
---
### UFW
Install "Uncomplicated Firewall" UFW and set some common rules. This common setup should be enough for day to day use.
---
### CLAMAV
Install ClamAV - Anti-Virus Scanner and updating virus defintion with "Fangfrisch".
---
### Noise Suppression for voice
It's always nice to have some noise reduction on your microphone input source.
Install `noise-suppression-for-voice` and add module config to pipewire.
---
### CONFIGS
Overwriting the configs of some more tools.
```
kitty nvim dunst btop lsd
```
---
### Bluetooth
You want it? You can have it! If your device supports bluetooth.
#### Full Package List
```
bluez bluez-utils-compat blueberry
```
_On X11/bspwm install blueman instead of blueberry._
---
### GUI
The final stage installs a lot more convenience tools and GUI applications, but also that's the allover look of the system.
e.g.:
File Explorer
Font Manager
Image Viewer
Video Player
Audio Player
Themes, Fonts, Cursor, Wallpaper
etc.
#### Full Package List
```
celluloid audacious font-manager viewnior nemo nemo-fileroller nemo-image-converter nemo-media-columns pavucontrol viewnior ttf-hack-nerd sweet-cursor-theme-git arc-solid-gtk-theme
```

16
etc/fonts/local.conf Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Hack Nerd Font</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Hack Nerd Font Mono</family>
</prefer>
</alias>
</fontconfig>

60
home/.bashrc Normal file
View File

@ -0,0 +1,60 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
#alias ls='ls --color=auto'
#PS1="\W:\$ "
export PS1="󰣇 \[$(tput setaf 6)\]\W \[$(tput sgr0)\] "
export SUDO_EDITOR=/usr/bin/nvim
bind 'set show-all-if-ambiguous on'
bind 'TAB:menu-complete'
#bind 'Space:magic-space'
# ctrl+r replacement with hstr
bind '"\C-r": "\e^ihstr -- \n"'
alias ssh="kitty +kitten ssh"
alias l="lsd -lh --group-dirs first --size short"
#alias ls="lsd"
alias ffs='sudo "$BASH" -c "$(history -p !!)"'
alias cd..="cd .."
alias orphans='[[ -n $(pacman -Qdt) ]] && sudo pacman -Rs $(pacman -Qdtq) || echo "no orphans to remove"'
# HSTR configuration - add this to ~/.bashrc
alias hh=hstr # hh to be alias for hstr
export HSTR_CONFIG=hicolor # get more colors
shopt -s histappend # append new history items to .bash_history
export HISTCONTROL=ignorespace # leading space hides commands from history
export HISTFILESIZE=10000 # increase history file size (default is 500)
export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
# ensure synchronization between bash memory and history file
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
function hstrnotiocsti {
{ READLINE_LINE="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
READLINE_POINT=${#READLINE_LINE}
}
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
if [[ $- =~ .*i.* ]]; then bind -x '"\C-r": "hstrnotiocsti"'; fi
export HSTR_TIOCSTI=n
# fancy git prompt
# https://github.com/magicmonty/bash-git-prompt
if [ -f "/lib/bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_START=" _LAST_COMMAND_INDICATOR_ ${Cyan}\W${ResetColor}"
GIT_PROMPT_END="  "
source /lib/bash-git-prompt/gitprompt.sh
fi
# set PATH so it includes user's private ~/.local/bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

35
home/.zshrc Normal file
View File

@ -0,0 +1,35 @@
export LANG=de_DE.UTF-8
export EDITOR="nvim"
export SUDO_EDITOR="nvim"
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
alias ssh="kitty +kitten ssh"
alias l="lsd -lh --group-dirs first --size short"
alias ls="lsd"
alias orphans='[[ -n $(pacman -Qdt) ]] && sudo pacman -Rs $(pacman -Qdtq) || echo "no orphans to remove"'
bindkey "^[[3~" delete-char
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
autoload -Uz compinit vcs_info promptinit
compinit
promptinit
# This will set the default prompt to the walters theme
prompt adam2
# git info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
RPROMPT='${vcs_info_msg_0_}'
# PROMPT='${vcs_info_msg_0_}%# '
zstyle ':vcs_info:git:*' formats '%b'

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -0,0 +1,108 @@
#!/usr/bin/env bash
MONITOR1=HDMI-1
MONITOR2=DP-2
version=0.0.1
help() {
echo "bspwm window titles"
echo "allows you to have bspwm window titles from each monitor in your bar"
echo "-------------------"
echo
echo "Syntax: bspwm_window_titles [-i <FILE_PATH>|m|p|f <FORMAT_FOCUSED|NORMAL>|V]"
echo "options:"
echo "h Print this help."
echo "i <FILE_PATH> Icon map path - custom path to file containing icon map"
echo "v Print software version and exit."
echo
}
add_desktop() {
desktop_id="`cat $HOME/.cache/bspwm_focused_desktop`"
monitor_id=$(bspc query -M -m '.focused' --names)
current_amount=$(cat $HOME/.cache/bspwm_desktop_count_"$monitor_id")
let new_id=current_amount+1
max=4
if [[ $current_amount -lt $max ]]; then
bspc monitor $monitor_id -a "$new_id"
echo $new_id > $HOME/.cache/bspwm_desktop_count_"$monitor_id"
fi
}
init() {
bspc monitor ${MONITOR1} -d 1
bspc monitor ${MONITOR2} -d 5
echo 1 > $HOME/.cache/bspwm_desktop_count_"$MONITOR1"
echo 1 > $HOME/.cache/bspwm_desktop_count_"$MONITOR2"
### node_remove event
### removes empty desktops
bspc subscribe node_remove | while read line
do
monitor_id=$(echo "$line" | awk '{print $2}')
desktop_id=$(echo "$line" | awk '{print $3}')
windowlist=$( bspc query -N -n .window -m "$monitor_id" -d "$desktop_id" )
desktopname=$( bspc query -D -m "$monitor_id" -d "$desktop_id" --names )
### check if desktop is empty
if [[ -z "$windowlist" ]]; then
bspc desktop -r
fi
done
### write focused desktop id to cache file
bspc subscribe desktop_focus | while read line
do
desktop_id=$(echo "$line" | awk '{print $3}')
echo $desktop_id > $HOME/.cache/bspwm_focused_desktop
done
### write desktop amount to cache file
bspc subscribe desktop_add | while read line
do
monitor_id=$(echo "$line" | awk '{print $2}')
monitor_name $(bspc query -M -m "$monitor_id" --names)
desktop_id=$(echo "$line" | awk '{print $3}')
desktops=$(bspc query -D -m "$monitor_id" --names)
count=0
echo "$desktops" | sed 's/ //g' | while read l
do
((count++))
echo $count
echo $count > $HOME/.cache/bspwm_desktop_count_"$monitor_name"
done
done
}
while getopts ":haiv:" option; do
case $option in
h)
help
exit;;
a)
add_desktop
exit;;
i)
init
exit;;
v)
echo "Version $version";
exit;;
*)
echo "Error: Invalid option"
exit;;
esac
done
help
exit

View File

@ -0,0 +1,60 @@
#!/bin/bash
# A more fluid way of moving windows with BSPWM, which is meant to be
# implemented in SXHKD. If there is a window in the given direction,
# swap places with it. Else if there is a receptacle move to it
# ("consume" its place). Otherwise create a receptacle in the given
# direction by splitting the entire viewport (circumvents the tiling
# scheme while respecting the current split ratio configuration). In
# the latter scenario, inputting the direction twice will thus move the
# focused window out of its current layout and into the receptacle.
#
# Part of my dotfiles: https://gitlab.com/protesilaos/dotfiles
#
# Copyright (c) 2019 Protesilaos Stavrou <info@protesilaos.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[ "$#" -eq 1 ] || { echo "Pass only one argument: north,east,south,west"; exit 1; }
# Check if argument is a valid direction.
case "$1" in
north|east|south|west)
dir="$1"
;;
*)
echo "Not a valid argument."
echo "Use one of: north,east,south,west"
exit 1
;;
esac
_query_nodes() {
bspc query -N -n "$@"
}
# Do not operate on floating windows!
[ -z "$(_query_nodes focused.floating)" ] || { echo "Only move tiled windows."; exit 1; }
receptacle="$(_query_nodes 'any.leaf.!window')"
# This regulates the behaviour documented in the description.
if [ -n "$(_query_nodes "${dir}.!floating")" ]; then
bspc node -s "$dir"
elif [ -n "$receptacle" ]; then
bspc node focused -n "$receptacle" --follow
else
bspc node @/ -p "$dir" -i && bspc node -n "$receptacle" --follow
fi

View File

@ -0,0 +1,160 @@
#!/usr/bin/env bash
# globals
version="1.1"
cache_path="${HOME}/.cache"
icon_map_path="$( dirname "$( readlink -f "$0" )" )/bspwm_window_titles_icon_map.txt"
# defaults
polybar_mode="true"
monocle_mode="false"
# format_focused="%{F#2e3440}%{T4}%{T- F-}%{B#2e3440}{NAME}%{B-}%{F#2e3440}%{T4}%{T- F-}"
# format_normal="%{F#20212C}%{T4}%{T- F-}%{B#20212C}%{F#5D5E72}{NAME}%{B-}%{F#20212C}%{T4}%{T- F-}"
format_focused="{NAME}"
format_normal="%{F#5D5E72}{NAME}%{F-}"
# wraps a text with polybar format command action
# $1 action
# $2 text
polybar_action_cmd() {
echo "%{A1:${1}:}${2}%{A}"
}
# formats window name with given format
# $1 format
# $2 window name
polybar_format_window_name() {
echo "$1" | sed "s@{NAME}@$2@"
}
help() {
echo "bspwm window titles"
echo "allows you to have bspwm window titles from each monitor in your bar"
echo "-------------------"
echo
echo "Syntax: bspwm_window_titles [-i <FILE_PATH>|m|p|f <FORMAT_FOCUSED|NORMAL>|V]"
echo "options:"
echo "h Print this help."
echo "i <FILE_PATH> Icon map path - custom path to file containing icon map"
echo "m Monocle mode - won't print window names when there is only one window on desktop."
echo "p Polybar action mode - will output window names wrapped with polybar action handlers."
echo " This allows you to directly click on a window name to focus it's window"
echo "f <FORMAT_FOCUSED|NORMAL> Format how focused/normal window names are displayed"
echo " You need to supply both polybar format tags (so need to use -f two times)"
echo " Example"
echo " bspwm_window_titles -f \"%{F#f00}{NAME}%{F-}\" -f \"{NAME}\""
echo " focused window name font color red and normal window as is"
echo "V Print software version and exit."
echo
}
while getopts ":hvmpf:i:" option; do
case $option in
h)
help
exit;;
m)
monocle_mode="true";;
i)
icon_map_path="$OPTARG";;
p)
polybar_mode="true";;
f)
formats+=("$OPTARG");
[[ -n ${formats[0]} ]] && format_focused="${formats[0]}"
[[ -n ${formats[1]} ]] && format_normal="${formats[1]}";;
v)
echo "Version $version";
exit;;
*)
echo "Error: Invalid option"
exit;;
esac
done
icon_map=$( cat "${icon_map_path}" )
# subscribe to events on which the window title list will get updated
bspc subscribe node_focus node_remove desktop_focus | while read -r _; do
# get all monitors
monitors=$( bspc query -M )
for monitor in $monitors; do
index=$((index + 1))
# get last focused desktop on given monitor
last_focused_desktop=$( bspc query -D -m "$monitor" -d .active )
# get windows from last focused desktop on given monitor
winids_on_desktop=$( bspc query -N -n .window -m "$monitor" -d "$last_focused_desktop" )
# get number of windows on desktop
number_of_windows=$( printf "$winids_on_desktop" | tr '\n' ' ' | wc -w )
# get a list of all windows
winlist=$( wmctrl -l -x )
for window_id in $winids_on_desktop; do
# replace all spaces and tabs with single spaces for easier cutting
window=$( echo "$winlist" | grep -i "$window_id" | tr -s '[:blank:]' )
# get window name
window_name=$( echo "$window" | cut -d " " -f 5- )
# longer window titles if there is only one window
[[ "$number_of_windows" == "1" ]] && char_cut="40" || char_cut="20"
# cut the window name
window_name_short=$( echo "$window_name" | cut -c1-"$char_cut" )
# get window class and match after a dot to get app name
window_class=$( echo "$window" | cut -d " " -f 3 | sed 's/.*\.//')
# if window id matched with list == not empty
if [[ -n "$window_name" ]]; then
# trim window name
window_name=$( echo "$window_name_short" | sed -e 's/^[[:space:]]*//' )
# display instance name if there is no window title
if [[ "$window_name" == "N/A" ]]; then
window_name=$(echo "$window" | cut -d " " -f 3 | cut -d "." -f 2 )
fi
# get icon for class name
window_icon=$( grep "$window_class" <<< "$icon_map" | cut -d " " -f2 )
# fallback icon if class not found
if [[ -z "$window_icon" ]]; then
window_icon=$( grep "Fallback" <<< "$icon_map" | cut -d " " -f2 )
fi
# join icon and name
window_name_with_icon="${window_icon} ${window_name}"
# apply formatting
if [[ $( bspc query -N -n focused) == "$window_id" ]]; then
formatted_window_name=$( polybar_format_window_name "$format_focused" "$window_name_with_icon" )
else
formatted_window_name=$( polybar_format_window_name "$format_normal" "$window_name_with_icon" )
fi
# wrap with polybar action cmd
[[ "$polybar_mode" == "true" ]] && formatted_window_name=$( polybar_action_cmd "bspc node -f ${window_id}" "$formatted_window_name")
curr_wins+="${formatted_window_name} "
fi
done
# if monocle set to true then don't print names if there is only one
if [[ "$monocle_mode" == "true" && "$number_of_windows" == "1" ]]; then
windows_print=""
else
windows_print="$curr_wins"
fi
# print out the window names to files for use in a bar
echo "$windows_print" > "${cache_path}/bspwm_windows_${index}.txt"
unset curr_wins
done
unset index
done

View File

@ -0,0 +1,11 @@
Google-chrome 
firefox 
Code 
Slack 
kitty 
Nautilus 
Nemo 
Viewnior 
Celluloid 
Audacious 
Fallback 󰘔

116
home/config/bspwm/bspwmrc Executable file
View File

@ -0,0 +1,116 @@
#! /bin/sh
# -- start hotkey daemon
pgrep -x sxhkd > /dev/null || sxhkd &
xrandr --output HDMI-1 --mode 2560x1440 --rate 144
xrandr --output HDMI-1 --primary
xrandr --output HDMI-1 --left-of DP-2
# -- BSPWM Settings
bspc monitor HDMI-1 -d 1 2 3
bspc monitor DP-2 -d 4 5 6
bspc config border_width 2
bspc config window_gap 4
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config single_monocle true
bspc config presel_feedback_color "#5D5E72"
bspc config normal_border_color "#1e1e2e"
bspc config active_border_color "#1e1e2e"
bspc config focused_border_color "#45475a"
bspc config focus_follows_pointer true
bspc config pointer_follows_focus true
bspc config pointer_follows_monitor true
# -- BSPWM Rules
bspc rule -a kitty-vpn state=center_pseudo_tiled follow=on
bspc rule -a NoiseTorch state=floating center=on
#bspc rule -a "microsoft teams - preview" desktop=4
#bspc rule -a Lutris desktop='^3'
#bspc rule -a battle.net.exe desktop='^3'
#bspc rule -a discord desktop='^6'
#bspc rule -a "VirtualBox Machine" state=floating desktop='^2'
#bspc rule -a Kupfer.py focus=on
#bspc rule -a Screenkey manage=off
bspc rule -a "Conky:Conky:conky*" flag=sticky layer=below state=floating sticky=on
# -- Autostart
# restart window titles daemon
cat /dev/null > $HOME/.cache/bspwm_windows_1.txt
cat /dev/null > $HOME/.cache/bspwm_windows_2.txt
while pgrep -u $UID -f bspwm_window_titles >/dev/null; do pkill -f bspwm_window_titles; done
bspwm_window_titles &
## -- launch polybar
$HOME/.config/polybar/launch.sh
roficlip.py --daemon &
## -- policy kit
#pgrep -x lxsession > /dev/null || lxsession &
pgrep -x lxpolkit > /dev/null || lxpolkit &
## -- launch dunst notification server
pgrep -x dunst > /dev/null || dunst &
## -- set the default cursor to left pointer
xsetroot -cursor_name left_ptr &
## -- start the compositor
#pgrep -x picom > /dev/null || picom --config $HOME/.config/picom/picom.conf --experimental-backends --backend glx &
pgrep -x picom > /dev/null || picom &
## -- udisk utils
#udisksvm >/dev/null &
pgrep -x udiskie > /dev/null || udiskie &
## -- noisetorch noise cancelling
#noisetorch -u
#pgrep -x noisetorch > /dev/null || noisetorch -i sys-devices-pci0000:00-0000:00:01.3-0000:02:00.0-usb2-2\x2d10-2\x2d10:1.0-sound-card3-controlC3.device -s alsa_input.usb-Corsair_CORSAIR_HS70_Pro_Wireless_Gaming_Headset-00.mono-fallback -t 70 &
# -- Autostart of misc
## -- applets
#nm-applet --indicator &
#blueman-applet &
#pgrep -x indicator-sound-switcher > /dev/null || indicator-sound-switcher &
#/home/dom/.local/share/headset-charge-indicator/headset-charge-indicator.py &
#/home/dom/.local/share/media-control-indicator/media-control-indicator.py &
# -- Set background wallpaper
#nitrogen --restore &
feh --bg-scale ~/Pictures/Wallpaper/MonarchOS.png &
###
### remove picom corners in monocle mode
### https://www.reddit.com/r/bspwm/comments/hqt1r3/is_there_a_way_to_disable_picom_rounded_borders/
###
bspc subscribe desktop_layout | while read -r Event
do
Desktop=$(echo "$Event" | awk '{print $3}')
State=$(echo "$Event" | awk '{print $4}')
if [ "$State" = "monocle" ]; then
bspc query -N -d $Desktop | while read -r Node
do
xprop -id $Node -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 1
done
elif [ $(bspc config window_gap) -gt 0 ]; then
bspc query -N -d $Desktop | while read -r Node
do
xprop -id $Node -remove _PICOM_ROUNDED
done
fi
done &

View File

@ -0,0 +1 @@
kitty

212
home/config/btop/btop.conf Normal file
View File

@ -0,0 +1,212 @@
#? Config file for btop v. 1.2.13
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
color_theme = "TTY"
#* If the theme set background should be shown, set to False if you want terminal background transparency.
theme_background = False
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor = True
#* Set to true to force tty mode regardless if a real tty has been detected or not.
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = False
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
#* Use whitespace " " as separator between different presets.
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = False
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = True
#* Default symbols to use for graph creation, "braille", "block" or "tty".
#* "braille" offers the highest resolution but might not be included in all fonts.
#* "block" has half the resolution of braille but uses more common characters.
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
graph_symbol = "braille"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_net = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
shown_boxes = "cpu mem net proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 2000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False.
proc_reversed = False
#* Show processes as a tree.
proc_tree = False
#* Use the cpu graph colors in the process list.
proc_colors = True
#* Use a darkening gradient in the process list.
proc_gradient = True
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = False
#* Show process memory as bytes instead of percent.
proc_mem_bytes = True
#* Show cpu graph for each process.
proc_cpu_graphs = True
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
proc_info_smaps = False
#* Show proc box on left side of screen instead of right.
proc_left = False
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = False
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "total"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "total"
#* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = True
#* Set to True to completely disable the lower CPU graph.
cpu_single_graph = False
#* Show cpu box at bottom of screen instead of top.
cpu_bottom = False
#* Shows the system uptime in the CPU box.
show_uptime = True
#* Show cpu temperature.
check_temp = True
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor = "Auto"
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
show_coretemp = True
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
#* Example: "4:0 5:1 6:3"
cpu_core_map = ""
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
temp_scale = "celsius"
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
base_10_sizes = False
#* Show CPU frequency.
show_cpu_freq = True
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
clock_format = "%X"
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
background_update = True
#* Custom cpu model name, empty string to disable.
custom_cpu_name = ""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
disks_filter = ""
#* Show graphs instead of meters for memory values.
mem_graphs = True
#* Show mem box below net box instead of above.
mem_below_net = False
#* Count ZFS ARC in cached and available memory.
zfs_arc_cached = True
#* If swap memory should be shown in memory box.
show_swap = True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True
#* If mem box should be split to also show disks info.
show_disks = True
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = True
#* Read disks list from /etc/fstab. This also disables only_physical.
use_fstab = True
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
zfs_hide_datasets = False
#* Set to true to show available disk space for privileged users.
disk_free_priv = False
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
#* Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = ""
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 100
net_upload = 100
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = True
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = True
#* Starts with the Network Interface specified here.
net_iface = ""
#* Show battery stats in top right if battery is present.
show_battery = True
#* Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = "Auto"
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING"

9
home/config/conky/conkytoggler Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
ps_out=`ps -ef | grep conky | grep -v 'grep' | grep -v $0`
result=$(echo $ps_out | grep "$1")
echo $result
if [[ "$result" != "" ]];then
killall conky
else
conky -c ~/.config/conky/mocha.conf
fi

View File

@ -0,0 +1,112 @@
conky.config = {
xinerama_head = 2,
--Various settings
background = false, -- forked to background
cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring.
diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring.
double_buffer = true, -- Use the Xdbe extension? (eliminates flicker)
if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address
net_avg_samples = 2, -- The number of samples to average for net data
no_buffers = true, -- Subtract (file system) buffers from used memory?
temperature_unit = 'celsius', -- fahrenheit or celsius
text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256
update_interval = 1, -- update interval
imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song
-- Placement (Conky on MIDDLE of THREE monitors at 1920x1080)
--alignment = 'top_left', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
--gap_x = 3540, -- pixels between right or left border
--gap_y = 70, -- pixels between bottom or left border
-- Placement (For SINGLE monitor users!)
alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
gap_x = 50, -- pixels between right or left border
gap_y = 70, -- pixels between bottom or left border
-- Size
minimum_height = 200, -- minimum height of window
minimum_width = 260, -- minimum width of window
maximum_width = 260, -- maximum width of window
--Graphical
border_inner_margin = 5, -- margin between border and text
border_outer_margin = 5, -- margin between border and edge of window
border_width = 0, -- border width in pixels
default_bar_width = 260, -- default is 0 - full width
default_bar_height = 10, -- default is 6
default_gauge_height = 25, -- default is 25
default_gauge_width =40, -- default is 40
default_graph_height = 40, -- default is 25
default_graph_width = 153, -- default is 0 - full width
default_shade_color = '#000000', -- default shading colour
default_outline_color = '#000000', -- default outline colour
draw_borders = false, -- draw borders around text
draw_graph_borders = true, -- draw borders around graphs
draw_shades = false, -- draw shades
draw_outline = false, -- draw outline
stippled_borders = 0, -- dashing the border
--Textual
format_human_readable = true, -- KiB, MiB rather then number of bytes
font = 'Hack Nerd Font:normal:size=10', -- the default font used
font2 = 'Hack Nerd Font:bold:size=24', -- font for the time
font3 = 'Hack Nerd Font:size=14', -- font for the date
font4 = 'Hack Nerd Font:bold:size=9', -- font for the keybindings heading
font5 = 'MonarchOS:bold:size=16', -- font for the keybindings heading
max_text_width = 0, -- 0 will make sure line does not get broken if width too smal
max_user_text = 16384, -- max text in conky default 16384
override_utf8_locale = true, -- force UTF8 requires xft
short_units = true, -- shorten units from KiB to k
top_name_width = 21, -- width for $top name value default 15
top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false.
uppercase = false, -- uppercase or not
use_spacer = 'none', -- adds spaces around certain objects to align - default none
use_xft = true, -- xft font - anti-aliased font
xftalpha = 1, -- alpha of the xft font - between 0-1
--Windows
own_window = true, -- create your own window to draw
own_window_argb_value = 255, -- real transparency - composite manager required 0-255
own_window_argb_visual = true, -- use ARGB - composite manager required
own_window_class = 'Conky', -- manually set the WM_CLASS name for use with xprop
own_window_colour = '#1e1e2e', -- set colour if own_window_transparent no
own_window_transparent = false, -- if own_window_argb_visual is true sets background opacity 0%
own_window_title = 'conky', -- set the name manually
own_window_type = 'panel', -- if own_window true options are: normal/override/dock/desktop/panel
own_window_hints = 'undecorated,below,above,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it
--catppuccin
color0 = '#b4befe',
color1 = '#D9E0EE',
color2 = '#89DCEB',
color3 = '#F2CDCD',
color4 = '#C3BAC6',
color5 = '#ABE9B3',
color6 = '#FAE3B0',
};
conky.text = [[
#${alignc}${color0}${font2}${DESKTOP_SESSION}${font}
${alignc}${color0}${font5}${font}${font2}MONARCH${font}
${voffset 6}${alignc}${color0}${font3}${time %d. %b %Y}${font}${color}
${alignc}${color0}${font}${exec lsb_release -ds | sed 's/"//g'}${font}
${voffset 10}${color0}${font1}󰠦 ${nodename_short} ${font}
${color0}${font1} Kernel ${kernel} ${font}
${color0}${font1} Uptime ${uptime_short} ${font}
${color0}${font1} Packages ${exec pacman -Q | wc -l} ${font}
${voffset 18}${goto 12}${color5}CPU${goto 50}
${goto 12}$cpu%
${color2}${goto 12}${cpubar 8,254}
${voffset 5}${goto 12}$font${color1}${top name 1}$alignr$color${top cpu 1}%
${goto 12}${color1}${top name 2}$alignr$color${top cpu 2}%
${goto 12}${color1}${top name 3}$alignr$color${top cpu 3}%
${voffset 14}${goto 12}${color6}RAM${goto 50}
${goto 12}$mem/$memmax
${color2}${goto 12}${membar 8,254}${color}
${goto 12}${voffset 5}${color1}${top_mem name 1}$alignr$color${top_mem mem_res 1}
${goto 12}${color1}${top_mem name 2}$alignr$color${top_mem mem_res 2}
${goto 12}${color1}${top_mem name 3}$alignr$color${top_mem mem_res 3}
${goto 12}${voffset 14}${color3}${font}File System
${goto 12}${color3}${fs_used /}/${fs_size /}
${goto 12}${color2}${fs_bar 8,254}
]];

458
home/config/dunst/dunstrc Normal file
View File

@ -0,0 +1,458 @@
# See dunst(5) for all configuration options
[global]
### Display ###
enable_posix_regex = true
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
### Geometry ###
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 300
# The maximum height of a single notification, excluding the frame.
#height = 300
# Position the notification in the top right corner
origin = top-center
# Offset from the origin
offset = 20x40
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 10
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 8
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
highlight = "#b4befe"
# Show how many messages are currently hidden (because of
# notification_limit).
indicate_hidden = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
# If gap_size is greater than 0, this setting will be ignored.
separator_height = 2
# Padding between text and separator.
padding = 16
# Horizontal padding.
horizontal_padding = 16
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#11111b"
# Size of gap to display between notifications - requires a compositor.
# If value is greater than 0, separator_height will be ignored and a border
# of size frame_width will be drawn around each notification instead.
# Click events on gaps do not currently propagate to applications below.
gap_size = 5
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
# idle_threshold = 120
### Text ###
font = Hack Nerd Font 10
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://docs.gtk.org/Pango/pango_markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Recursive icon lookup. You can set a single theme, instead of having to
# define all lookup paths.
enable_recursive_icon_lookup = true
# Set icon theme (only used for recursive icon lookup)
icon_theme = "Flatery-Dark"
# You can also set multiple icon themes, with the leftmost one being used first.
# icon_theme = "Adwaita, breeze"
# Align icons left/right/top/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 16
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 64
# Paths to default icons (only neccesary when not using recursive icon lookup)
icon_path = /usr/share/icons/Flatery-Dark/16x16/status/:/usr/share/icons/Flatery-Dark/16x16/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/xdg-open
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 10
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# applications (default: overlay)
layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = true
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#181825"
foreground = "#CDD6F4"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#default_icon = /path/to/icon
[urgency_normal]
background = "#181825"
foreground = "#CDD6F4"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#default_icon = /path/to/icon
[urgency_critical]
background = "#181825"
foreground = "#CDD6F4"
frame_color = "#eba0ac"
timeout = 60
# Icon for notifications with critical urgency, uncomment to enable
#default_icon = /path/to/icon
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# icon_position
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
# hide_text
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
[fullscreen_show_critical]
msg_urgency = critical
fullscreen = pushback
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

View File

@ -0,0 +1,17 @@
[Settings]
gtk-theme-name=Catppuccin-Mocha-Standard-Lavender-Dark
gtk-icon-theme-name=Flatery-Dark
gtk-font-name=Hack Nerd Font 11
gtk-cursor-theme-name=Sweet-cursors
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=1

View File

@ -0,0 +1,2 @@
[Settings]
gtk-application-prefer-dark-theme=1

View File

@ -0,0 +1,25 @@
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
bezier = overshot, 0.05, 0.9, 0.1, 1.1
bezier = smoothOut, 0.36, 0, 0.66, -0.56
bezier = smoothIn, 0.25, 1, 0.5, 1
animations {
enabled=1
animation = windows,1,5,overshot,slide # slide or popin
animation = windowsOut, 1, 8,smoothOut,slide
animation = windowsMove, 1, 5,default
animation = border,1,4,default
animation = fade, 1, 5, smoothIn
animation = fadeOut, 1, 5, smoothIn
animation = fadeDim, 1, 2, smoothIn
animation = workspaces,1,5,overshot,slidevert # slide , slidevert , fade
#buttery_smoooooooth...
# animation=windows,1,4,default,slide # slide or popin
# animation = windowsOut, 1, 6,smoothIn,slide
# animation = fade, 1, 12, smoothIn
# animation = fadeOut, 1, 6, smoothIn
# animation = fadeDim, 1, 5, smoothIn
# animation=workspaces,1,4,default,slide # slide , slidevert , fade
}

View File

@ -0,0 +1,19 @@
# █▀▀ ▀▄▀ █▀▀ █▀▀
# ██▄ █░█ ██▄ █▄▄
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = ~/.config/hypr/xdg-portal-hyprland
exec-once = lxpolkit
exec-once = waypaper --restore
exec-once = waybar
exec-once = cliphist wipe
exec-once = wl-paste --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
exec-once = dunst
#exec-once = swayidle -w timeout 300 '$HOME/.local/bin/moo-lockscreen' timeout 360 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f'
exec-once = swayidle -w timeout 300 'swaylock -f' timeout 360 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f'
exec-once = xdg-mime default pcmanfm.desktop inode/directory
#exec-once = sway-audio-idle-inhibit

View File

@ -0,0 +1,47 @@
# █▀▄ █▀▀ █▀▀ █▀█ █▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▄▀ ██▄ █▄▄ █▄█ █▀▄ █▀█ ░█░ █ █▄█ █░▀█
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 5
# █▄▄ █░░ █░█ █▀█
# █▄█ █▄▄ █▄█ █▀▄
#blur = true
#blur_size = 3
#blur_passes = 1
#blur_new_optimizations = true
blur {
enabled = true
size = 4
passes = 2
ignore_opacity = true
new_optimizations = true
xray = false
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
#vibrancy = 0.1696
# vibrancy_darkness = 0
special = false
}
# █▀█ █▀█ ▄▀█ █▀▀ █ ▀█▀ █▄█
# █▄█ █▀▀ █▀█ █▄▄ █ ░█░ ░█░
#active_opacity=0.98
#inactive_opacity=0.7
#fullscreen_opacity=1.05
#dim_inactive=0
#dim_strength=0.2
# dim_around=0.5
# █▀ █░█ ▄▀█ █▀▄ █▀█ █░█░█
# ▄█ █▀█ █▀█ █▄▀ █▄█ ▀▄▀▄▀
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}

View File

@ -0,0 +1,15 @@
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
# █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=HDMI-A-1,2560x1440@144,0x0,1
monitor=DP-2,preferred,2560x0,1
monitor=,preferred,auto,1
workspace = HDMI-A-1, 1
workspace = HDMI-A-1, 2
workspace = HDMI-A-1, 3
workspace = DP-2, 4
workspace = DP-2, 5
workspace = DP-2, 6

View File

@ -0,0 +1,16 @@
# █▀▀ █▀▀ █▄░█ █▀▀ █▀█ ▄▀█ █░░
# █▄█ ██▄ █░▀█ ██▄ █▀▄ █▀█ █▄▄
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 4
gaps_out = 8
border_size = 2
col.active_border = rgba(7f849cFF)
col.inactive_border = rgba(1e1e2eFF)
layout = dwindle
resize_on_border = true
}

View File

@ -0,0 +1,36 @@
# █ █▄░█ █▀█ █░█ ▀█▀
# █ █░▀█ █▀▀ █▄█ ░█░
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = de
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
numlock_by_default = true
accel_profile = flat
touchpad {
natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
# █▀▀ █▀▀ █▀ ▀█▀ █░█ █▀█ █▀▀ █▀
# █▄█ ██▄ ▄█ ░█░ █▄█ █▀▄ ██▄ ▄█
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# device:epic-mouse-v1 {
# sensitivity = -0.5
# }

View File

@ -0,0 +1,96 @@
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, Q, killactive,
#bind = $mainMod, M, exit,
bind = $mainMod, E, exec, xdg-open ~
bind = $mainMod, V, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, S, togglesplit, # dwindle
bind = $mainMod, F, fullscreen
bind = $mainMod, U, exec, $HOME/.config/conky/conkytoggler
bind = $mainMod, SPACE, exec, pkill rofi || ~/.config/rofi/launcher/launcher.sh
bind = ALT, TAB, exec, pkill rofi || ~/.config/rofi/launcher/launcher.sh window
bind = $mainMod, N, exec, pkill rofi || ~/.config/rofi/nm-vpn/nm-vpn.sh
bind = $mainMod, M, exec, pkill rofi || networkmanager_dmenu
bind = $mainMod, T, exec, pkill rofi || ~/.config/rofi/settings-menu/settings-menu.sh
bind = $mainMod, A, exec, pkill rofi || ~/.config/rofi/volume/volume.sh
bind = $mainMod, I, exec, pkill rofi || $HOME/.config/rofi/emojis/emojis.sh | rofi -dmenu -theme $HOME/.config/rofi/emojis/emojis.rasi -mesg " Emojis"
#bind = $mainMod, L, exec, swaync-client -t -sw
#bind = $mainMod, K, exec, xkill
bind = SUPER, C, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = $mainMod, TAB, cyclenext
bind = $mainMod ALT, SHIFT, cyclenext, prev
bind=,PRINT,exec, pkill rofi || ~/.config/rofi/screenshot/screenshot.sh
bind = CTRL ALT, DELETE, exec, kitty btop -p 1
bind = $mainMod, F4, exec, ~/.config/rofi/powermenu/powermenu.sh
bind = $mainMod, escape, exec, killall -SIGUSR1 waybar
# Move focus with mainMod
bind = $mainMod, H, movefocus, l
bind = $mainMod, J, movefocus, d
bind = $mainMod, K, movefocus, u
bind = $mainMod, L, movefocus, r
# Move window with mainMod + arrow keys
bind = $mainMod, left, movewindow, l
bind = $mainMod, right, movewindow, r
bind = $mainMod, up, movewindow, u
bind = $mainMod, down, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# MODKEYS
bindr = CAPS, Caps_Lock, exec, swayosd --caps-lock
# SPECIAL MODKEYS
binde = ,XF86AudioRaiseVolume, exec, /home/dom/.local/bin/volnote up
binde = ,XF86AudioLowerVolume, exec, /home/dom/.local/bin/volnote down
binde = ,XF86AudioMute, exec, /home/dom/.local/bin/volnote mute
binde = ,XF86MonBrightnessUp, exec, swayosd --brightness raise
binde = ,XF86MonBrightnessDown, exec, swayosd --brightness lower
binde = ,XF86AudioPlay, exec, /home/dom/.local/bin/volnote toggle
binde = ,XF86AudioStop, exec, playerctl stop
binde = ,XF86AudioPrev, exec, playerctl prev
binde = ,XF86AudioNext, exec, playerctl next

View File

@ -0,0 +1,13 @@
# █▀▄ █░█░█ █ █▄░█ █▀▄ █░░ █▀▀
# █▄▀ ▀▄▀▄▀ █ █░▀█ █▄▀ █▄▄ ██▄
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
no_gaps_when_only = 1 # monocle layout
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}

View File

@ -0,0 +1,13 @@
# █▀▄▀█ █ █▀ █▀▀
# █░▀░█ █ ▄█ █▄▄
misc {
disable_hyprland_logo=true
disable_splash_rendering=false
mouse_move_enables_dpms=true
vfr=true
layers_hog_keyboard_focus = true
animate_manual_resizes = true
enable_swallow = true
swallow_regex = ^(kitty)$
}

View File

@ -0,0 +1,99 @@
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# firefox Picture-in-Picture
windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = pin,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Picture-in-Picture)$
# firefox figma micro indicator
windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Firefox — Sharing Indicator)$
windowrulev2 = float,class:^(firefox)$,title:^(Firefox — Sharing Indicator)$
# Common Dialogs
windowrule = float,title:^(Open)$
windowrule = float,title:^(Öffnen von)$
windowrule = size 600 400, title:^(Öffnen von)$
windowrule = float,title:^(Choose Files)$
windowrule = float,title:^(Save As)$
windowrule = float,title:^(Confirm to replace files)$
windowrule = float,title:^(Ersetzung)$
windowrule = float,title:^(File Operation Progress)$
windowrule = float,title:^(Teilen-Hinweis)$
windowrule = float,title:^(Lxpolkit)$
windowrule = float,title:^(Timeshift-gtk)$
windowrulev2 = float,class:^(nm-connection-editor)$
windowrulev2 = float,class:^(sddm-conf)$
windowrule = float, mpv
windowrule = float, Vlc
windowrule = float, file_progress
windowrule = float, confirm
windowrule = float, dialog
windowrule = float, download
windowrule = float, notification
windowrule = float, error
windowrule = float, splash
windowrule = float, confirmreset
windowrule = float, title:Open File
windowrule = float, title:branchdialog
windowrule = float, Lxappearance
windowrule = float, Resources
windowrule = float, Rofi
windowrule = animation none,Rofi
windowrule = float,viewnior
windowrule = float,feh
windowrule = float, pavucontrol-qt
windowrule = float, pavucontrol
windowrule = float, file-roller
windowrule = idleinhibit focus, mpv
windowrule = idleinhibit fullscreen, firefox
windowrule = float, title:^(Media viewer)$
windowrule = float, title:^(Volume Control)$
windowrule = float, title:^(btop)$
windowrule = size 1024 768, title:^(btop)$
windowrule = float, title:^(Picture-in-Picture)$
windowrule = size 800 600, title:^(Volume Control)$
windowrule = move 75 44%, title:^(Volume Control)$
windowrulev2 = float,class:^(Conky)$
windowrulev2 = nofocus,class:^(Conky)$
windowrulev2 = pin,class:^(Conky)$
windowrulev2 = move 100 100,class:^(Conky)$
# Audio Mixer
windowrule = float,pavucontrol
windowrule = center,pavucontrol
windowrule = float,title:^(NoiseTorch)$
windowrule = float,title:^(Waydroid)$
# Nemo File Roller
windowrule = float,file-roller
windowrule = float,title:(Properties)$
# VPN Connection Dialog
windowrule = float,title:^(VPN Connection)$
windowrule = size 800 200,title:^(VPN Connection)$
windowrule = center,title:^(VPN Connection)$
windowrule = tile,title:^(Microsoft Teams)$
# Quick EDO Connection Dialog
windowrule = float,title:^(vscquick)$
windowrule = size 400 200,title:^(vscquick)$
windowrule = center,title:^(vscquick)$
windowrule = monitor DP-2,title:^(Default - Wine desktop)$
windowrule = fullscreen,title:^(Default - Wine desktop)$
#layerrule = noanim,rofi
#windowrulev2 = float,class:^(libreoffice)$
#layerrule = blur,rofi

View File

@ -0,0 +1,20 @@
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
env = XCURSOR_SIZE,24
env = HYPRLAND_INTERACTIVE_SCREENSHOT_SAVEDIR,$HOME/Pictures/Screenshots
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
#env = GTK_THEME,Catppuccin-Mocha-Standard-Lavender-Dark
source = ~/.config/hypr/hl-displays.conf
source = ~/.config/hypr/hl-general.conf
source = ~/.config/hypr/hl-autostart.conf
source = ~/.config/hypr/hl-input.conf
source = ~/.config/hypr/hl-decoration.conf
source = ~/.config/hypr/hl-animation.conf
source = ~/.config/hypr/hl-layout.conf
source = ~/.config/hypr/hl-windowrules.conf
source = ~/.config/hypr/hl-keybindings.conf
source = ~/.config/hypr/hl-misc.conf

View File

@ -0,0 +1,16 @@
ipc = off
preload = ~/Pictures/Wallpaper/MonarchOS.png
#if more than one preload is desired then continue to preload other backgrounds
#preload = /path/to/next_image.png
# .. more preloads
#set the default wallpaper(s) seen on inital workspace(s) --depending on the number of monitors used
# wallpaper = DP-3,/home/dom/.wallpaper/0wall.png
wallpaper = ,~/Pictures/Wallpaper/MonarchOS.png
#if more than one monitor in use, can load a 2nd image
# wallpaper = HDMI-A-1,/home/dom/.wallpaper/0wall.png
# wallpaper = ,/home/dom/.wallpaper/0wall.png
# .. more monitors

View File

@ -0,0 +1,8 @@
#!/bin/bash
sleep 1
killall xdg-desktop-portal-hyprland
#killall xdg-desktop-portal-wlr
killall xdg-desktop-portal
/usr/lib/xdg-desktop-portal-hyprland &
sleep 2
/usr/lib/xdg-desktop-portal &

View File

@ -0,0 +1,44 @@
# Nord Colorscheme for Kitty
# Based on:
# - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192
# - https://github.com/arcticicestudio/nord-hyper
background_opacity 0.9
foreground #D8DEE9
background #24273a
selection_foreground #000000
selection_background #FFFACD
url_color #0087BD
cursor #81A1C1
# black
color0 #3B4252
color8 #4C566A
# red
color1 #BF616A
color9 #BF616A
# green
color2 #A3BE8C
color10 #A3BE8C
# yellow
color3 #EBCB8B
color11 #EBCB8B
# blue
color4 #787c99
color12 #787c99
# magenta
color5 #B48EAD
color13 #B48EAD
# cyan
color6 #88C0D0
color14 #8FBCBB
# white
color7 #acb0d0
color15 #CACACE

View File

@ -0,0 +1,90 @@
font_family Hack Nerd Font
bold_font auto
italic_font auto
bold_italic_font auto
font_size 10.0
disable_ligatures never
cursor_shape beam
enable_audio_bell no
window_padding_width 10 10
open_url_with firefox
copy_on_select true
update_check_interval 0
confirm_os_window_close 0
tab_bar_style separator
tab_title_template " {index}: {title[title.rfind('/')+1:]}"
editor nvim
set-window-title "kitty"
sync_to_monitor yes
include ./custom.conf
# Key mapping
# For a list of key names, see: http://www.glfw.org/docs/latest/group__keys.html
# For a list of modifier names, see: http://www.glfw.org/docs/latest/group__mods.html
# You can use the special action no_op to unmap a keyboard shortcut that is
# assigned in the default configuration.
# Clipboard
map super+v paste_from_clipboard
map ctrl+shift+s paste_from_selection
map super+c copy_to_clipboard
map shift+insert paste_from_selection
# Scrolling
map ctrl+shift+up scroll_line_up
map ctrl+shift+down scroll_line_down
map ctrl+shift+k scroll_line_up
map ctrl+shift+j scroll_line_down
map ctrl+shift+page_up scroll_page_up
map ctrl+shift+page_down scroll_page_down
map ctrl+shift+home scroll_home
map ctrl+shift+end scroll_end
map ctrl+shift+h show_scrollback
# Window management
map super+n new_os_window
map super+w close_window
map ctrl+shift+enter new_window
map ctrl+shift+] next_window
map ctrl+shift+[ previous_window
map ctrl+shift+f move_window_forward
map ctrl+shift+b move_window_backward
map ctrl+shift+` move_window_to_top
map ctrl+shift+1 first_window
map ctrl+shift+2 second_window
map ctrl+shift+3 third_window
map ctrl+shift+4 fourth_window
map ctrl+shift+5 fifth_window
map ctrl+shift+6 sixth_window
map ctrl+shift+7 seventh_window
map ctrl+shift+8 eighth_window
map ctrl+shift+9 ninth_window
map ctrl+shift+0 tenth_window
# Tab management
map ctrl+shift+right next_tab
map ctrl+shift+left previous_tab
map ctrl+shift+t new_tab
map ctrl+shift+q close_tab
map ctrl+shift+l next_layout
map ctrl+shift+. move_tab_forward
map ctrl+shift+, move_tab_backward
# Miscellaneous
map ctrl+shift+up increase_font_size
map ctrl+shift+down decrease_font_size
map ctrl+shift+backspace restore_font_size

View File

@ -0,0 +1,3 @@
permission: octal
total-size: true
date: '+%d.%m.%Y %X'

View File

@ -0,0 +1,894 @@
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
#
# Colour config is here and in .zshrc
#
print_info() {
info title
info underline
prin "$(color 12)╭──────────── $(color 10)Software$(color 12) ────────────"
info "$(color 12)│ $(color 14)OS" distro
info "$(color 12)│ $(color 14)Kernel" kernel
info "$(color 12)│ $(color 14)Packages" packages
info "$(color 12)│ $(color 14)Shell" shell
info "$(color 12)│ $(color 14)DE" de
info "$(color 12)│ $(color 14)WM" wm
info "$(color 12)│ $(color 14)Terminal" term
info "$(color 12)│ $(color 14)Local IP" local_ip
info "$(color 12)│ $(color 14)Locale" locale
prin "$(color 12)├──────────── $(color 10)Hardware$(color 12) ────────────"
info "$(color 12)│ $(color 14)Host" model
info "$(color 12)│ $(color 14)CPU" cpu
info "$(color 12)│ $(color 14)GPU" gpu
info "$(color 12)│ $(color 14)Memory" memory
info "$(color 12)│ $(color 14)Disk" disk
prin "$(color 12)├───────────── $(color 10)Uptime$(color 12) ─────────────"
info "$(color 12)│" uptime
prin "$(color 12)╰──────────────────────────────────"
prin "$(color 02) MonArchOS v1.0.0"
info cols
# Defaults
# info "OS" distro
# info "Host" model
# info "Kernel" kernel
# info "Uptime" uptime
# info "Packages" packages
# info "Shell" shell
# info "Resolution" resolution
# info "DE" de
# info "WM" wm
# info "WM Theme" wm_theme
# info "Theme" theme
# info "Icons" icons
# info "Terminal" term
# info "Terminal Font" term_font
# info "CPU" cpu
# info "GPU" gpu
# info "Memory" memory
# info "GPU Driver" gpu_driver # Linux/macOS only
# info "CPU Usage" cpu_usage
# info "Disk" disk
# info "Battery" battery
# info "Font" font
# info "Song" song
# [[ "$player" ]] && prin "Music Player" "$player"
# info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
# info "Locale" locale # This only works on glibc systems.
# info cols
}
# Title
# Hide/Show Fully qualified domain name.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --title_fqdn
title_fqdn="off"
# Kernel
# Shorten the output of the kernel function.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
#
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="off"
# Distro
# Shorten the output of the distro function
#
# Default: 'off'
# Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="off"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
#
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
# Uptime
# Shorten the output of the uptime function
#
# Default: 'on'
# Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand
#
# Example:
# on: '2 days, 10 hours, 3 mins'
# tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="off"
# Memory
# Show memory pecentage in output.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
#
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="off"
# Change memory output unit.
#
# Default: 'mib'
# Values: 'kib', 'mib', 'gib'
# Flag: --memory_unit
#
# Example:
# kib '1020928KiB / 7117824KiB'
# mib '1042MiB / 6951MiB'
# gib: ' 0.98GiB / 6.79GiB'
memory_unit="mib"
# Packages
# Show/Hide Package Manager names.
#
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
#
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
# Shell
# Show the path to $SHELL
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
#
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
#
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
# CPU
# CPU speed type
#
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="on"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="on"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="on"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --de_version
de_version="on"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/' '/mnt/Storage')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="dir"
# Disk percent.
# Show/Hide disk percent.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --disk_percent
#
# Example:
# on: 'Disk (/): 74G / 118G (66%)'
# off: 'Disk (/): 74G / 118G'
disk_percent="on"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# gogglesmm
# guayadeque
# io.elementary.music
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# muine
# netease-cloud-music
# olivia
# playerctl
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# strawberry
# tauonmb
# tomahawk
# vlc
# xmms2d
# xnoise
# yarock
music_player="auto"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="¨"
# Info Separator
# Replace the default separator with the specified string.
#
# Default: ':'
# Flag: --separator
#
# Example:
# separator="->": 'Shell-> bash'
# separator=" =": 'WM = dwm'
separator=""
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '15'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Color Alignment
#
# Default: 'auto'
# Values: 'auto', 'num'
# Flag: --col_offset
#
# Number specifies how far from the left side of the terminal (in spaces) to
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
# and IRIX have ascii logos
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
# Use '{distro name}_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
# postmarketOS, and Void have a smaller logo variant.
# Use '{distro name}_small' to use the small variants.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
#
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
#
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
#
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
#
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
#
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
#
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
#
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color
background_color=
# Misc Options
# Stdout mode
# Turn off all colors and disables image backend (ASCII/Image).
# Useful for piping into another command.
# Default: 'off'
# Values: 'on', 'off'
stdout="off"

View File

@ -0,0 +1,415 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
shadow = false;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 12;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = 0.75
# The left offset for shadows, in pixels. (defaults to -15)
shadow-offset-x = -15;
# The top offset for shadows, in pixels. (defaults to -15)
shadow-offset-y = -15;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
shadow-exclude = [
"class_g = 'foo'",
];
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []
#
# Advanced Options
#
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
inactive-opacity = 1;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
frame-opacity = 1.0;
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
focus-exclude = [];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# opacity-rule = []
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
#
# blur-strength = 5
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = false
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ""
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# Animations - pijulius' fork #
#################################
animations = true;
animation-window-mass = 0.8;
#animation-stiffness = 350.0; #a.k.a tension
#animation-dampening = 20.0; #a.k.a friction
animation-clamping = true;
animation-delta = 8;
animation-force-steps = false;
# none,auto,zoom,fly-in,slide-up,slide-down,slide-left,slide-right
animation-for-open-window = "zoom";
animation-for-transient-window = "auto";
animation-for-unmap-window = "auto";
animation-for-workspace-switch-in = "auto";
animation-for-workspace-switch-out = "auto";
# not work
# animation-exclude = [
# "class_g = 'i3lock'",
# ];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
# backend = "glx"
backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 0;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = true;
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ""
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls wether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 1.0; animation-for-open-window = "slide-down"; }
dropdown_menu = { opacity = 1.0; animation-for-open-window = "slide-down"; }
};

View File

@ -0,0 +1,479 @@
#################################
# Transitions #
#################################
# When windows get moved or resized it transitions window position
transition = true;
# How many pixels move window to make the first position in transition (defaults to 20)
transition-offset = 10;
# Direction of transition (top, right, bottom, left) e.g: "right" direction will make
# all windows come from right to left
# (smart-x, smart-y) are smart direction that will check if there are
# multiple windows that splits the screen and will change their directions,
# in "smart-x" it changes direction of left window to "right" and direction of
# right window to "left", if screen is not splited and a window is taking
# a lot of screen it will change that window direction to "left".
# "smart-y" is also exactly like "smart-x" but instead of translating directions to
# "right" and "left", it translate to "top" and "bottom"
transition-direction = "smart-y";
# Function that calculates new position of window (defaults to "ease-out-cubic")
# see https://easings.net for list of all functions
# naming conventions are different to that site tho, e.g "easeInSine" is listed
# on site but here that translated to "ease-in-sine"
transition-timing-function = "ease-out-cubic";
# Time between frames in transition. (0.01 - 1.0, defaults to 0.028)
transition-step = 0.036;
# Similar to opacity rules but determites transition direction e.g:
# "right: name *= 'Firefox'" will make firefox transition direction to right
# Specify a list of transition rules, in the format `DIRECTION:PATTERN`
# for disabling transition on specific patterns use "none" keyword as a direction
# e.g: use "none: window_type = 'popup_menu'" for disabling transitions on popup menus
transition-rule = ["none: window_type = 'popup_menu'"];
#"unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 40;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
shadow-opacity = .60
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -40;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -40;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular monitor to that monitor. This is
# currently implemented using the X RandR extension.
# crop-shadow-to-monitor = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.02;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.02;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 3
# Specify a list of conditions of windows that should not be faded.
#fade-exclude = ["window_type = 'popup_menu'"]
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
#inactive-opacity = 0.8;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
#frame-opacity = 0.7;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true
#inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
#inactive-dim = 1.0
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
#focus-exclude = [ "class_g = 'Cairo-clock'" ];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
# opacity-rule = []
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 10
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_PICOM_ROUNDED@:32c = 1"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
#
# blur-strength = 5
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = false
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ""
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Enable remote control via D-Bus. See the man page for more details.
# dbus = true
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
# `xrender` is the default one.
#
# backend = "glx"
backend = "glx";
# Use higher precision during rendering, and apply dither when presenting the
# rendered screen. Reduces banding artifacts, but might cause performance
# degradation. Only works with OpenGL.
dithered-present = false;
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. This usually means windows from the same application
# will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
#
# detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface.
#
# window-shader-fg = "default"
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
# window-shader-fg-rule = [
# "my_shader.frag:window_type != 'dock'"
# ]
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Specify a list of conditions of windows that should never have transparent
# clipping applied. Useful for screenshot tools, where you need to be able to
# see through transparent parts of the window.
#
# transparent-clipping-exclude = []
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls whether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 1;shadow = false;fade-delta = 2 }
dropdown_menu = { opacity = 1; }
utility = {shadow = false;}
};

View File

@ -0,0 +1,479 @@
#################################
# Transitions #
#################################
# When windows get moved or resized it transitions window position
transition = true;
# How many pixels move window to make the first position in transition (defaults to 20)
transition-offset = 10;
# Direction of transition (top, right, bottom, left) e.g: "right" direction will make
# all windows come from right to left
# (smart-x, smart-y) are smart direction that will check if there are
# multiple windows that splits the screen and will change their directions,
# in "smart-x" it changes direction of left window to "right" and direction of
# right window to "left", if screen is not splited and a window is taking
# a lot of screen it will change that window direction to "left".
# "smart-y" is also exactly like "smart-x" but instead of translating directions to
# "right" and "left", it translate to "top" and "bottom"
transition-direction = "smart-y";
# Function that calculates new position of window (defaults to "ease-out-cubic")
# see https://easings.net for list of all functions
# naming conventions are different to that site tho, e.g "easeInSine" is listed
# on site but here that translated to "ease-in-sine"
transition-timing-function = "ease-out-cubic";
# Time between frames in transition. (0.01 - 1.0, defaults to 0.028)
transition-step = 0.036;
# Similar to opacity rules but determites transition direction e.g:
# "right: name *= 'Firefox'" will make firefox transition direction to right
# Specify a list of transition rules, in the format `DIRECTION:PATTERN`
# for disabling transition on specific patterns use "none" keyword as a direction
# e.g: use "none: window_type = 'popup_menu'" for disabling transitions on popup menus
transition-rule = ["none: window_type = 'popup_menu'"];
#"unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 40;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
shadow-opacity = .60
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -40;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -40;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular monitor to that monitor. This is
# currently implemented using the X RandR extension.
# crop-shadow-to-monitor = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.02;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.02;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 3
# Specify a list of conditions of windows that should not be faded.
#fade-exclude = ["window_type = 'popup_menu'"]
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
#inactive-opacity = 0.8;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
#frame-opacity = 0.7;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true
#inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
#inactive-dim = 1.0
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
#focus-exclude = [ "class_g = 'Cairo-clock'" ];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
# opacity-rule = []
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 10
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_PICOM_ROUNDED@:32c = 1"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
#
# blur-strength = 5
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
blur-background = true
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ""
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Enable remote control via D-Bus. See the man page for more details.
# dbus = true
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
# `xrender` is the default one.
#
# backend = "glx"
backend = "glx";
# Use higher precision during rendering, and apply dither when presenting the
# rendered screen. Reduces banding artifacts, but might cause performance
# degradation. Only works with OpenGL.
dithered-present = false;
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. This usually means windows from the same application
# will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
#
# detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface.
#
# window-shader-fg = "default"
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
# window-shader-fg-rule = [
# "my_shader.frag:window_type != 'dock'"
# ]
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Specify a list of conditions of windows that should never have transparent
# clipping applied. Useful for screenshot tools, where you need to be able to
# see through transparent parts of the window.
#
# transparent-clipping-exclude = []
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls whether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 1;shadow = false;fade-delta = 2 }
dropdown_menu = { opacity = 1; }
utility = {shadow = false;}
};

View File

@ -0,0 +1,33 @@
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = librnnoise_ladspa
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 90.0
"VAD Grace Period (ms)" = 150
"Retroactive VAD Grace (ms)" = 0
}
}
]
}
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.rate = 48000
}
playback.props = {
node.name = "rnnoise_source"
media.class = Audio/Source
audio.rate = 48000
}
}
}
]

View File

@ -0,0 +1,47 @@
include-file = ~/.config/polybar/theme.ini
include-file = ~/.config/polybar/modules.ini
[bar/main]
width = 100%
height = 34
offset-y = 0
offset-x = 0
top = true
fixed-center = true
padding = 1
locale = de_DE.UTF-8
wm-restack = bspwm
override-redirect = false
scroll-up = next
scroll-down = prev
enable-ipc = true
background = ${colors.bg}
foreground = ${colors.fg}
font-0 = "Hack Nerd Font:style=Bold:size=10;2"
font-1 = "MonarchOS:size=11;2"
font-2 = "Hack Nerd Font:style=Regular:size=11;2"
font-3 = "Hack Nerd Font:style=Regular:size=20;5"
radius = 0
tray-position = none
tray-padding = 5
tray-spacing = 0
tray-background = ${colors.shade-1}
cursor-click = pointer
monitor = HDMI-1
modules-left = session date bspwm
modules-center = windowlist
modules-right = pulseaudio wireless-network vpn
[bar/external]
inherit = bar/main
monitor = DP-2
modules-left = session date bspwm
modules-center = windowlist2
modules-right = pulseaudio wireless-network vpn gamemode updates-pacman-aurhelper
tray-position = left
[settings]
screenchange-reload = true
format-padding = 1
pseudo-transparency = true

View File

@ -0,0 +1,47 @@
include-file = ~/.config/polybar/theme.ini
include-file = ~/.config/polybar/modules.ini
[bar/main]
width = 100%
height = 34
offset-y = 0
offset-x = 0
top = true
fixed-center = true
padding = 1
locale = de_DE.UTF-8
wm-restack = bspwm
override-redirect = false
scroll-up = next
scroll-down = prev
enable-ipc = true
background = ${colors.bg}
foreground = ${colors.fg}
font-0 = "Hack Nerd Font:style=Bold:size=10;2"
font-1 = "MonarchOS:size=11;2"
font-2 = "Hack Nerd Font:style=Regular:size=11;2"
font-3 = "Hack Nerd Font:style=Regular:size=20;5"
radius = 0
tray-position = none
tray-padding = 5
tray-spacing = 0
tray-background = ${colors.shade-1}
cursor-click = pointer
monitor = ${env:MONITOR:}
modules-left = session date polywins
modules-center = windowlist
modules-right = pulseaudio wireless-network vpn
[bar/external]
inherit = bar/main
monitor = ${env:MONITOR:}
modules-left = session date polywins
modules-center = windowlist2
modules-right = pulseaudio wireless-network vpn gamemode updates-pacman-aurhelper
tray-position = left
[settings]
screenchange-reload = true
format-padding = 1
pseudo-transparency = true

26
home/config/polybar/launch.sh Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#kill all polybar instances
CPID=$(pgrep -x polybar)
if [ -n "${CPID}" ] ; then
kill -TERM ${CPID}
fi
# add window titles & launch the bars
# using bspc query here to get monitors in the same order bspwm sees them
for m in $( bspc query -M --names ); do
index=$((index + 1))
if [[ $index -eq 1 ]]; then
export P_BSPWM_WINDOW_CMD_1="tail ${HOME}/.cache/bspwm_windows_1.txt"
MONITOR=$m polybar --reload main &
fi
#if [ && [ $(xrandr -q | grep 'DP-2 connected') ]]; then
if [[ $index -eq 2 ]]; then
export P_BSPWM_WINDOW_CMD_2="tail ${HOME}/.cache/bspwm_windows_2.txt"
MONITOR=$m polybar --reload external &
fi
done

View File

@ -0,0 +1,330 @@
[module/nowplaying]
type = custom/script
tail = true
interval = 1
format =  <label>
exec = playerctl metadata --format "{{ artist }} - {{ title }}"
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
low-at = 25
format-full-prefix =
format-full = <label-charging>
format-charging-prefix =
format-charging = <label-charging>
label-charging = %percentage:2%%
label-charging-padding = 1
format-charging-foreground = ${colors.fg}
format-discharging = <ramp-capacity> <label-discharging>
label-discharging = %percentage%%
label-discharging-padding = 1
format-discharging-foreground = ${colors.fg}
format-low = <ramp-capacity><label-discharging>
label-low-padding = 1
format-low-foreground = ${colors.red}
ramp-capacity-0 = ""
ramp-capacity-1 = ""
ramp-capacity-2 = ""
ramp-capacity-3 = ""
ramp-capacity-4 = ""
ramp-capacity-5 = ""
poll-interval = 5
[module/bspwm]
type = internal/bspwm
format = <label-state> <label-mode>
label-focused =
label-focused-foreground = ${colors.shade-5}
label-focused-background = ${colors.shade-2}
label-focused-padding = 2
label-focused-underline= ${colors.shade-5}
label-occupied =
label-occupied-foreground = ${colors.shade-3}
label-occupied-background = ${colors.shade-2}
label-occupied-padding = 2
label-urgent =
label-urgent-foreground = ${colors.red}
label-urgent-background = ${colors.shade-2}
label-urgent-padding = 2
label-empty =
label-empty-foreground = ${colors.shade-3}
label-empty-background = ${colors.shade-2}
label-empty-padding = 2
[module/date]
type = internal/date
interval = 1
time = "%a, %d. %b %H:%M"
time-alt = %A, %d.%m.%g %H:%M:%S
format = <label>
format-foreground = ${colors.fg}
format-padding = 1
label = %{T1}%time%%{T-}
label-padding = 1
click-right = $HOME/.config/rofi/calendar/rofi-calendar.sh
[module/pulseaudio]
type = internal/pulseaudio
use-ui-max = false
format-volume = <label-volume>
format-volume-background = ${colors.shade-2}
format-volume-prefix = " "
format-volume-prefix-foreground = ${colors.lavender}
label-volume = %{T1}%percentage%%%{T-}
label-volume-foreground = ${colors.lavender}
label-volume-padding = 1
format-muted = <label-muted>
format-muted-background = ${colors.shade-2}
format-muted-prefix = " 󰝟"
format-muted-prefix-foreground = ${colors.red}
label-muted = %{T1}%percentage%%%{T-}
label-muted-foreground = ${colors.fg-alt}
label-muted-padding = 1
click-right = $HOME/.config/rofi/volume/volume.sh
[module/session]
type = custom/text
click-left = $HOME/.config/rofi/powermenu/powermenu.sh
click-right = $HOME/.config/rofi/launcher/launcher.sh
content = %{T4}%{T-}
content-foreground = ${colors.blue}
content-padding = 1
content-font = 2
[module/screenshot]
type = custom/text
click-left = flameshot gui
content = %{T4} %{T-}
content-foreground = ${colors.fg}
content-padding = 1
[module/wlan]
type = internal/network
interface = wlan0
interval = 1.0
format-connected-prefix =
format-connected = <label-connected>
label-connected = "%{A1:wifimenu:}%essid%%{A}"
label-connected-foreground = ${colors.fg}
label-connected-padding = 1
format-disconnected = <label-disconnected>
format-disconnected-padding = 1
label-disconnected = %{A1:wifimenu:}睊%{A}
label-disconnected-foreground = ${colors.shade-1}
label-disconnected-padding = 1
[module/filesystem]
type = internal/fs
mount-0 = /
interval = 30
warn-percentage = 90
format-mounted-prefix =
label-mounted = %percentage_used%%
label-mounted-padding = 1
format-warn-prefix =
format-warn = <label-warn>
label-warn = %free%
label-warn-padding = 1
format-warn-foreground = ${colors.red}
[module/title]
type = internal/xwindow
label = %title:0:50:...%
format-prefix = "  "
format-prefix-foreground = ${colors.fg}
[module/notification-history]
type = custom/text
click-left = $HOME/.config/polybar/modules/notifications.sh
content = %{T4}%{T-}
content-foreground = ${colors.fg}
content-padding = 1
content-font = 2
[module/notifications]
type = custom/script
exec = $HOME/.config/polybar/modules/notifications-count.sh
click-left = $HOME/.config/polybar/modules/notifications-open.sh
click-right = $HOME/.config/polybar/modules/notifications-close.sh
click-middle = $HOME/.config/polybar/modules/notifications-setmode.sh
tail = true
format = <label>
label = %output:0:50:...%
[module/spotifyctl]
type = custom/script
exec = $HOME/.config/polybar/modules/polybar-playerctl.sh
click-left = playerctl --player="spotify" play
click-right = playerctl --player="spotify" pause
click-middle = playerctl --player="spotify" next
double-click-left = playerctl --player="spotify" previous
label = %output:0:50:...%
[module/spotifyctl-menu]
type = custom/menu
expand-right = true
menu-0-0 = "  "
menu-0-0-exec = killall spotify
menu-0-1 = " ﭢ "
menu-0-1-exec = playerctl --player="spotify" previous
menu-0-2 = "  "
menu-0-2-exec = playerctl --player="spotify" play
menu-0-3 = "  "
menu-0-3-exec = playerctl --player="spotify" pause
menu-0-4 = " ﭠ "
menu-0-4-exec = playerctl --player="spotify" next
menu-0-5 = "  "
label-open = "  "
label-close = ""
label-separator = " "
[module/cpu]
type = internal/cpu
interval = 0.5
format = <label>
format-foreground = ${colors.fg}
format-padding = 2
label = "﬙ %percentage:%%"
[module/memory]
type = internal/memory
label = " %percentage_used:%%"
; Seconds to sleep between updates
; Default: 1
interval = 3
; Default: 90
; New in version 3.6.0
warn-percentage = 90
[module/wireless-network]
type = internal/network
interface = wlan0
interval = 3.0
unknown-as-up = true
format-connected-foreground = ${colors.lavender}
format-connected-background = ${colors.shade-2}
format-connected-padding = 2
format-connected = %{A1:$HOME/rofi/network-manager/rofi-network-manager.sh:}<ramp-signal> <label-connected>%{A}
label-connected = %essid%
format-disconnected-foreground = ${colors.lavender}
format-disconnected-padding = 1
format-disconnected = %{A1:$HOME/rofi/network-manager/rofi-network-manager.sh:}<label-disconnected>%{A}
label-disconnected ="󰖪"
ramp-signal-0 = "󰢿"
ramp-signal-1 = "󰢼"
ramp-signal-2 = "󰢽"
ramp-signal-3 = "󰢽"
ramp-signal-4 = "󰢾"
ramp-signal-foreground = ${colors.lavender}
ramp-signal-0-foreground = "#440000"
ramp-signal-1-foreground = "#440000"
[module/wired-network]
type = internal/network
interface = eth0
interval = 3.0
format-connected-foreground = ${colors.fg}
format-connected-padding = 1
format-connected = %{A1:$HOME/.../rofi-network-manager/rofi-network-manager.sh:}<label-connected>%{A}
label-connected =  %local_ip%
format-disconnected-foreground = ${colors.fg-alt}
format-disconnected-padding = 1
format-disconnected = %{A1:$HOME/.../rofi-network-manager/rofi-network-manager.sh:}<label-disconnected>%{A}
label-disconnected =" "
[module/bluetooth]
type = custom/script
exec = ~/.config/polybar/modules/system-bluetooth-bluetoothctl.sh
tail = true
click-left = ~/.config/rofi/bluetooth/bluetooth.sh &
[module/updates-pacman-aurhelper]
type = custom/script
exec = ~/.config/polybar/modules/updates-pacman-aurhelper.sh
interval = 600
format = <label>
format-background = ${colors.shade-2}
format-padding = 2
[module/gamemode]
type = custom/script
exec = ~/.config/polybar/modules/gamemode.sh
interval = 2
format = <label>
format-background = ${colors.shade-2}
[module/ixwindow]
type = custom/script
exec = ~/.config/polybar/modules/ixwindow/ixwindow
tail = true
label-font = 3
[module/windowlist]
type = custom/script
exec = ${env:P_BSPWM_WINDOW_CMD_1}
interval = 0.1
[module/windowlist2]
type = custom/script
exec = ${env:P_BSPWM_WINDOW_CMD_2}
interval = 0.1
[module/bluetooth2]
type = custom/script
exec = ~/.config/rofi/bluetooth/bluetooth.sh --status
interval = 1
click-left = ~/.config/rofi/bluetooth/bluetooth.sh &
[module/vpn]
type = custom/script
exec = ~/.config/polybar/modules/nm-vpn.sh
interval = 5
click-left = ~/.config/rofi/nm-vpn/nm-vpn.sh &
format-background = ${colors.shade-4}
[module/rofication-status]
type = custom/script
exec = ~/.config/polybar/modules/rofication.sh
click-left = ~/.config/polybar/modules/rofication.sh --show &
format-background = ${colors.shade-4}
background = ${colors.shade-4}
[module/polywins]
type = custom/script
exec = ~/.config/polybar/modules/polywins.py $MONITOR
format = <label>
label = %output%
label-padding = 0
tail = true
format-background = ${colors.shade-2}
format-spacing = 5

View File

@ -0,0 +1,11 @@
#!/bin/sh
STATE="$(gamemoded -s)"
if [[ "$STATE" != "gamemode is inactive" ]]; then
echo ""
else
echo ""
fi

View File

@ -0,0 +1,65 @@
#!/bin/bash
# Most of the code taken from
# https://unix.stackexchange.com/questions/48860/how-to-dump-the-icon-of-a-running-x-program
SIZE=16
COLOR="#00000000"
wid="$2"
# wid="$(xdotool selectwindow)"
# class="$(bspc query -T -n "$wid" | jq -r '.client.className')"
WM_CLASS="$(xprop -id "$wid" WM_CLASS | awk '{print $4}' | tr -d '"')"
name="$WM_CLASS"
CACHE="$1/$name"
if [ -f "$CACHE.jpg" ]; then
exit 0
fi
# Check if there is an icon for us in xprop,
# so it won't break the behavior of the script
if [ -z "$(xprop -id "$wid" | grep "Icon")" ]; then
exit 0
fi
# Resize it in advance, so icons will look better, but it's not necessary, so
# you can remove "-resize" flag if you prefer it the other way
cmd=(convert -resize "$SIZE"x"$SIZE" -set 'filename:w' '%w' - "${name}.png")
split_icons() {
xprop -id "$wid" -notype 32c _NET_WM_ICON |
awk -v RS=', | = ' '
NR == 1 { h = $1; i++; next }
NR == i + 1 { x = $1; printf "%s = %s", h, x; next }
NR == i + 2 { s = x * $1 } { printf ", %s", $1 }
NR == i + 2 + s { i += s + 2; printf "\n" }
'
}
to_pam() {
perl -0777 -pe '@_=/\d+/g;
printf "P7\nWIDTH %d\nHEIGHT %d\n", splice@_,0,2;
printf "DEPTH 4\nMAXVAL 255\nTUPLTYPE RGB_ALPHA\nENDHDR\n";
$_=pack "N*", @_;
s/(.)(...)/$2$1/gs'
}
while read -r data; do to_pam <<< "$data" | "${cmd[@]}"; done < <(split_icons)
convert "$name.png" -background $COLOR -flatten -alpha off "$name.jpg"
mv "$name.jpg" "$CACHE.jpg" && rm "$name.png"

View File

@ -0,0 +1,187 @@
#!/bin/bash
GAP=""
print_info() {
echo -n "$GAP"
local DESK="$(bspc query --names -D -d focused)"
case $DESK in
1)
DESKICON=""
;;
2)
DESKICON=""
;;
3)
DESKICON=""
;;
4)
DESKICON=""
;;
5)
DESKICON=""
;;
6)
DESKICON=""
;;
7)
DESKICON=""
;;
8)
DESKICON=""
;;
9)
DESKICON=""
;;
*)
DESKICON=""
;;
esac
if [ "$1" = "Empty" ]; then
echo "$DESKICON  $(whoami)@$(uname -n) - $(uname -r)"
else
local wid="$1"
# Doesn't always work, so xprop is more realiable here
# WM_CLASS="$(bspc query -T -n "$Node" | jq -r '.client.className')"
local WM_CLASS="$(xprop -id "$wid" WM_CLASS | awk '{print $4}' | tr -d '"')"
local WM_NAME="$(xprop -id $wid _NET_WM_NAME | awk -F '=' '{print $2}' | tr -d '"')"
case "$WM_CLASS" in
'firefox')
echo "$DESKICON  ${WM_NAME:0:100}";;
'kitty')
echo "$DESKICON  ${WM_NAME:0:100}";;
'code-oss')
echo "$DESKICON  ${WM_NAME:0:100}";;
'Audacious')
echo "$DESKICON ﱘ ${WM_NAME:0:100}";;
'io.github.celluloid_player.Celluloid')
echo "$DESKICON  ${WM_NAME:0:100}";;
'Lutris')
echo "$DESKICON  ${WM_NAME:0:100}";;
'discord')
echo "$DESKICON ﭮ ${WM_NAME:0:100}";;
'Nemo')
echo "$DESKICON  ${WM_NAME:0:100}";;
*)
# https://stackoverflow.com/questions/1538676/uppercasing-first-letter-of-words-using-sed
echo "$DESKICON ${WM_NAME:0:100}" | sed -e "s/\b\(.\)/\u\1/g";;
esac
fi
}
exists_fullscreen_node() {
local fullscreen_nodes="$(bspc query -N -n .fullscreen.\!hidden -d "$1")"
if [ -n "$fullscreen_nodes" ]; then
echo '1'
else
echo '0'
fi
}
process_window() {
local desk="$2"
local wid="$1"
local WM_CLASS="$(xprop -id "$wid" WM_CLASS | awk '{print $4}' | tr -d '"')"
# If there is a fullscreen node, don't show anything,
# since we shouldn't see it
if [ "$(exists_fullscreen_node "$desk")" = "1" ]; then
return 0;
fi
print_info "$wid"
}
is_desktop_empty() {
local desk="$1"
local nodes="$(bspc query -N -n .window.\!hidden -d "$desk")"
if [ -n "$nodes" ]; then
echo '0'
else
echo '1'
fi
}
process_desktop() {
local desk="$1"
local is_empty="$(is_desktop_empty "$desk")"
if [ "$is_empty" = "1" ]; then
print_info "Empty"
fi
}
bspc subscribe node_focus | while read -r Event Monitor Desktop Node
do
# For some reason "$Node" and "$Desktop" are not always working
# properly with sticky windows
Node="$(xdotool getactivewindow)"
Desktop="$(bspc query -D -d focused)"
process_window "$Node" "$Desktop"
done &
bspc subscribe node_state | while read -r Event Monitor Desktop Node State Active
do
Node="$(xdotool getactivewindow)"
Desktop="$(bspc query -D -d focused)"
if [ "$State" != "fullscreen" ]; then
continue;
fi
# So, if you will focus on the other windows of the same app,
# which are not fullscreen, you will see icon
if ![ "$Active" = "on" ]; then
process_window "$Node" "$Desktop"
fi
done &
bspc subscribe node_add | while read -r Event Monitor Desktop Ip Node
do
State="$(bspc query -T -n "$Node" | jq -r '.client.state')"
done &
bspc subscribe node_flag | while read -r Event Monitor Desktop Node Flag Active
do
if [ "$Flag" = "hidden" ] && [ "$Desktop" = "$(bspc query -D -d .focused)" ]; then
process_desktop "$Desktop"
fi
done &
bspc subscribe node_remove | while read -r Event Monitor Desktop Node
do
process_desktop "$Desktop"
done &
bspc subscribe desktop_focus | while read -r Event Monitor Desktop
do
if [ "$(exists_fullscreen_node "$Desktop")" = "1" ]; then
continue;
fi
process_desktop "$Desktop"
done

Binary file not shown.

View File

@ -0,0 +1,148 @@
// compilation:
// g++ polybar-xwindow-icon.cpp -o polybar-xwindow-icon -I/usr/include/opencv4/ -lopencv_core -lopencv_videoio -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lX11
//
// Code is mostly copied from
// https://stackoverflow.com/questions/54513419/putting-image-into-a-window-in-x11
// Some parts are taken from
// https://stackoverflow.com/questions/57078155/draw-border-frame-using-xlib
#include <opencv2/opencv.hpp> // FOR OpenCV
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat)
#include <opencv2/video/video.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <bits/stdc++.h>
#include <X11/Xlib.h> // Every Xlib program must include this
#include <assert.h> // I include this to test return values the lazy way
#include <unistd.h> // So we got the profile for 10 seconds
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <X11/Xlib.h> // Every Xlib program must include this
#include <X11/Xatom.h>
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/shape.h>
#define NIL (0) // A name for the void pointer
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
XGCValues gr_values;
//GC gc;
XColor color, dummy;
Display *dpy = XOpenDisplay(NIL);
//assert(dpy);
//int screen = DefaultScreen(dpy);
// Get some colors
int blackColor = BlackPixel(dpy, DefaultScreen(dpy));
int whiteColor = WhitePixel(dpy, DefaultScreen(dpy));
// Create the window
Window w = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 270, 6,
24, 24, 0, whiteColor, blackColor);
// We want to get MapNotify events
XSelectInput(dpy, w, StructureNotifyMask);
// XSelectInput(dpy, w, ExposureMask);
long value = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
XChangeProperty(dpy, w, XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False),
XA_ATOM, 32, PropModeReplace, (unsigned char *) &value, 1);
XClassHint *polybar_xwindow_icon;
//my_struct = malloc(sizeof(t_data));
polybar_xwindow_icon = XAllocClassHint();
polybar_xwindow_icon->res_name = "polybar-xwindow-icon";
polybar_xwindow_icon->res_class = "Polybar-xwindow-icon";
XSetClassHint(dpy, w, polybar_xwindow_icon);
XFree(polybar_xwindow_icon);
XMapWindow(dpy, w);
// Wait for the MapNotify event
for(;;) {
XEvent e;
XNextEvent(dpy, &e);
if (e.type == MapNotify)
break;
}
Window focal = w;
XWindowAttributes gwa;
XGetWindowAttributes(dpy, w, &gwa);
int wd1 = gwa.width;
int ht1 = gwa.height;
XImage *image = XGetImage(dpy, w, 0, 0 , wd1, ht1, AllPlanes, ZPixmap);
unsigned long rm = image->red_mask;
unsigned long gm = image->green_mask;
unsigned long bm = image->blue_mask;
Mat img(ht1, wd1, CV_8UC3); // OpenCV Mat object is initilaized
Mat scrap = imread(argv[1]);//(wid, ht, CV_8UC3);
resize(scrap, img, img.size(), cv::INTER_AREA);
for (int x = 0; x < wd1; x++)
for (int y = 0; y < ht1 ; y++)
{
unsigned long pixel = XGetPixel(image,x,y);
Vec3b color = img.at<Vec3b>(Point(x,y));
pixel = 65536 * color[2] + 256 * color[1] + color[0];
XPutPixel(image, x, y, pixel);
}
// namedWindow("QR", CV_WINDOW_NORMAL);
// imshow("QR", img);
GC gc = XCreateGC(dpy, w, 0, NIL);
XPutImage(dpy, w, gc, image, 0, 0, 0, 0, wd1, ht1);
int run = 1;
while(run) {
XEvent xe;
XNextEvent(dpy, &xe);
switch (xe.type) {
case Expose:
XPutImage(dpy, w, gc, image, 0, 0, 0, 0, wd1, ht1);
XSetForeground(dpy, gc, color.pixel);
XSync(dpy, False);
break;
default:
break;
}
}
XDestroyWindow(dpy, w);
XCloseDisplay(dpy);
// waitKey(0);
return 0;
}

View File

@ -0,0 +1,16 @@
#!/bin/sh
vpn="$(nmcli -t -f name,type connection show --order name --active 2>/dev/null | grep vpn | head -1 | cut -d ':' -f 1)"
case "$1" in
--disconnect)
nmcli con down $vpn
;;
*)
if [ -n "$vpn" ]; then
echo "%{F#94e2d5}󰖂%{F-} $vpn"
else
echo ""
fi
;;
esac

View File

@ -0,0 +1,17 @@
#!/bin/sh
PLAYER="spotify"
if [ "$(pidof "$PLAYER")" != "" ];
then
if [ "$(playerctl --player="$PLAYER" status)" == "Playing" ];
then
playerctl --player="$PLAYER" pause
else
playerctl --player="$PLAYER" play
fi
else
echo ""
fi

View File

@ -0,0 +1,12 @@
#!/bin/sh
PLAYER="spotify"
if [ "$(pidof "$PLAYER")" != "" ];
then
echo "$(playerctl metadata --player="$PLAYER" --format "{{ artist }} - {{ title }}")"
else
echo ""
fi

View File

@ -0,0 +1,571 @@
#!/usr/bin/env python
import sys
import os
# POLYWINS.py
# SETTINGS
name_style = None # options: upper, lower, None
separator = " " # What to separate workspaces with
windowlist_prefix = " " # prefix before listing windows, default is " "
show = "window_classname"
forbidden_classes = "Polybar Conky Gmrun Pavucontrol".casefold().split(" ")
hide_unpopulated_desktops = False
iconize = True
hide_name = True # Controls whether to hide window names when an icon is present
char_limit = 10
max_windows = 10
add_spaces = "true"
resize_increment = 16
resize_offset = resize_increment / 2
use_pywal = False
override_names = [
" %{F#b4befe} %{F-}",
" %{F#b4befe} %{F-}",
" %{F#b4befe} %{F-}"
] # Either a list containing the focused, populated and unfocused versions of workspace name, or False
underline = True
highlight_active_wps = True
if len(sys.argv) <= 2:
try:
if use_pywal is not True:
raise TypeError
with open(os.path.expanduser("~/.cache/wal/colors")) as colors:
colors = tuple(map(lambda x: x[:-1], colors.readlines()))
active_text_color = colors[1]
active_underline = colors[1] if underline is not False else None
inactive_text_color = colors[7]
inactive_underline = colors[7] if underline is not False else None
except (OSError, IndexError, TypeError):
active_text_color = "#cdd6f4"
active_underline = "#EB6572" if underline is not False else None
inactive_text_color = "#9399b2"
inactive_underline = "#C0CAF5" if underline is not False else None
# WINDOW LIST SETUP
active_left = "%{F" + active_text_color + "}"
active_right = "%{F-} "
inactive_left = "%{F" + inactive_text_color + "}"
inactive_right = "%{F-}"
# separator = "%{F" + inactive_text_color + "}" + separator + "%{F-}"
wps_active_left = (
"%{F" + (inactive_text_color if highlight_active_wps is False else active_text_color) + "}"
)
wps_active_right = "%{F-}"
wps_inactive_left = "%{F" + inactive_text_color + "}"
wps_inactive_right = "%{F-}"
if active_underline is not None:
active_left = active_left + "%{+u}%{u" + active_underline + "}"
active_right = "%{-u}" + active_right
wps_active_left = "%{F" + inactive_text_color + "}%{+u}%{u" + inactive_underline + "}"
wps_active_right = "%{-u}%{u}%{F-}"
if inactive_underline is not None:
inactive_left += "%{+u}%{u" + inactive_underline + "}"
inactive_right = "%{-u}" + inactive_right
on_click = " ".join(sys.argv[:2])
monitor = sys.argv[1]
printf = sys.stdout.write
superscript = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹")
class_icons = {
"alacritty": "",
"atom": "",
"vscode": "",
"code": "",
"code-oss": "",
"neovim": "",
"nvim": "",
"nvim-qt": "",
"neovide": "",
"banshee": "",
"blender": "",
"chromium": "",
"google-chrome": "",
"cura": "",
"darktable": "",
"discord": "",
"eclipse": "",
"emacs": "",
"eog": "",
"evince": "",
"evolution": "",
"feh": "",
"file-roller": "",
"filezilla": "",
"firefox": "",
"firefox-esr": "",
"firefoxdev": "",
"navigator": "",
"gimp": "",
"gimp-2.8": "",
"gnome-control-center": "",
"gnome-terminal-server": "",
"prusa-slicer": "",
"gpick": "",
"imv": "",
"insomnia": "",
"java": "",
"jetbrains-idea": "",
"jetbrains-studio": "",
"keepassxc": "",
"keybase": "",
"kicad": "",
"kitty": "",
"st-256color": "",
"st": "",
"libreoffice": "",
"lua5.1": "",
"mpv": "",
"mupdf": "",
"mysql-workbench-bin": "",
"nautilus": "",
"nemo": "",
"openscad": "",
"pavucontrol": "",
"postman": "",
"rhythmbox": "",
"robo3t": "",
"signal": "",
"slack": "",
"slic3r.pl": "",
"spotify": "",
"steam": "",
"subl": "",
"subl3": "",
"sublime_text": "",
"thunar": "",
"thunderbird": "",
"totem": "",
"urxvt": "",
"xfce4-terminal": "",
"xournal": "",
"yelp": "",
"zenity": "",
"zoom": "",
"telegram": "",
"kotatogram": "",
"lunarclient": "",
"viber": "",
}
def get_active_wid():
return os.popen("bspc query -N -n .focused").read()[:-1]
def ensure_len(ID, length=10):
while len(ID) < length - 1:
ID = "0x0" + ID[2:]
return ID
if hide_name:
def to_icon(name):
try:
return class_icons[name.lower()] + " "
except KeyError:
if not name.casefold().startswith("lunar client"):
return name[:char_limit]
else:
return ""
else:
def to_icon(name):
try:
return class_icons[name.lower()] + " " + name[:char_limit]
except KeyError:
if not name.casefold().startswith("lunar client"):
return name[:char_limit]
else:
return ""
def wid_to_name(wid, cache={}):
if not isinstance(wid, list):
if show == "window_class":
out = os.popen(f"xprop -id {wid} WM_CLASS 2> /dev/null").read().split('"')
if show == "window_classname":
out = os.popen(f"xprop -id {wid} WM_CLASS 2> /dev/null").read().split('"')[:-1][-1]
if show == "window_title":
out = os.popen(f"xprop -id {wid} _NET_WM_NAME 2> /dev/null").read().split('"')[1]
if name_style == "upper":
out = out.upper()
elif name_style == "lower":
out = out.lower()
return out
else:
out = {}
cached = cache.keys()
for id in wid:
if id not in cached:
if show == "window_class":
name = os.popen(f"xprop -id {id} WM_CLASS 2> /dev/null").read().split('"')[1]
if show == "window_classname":
name = os.popen(f"xprop -id {id} WM_CLASS 2> /dev/null").read().split('"')[-2]
if show == "window_title":
name = (
os.popen(f"xprop -id {id} _NET_WM_NAME 2> /dev/null").read().split('"')[1]
)
if name.lower() not in forbidden_classes:
if iconize:
name = to_icon(name)
try:
out[name].append(id)
except KeyError:
out[name] = [id]
cache[id] = name
else:
try:
out[cache[id]].append(id)
except KeyError:
out[cache[id]] = [id]
return out, cache
def generate(workspaces, focused_desk, order):
global classcache
focused = os.popen(f"bspc query -N -m {mon_id} -n .focused").read()[
:-1
] # ID of the currently focused window
for workspace_id in order:
if (
len(workspaces[workspace_id][0]) < hide_unpopulated_desktops
and workspace_id != focused_desk
):
continue
printf(
"%{A1:"
+ on_click
+ " switch_workspace "
+ workspace_id
+ ":}"
+ "%{A2:"
+ on_click
+ " swap_workspace "
+ workspace_id
+ ":}"
+ wps_inactive_left
+ (workspaces[workspace_id][1] if override_names is False else (override_names[1] if len(workspaces[workspace_id][0]) else override_names[0]))
if workspace_id != focused_desk
else wps_active_left
+ (workspaces[workspace_id][1] if override_names is False else override_names[2])
)
if len(workspaces[workspace_id][0]) == 0:
#printf(separator + wps_active_right + "%{A}%{A}")
printf( wps_active_right + "%{A}%{A}")
else:
printf(windowlist_prefix + "%{A}%{A}")
windows, classcache = wid_to_name(workspaces[workspace_id][0], classcache)
win_length = len(windows.keys())
for i, win_class in enumerate(windows.keys()):
if i == max_windows:
break
wid = " ".join(windows[win_class])
printf(
"%{A1:"
+ on_click
+ " focus "
+ wid
+ ":}%{A2:"
+ on_click
+ " close "
+ wid
+ ":}%{A3:"
+ on_click
+ " slop_resize "
+ wid
+ ":}%{A4:"
+ on_click
+ " increment_size "
+ wid
+ ":}%{A5:"
+ on_click
+ " decrement_size "
+ wid
+ ":}"
)
printf(active_left if focused in windows[win_class] else inactive_left)
# printf(separator if i == 0 else "")
printf(
win_class.upper()
if name_style == "upper"
else (win_class.lower() if name_style == "lower" else win_class)
)
printf(
#(separator if i < (win_length - 1) else "")
""
if len(windows[win_class]) <= 1
else str(len(windows[win_class])).translate(superscript)
)
printf(active_right + "%{A}%{A}%{A}%{A}%{A}")
printf(wps_active_right)
if len(windows.keys()) > max_windows:
printf(f"+{len(windows.keys())-max_windows}")
def main():
if len(sys.argv) <= 2:
focused = ""
command = os.popen(
"bspc subscribe desktop_focus desktop_add desktop_rename desktop_remove desktop_swap node_add node_remove node_swap node_transfer node_focus"
)
global mon_id
mon_id = os.popen(f"bspc query -M -m '{monitor}'").read()[:-1]
workspace_order = []
workspaces = {} # workspace ID and name pairs
for workspace in [
workspace[:-1] for workspace in os.popen(f"bspc query -D -m '{mon_id}'").readlines()
]:
workspace_order.append(workspace)
workspaces[workspace] = (
[
window[:-1]
for window in os.popen(f"bspc query -N -d {workspace} -n .window").readlines()
],
os.popen(f"bspc query -D -d {workspace} --names").read()[:-1],
)
focused_workspace = os.popen(f"bspc query -D -m {mon_id} -d .focused").read()[
:-1
] # ID of the currently focused workspace
global classcache
classcache = {}
try:
generate(
workspaces,
focused_workspace,
workspace_order,
)
printf("\n")
sys.stdout.flush()
except:
workspace_order = []
workspaces = {} # workspace ID and name pairs
for workspace in [
workspace[:-1] for workspace in os.popen(f"bspc query -D -m '{mon_id}'").readlines()
]:
workspace_order.append(workspace)
workspaces[workspace] = (
[
window[:-1]
for window in os.popen(
f"bspc query -N -d {workspace} -n .window"
).readlines()
],
os.popen(f"bspc query -D -d {workspace} --names").read()[:-1],
)
focused_workspace = os.popen(f"bspc query -D -m {mon_id} -d .focused").read()[
:-1
] # ID of the currently focused workspace
while True:
update = command.readline()[:-1]
if (
mon_id in update
or update.startswith("node_remove")
or update.startswith("node_focus")
or update.startswith("desktop_focus")
):
if update.startswith("node"):
update = update[5:].split(" ")
if update[0] == "focus":
# global focused
# focused = update[3]
pass
elif update[0] == "add":
try:
workspaces[update[2]][0].append(update[4])
except KeyError:
pass
elif update[0] == "remove":
classcache.pop(update[3], None)
try:
workspaces[update[2]][0].remove(update[3])
except KeyError:
continue
elif update[0] == "swap":
if update[1] == mon_id:
workspaces[update[2]][0].remove(update[3])
workspaces[update[2]][0].append(update[6])
if update[4] == mon_id:
workspaces[update[5]][0].remove(update[6])
workspaces[update[5]][0].append(update[3])
else:
if update[1] == mon_id:
workspaces[update[2]][0].remove(update[3])
if update[4] == mon_id:
workspaces[update[5]][0].append(update[3])
else:
update = update[8:].split(" ")
if update[0] == "focus":
focused_workspace = update[-1]
elif update[0] == "add":
workspaces[update[2]] = ([], update[-1])
elif update[0] == "rename":
workspaces[update[2]] = (
[
window[:-1]
for window in os.popen(f"bspc query -N -d {update[2]}").readlines()
],
update[-1],
)
elif update[0] == "remove":
workspaces.pop(update[-1], None)
else:
if update[1] == mon_id and update[3] == mon_id:
index = workspace_order.index(update[4])
workspace_order[workspace_order.index(update[2])] = update[4]
workspace_order[index] = update[2]
else:
workspace_order = []
workspaces = {} # workspace ID and name pairs
for workspace in [
workspace[:-1]
for workspace in os.popen(
f"bspc query -D -m '{mon_id}'"
).readlines()
]:
workspace_order.append(workspace)
workspaces[workspace] = (
[
window[:-1]
for window in os.popen(
f"bspc query -N -d {workspace} -n .window"
).readlines()
],
os.popen(f"bspc query -D -d {workspace} --names").read()[:-1],
)
focused_workspace = os.popen(
f"bspc query -D -m {mon_id} -d .focused"
).read()[
:-1
] # ID of the currently focused workspace
try:
generate(
workspaces,
focused_workspace,
workspace_order,
)
printf("\n")
sys.stdout.flush()
except:
workspace_order = []
workspaces = {} # workspace ID and name pairs
for workspace in [
workspace[:-1]
for workspace in os.popen(f"bspc query -D -m '{mon_id}'").readlines()
]:
workspace_order.append(workspace)
workspaces[workspace] = (
[
window[:-1]
for window in os.popen(
f"bspc query -N -d {workspace} -n .window"
).readlines()
],
os.popen(f"bspc query -D -d {workspace} --names").read()[:-1],
)
focused_workspace = os.popen(
f"bspc query -D -m {mon_id} -d .focused"
).read()[
:-1
] # ID of the currently focused workspace
command = os.popen(
"bspc subscribe desktop_focus desktop_add desktop_rename desktop_remove desktop_swap node_add node_remove node_swap node_transfer node_focus"
)
else:
exec(sys.argv[2] + "(" + "'" + " ".join(sys.argv[3:]) + "')")
def slop_resize(window):
window = sorted(window.split(" "))
try:
window = window[window.index(get_active_wid())]
except ValueError:
window = window[0]
os.system(
f"""bash -c 'bspc node "{window}" -g hidden=off &
bspc node "{window}" -g hidden=off &
xdo hide "{window}" &
pos="$(slop -b 2 -c 0.75,0.8,0.96.1 -f 0,%x,%y,%w,%h)"
xdo show "{window}"
bspc node "{window}" -t floating
bspc node "{window}" -d focused
wmctrl -ir "{window}" -e "$pos"
xdo activate "{window}"'"""
)
def close(window):
window = sorted(window.split(" "))
try:
window = window[window.index(get_active_wid())]
except ValueError:
window = window[0]
os.system("xdo close " + window)
def focus(window):
window = sorted(window.split(" "))
try:
window = window[(window.index(get_active_wid()) + 1) % len(window)]
os.system("bspc node " + window + " -g hidden=off")
# os.system("bspc node -s " + window)
os.system("bspc node -f " + window)
except ValueError:
window = window[0]
os.system("bspc node " + window + " -g hidden=off")
os.system("bspc node -f " + window)
os.system("wmctrl -ia " + window)
def increment_size(window):
window = sorted(window.split(" "))
try:
window = window[window.index(get_active_wid())]
except ValueError:
window = window[0]
os.system(f"xdo move -x -{resize_offset} -y -{resize_offset} {window}")
os.system(f"xdo resize -w +{resize_increment} -h +{resize_increment} {window}")
def decrement_size(window):
window = sorted(window.split(" "))
try:
window = window[window.index(get_active_wid())]
except ValueError:
window = window[0]
os.system(f"bspc node -t floating {window}")
os.system(f"xdo move -x +{resize_offset} -y +{resize_offset} {window}")
os.system(f"xdo resize -w -{resize_increment} -h -{resize_increment} {window}")
def switch_workspace(workspace):
os.system(f"bspc desktop -f {workspace}")
def swap_workspace(workspace):
os.system(f"bspc desktop -s {workspace}")
if __name__ == "__main__":
main()

View File

@ -0,0 +1,26 @@
#!/bin/bash
rofication_print() {
status=$(rofication-status)
if [ $status = '?' ]; then
printf $status
elif [ $status -gt 0 ]; then
printf " %s" "$status"
else
printf ""
fi
printf '\n'
}
rofication_show() {
rofication-gui
}
case "$1" in
--show)
rofication_show
;;
*)
rofication_print
;;
esac

View File

@ -0,0 +1,60 @@
#!/bin/sh
bluetooth_print() {
bluetoothctl | while read -r; do
if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then
printf ''
devices_paired=$(bluetoothctl devices Paired | grep Device | cut -d ' ' -f 2)
counter=0
for device in $devices_paired; do
device_info=$(bluetoothctl info "$device")
if echo "$device_info" | grep -q "Connected: yes"; then
device_alias=$(echo "$device_info" | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
counter=$((counter + 1))
fi
done
printf '\n'
else
echo ""
fi
done
}
bluetooth_toggle() {
if bluetoothctl show | grep -q "Powered: no"; then
bluetoothctl power on >> /dev/null
sleep 1
devices_paired=$(bluetoothctl devices Paired | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl connect "$line" >> /dev/null
done
else
devices_paired=$(bluetoothctl devices Paired | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl disconnect "$line" >> /dev/null
done
bluetoothctl power off >> /dev/null
fi
}
case "$1" in
--toggle)
bluetooth_toggle
;;
*)
bluetooth_print
;;
esac

View File

@ -0,0 +1,22 @@
#!/bin/sh
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$((updates_arch + updates_aur))
if [ "$updates" -gt 0 ]; then
echo "󰏔 $updates"
else
echo "󰍕"
fi

17
home/config/polybar/test.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
wlist=$(wmctrl -lpx)
IFS=$'\n' read -ra ADDR -d $'\0' <<< "$wlist"
for win in "${ADDR[@]}"
do
id=$win | awk '{print $1}'
desktop=$win | awk '{print $2}'
pid=$win | awk '{print $3}'
name=$win | awk '{print $4}'
host=$win | awk '{print $5}'
title=$win | awk '{print $6}'
echo $win | awk '{print $6}'
done

View File

@ -0,0 +1,47 @@
[colors]
bg = #181825
bg-alt = #20212C
fg = #acb0d0
fg-alt = #9399b2
trans = #00000000
shade-1 = #11111b
shade-2 = #1e1e2e
shade-3 = #313244
shade-4 = #45475a
shade-5 = #585b70
#https://catppuccin.ryanccn.dev/palette
rosewater = #f5e0dc
flamingo = #f2cdcd
pink = #f5c2e7
mauve = #cba6f7
red = #f38ba8
maroon = #eba0ac
peach = #fab387
yellow = #f9e2af
green = #a6e3a1
teal = #94e2d5
sky = #89dceb
sapphire = #74c7ec
blue = #89b4fa
lavender = #b4befe
text = #cdd6f4
subtext1 = #bac2de
subtext0 = #a6adc8
overlay0 = #6c7086
overlay1 = #7f849c
overlay2 = #9399b2
surface0 = #313244
surface1 = #45475a
surface2 = #585b70
base = #1e1e2e
mantle = #181825
crust = #11111b

View File

@ -0,0 +1,82 @@
/**
* @author Dominik Kressler
* @package rofi-archer
* @version 1.0.0
**/
* {
background: {@theme_bg_color};
background-alt: {@theme_unfocused_fg_color}80;
foreground: {@theme_text_color};
selected: #4c566a;
border: {@borders};
active: #98C37988;
urgent: var(error-color);
/*https://catppuccin.ryanccn.dev/palette*/
rosewater: #f5e0dc;
flamingo: #f2cdcd;
pink: #f5c2e7;
mauve: #cba6f7;
red: #f38ba8;
maroon: #eba0ac;
peach: #fab387;
yellow: #f9e2af;
green: #a6e3a1;
teal: #94e2d5;
sky: #89dceb;
sapphire: #74c7ec;
blue: #89b4fa;
lavender: #b4befe;
text: {@theme_text_color};
subtext1: {@theme_text_color}80;
subtext0: #a6adc8;
overlay0: #6c7086;
overlay1: #7f849c;
overlay2: #9399b2;
surface0: #313244;
surface1: #45475a;
surface2: #585b70;
base: #1e1e2e;
mantle: #181825;
crust: #11111b;
/* GTK THEME VARS*/
theme-fg-color: {@theme_fg_color};
theme-text-color: {@theme_text_color};
theme-bg-color: {@theme_bg_color};
theme-base-color: {@theme_base_color};
theme-bg-color-shade-1: {@theme_bg_color}EF;
theme-bg-color-shade-2: {@theme_bg_color}D8;
theme-bg-color-shade-3: {@theme_bg_color}C9;
theme-selected-bg-color: {@theme_selected_bg_color};
theme-selected-fg-color: {@theme_selected_fg_color};
theme-unfocused-fg-color: {@theme_unfocused_fg_color};
theme-unfocused-text-color: {@theme_unfocused_text_color};
theme-unfocused-bg-color: {@theme_unfocused_bg_color};
theme-unfocused-base-color: {@theme_unfocused_base_color};
theme-unfocused-selected-bg-color: {@theme_unfocused_selected_bg_color};
theme-unfocused-selected-fg-color: {@theme_unfocused_selected_fg_color};
unfocused-insensitive-color: {@unfocused_insensitive_color};
borders: {@theme_selected_bg_color}30;
unfocused-borders: {@unfocused_borders};
warning-color: {@warning_color};
error-color: {@error_color};
success-color: {@success_color};
}

View File

@ -0,0 +1,13 @@
#!/usr/bin/bash
# choose pulseaudio sink via rofi or dmenu
# changes default sink and moves all streams to that sink
#https://gist.github.com/Nervengift/844a597104631c36513c?permalink_comment_id=1826282
sink=$(ponymix -t sink list|awk '/^sink/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}'|rofi -dmenu -theme '~/.config/rofi/volume/volume.rasi' -mesg '󱡫 Sink Switcher' -p 'pulseaudio sink:' -location 6 -width 100|grep -Po '[0-9]+(?=:)') &&
ponymix set-default -d $sink &&
for input in $(ponymix list -t sink-input|grep -Po '[0-9]+(?=:)');do
echo "$input -> $sink"
ponymix -t sink-input -d $input move $sink
done

View File

@ -0,0 +1,295 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "";
show-icons: false;
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
}
/*****----- Global Properties -----*****/
@import "../colors.rasi"
@import "../fonts.rasi"
* {
border-colour: var(border);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 1px solid;
border-radius: 10px;
border-color: @border-colour;
cursor: "default";
/* Backgroud Colors */
background-color: @background-colour;
/* Backgroud Image */
//background-image: url("/path/to/image.png", none);
/* Simple Linear Gradient */
//background-image: linear-gradient(red, orange, pink, purple);
/* Directional Linear Gradient */
//background-image: linear-gradient(to bottom, pink, yellow, magenta);
/* Angle Linear Gradient */
//background-image: linear-gradient(45, cyan, purple, indigo);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: false;
spacing: 10px;
margin: 0;
padding: 20px 0px 0;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px 0px 15px;
expand: false;
font: "MonarchOS 14";
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(normal-background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

View File

@ -0,0 +1,317 @@
#!/usr/bin/env bash
# __ _ _ _ _ _ _
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
#
# Author: Nick Clyde (clydedroid)
#
# A script that generates a rofi menu that uses bluetoothctl to
# connect to bluetooth devices and display status info.
#
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
#
# Depends on:
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
# Constants
divider="---------"
goback="Back"
# Checks if bluetooth controller is powered on
power_on() {
if bluetoothctl show | grep -q "Powered: yes"; then
return 0
else
return 1
fi
}
# Toggles power state
toggle_power() {
if power_on; then
bluetoothctl power off
show_menu
else
if rfkill list bluetooth | grep -q 'blocked: yes'; then
rfkill unblock bluetooth && sleep 3
fi
bluetoothctl power on
show_menu
fi
}
# Checks if controller is scanning for new devices
scan_on() {
if bluetoothctl show | grep -q "Discovering: yes"; then
echo "Scan: on"
return 0
else
echo "Scan: off"
return 1
fi
}
# Toggles scanning state
toggle_scan() {
if scan_on; then
kill $(pgrep -f "bluetoothctl scan on")
bluetoothctl scan off
show_menu
else
bluetoothctl scan on &
echo "Scanning..."
sleep 5
show_menu
fi
}
# Checks if controller is able to pair to devices
pairable_on() {
if bluetoothctl show | grep -q "Pairable: yes"; then
echo "Pairable: on"
return 0
else
echo "Pairable: off"
return 1
fi
}
# Toggles pairable state
toggle_pairable() {
if pairable_on; then
bluetoothctl pairable off
show_menu
else
bluetoothctl pairable on
show_menu
fi
}
# Checks if controller is discoverable by other devices
discoverable_on() {
if bluetoothctl show | grep -q "Discoverable: yes"; then
echo "Discoverable: on"
return 0
else
echo "Discoverable: off"
return 1
fi
}
# Toggles discoverable state
toggle_discoverable() {
if discoverable_on; then
bluetoothctl discoverable off
show_menu
else
bluetoothctl discoverable on
show_menu
fi
}
# Checks if a device is connected
device_connected() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Connected: yes"; then
return 0
else
return 1
fi
}
# Toggles device connection
toggle_connection() {
if device_connected "$1"; then
bluetoothctl disconnect "$1"
device_menu "$device"
else
bluetoothctl connect "$1"
device_menu "$device"
fi
}
# Checks if a device is paired
device_paired() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Paired: yes"; then
echo "Paired: yes"
return 0
else
echo "Paired: no"
return 1
fi
}
# Toggles device paired state
toggle_paired() {
if device_paired "$1"; then
bluetoothctl remove "$1"
device_menu "$device"
else
bluetoothctl pair "$1"
device_menu "$device"
fi
}
# Checks if a device is trusted
device_trusted() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Trusted: yes"; then
echo "Trusted: yes"
return 0
else
echo "Trusted: no"
return 1
fi
}
# Toggles device connection
toggle_trust() {
if device_trusted "$1"; then
bluetoothctl untrust "$1"
device_menu "$device"
else
bluetoothctl trust "$1"
device_menu "$device"
fi
}
# Prints a short string with the current bluetooth status
# Useful for status bars like polybar, etc.
print_status() {
if power_on; then
printf ''
paired_devices_cmd="devices Paired"
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
paired_devices_cmd="paired-devices"
fi
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
counter=0
for device in "${paired_devices[@]}"; do
if device_connected "$device"; then
device_alias=$(bluetoothctl info "$device" | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
((counter++))
fi
done
printf "\n"
else
echo ""
fi
}
# A submenu for a specific device that allows connecting, pairing, and trusting
device_menu() {
device=$1
# Get device name and mac address
device_name=$(echo "$device" | cut -d ' ' -f 3-)
mac=$(echo "$device" | cut -d ' ' -f 2)
# Build options
if device_connected "$mac"; then
connected="Connected: yes"
else
connected="Connected: no"
fi
paired=$(device_paired "$mac")
trusted=$(device_trusted "$mac")
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
# Open rofi menu, read chosen option
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
# Match chosen option to command
case "$chosen" in
"" | "$divider")
echo "No option chosen."
;;
"$connected")
toggle_connection "$mac"
;;
"$paired")
toggle_paired "$mac"
;;
"$trusted")
toggle_trust "$mac"
;;
"$goback")
show_menu
;;
esac
}
# Opens a rofi menu with current bluetooth status and options to connect
show_menu() {
# Get menu options
if power_on; then
power="Power: on"
# Human-readable names of devices, one per line
# If scan is off, will only list paired devices
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
# Get controller flags
scan=$(scan_on)
pairable=$(pairable_on)
discoverable=$(discoverable_on)
# Options passed to rofi
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
else
power="Power: off"
options="$power\nExit"
fi
# Open rofi menu, read chosen option
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
# Match chosen option to command
case "$chosen" in
"" | "$divider")
echo "No option chosen."
;;
"$power")
toggle_power
;;
"$scan")
toggle_scan
;;
"$discoverable")
toggle_discoverable
;;
"$pairable")
toggle_pairable
;;
*)
device=$(bluetoothctl devices | grep "$chosen")
# Open a submenu if a device is selected
if [[ $device ]]; then device_menu "$device"; fi
;;
esac
}
# Rofi command to pipe into, can add any options here
rofi_command="rofi -dmenu $* -p -theme $HOME/.config/rofi/bluetooth/bluetooth.rasi -mesg -Bluetooth-Control"
case "$1" in
--status)
print_status
;;
*)
show_menu
;;
esac

View File

@ -0,0 +1,157 @@
* {
on: #98B3C8;
off: #CC9498;
}
/*****----- Global Properties -----*****/
@import "../colors.rasi"
@import "../fonts.rasi"
configuration {
show-icons: false;
icon-theme: "Papirus";
display-drun: ":";
drun-display-format: "{name}";
threads: 0;
scroll-method: 0;
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border: 0px;
border-radius: 0px;
border-color: @selected;
width: 384px;
location: center;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 4px 4px 6px 6px;
background-color: @background;
text-color: @foreground;
}
textbox-prompt-colon {
expand: false;
str: "";
background-color: @background;
text-color: @urgent;
padding: 5px 0px 0px 4px;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @selected;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
position: center;
}
entry {
background-color: @background;
text-color: @foreground;
placeholder-color: @foreground;
expand: true;
horizontal-align: 0;
placeholder: "Search";
blink: true;
padding: 4px 0px 0px 0px;
}
case-indicator {
background-color: @background;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 9;
lines: 7;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px 5px 5px 5px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: horizontal;
border: 0px;
border-radius: 0px;
border-color: @selected;
padding: 5px 5px 5px 5px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0;
margin: 2px 0px 2px 2px;
}
element selected {
background-color: @selected;
text-color: @background;
border: 0px;
border-radius: 0px;
border-color: @selected;
}
element.active,
element.selected.urgent {
background-color: @background-alt;
text-color: @background;
border-color: @background-alt;
}
element.selected.urgent {
border-color: @urgent;
}
element.urgent,
element.selected.active {
background-color: @background;
text-color: @foreground;
border-color: @background;
}
element.selected.active {
border-color: @selected;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

View File

@ -0,0 +1,95 @@
#!/usr/bin/env bash
DIR=$(dirname $PWD)
current_day=$(date +"%e")
current_month=$(date +"%m")
current_year=$(date +"%Y")
month=$(date +"%-m")
year=$(date +"%Y")
previous_month="◀"
next_month="▶"
last_selected_option=""
format_calendar () {
echo "$1" \
| sed -E 's/([[:alpha:]])__/\1\n/g' \
| sed -E 's/___([[:digit:]])/.\n\1/g' \
| sed -e 's/___/\n./g' \
| sed -e 's/__/\n/g' \
| sed -e 's/_/\n/g'
}
print_month() {
calendar="$(cal -v -- $1 $2 | tail -n +2 | sed -e 's/ /_/g')"
echo "$(format_calendar "$calendar")"
}
find_day_index() {
index=0
while IFS=' ' read -ra arr; do
for i in "${arr[@]}"; do
if [[ "$i" == "$2" ]]; then
echo "$index"
break
fi
((index++))
done
done <<< "$1"
}
calendar_menu() {
calendar_header=$(cal -v -- $month $year | head -n 1)
month_page="$(print_month $month $year)"
calendar_body="\n\n\n$previous_month\n\n\n\n$month_page\n\n\n\n$next_month\n\n\n"
previous_month_index="3"
next_month_index="59"
calendar_body_column="7"
urgent="-u $previous_month_index,$next_month_index"
active=""
selected_row=""
if [[ "$(echo $current_month | bc) $current_year" == "$(echo $month | bc) $year" ]]; then
current_day_index=$(($(find_day_index "$month_page" $current_day) + $calendar_body_column))
active="-a $current_day_index"
selected_row="-selected-row $current_day_index"
fi
if [[ $last_selected_option == $previous_month ]]; then
selected_row="-selected-row $previous_month_index"
fi
if [[ $last_selected_option == $next_month ]]; then
selected_row="-selected-row $next_month_index"
fi
echo -e "$calendar_body" | rofi -dmenu \
-theme $HOME/.config/rofi/calendar/rofi-calendar.rasi \
-p "$calendar_header" $urgent $active $selected_row
}
while [[ true ]]; do
selected=$(calendar_menu)
last_selected_option="$selected"
case $selected in
$previous_month)
((month--))
if [[ $month -lt 1 ]]; then
month=12
((year--))
fi
;;
$next_month)
((month++))
if [[ $month -gt 12 ]]; then
month=1
((year++))
fi
;;
*)
break
;;
esac
done

View File

@ -0,0 +1,82 @@
/**
* @author Dominik Kressler
* @package rofi-archer
* @version 1.0.0
**/
* {
background: #1e1e2e;
background-alt: #ffffff80;
foreground: #ffffff;
selected: #4c566a;
border: #ffffff;
active: #98C37988;
urgent: var(error-color);
/*https://catppuccin.ryanccn.dev/palette*/
rosewater: #f5e0dc;
flamingo: #f2cdcd;
pink: #f5c2e7;
mauve: #cba6f7;
red: #f38ba8;
maroon: #eba0ac;
peach: #fab387;
yellow: #f9e2af;
green: #a6e3a1;
teal: #94e2d5;
sky: #89dceb;
sapphire: #74c7ec;
blue: #89b4fa;
lavender: #b4befe;
text: #ffffff;
subtext1: #ffffff80;
subtext0: #a6adc8;
overlay0: #6c7086;
overlay1: #7f849c;
overlay2: #9399b2;
surface0: #313244;
surface1: #45475a;
surface2: #585b70;
base: #1e1e2e;
mantle: #181825;
crust: #11111b;
/* GTK THEME VARS*/
theme-fg-color: #ffffff;
theme-text-color: #ffffff;
theme-bg-color: #1e1e2e;
theme-base-color: #1e1e2e;
theme-bg-color-shade-1: #1e1e2eEF;
theme-bg-color-shade-2: #1e1e2eD8;
theme-bg-color-shade-3: #1e1e2eC9;
theme-selected-bg-color: #b4befe;
theme-selected-fg-color: #000000;
theme-unfocused-fg-color: #ffffff;
theme-unfocused-text-color: #ffffff;
theme-unfocused-bg-color: #1e1e2e;
theme-unfocused-base-color: #1e1e2e;
theme-unfocused-selected-bg-color: #b4befe;
theme-unfocused-selected-fg-color: #000000;
unfocused-insensitive-color: #ffffff;
borders: #b4befe30;
unfocused-borders: #ffffff;
warning-color: #fbc02d;
error-color: #f44336;
success-color: #66bb6a;
}

View File

@ -0,0 +1,301 @@
/**
*
* 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: "";
display-run: "";
display-filebrowser: "";
display-window: "";
display-combi: "練";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
matching: "fuzzy";
sidebar-mode: true;
threads: 0;
scroll-method: 0;
}
/*****----- Global Properties -----*****/
@import "colors.rasi"
* {
border-colour: var(borders);
handle-colour: var(selected);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
font: "Hack Nerd Font 10";
border-radius: 10px;
frame-border: 2px solid;
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 60px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border-radius: var(border-radius);
border: var(frame-border);
border-color: var(borders);
cursor: "default";
background-color: @theme-bg-color;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0;
padding: 20px 0px 0;
border: 0px solid;
border-radius: 0px;
border-color: @borders;
background-color: transparent;
text-color: var(theme-text-color);
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 3px 0px 0;
expand: false;
//font: "MonarchOS 14";
//str: "";
str: "󰣇";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @borders;
background-color: transparent;
text-color: var(theme-text-color);
cursor: "default";
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @borders;
background-color: transparent;
text-color: var(theme-text-color);
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(theme-selected-bg-color);
text-color: var(theme-selected-fg-color);
}
element selected.urgent {
background-color: var(theme-selected-bg-color);
text-color: var(normal-background);
}
element selected.active {
background-color: var(error-color);
text-color: var(normal-background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @borders;
background-color: transparent;
text-color: var(theme-text-color);
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @borders;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @borders;
background-color: transparent;
text-color: var(theme-text-color);
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @borders;
background-color: @alternate-background;
text-color: var(theme-text-color);
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: var(theme-text-color);
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @borders;
background-color: @background;
text-color: var(theme-text-color);
}

View File

@ -0,0 +1,290 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser,window";
show-icons: true;
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "../config.rasi"
@import "../colors.rasi"
* {
border-colour: var(border);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
cursor: "default";
/* Backgroud Colors */
background-color: @background-colour;
/* Backgroud Image */
//background-image: url("/path/to/image.png", none);
/* Simple Linear Gradient */
//background-image: linear-gradient(red, orange, pink, purple);
/* Directional Linear Gradient */
//background-image: linear-gradient(to bottom, pink, yellow, magenta);
/* Angle Linear Gradient */
//background-image: linear-gradient(45, cyan, purple, indigo);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0;
padding: 20px 0px 0;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px 0px 15px;
expand: false;
font: "MonarchOS 14";
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 0;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(normal-background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 0;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

View File

@ -0,0 +1,81 @@
#!/usr/bin/env bash
# author: unknown
# sentby: MoreChannelNoise (https://www.youtube.com/user/MoreChannelNoise)
# editby: gotbletu (https://www.youtube.com/user/gotbletu)
# demo: https://www.youtube.com/watch?v=kxJClZIXSnM
# info: this is a script to launch other rofi scripts,
# saves us the trouble of binding multiple hotkeys for each script,
# when we can just use one hotkey for everything.
declare -A LABELS
declare -A COMMANDS
###
# List of defined 'bangs'
COMMANDS["󰓅"]="pkexec auto-cpufreq --force=performance"
LABELS["󰓅"]="Performance"
COMMANDS["󰌪"]='pkexec auto-cpufreq --force=powersave'
LABELS["󰌪"]="Powersave"
COMMANDS[""]='pkexec auto-cpufreq --force=reset'
LABELS[""]="Reset"
################################################################################
# do not edit below
################################################################################
##
# Generate menu
##
function print_menu()
{
for key in ${!LABELS[@]}
do
# echo "$key ${LABELS}"
echo "$key ${LABELS[$key]}"
# my top version just shows the first field in labels row, not two words side by side
done
}
##
# Show rofi.
##
function start()
{
# print_menu | rofi -dmenu -p "?=>"
print_menu | sort | rofi -theme ~/.config/rofi/cpugov/rofi-cpugov.rasi -show "CPU Mode" -dmenu -mesg " CPU Mode" -i -p "rofi-bangs: "
}
# Run it
value="$(start)"
# Split input.
# grab upto first space.
choice=${value%%\ *}
# graph remainder, minus space.
input=${value:$((${#choice}+1))}
##
# Cancelled? bail out
##
if test -z ${choice}
then
exit
fi
# check if choice exists
if test ${COMMANDS[$choice]+isset}
then
# Execute the choice
#eval echo "Executing: ${COMMANDS[$choice]}"
eval ${COMMANDS[$choice]}
dunstify --replace 553 -i "/usr/share/icons/zafiro-dark/devices/48/cpu.svg" "CPU Mode" "Set to $choice ${LABELS[$choice]}"
else
eval $choice | rofi
# prefer my above so I can use this same script to also launch apps like geany or leafpad etc (DK)
# echo "Unknown command: ${choice}" | rofi -dmenu -p "error"
fi

View File

@ -0,0 +1,280 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
@import "../config.rasi"
@import "../colors.rasi"
/*****----- Configuration -----*****/
configuration {
show-icons: true;
display-emoji: "";
}
/*****----- Global Properties -----*****/
* {
border-colour: var(border);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0;
padding: 20px 0px 0;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px 0px 15px;
expand: false;
font: "MonarchOS 14";
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 4;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: true;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
background-color: transparent;
text-color: @subtext1;
cursor: "default";
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 0px;
margin: 0px;
padding: 5px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @text;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(normal-background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 0;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

View File

@ -0,0 +1,12 @@
#!/bin/sh
FILE="$HOME/.config/rofi/emojis/emojis.txt"
if [ "$@" ]
then
smiley=$(echo $@ | cut -d' ' -f1)
echo -n "$smiley" | xsel -bi
exit 0
fi
cat $FILE

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
#! /usr/bin/env python3
# https://github.com/Git-Fal7/gtk-rofi/
# Taken from MATE-HUD github.com/ubuntu-mate/mate-hud
# Used for rofi css
# Usage
# ./file_gtk_style.py [input file] > [output file]
# examples
# background-color: {@theme_bg_color}
# see the array below for list of style context to use
import sys
if len(sys.argv)<2:
sys.exit(1)
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gio, GLib, Gtk
#Converts from rgba <GTK R, G, B> to hex #RRGGBB
def rgba_to_hex(color):
return "#{0:02x}{1:02x}{2:02x}".format( int(color.red * 255), int(color.green * 255), int(color.blue * 255))
window = Gtk.Window()
style_context = window.get_style_context()
#List of style contexts
lists = [
#Foreground
'theme_fg_color', 'theme_selected_fg_color', 'theme_fg_color',
'warning_fg_color', 'info_fg_color',
#Background
'theme_bg_color', 'theme_selected_bg_color', 'error_bg_color',
'warning_bg_color', 'info_bg_color',
#Others
'theme_unfocused_fg_color', 'theme_text_color',
'theme_unfocused_text_color',
'theme_base_color',
'theme_unfocused_fg_color',
'theme_unfocused_text_color',
'theme_unfocused_bg_color',
'theme_unfocused_base_color',
'theme_unfocused_selected_bg_color',
'theme_unfocused_selected_fg_color',
'unfocused_insensitive_color',
'borders',
'unfocused_borders',
'warning_color',
'error_color',
'success_color'
]
with open(sys.argv[1]) as f:
file=f.read()
for style in lists:
file=file.replace("{@" + style + "}", rgba_to_hex(style_context.lookup_color(style)[1]))
print(file)

View File

@ -0,0 +1 @@
GTK_THEME=Catppuccin-Mocha-Standard-Lavender-Dark

View File

@ -0,0 +1,291 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser,window";
show-icons: true;
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "../config.rasi"
@import "../colors.rasi"
@import "../fonts.rasi"
* {
border-colour: var(border);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
cursor: "default";
/* Backgroud Colors */
background-color: @background-colour;
/* Backgroud Image */
//background-image: url("/path/to/image.png", none);
/* Simple Linear Gradient */
//background-image: linear-gradient(red, orange, pink, purple);
/* Directional Linear Gradient */
//background-image: linear-gradient(to bottom, pink, yellow, magenta);
/* Angle Linear Gradient */
//background-image: linear-gradient(45, cyan, purple, indigo);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0;
padding: 20px 0px 0;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px 0px 15px;
expand: false;
font: "MonarchOS 14";
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 0;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(normal-background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 0;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

View File

@ -0,0 +1,151 @@
#!/usr/bin/env bash
# author: unknown
# sentby: MoreChannelNoise (https://www.youtube.com/user/MoreChannelNoise)
# editby: gotbletu (https://www.youtube.com/user/gotbletu)
# demo: https://www.youtube.com/watch?v=kxJClZIXSnM
# info: this is a script to launch other rofi scripts,
# saves us the trouble of binding multiple hotkeys for each script,
# when we can just use one hotkey for everything.
declare -A LABELS
declare -A COMMANDS
###
# List of defined 'bangs'
# launch programs
# COMMANDS["apps"]="rofi -combi-modi window,drun -show combi"
# LABELS["apps"]=""
# open bookmarks
# COMMANDS["bookmarks"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-bookmarks.sh"
# LABELS["bookmarks"]=""
# search local files
COMMANDS[""]="~/.config/rofi/locate/rofi-locate.sh"
LABELS[""]="Locate"
# open custom web searches
# COMMANDS["websearch"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-websearch.sh"
# LABELS["websearch"]=""
# show clipboard history
# source: https://bitbucket.org/pandozer/rofi-clipboard-manager/overview
# COMMANDS["clipboard"]='rofi -modi "clipboard:~/.bin/rofi-clipboard-manager/mclip.py menu" -show clipboard && ~/.bin/rofi-clipboard-manager/mclip.py paste'
# LABELS["clipboard"]=""
# references --------------------------
# COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""
# LABELS[";sr2"]=""
# COMMANDS[";piratebay"]="chromium --disk-cache-dir=/tmp/cache http://thepiratebay.org/search/\" \${input}\""
# LABELS[";piratebay"]=""
# COMMANDS[".bin"]="spacefm -r '/home/dka/bin'"
# LABELS[".bin"]=".bin"
# COMMANDS["#screenshot"]='/home/dka/bin/screenshot-scripts/myscreenshot.sh'
# LABELS["#screenshot"]="screenshot"
# greenclip clipboard history
# source: https://github.com/erebe/greenclip
COMMANDS[""]='rofi -modi "clipboard:greenclip print" -show Clipboard'
LABELS[""]="Clipboard"
COMMANDS["󰖂"]='~/.config/rofi/nm-vpn/nm-vpn.sh'
LABELS["󰖂"]='VPN Connection Manager'
COMMANDS["󰗅"]='~/.config/rofi/volume/volume.sh'
LABELS["󰗅"]='Sound Manager'
COMMANDS[""]='~/.config/rofi/shortcuts/shortcuts.sh'
LABELS[""]='Hotkey List'
COMMANDS[""]='wlogout'
LABELS[""]='Session Menu'
COMMANDS["󰍹"]='wdisplays'
LABELS["󰍹"]='Display Setup'
COMMANDS[""]='nwg-look'
LABELS[""]='Appearance Settings'
COMMANDS["󱘆"]='noisetorch'
LABELS["󱘆"]='Audio Noise Reduction'
COMMANDS["󰋋"]='/home/dom/.local/share/headset-charge-indicator/headset-charge-indicator.py &'
LABELS["󰋋"]='Headset Control'
COMMANDS[""]='~/.config/rofi/bluetooth/bluetooth.sh'
LABELS[""]='Bluetooth Control'
COMMANDS["󰛳"]='nm-applet --indicator &'
LABELS["󰛳"]='Networker Manager'
COMMANDS["󰴱"]='hyprpicker -f hex -a'
LABELS["󰴱"]='Color Picker'
COMMANDS["󰚞"]='font-manager'
LABELS["󰚞"]='Font Manager'
COMMANDS["󱨑"]='gufw'
LABELS["󱨑"]='Firewall Settings'
COMMANDS[""]='stacer'
LABELS[" "]='System Maintenance'
################################################################################
# do not edit below
################################################################################
##
# Generate menu
##
function print_menu()
{
for key in ${!LABELS[@]}
do
# echo "$key ${LABELS}"
echo "$key ${LABELS[$key]}"
# my top version just shows the first field in labels row, not two words side by side
done
}
##
# Show rofi.
##
function start()
{
# print_menu | rofi -dmenu -p "?=>"
print_menu | sort | rofi -show "Tools" -dmenu -mesg " Tools" -i -p "rofi-bangs: "
}
# Run it
value="$(start)"
# Split input.
# grab upto first space.
choice=${value%%\ *}
# graph remainder, minus space.
input=${value:$((${#choice}+1))}
##
# Cancelled? bail out
##
if test -z ${choice}
then
exit
fi
# check if choice exists
if test ${COMMANDS[$choice]+isset}
then
# Execute the choice
eval echo "Executing: ${COMMANDS[$choice]}"
eval ${COMMANDS[$choice]}
else
eval $choice | rofi
# prefer my above so I can use this same script to also launch apps like geany or leafpad etc (DK)
# echo "Unknown command: ${choice}" | rofi -dmenu -p "error"
fi

View File

@ -0,0 +1,50 @@
#!/bin/bash
#https://github.com/luiscrjunior/rofi-json
user_file="$(eval echo ${1})"
if [[ "$user_file" = /* ]]
then
config_file="$user_file"
else
cwd=$(dirname $0)
config_file="${cwd}/${user_file}"
fi
json=$(cat ${config_file})
if [ $# -eq 1 ]; then
echo $json | jq -cr '.[] | "\(.name)|\(.command)|\(.icon)"' |
while IFS="|" read -r name command icon
do
if [[ $name == "null" ]]; then
continue
fi
if [[ $icon == "null" ]]; then
icon="system-run"
fi
echo -en "${name}\0icon\x1f${icon}\n"
done
exit 1
fi
if [ $# -eq 2 ]; then
selected=$2
task=$(echo $json | jq ".[] | select(.name == \"$selected\")")
if [[ $task == "" ]]; then
exit 1
fi
command=$(echo $task | jq -j ".command")
if [[ $command == "null" ]]; then
command=$(echo $task | jq -j ".name")
fi
coproc bash -c "$command"
exit
fi

View File

@ -0,0 +1,6 @@
@import "../config.rasi"
@import "../colors.rasi"
window {
width: 400px;
}

View File

@ -0,0 +1,40 @@
#!/usr/bin/env bash
SETTINGS=$HOME/.config/rofi/gtk-theme.ini
#Gets the current gtk using gsettings and removes the quotes
CURRENT_GTK_THEME=$(gsettings get org.gnome.desktop.interface gtk-theme)
CURRENT_GTK_THEME="${CURRENT_GTK_THEME#?}"
CURRENT_GTK_THEME="${CURRENT_GTK_THEME%?}"
#Gets the gtk theme that is in the settings.ini file
SETTINGS_GTK_THEME=$(grep "GTK_THEME" "${SETTINGS}" | cut -b 11-)
#create new colors.rasi from template
if [ "${SETTINGS_GTK_THEME}" != "${CURRENT_GTK_THEME}" ]; then
sed -i "s:GTK_THEME=${SETTINGS_GTK_THEME}:GTK_THEME=${CURRENT_GTK_THEME}:g" "${SETTINGS}"
python3 $HOME/.config/rofi/file_gtk_style.py "${HOME}"/.config/rofi/_template/colors.rasi > "${HOME}"/.config/rofi/colors.rasi
fi
case $1 in
window)
showmode="window"
;;
files)
showmode="filebrowser"
;;
run)
showmode="run"
;;
*)
showmode="drun"
;;
esac
## Run
rofi \
-show $showmode \
-theme ~/.config/rofi/launcher/launcher.rasi
-normal-window
-matching fuzzy

View File

@ -0,0 +1,19 @@
#!/bin/bash
# _ _ _ _
# __ _ ___ | |_| |__ | | ___| |_ _ _
# / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
#| (_| | (_) | |_| |_) | | __/ |_| |_| |
# \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
# |___/
# https://www.youtube.com/user/gotbletu
# https://twitter.com/gotbletu
# https://plus.google.com/+gotbletu
# https://github.com/gotbletu
# gotbletu@gmail.com
# info: rofi-locate is a script to search local files and folders on your computer using the locate command and the updatedb database
# requirements: rofi mlocate
# playlist: rofi https://www.youtube.com/playlist?list=PLqv94xWU9zZ0LVP1SEFQsLEYjZC_SUB3m
xdg-open "$(locate home media | rofi -threads 0 -width 100 -dmenu -i -p "locate:")"

View File

@ -0,0 +1,224 @@
@import "../config.rasi"
configuration {
modi: "";
show-icons: false;
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
}
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
inputbar {
enabled: true;
spacing: 10px;
margin: 0;
padding: 20px 0px 0;
border: 0px solid;
border-radius: 0px;
border-color: @border;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px 0px 15px;
expand: false;
font: "MonarchOS 14";
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 2;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(normal-background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border;
background-color: transparent;
text-color: @foreground;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border;
background-color: @alternate-background;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border;
background-color: @background;
text-color: @foreground;
}

View File

@ -0,0 +1,99 @@
#!/usr/bin/env bash
# Copyright (C) 2021 Damien Cassou
# Author: Damien Cassou <damien@cassou.me>
# Url: https://gitlab.com/DamienCassou/rofi-vpn
# Version: 0.2.0
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Commentary:
# This program uses rofi and nmcli to let the user enable/disable VPN
# connections.
# Code:
# What to show in front of an active VPN connection:
ACTIVE_PREFIX="󰌘 "
# What to show in front of an inactive VPN connection:
INACTIVE_PREFIX="󰌙 "
# Display on standard output all VPN connections, one per line. An
# active VPN connection is prefixed with `ACTIVE_PREFIX` and an inactive
# one is prefixed with `INACTIVE_PREFIX`.
function list_vpn_connections() {
nmcli --get-values ACTIVE,NAME,TYPE connection show \
| grep ':vpn$' \
| sed \
-e "s/^no:/${INACTIVE_PREFIX}/" \
-e "s/^yes:/${ACTIVE_PREFIX}/" \
-e 's/:vpn$//'
}
# Take a line as displayed by `list_vpn_connections()` as argument and
# use nmcli to toggle the corresponding connection.
function toggle_vpn_connection() {
local result="$1"
local connection
connection=$(extract_connection_name_from_result "${result}")
if [[ $result = ${ACTIVE_PREFIX}* ]]; then
feedback=$(nmcli connection down "$connection")
dunstify "VPN Status '$connection'" "$feedback" --replace=553
else
kitty --class "kitty-vpn" --title "VPN Connection" nmcli connection --ask up "$connection"
#feedback=$(nmcli connection up "$connection")
dunstify "VPN Status '$connection'" "" --replace=553
fi
}
# Take a line as displayed by `list_vpn_connections()` as argument and
# remove `ACTIVE_PREFIX` or `INACTIVE_PREFIX` to only display the
# connection name.
function extract_connection_name_from_result() {
local result="$1"
# I don't know how to use plain bash to remove the prefix so I'm
# using sed:
# shellcheck disable=SC2001
sed -e 's/^.* \([^ ]\+\)$/\1/' <<< "$result"
}
# Execute the `rofi` command. The first argument of the function is
# used as lines to select from.
function start_rofi() {
local content="$1"
echo -e "$content" | rofi -dmenu -theme $HOME/.config/rofi/nm-vpn/nm-vpn.rasi -mesg "󰖂 VPN Connection Manager" -icon "󰖂"
}
# List the VPN connections and let the user toggle one using rofi.
function main() {
local connections
local result
connections=$(list_vpn_connections)
result=$(start_rofi "$connections")
if [ -n "$result" ]; then
toggle_vpn_connection "$result"
else
exit 1
fi
}
main

View File

@ -0,0 +1,42 @@
#!/usr/bin/env bash
####
## https://github.com/ericmurphyxyz/rofi-wifi-menu
####
notify-send "Getting list of available Wi-Fi networks..."
# Get a list of available wifi connections and morph it into a nice-looking list
wifi_list=$(nmcli --fields "SECURITY,SSID" device wifi list | sed 1d | sed 's/ */ /g' | sed -E "s/WPA*.?\S/ /g" | sed "s/^--/ /g" | sed "s/ //g" | sed "/--/d")
connected=$(nmcli -fields WIFI g)
if [[ "$connected" =~ "enabled" ]]; then
toggle="睊 Disable Wi-Fi"
elif [[ "$connected" =~ "disabled" ]]; then
toggle="直 Enable Wi-Fi"
fi
# Use rofi to select wifi network
chosen_network=$(echo -e "$toggle\n$wifi_list" | uniq -u | rofi -drun -i -selected-row 1 -p "Wi-Fi SSID: " )
# Get name of connection
chosen_id=$(echo "${chosen_network:3}" | xargs)
if [ "$chosen_network" = "" ]; then
exit
elif [ "$chosen_network" = "直 Enable Wi-Fi" ]; then
nmcli radio wifi on
elif [ "$chosen_network" = "睊 Disable Wi-Fi" ]; then
nmcli radio wifi off
else
# Message to show when connection is activated successfully
success_message="You are now connected to the Wi-Fi network \"$chosen_id\"."
# Get saved connections
saved_connections=$(nmcli -g NAME connection)
if [[ $(echo "$saved_connections" | grep -w "$chosen_id") = "$chosen_id" ]]; then
nmcli connection up id "$chosen_id" | grep "successfully" && notify-send "Connection Established" "$success_message"
else
if [[ "$chosen_network" =~ "" ]]; then
wifi_password=$(rofi -dmenu -p "Password: " )
fi
nmcli device wifi connect "$chosen_id" password "$wifi_password" | grep "successfully" && notify-send "Connection Established" "$success_message"
fi
fi

View File

@ -0,0 +1,76 @@
@import "config.rasi"
@import "colors.rasi"
configuration {
show-icons: false;
}
window {
width:200px;
}
mainbox {
children: [ "message", "listview"];
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 8px;
border: 0px solid;
border-radius: 100%;
background-color: transparent;
text-color: var(theme-text-color);
}
textbox {
background-color: inherit;
text-color: inherit;
placeholder-color: var(theme-text-color);
font: "Hack Nerd Font Bold 12";
}
error-message {
padding: 12px;
border: 0px solid;
border-radius: 0px;
background-color: var(theme-bg-color);
text-color: var(theme-text-color);
}
listview {
columns: 2;
lines: 1;
layout:vertical;
}
element {
enabled: true;
spacing: 0px;
margin: 0px;
border: 0px solid;
border-radius: 100%;
background-color: transparent;
cursor: "pointer";
}
element-text {
background-color: transparent;
text-color: var(theme-text-color);
cursor: inherit;
horizontal-align: 0.5;
vertical-align:0;
font: "Hack Nerd Font 18";
}
element selected.normal {
background-color: var(theme-selected-bg-color);
text-color: var(theme-selected-fg-color);
}
element-text selected.normal {
text-color: var(mantle);
}

View File

@ -0,0 +1,119 @@
configuration {
show-icons: false;
}
@import "../colors.rasi"
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
x-offset: 0px;
y-offset: 60px;
width: 635px;
border: 2px solid;
border-radius: 10px;
border-color: var(borders);
cursor: "default";
background-color: var(theme-bg-color);
}
mainbox {
enabled: true;
spacing: 15px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px;
border-color: var(borders);
background-color: transparent;
children: ["inputbar", "listview" ];
}
inputbar {
enabled: true;
spacing: 15px;
margin: 0px;
padding: 0px;
background-color: transparent;
text-color: var(theme-text-color);
children: ["textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
font: "MonarchOS 10";
str: "";
padding: 12px 16px;
border-radius: 100%;
background-color: var(theme-selected-bg-color);
text-color: @theme-selected-fg-color;
}
prompt {
enabled: true;
padding: 12px;
border-radius: 100%;
background-color: var(theme-text-color);
text-color: var(theme-bg-color);
}
dummy {
background-color: inherit;
}
listview {
enabled: true;
columns: 2;
lines: 5;
cycle: true;
dynamic: false;
scrollbar: false;
layout: horizontal;
reverse: false;
fixed-height: true;
fixed-columns: true;
vertical-align: 0.5;
horizontal-align: 0.5;
spacing: 15px;
background-color: transparent;
text-color: var(theme-text-color);
cursor: "default";
}
element {
enabled: true;
spacing: 0px;
margin: 0px;
border: 0px solid;
border-radius: 100%;
background-color: transparent;
cursor: "pointer";
}
element-text {
font: "Hack Nerd Font 28";
background-color: transparent;
text-color: var(text);
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
padding: 10px 40px;
horizontal-align: 0;
}
element selected.normal {
background-color: var(theme-selected-bg-color);
}
element-text selected.normal {
text-color: var(theme-bg-color);
}

View File

@ -0,0 +1,101 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Rofi : Power Menu
#
# CMDs
uptime="`uptime -p | sed -e 's/up //g'`"
host=`hostname`
# Options
shutdown='󰤆'
reboot=''
lock=''
suspend=''
logout='󰗽'
yes=''
no='󰆢'
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$host uptime: $uptime" \
-mesg "$host uptime: $uptime" \
-theme ~/.config/rofi/powermenu/powermenu.rasi
}
# Confirmation CMD
confirm_cmd() {
rofi -dmenu \
-p 'Confirmation' \
-mesg 'Confirm '${chosen} \
-theme ~/.config/rofi/powermenu/confirm.rasi
}
# Ask for confirmation
confirm_exit() {
echo -e "$yes\n$no" | confirm_cmd ${chosen}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$lock\n$suspend\n$logout\n$reboot\n$shutdown" | 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 == '--suspend' ]]; then
mpc -q pause
amixer set Master mute
systemctl suspend
elif [[ $1 == '--logout' ]]; then
if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then
openbox --exit
elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
bspc quit
elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then
i3-msg exit
elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
elif [[ "$DESKTOP_SESSION" == 'hyprland' ]]; then
hyprctl dispatch exit
fi
fi
else
exit 0
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$shutdown)
run_cmd --shutdown
;;
$reboot)
run_cmd --reboot
;;
$lock)
if [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
betterlockscreen -l
elif [[ "$DESKTOP_SESSION" == 'hyprland' ]]; then
killall rofi
swaylock
fi
;;
$suspend)
run_cmd --suspend
;;
$logout)
run_cmd --logout
;;
esac

View File

@ -0,0 +1,307 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Rofi clipboard manager
Usage:
roficlip.py --daemon [-q | --quiet]
roficlip.py --show [--persistent | --actions] [-q | --quiet] [<item>]
roficlip.py --add [-q | --quiet ]
roficlip.py --remove [-q | --quiet]
roficlip.py --edit
roficlip.py (-h | --help)
roficlip.py (-v | --version)
Arguments:
<item> Selected item to be used with rofi
Commands:
--daemon Run clipboard manager daemon.
--show Show clipboard history.
--persistent Select to show persistent history.
--actions Select to show actions defined in config.
--add Add current clipboard to persistent storage.
--remove Remove current clipboard from persistent storage.
--edit Edit persistent storage with text editor.
-q, --quiet Do not notify, even if notification enabled in config.
-h, --help Show this screen.
-v, --version Show version.
"""
import errno
import os
import sys
import stat
import struct
from subprocess import Popen, DEVNULL
from tempfile import NamedTemporaryFile
try:
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib
except ImportError:
raise
import yaml
from docopt import docopt
from xdg import BaseDirectory
try:
import notify2
except ImportError:
pass
class ClipboardManager():
def __init__(self):
# Init databases and fifo
name = 'roficlip'
self.ring_db = '{0}/{1}'.format(BaseDirectory.save_data_path(name), 'ring.db')
self.persist_db = '{0}/{1}'.format(BaseDirectory.save_data_path(name), 'persistent.db')
self.fifo_path = '{0}/{1}.fifo'.format(BaseDirectory.get_runtime_dir(strict=False), name)
self.config_path = '{0}/settings'.format(BaseDirectory.save_config_path(name))
if not os.path.isfile(self.ring_db):
open(self.ring_db, "a+").close()
if not os.path.isfile(self.persist_db):
open(self.persist_db, "a+").close()
if (
not os.path.exists(self.fifo_path) or
not stat.S_ISFIFO(os.stat(self.fifo_path).st_mode)
):
os.mkfifo(self.fifo_path)
self.fifo = os.open(self.fifo_path, os.O_RDONLY | os.O_NONBLOCK)
# Init clipboard and read databases
self.cb = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
self.ring = self.read(self.ring_db)
self.persist = self.read(self.persist_db)
# Load settings
self.load_config()
# Init notifications
if self.cfg['notify'] and 'notify2' in sys.modules:
self.notify = notify2
self.notify.init(name)
else:
self.cfg['notify'] = False
def daemon(self):
"""
Clipboard Manager daemon.
"""
GLib.timeout_add(300, self.cb_watcher)
GLib.timeout_add(300, self.fifo_watcher)
Gtk.main()
def cb_watcher(self):
"""
Callback function.
Watch clipboard and write changes to ring database.
Must return "True" for continuous operation.
"""
clip = self.cb.wait_for_text()
if self.sync_items(clip, self.ring):
self.ring = self.ring[0:self.cfg['ring_size']]
self.write(self.ring_db, self.ring)
return True
def fifo_watcher(self):
"""
Callback function.
Copy contents from fifo to clipboard.
Must return "True" for continuous operation.
"""
try:
fifo_in = os.read(self.fifo, 65536)
except OSError as err:
if err.errno == errno.EAGAIN or err.errno == errno.EWOULDBLOCK:
fifo_in = None
else:
raise
if fifo_in:
self.cb.set_text(fifo_in.decode('utf-8'), -1)
self.notify_send('Copied to the clipboard.')
return True
def sync_items(self, clip, items):
"""
Sync clipboard contents with specified items dict when needed.
Return "True" if dict modified, otherwise "False".
"""
if clip and (not items or clip != items[0]):
if clip in items:
items.remove(clip)
items.insert(0, clip)
return True
return False
def copy_item(self, clip):
"""
Writes to fifo item that should be copied to clipboard.
"""
if clip:
with open(self.fifo_path, "w") as file:
file.write(clip)
file.close()
def show_items(self, items):
"""
Format and show contents of specified items dict (for rofi).
"""
for clip in items:
clip = clip.replace('\n', self.cfg['newline_char'])
# Move text after last \# to beginning of string
if args['--persistent'] and self.cfg['show_comments_first'] and '#' in clip:
# Save index of last \#
idx = clip.rfind('#')
# Format string
clip = '{}{}'.format(clip[idx+1:], clip[:idx])
preview = clip[0:self.cfg['preview_width']]
print(preview)
def persistent_add(self):
"""
Add current clipboard to persistent storage.
"""
clip = self.cb.wait_for_text()
if self.sync_items(clip, self.persist):
self.write(self.persist_db, self.persist)
self.notify_send('Added to persistent.')
def persistent_remove(self):
"""
Remove current clipboard from persistent storage.
"""
clip = self.cb.wait_for_text()
if clip and clip in self.persist:
self.persist.remove(clip)
self.write(self.persist_db, self.persist)
self.notify_send('Removed from persistent.')
def persistent_edit(self):
"""
Edit persistent storage with text editor.
New line char will be used as separator.
"""
editor = os.getenv('EDITOR')
if self.persist and editor:
try:
tmp = NamedTemporaryFile(mode='w+')
for clip in self.persist:
clip = '{}\n'.format(clip.replace('\n', self.cfg['newline_char']))
tmp.write(clip)
tmp.flush()
except IOError as e:
print("I/O error({0}): {1}".format(e.errno, e.strerror))
else:
proc = Popen([editor, tmp.name], stdout=DEVNULL, stderr=DEVNULL)
ret = proc.wait()
if ret == 0:
tmp.seek(0, 0)
clips = tmp.read().splitlines()
if clips:
self.persist = []
for clip in clips:
clip = clip.replace('\n', '')
clip = clip.replace(self.cfg['newline_char'], '\n')
self.persist.append(clip)
self.write(self.persist_db, self.persist)
finally:
tmp.close()
def do_action(self, action):
"""
Run selected action on clipboard contents.
"""
if action:
clip = self.cb.wait_for_text()
params = self.actions[action].split(' ')
while '%s' in params:
params[params.index('%s')] = clip
Popen(params, stdout=DEVNULL, stderr=DEVNULL)
self.notify_send("Action: {}".format(action))
def notify_send(self, text):
"""
Show desktop notification.
"""
if self.cfg['notify']:
n = self.notify.Notification("Roficlip", text)
n.timeout = self.cfg['notify_timeout'] * 1000
n.show()
def read(self, fd):
"""
Helper function. Binary reader.
"""
result = []
with open(fd, "rb") as file:
bytes_read = file.read(4)
while bytes_read:
chunksize = struct.unpack('>i', bytes_read)[0]
bytes_read = file.read(chunksize)
result.append(bytes_read.decode('utf-8'))
bytes_read = file.read(4)
return result
def write(self, fd, items):
"""
Helper function. Binary writer.
"""
with open(fd, 'wb') as file:
for item in items:
item = item.encode('utf-8')
file.write(struct.pack('>i', len(item)))
file.write(item)
def load_config(self):
"""
Read config if exists, and/or provide defaults.
"""
# default settings
settings = {
'settings': {
'ring_size': 20,
'preview_width': 100,
'newline_char': '¬',
'notify': True,
'notify_timeout': 1,
'show_comments_first': False,
},
'actions': {}
}
if os.path.isfile(self.config_path):
with open(self.config_path, "r") as file:
config = yaml.safe_load(file)
for key in {'settings', 'actions'}:
if key in config:
settings[key].update(config[key])
self.cfg = settings['settings']
self.actions = settings['actions']
if __name__ == "__main__":
cm = ClipboardManager()
args = docopt(__doc__, version='0.4')
if args['--quiet']:
cm.cfg['notify'] = False
if args['--daemon']:
cm.daemon()
elif (args['--show'] and not args['--actions']):
if args['<item>']:
cm.copy_item(args['<item>'])
else:
cm.show_items(cm.persist if args['--persistent'] else cm.ring)
elif (args['--show'] and args['--actions']):
if args['<item>']:
cm.do_action(args['<item>'])
else:
cm.show_items(cm.actions)
elif args['--add']:
cm.persistent_add()
elif args['--remove']:
cm.persistent_remove()
elif args['--edit']:
cm.persistent_edit()
exit(0)

View File

@ -0,0 +1,9 @@
@import "../config.rasi"
@import "../colors.rasi"
configuration {
show-icons: false;
modi: "drun";
window-format: "{w} · {c} · {t}";
}

View File

@ -0,0 +1,77 @@
#!/bin/bash
# https://github.com/Gustash/hyprland-interactive-screenshot
# `list_geometry` returns the geometry of the focused of visible windows. You can also get they title
# by setting a second argument to `with_description`. The geometry and the title are seperated by `\t`.
#
# Arguments:
# $1: `focused` or `visible`
# $2: `with_description` or nothing
#
# Output examples:
# - with the `with_description` option:
# 12,43 100x200\tTermite
# - without the `with_description` option:
# 12,43 100x200
function list_geometry () {
[ "$2" = with_description ] && local append="\(.title)\t" || local append=
if [ "$1" = focused ]; then
hyprctl -j activewindow | jq -r '"'$append'\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"'
else
hyprctl -j clients | jq -r '.[] | select(.workspace.id | contains('$(hyprctl -j monitors | jq -r 'map(.activeWorkspace.id) | join(",")')')) | "'$append'\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"'
fi
}
WINDOWS=`list_geometry visible with_description`
FOCUSED=`list_geometry focused`
CHOICE=`rofi -dmenu -theme ~/.config/rofi/screenshot/screenshot.rasi -p 'Screenshot' << EOF
fullscreen
region
focused
$WINDOWS
EOF`
SAVEDIR=${HYPRLAND_INTERACTIVE_SCREENSHOT_SAVEDIR}
[ -z "$SAVEDIR" ] && SAVEDIR=${SWAY_INTERACTIVE_SCREENSHOT_SAVEDIR:=~}
mkdir -p -- "$SAVEDIR"
FILENAME="$SAVEDIR/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')"
EXPENDED_FILENAME="${FILENAME/#\~/$HOME}"
case $CHOICE in
fullscreen)
grim "$EXPENDED_FILENAME"
;;
region)
grim -g "$(slurp)" "$EXPENDED_FILENAME"
;;
focused)
grim -g "$FOCUSED" "$EXPENDED_FILENAME"
;;
'')
notify-send "Screenshot" "Cancelled"
exit 0
;;
*)
GEOMETRY="`echo \"$CHOICE\" | cut -d$'\t' -f1`"
grim -g "$GEOMETRY" "$EXPENDED_FILENAME"
esac
# If swappy is installed, prompt the user to edit the captured screenshot
if command -v swappy $>/dev/null
then
EDIT_CHOICE=`echo -e "\n󰆢" | rofi -dmenu -theme ~/.config/rofi/powermenu/confirm.rasi -p 'Edit' -mesg 'Edit?'`
case $EDIT_CHOICE in
)
swappy -f "$EXPENDED_FILENAME" -o "$EXPENDED_FILENAME"
;;
󰆢)
;;
'')
;;
esac
fi
wl-copy < "$EXPENDED_FILENAME"
notify-send "Screenshot" "File saved as <i>'$FILENAME'</i> and copied to the clipboard." -i "$EXPENDED_FILENAME"

View File

@ -0,0 +1,49 @@
configuration {
modi: "drun";
show-icons: false;
drun-display-format: "{name}";
}
@import "../config.rasi"
@import "../colors.rasi"
window {
enabled: true;
cursor: "default";
}
mainbox {
children: [ "message", "listview", "inputbar" ];
}
inputbar {
enabled: true;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
listview {
enabled: true;
columns: 2;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
}
element-icon {
size: 0px;
}

View File

@ -0,0 +1,151 @@
#!/usr/bin/env bash
# author: unknown
# sentby: MoreChannelNoise (https://www.youtube.com/user/MoreChannelNoise)
# editby: gotbletu (https://www.youtube.com/user/gotbletu)
# demo: https://www.youtube.com/watch?v=kxJClZIXSnM
# info: this is a script to launch other rofi scripts,
# saves us the trouble of binding multiple hotkeys for each script,
# when we can just use one hotkey for everything.
declare -A LABELS
declare -A COMMANDS
###
# List of defined 'bangs'
# launch programs
# COMMANDS["apps"]="rofi -combi-modi window,drun -show combi"
# LABELS["apps"]=""
# open bookmarks
# COMMANDS["bookmarks"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-bookmarks.sh"
# LABELS["bookmarks"]=""
# search local files
COMMANDS[""]="~/.config/rofi/locate/rofi-locate.sh"
LABELS[""]="Locate"
# open custom web searches
# COMMANDS["websearch"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-websearch.sh"
# LABELS["websearch"]=""
# show clipboard history
# source: https://bitbucket.org/pandozer/rofi-clipboard-manager/overview
# COMMANDS["clipboard"]='rofi -modi "clipboard:~/.bin/rofi-clipboard-manager/mclip.py menu" -show clipboard && ~/.bin/rofi-clipboard-manager/mclip.py paste'
# LABELS["clipboard"]=""
# references --------------------------
# COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""
# LABELS[";sr2"]=""
# COMMANDS[";piratebay"]="chromium --disk-cache-dir=/tmp/cache http://thepiratebay.org/search/\" \${input}\""
# LABELS[";piratebay"]=""
# COMMANDS[".bin"]="spacefm -r '/home/dka/bin'"
# LABELS[".bin"]=".bin"
# COMMANDS["#screenshot"]='/home/dka/bin/screenshot-scripts/myscreenshot.sh'
# LABELS["#screenshot"]="screenshot"
# greenclip clipboard history
# source: https://github.com/erebe/greenclip
COMMANDS[""]='cliphist list | rofi -dmenu | cliphist decode | wl-copy'
LABELS[""]="Clipboard"
COMMANDS["󰖂"]='~/.config/rofi/nm-vpn/nm-vpn.sh'
LABELS["󰖂"]='VPN Connection Manager'
COMMANDS["󰗅"]='~/.config/rofi/volume/volume.sh'
LABELS["󰗅"]='Sound Manager'
COMMANDS[""]='~/.config/rofi/shortcuts/shortcuts.sh'
LABELS[""]='Hotkey List'
COMMANDS[""]='wlogout'
LABELS[""]='Session Menu'
COMMANDS["󰍹"]='wdisplays'
LABELS["󰍹"]='Display Setup'
COMMANDS[""]='nwg-look'
LABELS[""]='Appearance Settings'
COMMANDS["󱘆"]='noisetorch'
LABELS["󱘆"]='Audio Noise Reduction'
COMMANDS["󰋋"]='/home/dom/.local/share/headset-charge-indicator/headset-charge-indicator.py &'
LABELS["󰋋"]='Headset Control'
COMMANDS[""]='~/.config/rofi/bluetooth/bluetooth.sh'
LABELS[""]='Bluetooth Control'
COMMANDS["󰛳"]='nm-applet --indicator &'
LABELS["󰛳"]='Networker Manager'
COMMANDS["󰴱"]='hyprpicker -f hex -a'
LABELS["󰴱"]='Color Picker'
COMMANDS["󰚞"]='font-manager'
LABELS["󰚞"]='Font Manager'
COMMANDS["󱨑"]='gufw'
LABELS["󱨑"]='Firewall Settings'
COMMANDS[""]='stacer'
LABELS[""]='System Maintenance'
################################################################################
# do not edit below
################################################################################
##
# Generate menu
##
function print_menu()
{
for key in ${!LABELS[@]}
do
# echo "$key ${LABELS}"
echo "$key ${LABELS[$key]}"
# my top version just shows the first field in labels row, not two words side by side
done
}
##
# Show rofi.
##
function start()
{
# print_menu | rofi -dmenu -p "?=>"
print_menu | sort | rofi -theme $HOME/.config/rofi/settings-menu/settings-menu.rasi -show "Settings x Tools" -dmenu -mesg " Settings x Tools" -i -p "rofi-bangs: "
}
# Run it
value="$(start)"
# Split input.
# grab upto first space.
choice=${value%%\ *}
# graph remainder, minus space.
input=${value:$((${#choice}+1))}
##
# Cancelled? bail out
##
if test -z ${choice}
then
exit
fi
# check if choice exists
if test ${COMMANDS[$choice]+isset}
then
# Execute the choice
eval echo "Executing: ${COMMANDS[$choice]}"
eval ${COMMANDS[$choice]}
else
eval $choice | rofi
# prefer my above so I can use this same script to also launch apps like geany or leafpad etc (DK)
# echo "Unknown command: ${choice}" | rofi -dmenu -p "error"
fi

View File

@ -0,0 +1,5 @@
#!/bin/bash
config_file=~/.config/hypr/hl-keybindings.conf
keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
rofi -dmenu -p "Keybinds" <<< "$keybinds"

View File

@ -0,0 +1,19 @@
#!/bin/bash
mapfile -t allLines < $HOME/.config/sxhkd/sxhkdrc
jsonstr="["
for ((i = 0; i < ${#allLines[@]}; ++i)); do
if [[ ${allLines[$i]} =~ ^#.* ]]; then
shortcut="${allLines[$i]:1}: ${allLines[$(( $i + 1 ))]}"
if (( $i > 0 )); then
jsonstr+=","
fi
jsonstr+="{"
jsonstr+=\""name"\"":"
jsonstr+=\""${shortcut}"\"
jsonstr+=","\""command"\"":""\""\"
jsonstr+="}"
fi
done
jsonstr+="]"
echo $jsonstr > /tmp/sxhkdrc.json
rofi -modi " Hotkeys":"~/.config/rofi/helper/rofi-json.sh /tmp/sxhkdrc.json" -show " Hotkeys" -theme $HOME/.config/rofi/config.rasi

View File

@ -0,0 +1 @@
[{"name":"Window Switcher: alt + Tab","command":""},{"name":"System Monitor: ctrl + alt + Delete","command":""},{"name":" File Explorer: super + e","command":""},{"name":"Screenshot Tool: Print","command":""},{"name":"Kill GUI: super + k","command":""},{"name":"Screen Brightness +: XF86MonBrightnessUp","command":""},{"name":"Screen Brightness -: XF86MonBrightnessDown","command":""},{"name":"Song Prev, Next : XF86Audio{Prev,Next}","command":""},{"name":"Sond Play / Pause: XF86AudioPlay","command":""},{"name":" terminal emulator: super + Return","command":""},{"name":" program launcher: super + space","command":""},{"name":" Show this Shortcut List: super + s","command":""},{"name":" make sxhkd reload its configuration files:: super + Escape","command":""},{"name":": # bspwm hotkeys","command":""},{"name":" bspwm hotkeys: #","command":""},{"name":": ","command":""},{"name":" quit/restart bspwm: super + alt + {q,r}","command":""},{"name":" close and kill: super + {_,shift + }q","command":""},{"name":" alternate between the tiled and monocle layout: super + m","command":""},{"name":" send the newest marked node to the newest preselected node: super + y","command":""},{"name":" swap the current node and the biggest window: super + g","command":""},{"name":": # preselect","command":""},{"name":" preselect: #","command":""},{"name":": ","command":""},{"name":" preselect the direction: super + ctrl + {h,j,k,l}","command":""},{"name":" preselect the ratio: super + ctrl + {1-9}","command":""},{"name":" cancel the preselection for the focused node: super + ctrl + space","command":""},{"name":" cancel the preselection for the focused desktop: #super + ctrl + shift + space","command":""},{"name":"super + ctrl + shift + space: # bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel","command":""},{"name":" bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel: ","command":""},{"name":": # state/flags","command":""},{"name":" state/flags: #","command":""},{"name":": ","command":""},{"name":" set the window state: super + {t,shift + t,s,f}","command":""},{"name":" set the node flags: super + ctrl + {m,x,y,z}","command":""},{"name":": # focus/swap","command":""},{"name":" focus/swap: #","command":""},{"name":": ","command":""},{"name":" focus the node in the given direction: super + {_,shift + }{h,j,k,l}","command":""},{"name":" focus the node for the given path jump: super + {p,b,comma,period}","command":""},{"name":" focus the next/previous window in the current desktop: super + {_,shift + }c","command":""},{"name":" focus the next/previous desktop in the current monitor: super + {8,9}","command":""},{"name":" focus the last node/desktop: super + {grave,Tab}","command":""},{"name":" focus the older or newer node in the focus history: super + {o,i}","command":""},{"name":" focus or send to the given desktop: super + {_,shift + }{1-9,0}","command":""},{"name":": # move/resize","command":""},{"name":" move/resize: #","command":""},{"name":": ","command":""},{"name":" expand a window by moving one of its side outward: super + alt + {h,j,k,l}","command":""},{"name":" contract a window by moving one of its side inward: super + alt + shift + {h,j,k,l}","command":""},{"name":" move a floating window: #super + {Left,Down,Up,Right}","command":""},{"name":"super + {Left,Down,Up,Right}: # bspc node -v {-20 0,0 20,0 -20,20 0}","command":""},{"name":" bspc node -v {-20 0,0 20,0 -20,20 0}: ","command":""},{"name":" Move window by direction in same workspace: super + {Left,Down,Up,Right}","command":""}]

View File

@ -0,0 +1,176 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
* ---
*
* @Modification Dominik Kressler
* @package rofi-archer
* @version 1.0.0
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "../colors.rasi"
@import "../fonts.rasi"
/*
USE_BUTTONS=YES
*/
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 800px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 10px;
border-color: @selected;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 15px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 15px;
margin: 0px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
dummy {
background-color: transparent;
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 12px 20px 12px 16px;
border-radius: 100%;
background-color: @urgent;
text-color: @background;
}
prompt {
enabled: true;
padding: 12px;
border-radius: 100%;
background-color: @active;
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 12px;
border: 0px solid;
border-radius: 100%;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
font-weight: bold;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 12px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background;
text-color: @foreground;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 5;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 15px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 0px;
margin: 0px;
padding: 40px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @selected;
background-color: @selected;
text-color: var(background-alt);
cursor: pointer;
}
element-text {
font: "JetBrainsMono Nerd Font bold 32";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(background-alt);
text-color: @foreground;
}

View File

@ -0,0 +1,224 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "";
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "../config.rasi"
@import "../colors.rasi"
* {
border-colour: var(border);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
border-radius: 10px;
/* properties for all widgets */
enabled: true;
cursor: "default";
background-color: @background-colour;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: false;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: false;
fixed-columns: false;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
align: center;
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(normal-background);
text-color: var(normal-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-normal-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

122
home/config/rofi/volume/volume.sh Executable file
View File

@ -0,0 +1,122 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Applets : Volume
theme="~/.config/rofi/volume/volume.rasi"
# Volume Info
mixer="`amixer info Master | grep 'Mixer name' | cut -d':' -f2 | tr -d \',' '`"
speaker="`amixer get Master | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`"
mic="`amixer get Capture | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`"
active=""
urgent=""
# Speaker Info
amixer get Master | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
active="-a 1"
stext='Mute Speaker'
sicon='󰓃'
else
urgent="-u 1"
stext='Unmute Speaker'
sicon='󰓄'
fi
# Microphone Info
amixer get Capture | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
[ -n "$active" ] && active+=",3" || active="-a 3"
mtext='Mute Mic'
micon=''
else
[ -n "$urgent" ] && urgent+=",3" || urgent="-u 3"
mtext='Unmute Mic'
micon=''
fi
currentsink=$(ponymix defaults|awk '/^sink/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}' | cut -d':' -f2)
currentsource=$(ponymix defaults|awk '/^source/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}' | cut -d':' -f2)
# Theme Elements
prompt="Speaker: $sicon Mic: $micon "
mesg="$mixer Speaker: $speaker Mic: $mic"
list_col='6'
list_row='3'
win_width='670px'
# Options
option_1="$micon $mtext $currentsource"
option_2="$sicon $stext $currentsink"
option_3="󱡫 Sink Switcher"
option_4=""
option_5=" Mixer"
option_6="󰍯 Noise Torch"
# Rofi CMD
#-theme-str "listview {columns: $list_col; lines: $list_row;}" \
rofi_cmd() {
rofi -theme-str "window {width: $win_width;}" \
-theme-str 'textbox-prompt-colon {str: "";}' \
-dmenu \
-p "$prompt" \
-mesg "$mesg" \
${active} ${urgent} \
-markup-rows \
-theme ${theme}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt3' ]]; then
#amixer -Mq set Master,0 5%+ unmute
$HOME/.config/rofi/audio/rofi-sink-switcher.sh
elif [[ "$1" == '--opt2' ]]; then
amixer set Master toggle
elif [[ "$1" == '--opt4' ]]; then
amixer -Mq set Master,0 5%- unmute
elif [[ "$1" == '--opt1' ]]; then
amixer set Capture toggle
elif [[ "$1" == '--opt5' ]]; then
pavucontrol
elif [[ "$1" == '--opt6' ]]; then
noisetorch
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
$option_6)
run_cmd --opt6
;;
esac

View File

@ -0,0 +1,23 @@
screenshots
clock
indicator
submit-on-touch
effect-greyscale
indicator-caps-lock
line-uses-ring
indicator-radius=100
indicator-thickness=5
effect-blur=7x5
effect-vignette=0.5:0.5
grace=5
fade-in=0.2
ring-color=7f849c
key-hl-color=f38ba8
line-color=00000000
line-ver-color=00000000
line-wrong-color=00000000
inside-color=11111b88
separator-color=00000000
inside-ver-color=cba6f7
ring-ver-color=a6e3a1
layout-text-color=cdd6f4

View File

@ -0,0 +1,199 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"control-center-margin-top": 20,
"control-center-margin-bottom": 20,
"control-center-margin-right": 20,
"control-center-margin-left": 0,
"notification-icon-size": 48,
"notification-body-image-height": 160,
"notification-body-image-width": 90,
"timeout": 6,
"timeout-low": 4,
"timeout-critical": 0,
"fit-to-screen": true,
"control-center-width": 380,
"notification-window-width": 366,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 100,
"hide-on-clear": false,
"hide-on-action": true,
"script-fail-notify": true,
"scripts": {
"example-script": {
"exec": "echo 'Do something...'",
"urgency": "Normal"
}
},
"notification-visibility": {
"example-name": {
"state": "muted",
"urgency": "Low",
"app-name": "Spotify"
}
},
"widgets": [
"menubar",
"buttons-grid",
"volume",
"mpris",
"title",
"dnd",
"notifications"
],
"widget-config": {
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 1,
"text": "Control Center"
},
"mpris": {
"image-size": 96,
"image-radius": 10
},
"backlight": {
"label": "",
"device": "intel_backlight",
"min": 10
},
"backlight#KB": {
"label": " ",
"device": "asus::kbd_backlight",
"subsystem": "leds"
},
"volume": {
"label": ""
},
"menubar": {
"menu#power-buttons": {
"label": "",
"position": "right",
"actions": [
{
"label": " Reboot",
"command": "systemctl reboot"
},
{
"label": " Lock",
"command": "swaylock.sh"
},
{
"label": " Logout",
"command": "loginctl terminate-session ${XDG_SESSION_ID-}"
},
{
"label": " Shut down",
"command": "systemctl poweroff"
}
]
},
"menu#powermode-buttons": {
"label": "",
"position": "right",
"actions": [
{
"label": "Performance",
"command": "powerprofilesctl set performance"
},
{
"label": "Balanced",
"command": "powerprofilesctl set balanced"
},
{
"label": "Power-saver",
"command": "powerprofilesctl set power-saver"
}
]
},
"menu#screenshot-buttons": {
"label": "",
"position": "left",
"actions": [
{
"label": " Entire screen",
"command": "swaync-client -cp && sleep 1 && hyprshot -m output"
},
{
"label": " Select a region",
"command": "swaync-client -cp && sleep 1 && hyprshot -m region"
},
{
"label": " Open screenshot menu",
"command": "swaync-client -cp && rofi-screenshot"
},
{
"label": " Open screenshot folder",
"command": "exo-open $HYPRSHOT_DIR"
}
]
},
"menu#screencast-buttons": {
"label": "",
"position": "left",
"actions": [
{
"label": " Entire screen",
"command": "swaync-client -cp && sleep 1 && recording.sh toggle fullscreen"
},
{
"label": " Select a region",
"command": "swaync-client -cp && sleep 1 && recording.sh toggle region"
},
{
"label": " Stop",
"command": "swaync-client -cp && recording.sh stop"
},
{
"label": " Open screencast folder",
"command": "$XDG_VIDEOS_DIR/Screencasts"
}
]
}
},
"buttons-grid": {
"actions": [
{
"label": "",
"command": "nm-connection-editor"
},
{
"label": "",
"command": "blueman"
},
{
"label": "",
"command": "nwg-look"
},
{
"label": "",
"command": "exo-open ~/ConfigHub"
},
{
"label": "",
"command": "ymuse"
},
{
"label": "",
"command": "orage"
},
{
"label": "",
"command": "pamac-manager"
},
{
"label": "",
"command": "firefox"
}
]
}
}
}

View File

@ -0,0 +1,327 @@
@define-color noti-border-color rgba(255, 255, 255, 0.15);
@define-color noti-bg #2a293a;
@define-color noti-bg-hover-alt #454545;
@define-color noti-bg-alt rgba(38,37,53,1);
@define-color noti-fg #acb0d0;
@define-color noti-bg-hover rgba(255, 255, 255, 0.1);
@define-color noti-bg-focus rgba(255, 255, 255, 0.1);
@define-color noti-close-bg rgba(255, 255, 255, 0.1);
@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15);
@define-color noti-urgent rgba(255,0,80,0.8);
@define-color bg-selected #26A69A;
*{
font-family: "Hack Nerd Font";
color: @noti-fg;
}
.notification-row {
outline: none;
}
.notification-row:focus,
.notification-row:hover {
background: @noti-bg-focus;
}
.notification {
border: 1px solid @bg-selected;
border-radius: 4px;
margin: 6px 12px;
box-shadow: none;
padding: 0;
}
/* Uncomment to enable specific urgency colors */
/* .low {
background: yellow;
}
.normal {
background: green;
} */
.critical {
border: 1px solid @noti-urgent;
}
.notification-content {
background: transparent;
padding: 6px;
border-radius: 4px;
}
.close-button {
background: @noti-close-bg;
color: white;
text-shadow: none;
padding: 0;
border-radius: 100%;
margin-top: 10px;
margin-right: 16px;
box-shadow: none;
border: none;
min-width: 24px;
min-height: 24px;
}
.close-button:hover {
box-shadow: none;
background: @noti-close-bg-hover;
transition: all 0.15s ease-in-out;
border: none;
}
.notification-default-action,
.notification-action {
padding: 4px;
margin: 0;
box-shadow: none;
background: @noti-bg;
border: 1px solid @noti-border-color;
color: white;
}
.notification-default-action:hover,
.notification-action:hover {
-gtk-icon-effect: none;
background: @noti-bg-alt;
}
.notification-default-action {
border-radius: 4px;
}
/* When alternative actions are visible */
.notification-default-action:not(:only-child) {
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.notification-action {
border-radius: 0px;
border-top: none;
border-right: none;
}
/* add bottom border radius to eliminate clipping */
.notification-action:first-child {
border-bottom-left-radius: 4px;
}
.notification-action:last-child {
border-bottom-right-radius: 4px;
border-right: 1px solid @noti-border-color;
}
.image {}
.body-image {
margin-top: 6px;
background-color: white;
border-radius: 6px;
}
.summary {
font-size: 14px;
font-weight: bold;
background: transparent;
color: white;
text-shadow: none;
}
.time {
font-size: 13px;
font-weight: bold;
background: transparent;
color: white;
text-shadow: none;
margin-right: 18px;
}
.body {
font-size: 12px;
font-weight: normal;
background: transparent;
color: white;
text-shadow: none;
}
/* The "Notifications" and "Do Not Disturb" text widget */
.top-action-title {
color: white;
text-shadow: none;
}
.control-center {
background-color: @noti-bg-alt;
border-radius: 10px;
padding-top:5px;
}
.control-center-list {
background: transparent;
}
.floating-notifications {
background: transparent;
}
/* Window behind control center and on all other monitors */
.blank-window {
background: transparent;
}
/*** Widgets ***/
/* Title widget */
.widget-title {
margin: 8px;
font-size: 16px;
}
.widget-title>button {
font-size: 10px;
color: white;
text-shadow: none;
background: @noti-bg;
border: 1px solid @noti-border-color;
box-shadow: none;
border-radius: 20px;
}
.widget-title>button:hover {
background: @noti-bg-hover;
}
/* DND widget */
.widget-dnd {
margin: 8px;
font-size: 1.1rem;
border-radius: 20px;
}
.widget-dnd>switch {
font-size: initial;
border-radius: 20px;
background: @noti-bg;
border: 1px solid @noti-border-color;
box-shadow: none;
}
.widget-dnd>switch:checked {
background: @noti-bg;
}
.widget-dnd>switch slider {
background: @noti-bg-hover;
border-radius: 10px;
}
/* Label widget */
.widget-label {
margin: 4px 8px 8px;
}
.widget-label>label {
font-size: 16px;
}
/* Mpris widget */
.widget-mpris {
/* The parent to all players */
}
.widget-mpris-player {
padding: 8px;
margin: 8px;
}
.widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
}
/* Volume and Brightness Widget*/
.widget-volume {
background-color: @noti-bg;
padding: 4px 4px 4px 20px;
margin: 0px 8px 8px 8px;
border-radius: 20px;
font-size: 14px;
}
.widget-backlight {
background-color: @noti-bg;
padding: 8px 8px 4px 8px;
margin: 8px 8px 0px 8px;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
.KB {
padding: 4px 8px 4px 8px;
margin: 0px 8px 0px 8px;
border-radius: 0;
}
.widget-menubar>box{
padding: 8px 0px 4px;
margin: 0px 8px;
border-radius: 10px 10px 0px 0px;
background-color: @noti-bg;
}
.widget-menubar>box>.menu-button-bar>button{
border: 1px solid @noti-border-color;
background: @noti-bg;
border-radius: 10px;
margin: 4px 12px;
}
.widget-buttons-grid{
padding: 0px 8px 8px;
margin: 0px 8px 8px;
border-radius: 0px 0px 10px 10px;
background-color: @noti-bg;
font-size: 14px;
}
.widget-buttons-grid>flowbox>flowboxchild>button{
background: @noti-bg;
border-radius: 20px;
}
.widget-buttons-grid>flowbox>flowboxchild>button:hover {
background: @noti-bg-hover;
}
.screenshot-buttons,
.screencast-buttons,
.powermode-buttons,
.power-buttons{
border-radius: 20px;
}
.screenshot-buttons>button,
.screencast-buttons>button,
.powermode-buttons>button,
.power-buttons>button{
background: transparent;
padding: 2px 0px;
margin: 5px 70px 3px;
border: 1px solid @noti-border-color;
}
.screenshot-buttons>button:hover,
.screencast-buttons>button:hover,
.powermode-buttons>button:hover,
.power-buttons>button:hover{
background: @noti-bg-hover;
}

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