Added UI configs

Added Rofi Config
Added Tint2 Config
Added eww Config

Updated Xmonad config for ui panels

Added auth loader for zsh

Added window corner radius to picom
Joe Bellus 1 year ago
parent 4df25f8223
commit 857aa26499

1113
eww.org

File diff suppressed because it is too large Load Diff

@ -3,38 +3,49 @@
* Corners
#+begin_src conf
# corner-radius = 12;
# rounded-corners-exclude = [
# #"window_type = 'normal'",
# "class_g = 'Rofi'",
# #"class_g = 'Tint2'",
# "name = 'Notification area'",
# #"class_g = 'kitty'",
# #"class_g = 'Alacritty'",
# "class_g = 'Polybar'",
# "class_g = 'code-oss'",
# "class_g = 'firefox'",
# "class_g = 'Thunderbird'",
# "name = 'xmobar'",
# "class_g = 'dmenu'"
# ];
# round-borders = 1;
# round-borders-exclude = [
# #"class_g = 'TelegramDesktop'",
# ];
# requires: https://github.com/sdhand/compton
corner-radius = 12;
rounded-corners-exclude = [
#"window_type = 'normal'",
"class_g = 'Rofi'",
#"class_g = 'Tint2'",
"name = 'Notification area'",
#"class_g = 'kitty'",
#"class_g = 'Alacritty'",
"class_g = 'Polybar'",
"class_g = 'code-oss'",
"class_g = 'firefox'",
"class_g = 'Thunderbird'"
];
round-borders = 1;
round-borders-exclude = [
#"class_g = 'TelegramDesktop'",
];
#+end_src
* Shadows
Enable client-side shadows on windows
#+begin_src conf
shadow = true;
# 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 = 12;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
shadow-opacity = .75
shadow-opacity = 0.75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -15;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -15;
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
@ -48,19 +59,38 @@ shadow-offset-y = -15;
# no-dnd-shadow = false
# Red color value of shadow (0.0 - 1.0, defaults to 0).
shadow-red = 0
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
shadow-green = 0
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
shadow-blue = 0
# shadow-blue = 0
# Do not paint shadows on shaped windows. Note shaped windows
# here means windows setting its shape through X Shape extension.
# Those using ARGB background is beyond our control.
# Deprecated, use
# shadow-exclude = 'bounding_shaped'
# or
# shadow-exclude = 'bounding_shaped && !rounded_corners'
# instead.
#
# shadow-ignore-shaped = ''
# 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'",
"class_g = 'slop'",
"class_g = 'Polybar'",
"_GTK_FRAME_EXTENTS@:c"
];
@ -146,10 +176,11 @@ focus-exclude = [
* Background Bluring
#+begin_src conf
# Parameters for background blurring, see the *BLUR* section for more information.
blur_method = "dual_kawase"
blur_deviation = true
blur_method = "kawase";
# blur_deviation = true;
blur-size = 12
blur-size = 12;
blur-strength = 12;
#
# blur-deviation = false
@ -168,7 +199,7 @@ blur-background-frame = true;
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
blur-background-fixed = true;
# Specify the blur convolution kernel, with the following format:
@ -176,7 +207,7 @@ blur-background-frame = true;
# 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";
blur-kern = "3x3box";
# # Exclude conditions for background blur.

@ -0,0 +1,405 @@
#+TITLE: Rofi Configuration
* Main Configuration
#+begin_src js :tangle ~/.config/rofi/config.rasi :mkdirp yes
configuration {
show-icons: true;
icon-theme: "candy-icons";
}
#+end_src
* Launcher
** Black Launcher
#+begin_src css :tangle ~/.config/rofi/launcher/black_launcher.rasi :mkdirp yes
* {
al: #00000000;
bg: #010101ff;
se: #ffd5cdff;
fg: #444;
ac: #BA68C8ff;
red: #EC7875ff;
green: #61C766ff;
yellow: #FDD835ff;
blue: #42A5F5ff;
purple: #BA68C8ff;
cyan: #4DD0E1ff;
}
#+end_src
** Style
#+begin_src css :tangle ~/.config/rofi/launcher/style.rasi :mkdirp yes
configuration {
lines: 10;
columns: 1;
font: "Museo Sans 12";
bw: 0;
location: 0;
padding: 0;
fixed-num-lines: true;
show-icons: true;
icon-theme: "candy-icons";
sidebar-mode: true;
separator-style: "none";
hide-scrollbar: true;
fullscreen: false;
fake-transparency: false;
scroll-method: 0;
window-format: "[{w}] ··· {c} ··· {t}";
click-to-exit: true;
show-match: false;
combi-hide-mode-prefix: false;
display-window: " ";
display-windowcd: " ";
display-run: " ";
display-ssh: " ";
display-drun: " ";
display-combi: " ";
}
@import "black_launcher.rasi"
* {
background-color: @bg;
}
window {
border: 0px;
border-color: @ac;
border-radius: 12px;
padding: 30;
width: 35%;
}
prompt {
spacing: 0;
border: 0;
text-color: @fg;
}
textbox-prompt-colon {
expand: false;
str: " ";
margin: 0px 4px 0px 0px;
text-color: inherit;
}
entry {
spacing: 0;
text-color: @fg;
}
case-indicator {
spacing: 0;
text-color: @fg;
}
inputbar {
spacing: 0px;
text-color: @fg;
padding: 1px;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
mainbox {
border: 0px;
border-color: @ac;
padding: 6;
}
listview {
fixed-height: 0;
border: 0px;
border-color: @ac;
spacing: 4px;
scrollbar: false;
padding: 5px 5px 0px 5px;
}
element {
border: 0px;
border-radius: 4px;
padding: 5px;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
element normal.normal {
background-color: @bg;
text-color: @fg;
}
element normal.urgent {
background-color: @bg;
text-color: @red;
}
element normal.active {
background-color: @green;
text-color: @bg;
}
element selected.normal {
background-color: @fg;
text-color: @bg;
}
element selected.urgent {
background-color: @bg;
text-color: @red;
}
element selected.active {
background-color: @fg;
text-color: @bg;
}
element alternate.normal {
background-color: @bg;
text-color: @fg;
}
element alternate.urgent {
background-color: @bg;
text-color: @fg;
}
element alternate.active {
background-color: @bg;
text-color: @fg;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
sidebar {
border: 0px;
border-color: @ac;
border-radius: 0px;
}
button {
background-color: @fg;
margin: 5px;
padding: 5px;
text-color: @bg;
border: 0px;
border-radius: 4px;
border-color: @fg;
}
button selected {
background-color: @ac;
text-color: @fg;
border: 0px;
border-radius: 4px;
border-color: @fg;
}
scrollbar {
width: 4px;
border: 0px;
handle-color: @fg;
handle-width: 8px;
padding: 0;
}
message {
border: 0px;
border-color: @ac;
padding: 1px;
}
textbox {
text-color: @fg;
}
#+end_src
* Power Menu
** Black powermenu
#+begin_src js :tangle ~/.config/rofi/powermenu/black_powermenu.rasi :mkdirp yes
* {
background-alt: #121212ff;
background: #121212ff;
selected: #ffd5cdff;
foreground: #eeeeeeff;
ac: #ea907aff;
red: #D35D6Eff;
green: #90c861ff;
yellow: #FDD835ff;
blue: #84afdbff;
purple: #c47eb7ff;
cyan: #4DD0E1ff;
}
#+end_src
* Card Circle
#+begin_src js :tangle ~/.config/rofi/powermenu/card_circle.rasi :mkdirp yes
configuration {
font: "Museo Sans 18";
show-icons: false;
icon-theme: "Papirus";
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
@import "black_powermenu.rasi"
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 12px;
height: 22%;
width: 37%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: false;
padding: 0.5% 0.5% 0.5% 0%;
background-color: @background;
text-color: @foreground;
}
textbox-prompt-colon {
expand: true;
str: "Goodbye, Axarva";
background-color: @background;
text-color: @selected;
padding: 3% 0.5% 0% 0%;
}
inputbar {
children: [ textbox-prompt-colon ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0% 0.2% 0.2% 0%;
border-radius: 0% 100% 100% 100%;
border-color: @border;
margin: 0% 3% 0% 9.5%;
padding: 0.5%;
position: center;
}
listview {
background-color: @background;
margin: 0% 0% 0% 0%;
spacing: 1%;
cycle: true;
dynamic: true;
layout: horizontal;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
spacing: 1.5%;
padding: 0.1% 0% 0% 2%;
}
element {
background-color: @background-alt;
text-color: @selected;
orientation: horizontal;
border-radius: 100%;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
element-text {
font: "feather 28";
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 2.5% 1.7% 2.5% 1.7%;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 0.2%;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @background;
text-color: @red;
border: 0% 0.2% 0.2% 0%;
border-radius: 100%;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}
#+end_src
* Confirm
#+begin_src js :tangle ~/.config/rofi/powermenu/confirm.rasi :mkdirp yes
@import "black_powermenu.rasi"
* {
background-color: @background;
text-color: @selected;
font: "Museo Sans 12";
}
window {
width: 225px;
padding: 25px;
border: 1px;
border-radius: 12px;
border-color: @border;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @border;
}
#+end_src
* Message
#+begin_src js :tangle ~/.config/rofi/powermenu/message.rasi :mkdirp yes
@import "black_powermenu.rasi"
* {
background-color: @background;
text-color: @selected;
font: "Museo Sans 12";
}
window {
width: 360px;
padding: 25px;
border: 1px;
border-radius: 12px;
border-color: @border;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @border;
}
#+end_src

@ -0,0 +1,125 @@
* Send to Remarkable
Sends a PDF or EPUB to a Remarkble. Remarkable must be configured in ssh_config as "remarkable"
#+begin_src sh :tangle ~/.local/bin/toremarkable :mkdirp yes :shebang #!/bin/bash
REMARKABLE_HOST=${REMARKABLE_HOST:-remarkable}
REMARKABLE_XOCHITL_DIR=${REMARKABLE_XOCHITL_DIR:-.local/share/remarkable/xochitl/}
TARGET_DIR="${REMARKABLE_HOST}:${REMARKABLE_XOCHITL_DIR}"
# Check if we have something to do
if [ $# -lt 1 ]; then
echo "Transfer PDF or EPUB document(s) to a reMarkable tablet."
echo "See comments/documentation at start of script."
echo "usage: $(basename $0) [ -r ] path-to-file [path-to-file]..."
exit 1
fi
RESTART_XOCHITL_DEFAULT=${RESTART_XOCHITL_DEFAULT:-0}
RESTART_XOCHITL=${RESTART_XOCHITL_DEFAULT}
if [ "$1" = "-r" ] ; then
shift
if [ $RESTART_XOCHITL_DEFAULT -eq 0 ] ; then
echo Switching
RESTART_XOCHITL=1
else
RESTART_XOCHITL=0
fi
fi
# Create directory where we prepare the files as the reMarkable expects them
tmpdir=$(mktemp -d)
# Loop over the command line arguments,
# which we expect are paths to the files to be transferred
for filename in "$@" ; do
# reMarkable documents appear to be identified by universally unique IDs (UUID),
# so we generate one for the document at hand
uuid=$(uuidgen | tr '[:upper:]' '[:lower:]')
extension="${filename##*.}"
# Copy the file itself
cp -- "$filename" "${tmpdir}/${uuid}.${extension}"
# Add metadata
# The lastModified item appears to contain the date in milliseconds since Epoch
cat <<EOF >>${tmpdir}/${uuid}.metadata
{
"deleted": false,
"lastModified": "$(date +%s)000",
"metadatamodified": false,
"modified": false,
"parent": "",
"pinned": false,
"synced": false,
"type": "DocumentType",
"version": 1,
"visibleName": "$(basename -- "$filename" ".$extension")"
}
EOF
if [ "$extension" = "pdf" ]; then
# Add content information
cat <<EOF >${tmpdir}/${uuid}.content
{
"extraMetadata": {
},
"fileType": "pdf",
"fontName": "",
"lastOpenedPage": 0,
"lineHeight": -1,
"margins": 100,
"pageCount": 1,
"textScale": 1,
"transform": {
"m11": 1,
"m12": 1,
"m13": 1,
"m21": 1,
"m22": 1,
"m23": 1,
"m31": 1,
"m32": 1,
"m33": 1
}
}
EOF
# Add cache directory
mkdir ${tmpdir}/${uuid}.cache
# Add highlights directory
mkdir ${tmpdir}/${uuid}.highlights
# Add thumbnails directory
mkdir ${tmpdir}/${uuid}.thumbnails
elif [ "$extension" = "epub" ]; then
# Add content information
cat <<EOF >${tmpdir}/${uuid}.content
{
"fileType": "epub"
}
EOF
else
echo "Unknown extension: $extension, skipping $filename"
rm -rf ${tmpdir}/*
continue
fi
# Transfer files
echo "Transferring $filename as $uuid"
scp -r ${tmpdir}/* "${TARGET_DIR}"
rm -rf ${tmpdir}/*
done
rm -rf ${tmpdir}
if [ $RESTART_XOCHITL -eq 1 ] ; then
echo "Restarting Xochitl..."
ssh ${REMARKABLE_HOST} "systemctl restart xochitl"
echo "Done."
fi
#+end_src

File diff suppressed because it is too large Load Diff

@ -22,6 +22,7 @@ import Data.List
import XMonad.Layout.Spacing
import XMonad.Layout.Renamed
import XMonad.Layout.NoBorders
import XMonad.Hooks.DynamicProperty
import qualified XMonad.StackSet as W
import qualified Data.Map as M
@ -48,12 +49,19 @@ myFocusedBorderColor = "#bc96da"
* Keybindings
#+begin_src haskell
sidebarlaunch = spawn "eww open-many weather_side time_side smol_calendar player_side sys_side sliders_side"
centerlaunch = spawn "eww open-many blur_full weather profile quote search_full disturb-icon vpn-icon home_dir screenshot power_full reboot_full lock_full logout_full suspend_full"
ewwclose = spawn "eww close-all"
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch dmenu
-- , ((modm, xK_space ), spawn "dmenu_run")
, ((modm, xK_space ), spawn "rofi -show drun -modi drun,run -theme ~/.config/rofi/rofi-collection/dracula/dracula.rasi")
-- launcher
, ((modm, xK_space ), spawn "rofi -no-lazy-grab -show drun -modi run,drun,window -theme $HOME/.config/rofi/launcher/style -drun-icon-theme \"candy-icons\"")
-- dashbaords
, ((modm, xK_F1 ), sidebarlaunch)
, ((modm, xK_F2 ), centerlaunch)
, ((modm, xK_F4 ), ewwclose)
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
@ -92,7 +100,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
, ((0, 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0, 0x1008FF12), spawn "amixer set Master toggle")
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
, ((modm .|. shiftMask, xK_q ), spawn "~/.local/bin/powermenu.sh")
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "xmonad --recompile; xmonad --restart")
]
@ -139,7 +147,7 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
#+begin_src haskell
full = renamed [Replace "Full"]
$ spacingWithEdge 20
$ spacingWithEdge 10
$ Full
tiled = renamed [Replace "Master"]
@ -177,6 +185,7 @@ myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, className =? "1Password" --> doFloat
, className =? "nextcloud" --> doFloat
, title =? "Media viewer" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
@ -184,12 +193,10 @@ myManageHook = composeAll
* Scratch Pads
#+begin_src haskell
scratchpads :: [NamedScratchpad]
scratchpads = [
-- run htop in xterm, find it by title, use default floating window placement
NS "term" "kitty --class kittyscratch" (className =? "kittyscratch")
(customFloating $ W.RationalRect (1/4) (1/4) (2/4) (2/4))
(customFloating $ W.RationalRect (2/5) (1/6) (2/5) (4/6))
]
#+end_src
* Event Handling
@ -215,7 +222,7 @@ myEventHook = mempty
myLogHook h = dynamicLogWithPP $ def
{ ppLayout = wrap "<fn=2>\xf00a</fn> " ""
, ppTitleSanitize = wrap " <fn=2>\xf40e</fn> <fc=#777>" "</fc>"
, ppTitle = wrap " <fn=2>\xf40e</fn> <fc=#777>" "</fc>"
, ppWsSep = " "
, ppSep = " "
, ppVisible = const "<fn=1>\xf111</fn>"
@ -241,9 +248,11 @@ myStartupHook = do
spawnOnce "feh --bg-fill /mnt/data-drive/NextCloud/Wallpapers/sylvanas2.jpg"
spawnOnce " xrandr --output DVI-D-0 --mode 3840x2160 --pos 6400x0 --rotate normal --output HDMI-0 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-0 --primary --mode 2560x1440 --pos 3840x0 --rotate normal --output DP-1 --off"
spawnOnce "dunst"
spawnOnce "stalonetray"
spawnOnce "nextcloud"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
spawnOnce "eww daemon"
spawnOnce "tint2 -c ~/.config/tint2/panellauncher.tint2rc"
spawnOnce "eww open-many weather_side time_side smol_calendar player_side sys_side sliders_side"
#+end_src
* Main Configuration
@ -254,6 +263,7 @@ main = do
xmproc2 <- spawnPipe "xmobar -x 1 /home/joe/.config/xmobar/1.rc"
xmproc3 <- spawnPipe "xmobar -x 2 /home/joe/.config/xmobar/2.rc"
emacsproc <- spawnPipe "/usr/bin/emacs --daemon"
xmonad $ withUrgencyHook dzenUrgencyHook { args = ["-bg", "darkgreen", "-xs", "1"] } $ docks $ def {
-- simple stuff
terminal = myTerminal,
@ -270,7 +280,7 @@ main = do
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
layoutHook = gaps [(L,30), (R,30), (U,40), (D,60)] $ spacingRaw True (Border 10 10 10 10) True (Border 10 10 10 10) True $ smartBorders $ myLayout,
manageHook = (myManageHook <+> namedScratchpadManageHook scratchpads),
handleEventHook = myEventHook,
logHook = myLogHook xmproc1,
@ -291,11 +301,12 @@ Config {
, "xft:Hack Nerd Font Mono:pixelsize=21"
, "xft:Hack Nerd Font Mono:pixelsize=25"
]
, bgColor = "#2B2E37"
, bgColor = "#111"
, fgColor = "#646464"
, alpha = 220
, position = Top
, border = NoBorder
, alpha = 255
, position = TopW C 75
-- , Static { xpos = 0 , ypos = 1064, width = 1920, height = 16 }
, border = NoBorder
, borderColor = "#646464"
-- layout
@ -338,9 +349,9 @@ Config {
, "xft:Hack Nerd Font Mono:pixelsize=21"
, "xft:Hack Nerd Font Mono:pixelsize=25"
]
, bgColor = "#2B2E37"
, bgColor = "#111"
, fgColor = "#646464"
, alpha = 220
, alpha = 255
, position = Top
, border = NoBorder
, borderColor = "#646464"
@ -414,9 +425,9 @@ Config {
, "xft:Hack Nerd Font Mono:pixelsize=21"
, "xft:Hack Nerd Font Mono:pixelsize=25"
]
, bgColor = "#2B2E37"
, bgColor = "#111"
, fgColor = "#646464"
, alpha = 220
, alpha = 255
, position = Top
, border = NoBorder
, borderColor = "#646464"
@ -476,10 +487,106 @@ fi
** Updates
#+begin_src sh :tangle ~/.config/xmobar/updates.sh :mkdirp yes :shebang #!/bin/bash
pamac checkupdates | grep '/up to date/' &> /dev/null
if [ $? == 0 ]; then
VAL=$(pamac checkupdates | grep -c '/up to date/')
if [ "$VAL" == 0 ]; then
echo "<fc=#3388CC><fn=1></fn></fc>"
else
echo "<fc=#999999><fn=1></fn></fc>"
fi
#+end_src
* Power Script
#+begin_src sh :tangle ~/.local/bin/powermenu.sh :mkdirp yes :shebang #!/bin/sh
theme="card_circle"
dir="$HOME/.config/rofi/powermenu"
# random colors
#styles=($(ls -p --hide="colors.rasi" $dir/styles))
#color="${styles[$(( $RANDOM % 8 ))]}"
# comment this line to disable random colors
#sed -i -e "s/@import .*/@import \"$color\"/g" $dir/styles/colors.rasi
# comment these lines to disable random style
#themes=($(ls -p --hide="powermenu.sh" --hide="styles" --hide="confirm.rasi" --hide="message.rasi" $dir))
#theme="${themes[$(( $RANDOM % 24 ))]}"
uptime=$(uptime -p | sed -e 's/up //g')
rofi_command="rofi -theme $dir/$theme"
# Options
shutdown=""
reboot=""
lock=""
suspend=""
logout=""
# Confirmation
confirm_exit() {
rofi -dmenu\
-i\
-no-fixed-num-lines\
-p "Are You Sure? : "\
-theme $dir/confirm.rasi
}
# Message
msg() {
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
}
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)"
case $chosen in
$shutdown)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl poweroff
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$reboot)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl reboot
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$lock)
betterlockscreen -l
;;
$suspend)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
playerctl pause
amixer set Master mute
systemctl suspend
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$logout)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
session=`loginctl session-status | head -n 1 | awk '{print $1}'`
loginctl terminate-session $session
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
esac
#+end_src

@ -70,3 +70,8 @@ function send-pixel() {
kdeconnect-cli -d $(kdeconnect-cli -l --id-only) --share $1
}
#+end_src
* Credentials & Secrets
#+begin_src sh
. ~/.env_creds
#+end_src

Loading…
Cancel
Save