8 Commits

Author SHA1 Message Date
opal
59f815002f battery 2025-06-02 20:06:51 -07:00
opal
db517a0759 trisquel stuff 2025-04-22 22:08:45 -07:00
opal
b382e491b8 added script stuff to swaybar, fixed fonts 2024-09-28 10:54:24 -07:00
opal
5492a527c0 stoof 2024-09-27 23:08:33 -07:00
opal
c6ef708071 switching stuff over 2024-09-27 21:00:16 -07:00
opal
0f063a4e58 changing apt and font stuff 2024-09-27 13:47:26 -07:00
opal
a8e907de50 alacritty font stuff 2024-09-27 13:35:01 -07:00
opal
9b921046cf init trisquel branch 2024-09-26 22:19:13 -07:00
15 changed files with 720 additions and 87 deletions

28
.bashrc
View File

@@ -1,6 +1,8 @@
#!/bin/sh
# If not running interactively, don't do anything
export TERM=xterm-256color
#If not running interactively, don't do anything
[ -z "$PS1" ] && return
#Source global definitions
@@ -55,7 +57,7 @@ export LESS_TERMCAP_us=$'\E[01;32m'
#######################################################
# Ensure gopass autocompletion is sourced
source <(gopass completion bash)
#source <(gopass completion bash)
# Gopass aliases
alias gpi='gopass insert --multiline'
@@ -71,16 +73,15 @@ alias gpe='gopass edit'
# To temporarily bypass an alias, we preceed the command with a \
# EG: the ls command is aliased, but to use the normal ls command you would type \ls
alias v='nvim'
alias vim='nvim'
alias vi='nvim'
#alias v='nvim'
#alias vim='nvim'
#alias vi='nvim'
# DNF
alias dnf='dnf5'
alias din='sudo dnf5 install'
alias dre='sudo dnf5 remove'
alias dup='sudo dnf5 update'
alias dse='dnf5 search'
# APT
alias ain='sudo apt install'
alias are='sudo apt remove'
alias aup='sudo apt update && sudo apt upgrade'
alias ase='apt search'
# alias to show the date
alias da='date "+%Y-%m-%d %A %T %Z"'
@@ -107,9 +108,6 @@ alias .....='cd ../../../..'
# cd into the old directory
alias bd='cd "$OLDPWD"'
# ls -> exa
alias ls='exa'
# Search command line history
alias h="history | grep "
@@ -138,7 +136,6 @@ alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
# Translate
alias tbr='trans :pt-BR'
#######################################################
# WORK
#######################################################
@@ -189,3 +186,4 @@ PS1="${CYAN}[\u@\h ${YELLOW}\w${GREEN}\$(parse_git_branch)${CYAN}]${WHITE}${RESE
#######################################################
eval $(keychain --eval --quiet ry_ecdsa)
eval $(keychain --eval --quiet id_rsa)

View File

@@ -1,14 +1,14 @@
import = ["/home/opal/.config/alacritty/gruvbox-light.toml"]
[env]
TERM = "alacritty"
TERM = "xterm-256color"
[font]
size = 22
size = 18
[font.normal]
family = "Terminus"
style = "Regular"
style = "Bold"
[font.offset]
x = 0

View File

@@ -27,9 +27,9 @@
(add-hook mode (lambda () (display-line-numbers-mode 0))))
;; Font configuration
(set-face-attribute 'default nil :font "Terminus" :height 200)
(set-face-attribute 'fixed-pitch nil :font "Terminus" :height 200)
(set-face-attribute 'variable-pitch nil :font "ETBembo" :height 200)
(set-face-attribute 'default nil :font "Monospace" :height 190)
(set-face-attribute 'fixed-pitch nil :font "Monospace" :height 190)
(set-face-attribute 'variable-pitch nil :font "ETBembo" :height 190)
(defun opal/org-font-setup ()
;; Replace list hyphen with dot
@@ -163,7 +163,7 @@
(defun opal/org-mode-visual-fill ()
(setq visual-fill-column-width 150
visual-fill-column-center-text t)
visual-fill-column-center-text t)
(visual-fill-column-mode 1))
(use-package visual-fill-column
@@ -202,13 +202,16 @@
(global-set-key (kbd "C-c y") 'opal/play-yt-url-at-point)
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community")
;; Elfeed
(defun opal/elfeed-open-in-firefox ()
"Open the current Elfeed entry link in Firefox."
(defun opal/elfeed-open-in-browser ()
"Open the current Elfeed entry link in browser (LibreWolf)."
(interactive)
(let ((link (elfeed-entry-link (elfeed-search-selected :single))))
(if link
(browse-url-firefox link)
(browse-url link)
(message "No link to open."))))
(defun opal/elfeed-open-in-eww()
@@ -248,8 +251,8 @@
;; Evil keybindings for Elfeed
(evil-define-key 'normal elfeed-search-mode-map
"f" 'opal/elfeed-open-in-firefox ;; Open link in Firefox
"e" 'opal/elfeed-open-in-eww ;; Open link in Firefox
"f" 'opal/elfeed-open-in-browser ;; Open link in Browser
"e" 'opal/elfeed-open-in-eww ;; Open link in eww
"r" 'opal/elfeed-mark-all-read ;; Marks all feeds as read
"gr" 'elfeed-update ;; Refresh feeds
"q" 'quit-window)) ;; Quit Elfeed

View File

@@ -74,7 +74,7 @@
;;grammar ; tasing grammar mistake every you make
:tools
ansible
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv

View File

@@ -1,4 +1,5 @@
[global]
geometry = "300x50-10+50"
monitor = 0
follow = keyboard
indicate_hidden = yes
@@ -23,7 +24,7 @@ show_indicators = no
icon_position = off
sticky_history = yes
history_length = 20
browser = /usr/bin/icecat -new-tab
browser = /usr/bin/abrowser -new-tab
always_run_script = true
title = Dunst
class = Dunst

254
.config/foot/foot.ini Normal file
View File

@@ -0,0 +1,254 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
#term=xterm-256color (or xterm-256color if built with -Dterminfo=disabled)
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
# title=foot
# locked-title=no
font=Monospace:size=11
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# font-size-adjustment=0.5
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# strikeout-thickness=<font strikeout thickness>
# box-drawings-uses-font-glyphs=no
# dpi-aware=no
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
# pad=0x0 # optionally append 'center'
# resize-by-cells=yes
# resize-keep-grid=yes
# resize-delay-ms=100
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is libutempter (Linux)
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ulog (FreeBSD)
[bell]
# urgent=no
# notify=no
# visual=no
# command=
# command-focused=no
[scrollback]
lines=1000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
# style=block
# color=<inverse foreground/background>
# blink=no
# blink-rate=500
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[colors]
# Background and Foreground
background=E8D8B0 # Match Gruvbox light background
foreground=3c3836 # Match Gruvbox light foreground
## Normal/regular colors (color palette 0-7)
regular0=fbf1c7 # black
regular1=cc241d # red
regular2=98971a # green
regular3=d79921 # yellow
regular4=458588 # blue
regular5=7c6f64 # magenta (desaturated brownish-gray)
regular6=689d6a # cyan
regular7=7c6f64 # white
## Bright colors (color palette 8-15)
bright0=928374 # bright black
bright1=9d0006 # bright red
bright2=79740e # bright green
bright3=b57614 # bright yellow
bright4=076678 # bright blue
bright5=7c6f64 # bright magenta (neutral/desaturated tone)
bright6=427b58 # bright cyan
bright7=3c3836 # bright white
# alpha=1.0
# background=242424
# foreground=ffffff
# flash=7f7f00
# flash-alpha=0.5
## Normal/regular colors (color palette 0-7)
# regular0=242424 # black
# regular1=f62b5a # red
# regular2=47b413 # green
# regular3=e3c401 # yellow
# regular4=24acd4 # blue
# regular5=f2affd # magenta
# regular6=13c299 # cyan
# regular7=e6e6e6 # white
## Bright colors (color palette 8-15)
# bright0=616161 # bright black
# bright1=ff4d51 # bright red
# bright2=35d450 # bright green
# bright3=e9e836 # bright yellow
# bright4=5dc5f8 # bright blue
# bright5=feabf2 # bright magenta
# bright6=24dfc4 # bright cyan
# bright7=ffffff # bright white
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
# dim7=<not-set>
## The remaining 256-color palette
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-maximized=no
# double-click-to-maximize=yes
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
# show-urls-launch=Control+Shift+o
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=Control+Shift+u
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-char=Shift+Right
# extend-to-word-boundary=Control+w Control+Shift+Right
# extend-to-next-whitespace=Control+Shift+w
# extend-line-down=Shift+Down
# extend-backward-char=Shift+Left
# extend-backward-to-word-boundary=Control+Shift+Left
# extend-backward-to-next-whitespace=none
# extend-line-up=Shift+Up
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
# quit=none
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[mouse-bindings]
# scrollback-up-mouse=BTN_WHEEL_BACK
# scrollback-down-mouse=BTN_WHEEL_FORWARD
# font-increase=Control+BTN_WHEEL_BACK
# font-decrease=Control+BTN_WHEEL_FORWARD
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-quote = BTN_LEFT-3
# select-row=BTN_LEFT-4
# vim: ft=dosini

View File

@@ -1,22 +1,22 @@
[Added Associations]
video/mp4=org.videolan.VLC.desktop;org.kde.dragonplayer.desktop;mpv.desktop;
video/quicktime=org.videolan.VLC.desktop;org.kde.dragonplayer.desktop;mpv.desktop;
video/mp4=mpv.desktop;
video/quicktime=mpv.desktop;
[Default Applications]
inode/directory=pcmanfm-qt
video/mp4=org.videolan.VLC.desktop;
video/quicktime=org.videolan.VLC.desktop
inode/directory=thunar
video/mp4=mpv.desktop;
video/quicktime=mpv.desktop
text/html=/usr/bin/firefox
application/xhtml+xml=/usr/bin/firefox
application/xml=/usr/bin/firefox
text/xml=/usr/bin/firefox
text/xsl=/usr/bin/firefox
application/rss+xml=/usr/bin/firefox
application/atom+xml=/usr/bin/firefox
x-scheme-handler/http=/usr/bin/firefox
x-scheme-handler/https=/usr/bin/firefox
x-scheme-handler/ftp=/usr/bin/firefox
x-scheme-handler/chrome=/usr/bin/firefox
x-scheme-handler/about=/usr/bin/firefox
x-scheme-handler/mailto=/usr/bin/firefox
text/html=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
application/xhtml+xml=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
application/xml=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
text/xml=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
text/xsl=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
application/rss+xml=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
application/atom+xml=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
x-scheme-handler/http=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
x-scheme-handler/https=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
x-scheme-handler/ftp=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
x-scheme-handler/chrome=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
x-scheme-handler/about=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community
x-scheme-handler/mailto=/var/lib/flatpak/exports/bin/io.gitlab.librewolf-community

152
.config/rofi/config.rasi Normal file
View File

@@ -0,0 +1,152 @@
// Config //
configuration {
modi: "drun,filebrowser,window";
show-icons: true;
display-drun: "󰣚";
display-run: "";
display-filebrowser: "";
display-window: "";
drun-display-format: "{name}";
window-format: "{w}{t}";
font: "Hack Font 10";
icon-theme: "Papirus";
}
@theme "~/.config/rofi/graphite-mono.rasi"
// Main //
window {
height: 200px;
width: 600px;
transparency: "real";
fullscreen: false;
enabled: true;
cursor: "default";
spacing: 0px;
padding: 0px;
border: 2px;
border-radius: 40px;
border-color: @main-br;
background-color: transparent;
}
mainbox {
enabled: true;
spacing: 0px;
padding: 0px;
orientation: vertical;
children: [ "listbox" , "inputmode" ];
background-color: rgba(32, 32, 32, 0.88);
}
// Lists //
listbox {
padding: 0px;
spacing: 0px;
orientation: horizontal;
children: [ "listview" ];
background-color: transparent;
}
listview {
padding: 10px;
spacing: 0px;
enabled: true;
columns: 5;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
cursor: "default";
background-color: @main-bg;
text-color: @main-fg;
}
// Inputs //
inputmode {
padding: 0px;
spacing: 0px;
orientation: horizontal;
children: [ "inputbar" , "mode-switcher" ];
background-color: transparent;
}
inputbar {
enabled: true;
width: 400px;
height: 0px;
spacing: 0px;
padding: 30px 10px 30px 65px;
children: [ "entry" ];
background-color: transparent;
}
entry {
vertical-align: 0.5;
border-radius: 50px;
enabled: true;
spacing: 0px;
padding: 10px;
text-color: @main-fg;
background-color: @main-bg;
}
// Modes //
mode-switcher {
width: 200px;
orientation: horizontal;
enabled: true;
padding: 30px 65px 30px 0px;
spacing: 10px;
background-color: transparent;
}
button {
cursor: pointer;
padding: 0px;
border-radius: 50px;
background-color: @main-bg;
text-color: @main-fg;
}
button selected {
background-color: @main-fg;
text-color: @main-bg;
}
// Elements //
element {
orientation: vertical;
enabled: true;
spacing: 0px;
padding: 10px;
border-radius: 25px;
cursor: pointer;
background-color: transparent;
text-color: @main-fg;
}
@media(max-aspect-ratio: 1.8) {
element {
orientation: vertical;
}
}
element selected.normal {
background-color: @select-bg;
text-color: @select-fg;
}
element-icon {
size: 38px;
cursor: inherit;
background-color: transparent;
text-color: inherit;
}
element-text {
vertical-align: 0.5;
horizontal-align: 0.5;
cursor: inherit;
background-color: transparent;
text-color: inherit;
}

View File

@@ -0,0 +1,10 @@
* {
main-bg: #262626e6;
main-fg: #d9d9d9ff;
main-br: #a6a6a6ff;
main-ex: #595959cc;
select-bg: #a6a6a6ff;
select-fg: #262626ff;
separatorcolor: transparent;
border-color: transparent;
}

View File

@@ -11,11 +11,11 @@ set $right l
set $mod Mod4
# Terminal
set $term alacritty
set $term foot
# Application Launcher
set $menu bemenu-run -p Run: -l 10 -c -M 500 --fn 'Terminus 17' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00'
#set $menu rofi -show
#set $menu bemenu-run -p Run: -l 10 -c -M 500 --fn 'Terminus 17' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00'
set $menu rofi -show
#######################
# GENERAL KEYBINDS
@@ -24,7 +24,7 @@ set $menu bemenu-run -p Run: -l 10 -c -M 500 --fn 'Terminus 17' --tf '#ff4e00' -
# Start a terminal
bindsym $mod+Return exec $term
# Start wofi
# Start rofi
bindsym $mod+d exec $menu
# Kill focused window
@@ -43,6 +43,9 @@ bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
# bindsym $mod+Shift+x exec swaymsg -r exit
# Reload the configuration file
bindsym $mod+Shift+comma exec /usr/bin/keepassxc
## Volume
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
@@ -163,12 +166,12 @@ bindsym $mod+Ctrl+g exec grimshot save window
#bindsym $mod+Shift+e exec wlogout -p layer-shell
# Bookmarks
bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
# bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
bindsym $mod+Shift+Insert exec ~/.local/bin/bookmark_insert
# bindsym $mod+Shift+Insert exec ~/.local/bin/bookmark_insert
# Emojis
bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emojis* | bemenu -p Emoji: -l 25 -c -M 500 --fn 'Noto Color Emoji,Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | awk '{print $1}')
# bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emojis* | bemenu -p Emoji: -l 25 -c -M 500 --fn 'Noto Color Emoji,Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | awk '{print $1}')
#######################
@@ -177,28 +180,29 @@ bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emoj
set $gnome-schema org.gnome.desktop.interface
# Set GTK/icon theme
exec_always {
gsettings set $gnome-schema gtk-theme 'ArcDarker'
gsettings set $gnome-schema icon-theme 'Papirus-Dark'
gsettings set $gnome-schema cursor-theme 'Breeze_Light'
# Set GTK/icon theme
exec {
gsettings set $gnome-schema gtk-theme 'Arc-Darker'
gsettings set $gnome-schema icon-theme 'Papirus'
gsettings set $gnome-schema cursor-theme 'breeze_cursors'
gsettings set $gnome-schema cursor-size 30
gsettings set $schema gtk-application-prefer-dark-theme true
}
# Syncthing
exec /usr/bin/syncthing
exec /usr/bin/syncthing &
# Notifications
exec_always dunst
exec pgrep -x dunst > /dev/null || dunst
# Wlsunset (Night Light)
exec_always wlsunset -l 47.6 -L -122.3 -t 2000 -T 3000
# Gammastep until wlsunset becomes a thing again:
exec_always sleep 2 && pgrep -x gammastep > /dev/null || gammastep -l 47.6062:-122.3321 -t 3000:2500
# udiskie - auto usb mounting
exec /usr/bin/udiskie &
# Network Manager tray applet
exec_always /usr/bin/nm-applet
exec pgrep -x nm-tray || /usr/bin/nm-tray
# Bluetooth manager tray applet
exec /usr/bin/blueman-applet
@@ -210,6 +214,9 @@ exec /usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# Weather script (runs every 900 seconds, updates /tmp/weather.txt for swaybar to read from).
exec_always sleep 2 && ~/.config/sway/scripts/weather_swaybar.scm &
# Idle configuration
#exec swayidle -w \
# timeout 3200 'swaymsg "output * dpms off"' \
@@ -221,13 +228,6 @@ exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activati
# DECORATIONS
#######################
# SwayFX specific directions
corner_radius 3
shadows enable
#default_dim_inactive 0.1
blur enable
blur_xray disable
# Gaps
smart_gaps off
gaps inner 5
@@ -239,12 +239,14 @@ default_floating_border none
client.focused "#D27A31" "#5F9EA0" "#000000" "#D27A31"
set $opacity 0.9
for_window [app_id="emacs"] opacity $opacity
for_window [class="Emacs"] opacity $opacity
for_window [app_id="foot"] opacity $opacity
for_window [app_id="strawberry"] opacity $opacity
for_window [app_id="pcmanfm-qt"] opacity $opacity
for_window [app_id="org.kde.polkit-kde-authentication-agent-1"] floating enable
for_window [app_id="bemenu"] floating enable
for_window [app_id="bemenu"] layer top
for_window [class="KeePassXC"] opacity $opacity
for_window [class="KeePassXC"] floating enable
#for_window [app_id="org.kde.polkit-kde-authentication-agent-1"] floating enable
#for_window [app_id="bemenu"] floating enable
#for_window [app_id="bemenu"] layer top
#######################
@@ -278,7 +280,7 @@ input "1241:1031:USB-HID_Keyboard_Mouse" {
accel_profile "flat"
}
seat seat0 xcursor_theme Breeze_Light 30
seat seat0 xcursor_theme breeze_cursors 30
# Hide mouse cursor after inactivity
seat * hide_cursor 10000
@@ -297,7 +299,7 @@ bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
# Monitors
output HDMI-A-1 scale 2.0
#output HDMI-A-1 scale 2.0
# Wallpaper
output * bg ~/.config/wallpapers/greek-ruins.jpg fill
@@ -343,7 +345,20 @@ bindsym $mod+Shift+0 move container to workspace $ws7
# BAR
#######################
# Status Bar:
bar {
swaybar_command waybar
position top
font "ETBembo 17"
height 40
icon_theme "Papirus"
strip_workspace_numbers yes
status_command ~/.config/sway/scripts/bar.sh
colors {
statusline #ffffff
background #000000AA
inactive_workspace #323232AA #323232AA #5c5c5cAA
focused_workspace #323232AA #5c5c5cAA #FFFFFFAA
}
#swaybar_command waybar
}

109
.config/sway/scripts/bar.sh Executable file
View File

@@ -0,0 +1,109 @@
#!/bin/bash
get_date() {
echo -n "$(date '+%a %d/%m/%y %H:%M')"
}
get_battery() {
BATTERY_PATH="/sys/class/power_supply/BAT0"
if [ -f "$BATTERY_PATH/capacity" ]; then
BAT_PERCENT=$(cat "$BATTERY_PATH/capacity")
BAT_STATUS=$(cat "$BATTERY_PATH/status")
# Determine battery icon based on percentage
case $BAT_PERCENT in
9[5-9]|100)
ICON="󰁹" # Full battery (95%-100%)
;;
9[0-4])
ICON="󰂂" # 90%-94% battery
;;
8[0-9])
ICON="󰂁" # 80% battery
;;
7[0-9])
ICON="󰂀" # 70% battery
;;
6[0-9])
ICON="󰁿" # 60% battery
;;
5[0-9])
ICON="󰁾" # 50% battery
;;
4[0-9])
ICON="󰁽" # 40% battery
;;
3[0-9])
ICON="󰁼" # 30% battery
;;
2[0-9])
ICON="󰁻" # 20% battery
;;
1[0-9])
ICON="󰂃" # 10% battery
;;
*)
ICON="󰂃" # Critical battery (less than 10%)
;;
esac
# Display charging icon if the battery is charging
if [ "$BAT_STATUS" == "Charging" ] || [ "$BAT_STATUS" == "Unknown" ]; then
echo -n "󱐋 $BAT_PERCENT%"
else
echo -n "$ICON $BAT_PERCENT%"
fi
# Send notifications at critical levels
case $BAT_PERCENT in
30)
notify-send -u normal "Battery at 30%" "Consider plugging in."
;;
20)
notify-send -u normal "Battery at 20%" "Battery is getting low."
;;
10)
notify-send -u critical "Battery at 10%" "Battery is critically low!"
;;
[5])
notify-send -u critical "Battery at 5%" "Battery is about to die!"
;;
esac
else
echo -n "Battery not found"
fi
}
get_volume() {
# Get the default sink (output device)
SINK=$(pactl info | awk -F': ' '/Default Sink/ {print $2}')
# Get the volume percentage
VOLUME=$(pactl get-sink-volume "$SINK" | awk '{print $5}' | head -n1)
# Get the mute status
MUTE_STATUS=$(pactl get-sink-mute "$SINK" | awk '{print $2}')
# Check if the output is muted
if [ "$MUTE_STATUS" == "no" ]; then
# Volume is not muted, display the volume percentage
echo -n "$VOLUME"
else
# Volume is muted, display mute icon
echo -n "󰖁 Muted"
fi
}
get_weather() {
temp=$(cat /tmp/weather.txt)
echo "$temp"
}
while true; do
echo "$(get_weather) $(get_volume) $(get_date) $(get_battery)"
sleep 1
done

View File

@@ -0,0 +1,91 @@
#!/usr/bin/env guile-3.0
!#
(use-modules (web client)
(json)
(rnrs bytevectors)
(ice-9 receive)
(srfi srfi-18)) ;; For sleep functionality
(define api-key "99631af2d6db903d1f689c7d2cb13764")
(define city-id "5809844")
(define units "metric")
;; Construct the openweathermap URL with API token, city ID, and unit of measurement
(define weather-url
(format #f "http://api.openweathermap.org/data/2.5/weather?id=~a&units=~a&appid=~a"
city-id units api-key))
;; Define weather icons as an association list
(define weather-icons
'(("clear sky" . "☀️")
("few clouds" . "🌤️")
("scattered clouds" . "🌥️")
("broken clouds" . "☁️")
("overcast clouds" . "☁️")
("shower rain" . "🌦️")
("light rain" . "🌧️")
("light intensity drizzle" . "🌧️")
("rain" . "🌧️")
("moderate rain" . "🌧️")
("thunderstorm" . "⛈️")
("snow" . "❄️")
("mist" . "🌫️")
("haze" . "🌫️")
("smoke" . "🌫️")
("fog" . "🌫️")))
;; Convert Celsius to Fahrenheit
(define (celsius-to-fahrenheit celsius)
(+ (* celsius (/ 9 5)) 32))
;; Get weather icon based on description
(define (get-weather-icon description)
(or (assoc-ref weather-icons description) "❓"))
;; Parse and extract weather data from JSON
(define (extract-weather-data json-data)
(let* ((main (assoc "main" json-data))
(temp-c (and main
(cdr (assoc "temp" (cdr main)))))
;; Round and convert to exact integer
(temp-c-value (and temp-c
(inexact->exact
(round temp-c))))
(weather-description
(cdr (assoc "description"
(vector-ref (cdr (assoc "weather" json-data)) 0)))))
;; Return temperature (C, F), description, and icon
(values temp-c-value
(and temp-c-value
(inexact->exact
(round (celsius-to-fahrenheit temp-c-value))))
weather-description
(get-weather-icon weather-description))))
;; Fetch and display weather data to a file
(define (get-weather)
;; Request and parse the data
(receive (response-status response-body)
(http-request weather-url)
(let ((json-data (json-string->scm
(utf8->string response-body))))
(call-with-values
(lambda () (extract-weather-data json-data))
(lambda (temp-c temp-f description icon)
;; Open file for writing
(call-with-output-file "/tmp/weather.txt"
(lambda (port)
;; Write the weather information to the file
(if temp-c
(format port "~a ~d°C / ~d°F~%" icon temp-c temp-f)
(format port "Error: Temperature data not available.\n")))))))))
;; Run the script indefinitely, fetching weather every 900 seconds (15 minutes)
(define (run-indefinitely)
(let loop ()
(get-weather)
(sleep 900) ;; Sleep for 900 seconds (15 minutes)
(loop)))
(run-indefinitely)

View File

@@ -40,12 +40,12 @@
"warning": 30,
"critical": 15
},
"full-at": "99",
"full-at": "100",
"format": "{icon} {capacity}%",
"format-icons": [" ","", "","", ""],
"format-good": " %", // An empty format will hide the module
"format-full": "",
"format-charging": " {capacity}% "
"format-icons": ["󰁺","󰁻", "󰁼","󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
"format-good": "󰁹 %", // An empty format will hide the module
"format-full": "󱈑",
"format-charging": "󰂄 {capacity}% "
},
"custom/wlsunset": {
"format": "{icon}",

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env guile3.0
#!/usr/bin/env guile-3.0
!#
(use-modules (ice-9 popen)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env guile3.0
#!/usr/bin/env guile-3.0
!#
(use-modules (web client)