Fix stuff

This commit is contained in:
Marco Thomas
2022-02-03 06:35:42 +01:00
parent 1f7db961d8
commit fd31cdf2ca
13 changed files with 164 additions and 305 deletions

View File

@@ -32,11 +32,13 @@ It will link all dotfiles to their correct place.
+ polybar + polybar
+ rofi + rofi
+ xlock + xlock
+ picom (no settings, just for compositing)
** main programs ** main programs
+ discord + discord
+ spotify + spotify
+ seafile-applet + seafile-applet
+ keepassxc + keepassxc
+ okular
** control stuff ** control stuff
+ [[https://github.com/bulletmark/libinput-gestures][libinput-gestures]] + [[https://github.com/bulletmark/libinput-gestures][libinput-gestures]]
+ pactl + pactl

View File

@@ -254,14 +254,16 @@ I mainly use these fonts:
Use non-monospace font for org-mode! Use non-monospace font for org-mode!
Blocks will still be mono-spaced. Blocks will still be mono-spaced.
#+begin_src emacs-lisp :tangle yes *CURRENTLY DISABLED*
#+begin_src emacs-lisp :tangle no
(set-face-attribute 'variable-pitch nil :family "Roboto") (set-face-attribute 'variable-pitch nil :family "Roboto")
(set-face-attribute 'fixed-pitch nil :family "JuliaMono") (set-face-attribute 'fixed-pitch nil :family "JuliaMono")
(use-package mixed-pitch (use-package mixed-pitch
:straight t :straight t
:hook :hook
(text-mode . mixed-pitch-mode)) (text-mode . mixed-pitch-mode)
(org-agenda-mode . mixed-pitch-mode))
#+end_src #+end_src
*** Bars *** Bars
@@ -342,7 +344,8 @@ TODO: Disable this in c/c++ mode.
(use-package rainbow-mode (use-package rainbow-mode
:straight t :straight t
:hook :hook
(prog-mode . rainbow-mode)) (prog-mode . rainbow-mode)
(org-mode . rainbow-mode))
#+end_src #+end_src
*** Whitespaces *** Whitespaces
@@ -370,6 +373,18 @@ I only need 80 columns on my 4K display.
(markdown-mode . fci-mode)) (markdown-mode . fci-mode))
#+end_src #+end_src
*** Highlight indentation
Show me indentation markers.
#+begin_src emacs-lisp :tangle yes
(use-package highlight-indent-guides
:straight t
:config
(setq highlight-indent-guides-method 'character
highlight-indent-guides-responsive 'top)
:hook
(prog-mode . highlight-indent-guides-mode))
#+end_src
*** File bar *** File bar
Sometimes I want to see all of my files. Sometimes I want to see all of my files.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
@@ -477,16 +492,12 @@ Bootstrap =org-mode= together with keybindings.
*** Misc *** Misc
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(setq ;; org-hidden-keywords '(title) ;; hide title (setq org-startup-with-inline-images t ;; start with inline images enabled
org-startup-with-inline-images t ;; start with inline images enabled
org-image-actual-width nil ;; rescale inline images org-image-actual-width nil ;; rescale inline images
org-directory "~/org" ;; set org file directory org-directory "~/org" ;; set org file directory
org-agenda-files (quote ("~/org")) ;; indexed files by org agenda
org-edit-src-content-indentation 0 ;; don't indent stupidly in org-edit-src-code org-edit-src-content-indentation 0 ;; don't indent stupidly in org-edit-src-code
org-log-done nil ;; just mark DONE without a time stamp org-log-done nil ;; just mark DONE without a time stamp
org-log-repeat nil ;; don't set a time after marking sth DONE org-log-repeat nil ;; don't set a time after marking sth DONE
org-agenda-start-on-weekday nil ;; my week starts on a monday
calendar-week-start-day 1 ;; my week starts on a monday
) )
#+end_src #+end_src
@@ -524,6 +535,40 @@ Also be *careful* with =haskell= recursion, it can lead to system crashes (at l
:straight t) :straight t)
#+end_src #+end_src
*** org-agenda
The default =agenda= looks a bit messy.
#+begin_src emacs-lisp :tangle yes
(use-package org-super-agenda
:straight t
:after org
:config
(setq org-super-agenda-groups '((:auto-outline-path t)))
(org-super-agenda-mode))
#+end_src
Setup some stuff for =agenda=
#+begin_src emacs-lisp :tangle yes
(setq org-agenda-files (quote ("~/org")) ;; indexed files by org agenda
org-agenda-start-on-weekday nil ;; my week starts on a monday
calendar-week-start-day 1 ;; my week starts on a monday
)
#+end_src
I need my =hjkl= :(
#+begin_src emacs-lisp :tangle yes
(define-key org-agenda-mode-map (kbd "h") 'org-agenda-earlier)
(define-key org-agenda-mode-map (kbd "l") 'org-agenda-later)
(define-key org-agenda-mode-map (kbd "j") 'org-agenda-next-line)
(define-key org-agenda-mode-map (kbd "k") 'org-agenda-previous-line)
(define-key org-agenda-mode-map (kbd "t") 'org-agenda-goto-today)
(define-key org-super-agenda-header-map (kbd "h") 'org-agenda-earlier)
(define-key org-super-agenda-header-map (kbd "l") 'org-agenda-later)
(define-key org-super-agenda-header-map (kbd "j") 'org-agenda-next-line)
(define-key org-super-agenda-header-map (kbd "k") 'org-agenda-previous-line)
(define-key org-super-agenda-header-map (kbd "t") 'org-agenda-goto-today)
#+end_src
*** LaTeX Export *** LaTeX Export
Enable LaTeX export with =pdflatex= and use =minted= for code highlighting. Enable LaTeX export with =pdflatex= and use =minted= for code highlighting.
Also fix math =utf8= chars. Also fix math =utf8= chars.
@@ -576,7 +621,6 @@ Use graphivz to draw graphs.
*** Fonts and fancy *** Fonts and fancy
Some custom fonts stuff. Some custom fonts stuff.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(set-face-attribute 'org-document-title nil :family "Roboto" :weight 'bold :inherit 'default :height 250)
(setq org-ellipsis "" ;; folding icon (setq org-ellipsis "" ;; folding icon
;; org-hide-emphasis-markers t ;; hide markers such as *, =, _ ;; org-hide-emphasis-markers t ;; hide markers such as *, =, _
) )
@@ -591,17 +635,8 @@ Use =(setq inhibit-compacting-font-caches t)=, if performance is low.
:hook :hook
(org-mode . org-superstar-mode) (org-mode . org-superstar-mode)
:config :config
(setq org-superstar-remove-leading-stars t)) (setq org-superstar-remove-leading-stars t
#+end_src org-superstar-headline-bullets-list '(9673 10061 10040)))
Also the default =agenda= looks a bit messy.
#+begin_src emacs-lisp :tangle yes
(use-package org-super-agenda
:straight t
:after org
:config
(setq org-super-agenda-groups '((:auto-group t)))
(org-super-agenda-mode))
#+end_src #+end_src
@@ -751,8 +786,7 @@ We also need the actual snippets.
(setq lsp-keymap-prefix "C-l") (setq lsp-keymap-prefix "C-l")
:config :config
(lsp-enable-which-key-integration t) (lsp-enable-which-key-integration t)
(setq lsp-rust-server 'rust-analyzer (setq lsp-auto-guess-root t
lsp-auto-guess-root t
lsp-idle-delay 1 lsp-idle-delay 1
lsp-enable-file-watchers nil) lsp-enable-file-watchers nil)
:hook :hook
@@ -790,6 +824,7 @@ In order for =lsp-mode= to work, it needs to compile code on the =fly=.
*** language servers *** language servers
**** rust **** rust
Basic =rust-mode= with some fancy characters.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package rust-mode (use-package rust-mode
:straight t :straight t
@@ -803,6 +838,13 @@ In order for =lsp-mode= to work, it needs to compile code on the =fly=.
(push '(">=" . ?≥) prettify-symbols-alist)))) (push '(">=" . ?≥) prettify-symbols-alist))))
#+end_src #+end_src
I want to use =rust-analyzer= and see inlay type hints for variables.
#+begin_src emacs-lisp :tangle yes
(setq lsp-rust-server 'rust-analyzer
lsp-rust-analyzer-server-display-inlay-hints t)
(add-hook 'rust-mode 'lsp-rust-analyzer-inlay-hints-mode)
#+end_src
**** haskell **** haskell
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package haskell-mode (use-package haskell-mode

View File

@@ -6,11 +6,16 @@ floating_modifier $mod
# applications # applications
bindsym $mod+Return exec --no-startup-id alacritty bindsym $mod+Return exec --no-startup-id alacritty
bindsym $mod+d exec --no-startup-id rofi -theme ~/.config/rofi/light.rasi -show drun
bindsym $mod+Shift+s exec --no-startup-id flameshot gui bindsym $mod+Shift+s exec --no-startup-id flameshot gui
bindsym XF86Calculator exec --no-startup-id emacs bindsym XF86Calculator exec --no-startup-id emacs
# rofi
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+s exec --no-startup-id rofi -show window # 's'witch window
bindsym $mod+a exec --no-startup-id rofi -show filebrowser
# audio and brightness # audio and brightness
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle; exec --no-startup-id notify-send -i /usr/share/icons/Papirus/48x48/devices/audio-input-microphone.svg -u critical "Audio" "Mic Mute toggled"
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
@@ -47,13 +52,13 @@ bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right bindsym $mod+Shift+l move right
# split in horizontal orientation # split in horizontal orientation
bindsym $mod+v split h # bindsym $mod+v split h
# split in vertical orientation # split in vertical orientation
bindsym $mod+s split v # bindsym $mod+s split v
# enable stacked # enable stacked
bindsym $mod+a layout stacking # bindsym $mod+a layout stacking
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
@@ -107,7 +112,7 @@ bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+Ctrl+l move workspace to output right bindsym $mod+Ctrl+l move workspace to output right
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload; exec --no-startup-id notify-send 'i3wm' 'Reloaded i3 configuration'
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart bindsym $mod+Shift+r restart
@@ -117,7 +122,7 @@ title_align center
# colors # colors
set $white "#ffffff" set $white "#ffffff"
set $fg "#5c6773" set $fg "#5c6773"
set $black "#000000" set $black "#222222"
set $grey "#eeeeee" set $grey "#eeeeee"
set $green "#a6cc70" set $green "#a6cc70"
set $red "#ff3333" set $red "#ff3333"
@@ -125,22 +130,29 @@ set $blue "#55b4d4"
set $yellow "#e7c547" set $yellow "#e7c547"
# class border backgr. text indicator child_border # class border backgr. text indicator child_border
client.focused $green $green $fg $green $grey client.focused $black $black $white $black $black
client.focused_inactive $grey $grey $fg $grey $grey client.focused_inactive $grey $grey $fg $grey $grey
client.unfocused $grey $grey $fg $grey $grey client.unfocused $grey $grey $fg $grey $grey
client.urgent $red $red $white $red $red client.urgent $red $red $white $red $grey
# i3 bar # floating on start
# flaoting on start
for_window [class="Pavucontrol"] floating enable for_window [class="Pavucontrol"] floating enable
for_window [title="Event Tester"] floating enable for_window [title="Event Tester"] floating enable
for_window [class="flameshot"] floating enable for_window [class="flameshot"] floating enable
# auto assign
for_window [class="Firefox"] move to workspace $ws2
for_window [class="discord"] move to workspace $ws3
for_window [class="TelegramDesktop"] move to workspace $ws3
for_window [class="Spotify"] move to workspace $ws4
for_window [class="Thunderbird"] move to workspace $ws9
# border # border
smart_borders on smart_borders on
smart_gaps on
# gaps # gaps
gaps inner 10 gaps inner 0
# desktop (wallpaper, bar, ...) # desktop (wallpaper, bar, ...)
exec_always --no-startup-id ~/dots/scripts/reload_desktop.sh exec_always --no-startup-id ~/dots/scripts/reload_desktop.sh
@@ -150,5 +162,6 @@ exec --no-startup-id nm-applet
exec --no-startup-id keepassxc exec --no-startup-id keepassxc
exec --no-startup-id seafile-applet exec --no-startup-id seafile-applet
exec --no-startup-id fcitx5 exec --no-startup-id fcitx5
exec --no-startup-id picom
exec --no-startup-id libinput-gestures-setup start exec --no-startup-id libinput-gestures-setup start
exec --no-startup-id redshift-gtk -l 48.13333:11.56667 exec --no-startup-id redshift-gtk -l 48.13333:11.56667

View File

@@ -1,8 +1,9 @@
[colors] [colors]
white = #ffffff white = #ffffff
black = #222222 black = #ee222222
green = #a6cc70 green = #a6cc70
red = #ff3333 red = #ff3333
yellow = #e7c547
[bar/bar] [bar/bar]
@@ -29,19 +30,19 @@ bottom = false
screenchange-reload = true screenchange-reload = true
tray-position = ${env:TRAYPOS:right} tray-position = ${env:TRAYPOS:none}
tray-scale = 1.0 tray-scale = 1.0
tray-maxsize = 25 tray-maxsize = 25
line-size = 4 line-size = 4
padding-left = 1 # keep these two the same
padding-right = 1 padding = 3
module-margin = 2 module-margin = 3
modules-left = logo i3 polywins spotify modules-left = logo i3 polywins
modules-center = modules-center =
modules-right = ram sep cpu sep cpu_temp sep temp sep backlight sep pulseaudio sep conservation sep battery sep date sep modules-right = spotify backlight pulseaudio mic conservation battery date
[module/i3] [module/i3]
strip-wsnumbers = true strip-wsnumbers = true
@@ -81,7 +82,7 @@ type = internal/date
interval = 1.0 interval = 1.0
date = %a, %d %b date = %a, %d %b
time = %H:%M time = %H:%M
label = %date% %time% label = %date% %time%
[module/pulseaudio] [module/pulseaudio]
type = internal/pulseaudio type = internal/pulseaudio
@@ -113,11 +114,13 @@ time-format = %H:%M
# charging # charging
format-charging = <ramp-capacity> <label-charging> format-charging = <ramp-capacity> <label-charging>
label-charging = %percentage%% label-charging = %percentage%%
format-charging-foreground = ${colors.green}
# discharging # discharging
format-discharging = <ramp-capacity> <label-discharging> format-discharging = <ramp-capacity> <label-discharging>
label-discharging = %percentage%% - %time% label-discharging = %percentage%% - %time%
format-discharging-foreground = ${colors.yellow}
ramp-capacity-0 =  ramp-capacity-0 = 
ramp-capacity-1 =  ramp-capacity-1 = 
ramp-capacity-2 =  ramp-capacity-2 = 
@@ -129,7 +132,7 @@ label-full =  100%
[module/conservation] [module/conservation]
type = custom/script type = custom/script
exec = if [ /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode ]; then echo "On"; else echo "Off"; fi exec = if [ "$(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode)" == "1" ]; then echo "On"; else echo "Off"; fi
click-left = alacritty --command ~/dots/scripts/laptop/conservation_mode.sh click-left = alacritty --command ~/dots/scripts/laptop/conservation_mode.sh
format = <label> format = <label>
label =  %output% label =  %output%
@@ -142,8 +145,9 @@ card = intel_backlight
format = <ramp> <label> format = <ramp> <label>
label = %percentage%% label = %percentage%%
ramp-0 =  # ramp-0 = 
ramp-1 =  # ramp-1 = 
ramp-0 = 
[module/polywins] [module/polywins]
type = custom/script type = custom/script
@@ -164,7 +168,7 @@ click-middle = playerctl -p spotify previous
[module/sep] [module/sep]
type = custom/text type = custom/text
content = "|" content = ""
[module/temp] [module/temp]
type = internal/temperature type = internal/temperature
@@ -189,3 +193,12 @@ type = internal/memory
interval = 5 interval = 5
label = %gb_used% label = %gb_used%
format =  <label> format =  <label>
[module/mic]
type = custom/script
exec = if [ "$(pactl get-source-mute @DEFAULT_SOURCE@)" == "Mute: no" ]; then echo "On"; else echo "Muted"; fi
tail = true
interval = 1
format =  <label>
click-left = pactl set-source-mute @DEFAULT_SOURCE@ toggle && notify-send -i /usr/share/icons/Papirus/48x48/devices/audio-input-microphone.svg -u critical "Audio" "Mic Mute toggled"

View File

@@ -1,10 +0,0 @@
* {
background: #222222;
background-alt: #222222;
foreground: #ffffff;
accent: #A6CC70;
border: #222222;
border-alt: #222222;
selected: @accent;
urgent: #ff3333;
}

View File

@@ -0,0 +1,29 @@
configuration {
filebrowser {
directory: "/home/marc";
directories-first: true;
}
show-icons: true;
display-drun: "🔎 Launch";
display-filebrowser: "💾 Files";
display-window: "🖥️ Switch application";
location: 0;
terminal: "alacritty";
sidebar-mode: false;
window-format: " {c}";
}
@theme "Arc"
* {
font: "Roboto 20";
}
element.selected.active {
background-color: #A6CC70;
text-color: rgba ( 255, 255, 255, 100 % );
}
element.selected.normal {
background-color: #A6CC70;
text-color: rgba ( 255, 255, 255, 100 % );
}

View File

@@ -1,86 +0,0 @@
configuration {
show-icons: true;
display-drun: "🔎";
location: 0;
fake-transparency: false;
hide-scrollbar: true;
bw: 0;
terminal: "alacritty";
sidebar-mode: false;
}
@import "~/.config/rofi/colors.rasi"
* {
background-color: rgba(0, 0, 0, 0);
font: "Roboto 20";
}
window {
background-color: @background;
padding: 30;
width: 30%;
height: 30%;
transparency: "real";
}
mainbox {
children: [ inputbar, listview];
border-radius: 12;
border-color: #ffffff0A;
}
listview {
columns: 3;
lines: 1;
padding: 8;
spacing: 0;
cycle: false;
dynamic: true;
layout: vertical;
}
element {
border: 1;
orientation: vertical;
padding: 15 15 15 15;
border-radius: 6;
text-color: @foreground;
}
element selected {
background-color: @accent;
border-color: #ffffff0A;
text-color: @foreground;
transition: 20;
}
element-icon {
size: 4%;
horizontal-align: 0.5;
vertical-align: 0.5;
}
element-text {
horizontal-align: 0.5;
vertical-align: 0.5;
text-color: inherit;
}
inputbar {
children: [ prompt, entry ];
background-color: #ffffff00;
}
prompt {
enabled: true;
padding: 0.5% 1% 0% 1%;
}
entry {
padding: 8 12 8 12;
margin: 0% 0% 0% 0%;
placeholder: "Search";
placeholder-color: #eeeeee;
text-color: @foreground;
}

View File

@@ -1,32 +0,0 @@
/* Message Dialog */
colors {
background: #425775ff;
background-alt: #475C7Bff;
foreground: #ffffffcc;
border: #FDBB6Dff;
border-alt: #DA717Fff;
selected: #685E79ff;
urgent: #DA4453FF;
}
* {
background-color: @background;
text-color: @foreground;
font: "FantasqueSansMono Nerd Font 12";
}
window {
width: 360px;
padding: 25px;
border: 1px;
border-radius: 0px;
border-color: @border;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @border;
}

View File

@@ -1,112 +0,0 @@
configuration {
font: "Roboto 20";
show-icons: false;
icon-theme: "Papirus";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "~/.config/rofi/colors.rasi"
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 0px;
height: 30%;
width: 15%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.5% 0.5% 0.5% 0%;
background-color: @background-alt;
text-color: @foreground;
}
textbox-prompt-colon {
expand: false;
str: "Powermenu";
background-color: @background-alt;
text-color: @foreground;
padding: 0.5% 0.5% 0.5% 0%;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @background-alt;
text-color: @foreground;
expand: false;
border: 0% 0% 0% 0.2%;
border-radius: 0% 0% 0% 0%;
border-color: @border;
padding: 0.5%;
position: center;
}
listview {
background-color: @background;
margin: 0% 0% 0% 0%;
spacing: 1%;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
padding: 1% 1% 1% 1%;
}
element {
background-color: @background-alt;
text-color: @foreground;
orientation: vertical;
border-radius: 0%;
}
element-text {
background-color: #00000000;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 1% 1% 1% 1%;
}
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: @selected;
text-color: @foreground;
border: 0% 0% 0% 0.2%;
border-radius: 0%;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}

View File

@@ -1,10 +1,8 @@
connected=$(xrandr --query | grep "DP-3" | grep " connected" | cut -d" " -f1)
if type "xrandr"; then if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# workaround to always show tray, when external mon is connected # only show on internal display
if [ "$m" == "eDP-1" ] && [ "$connected" == "DP-3" ]; then if [ "$m" == "eDP-1" ]; then
pos="none" pos="right"
fi fi
MON=$m TRAYPOS=$pos polybar --reload bar & MON=$m TRAYPOS=$pos polybar --reload bar &
pos= pos=

View File

@@ -138,4 +138,5 @@ except Exception as e:
if isinstance(e, dbus.exceptions.DBusException): if isinstance(e, dbus.exceptions.DBusException):
print('') print('')
else: else:
print(e) # i dont want long exceptions strings in my bar
print('')

View File

@@ -2,14 +2,15 @@
dir="$HOME/.config/rofi" dir="$HOME/.config/rofi"
rofi_command="rofi -theme $dir/powermenu.rasi" rofi_command="rofi"
lock_command="xlock -mode maze -font variable -messagefont variable -fpsfont variable -planfont variable"
# Options # Options
shutdown="Shutdown" shutdown="shutdown"
reboot="Reboot" reboot="reboot"
lock="Lock" lock="lock"
suspend="Suspend" suspend="suspend"
logout="Logout" logout="logout"
# Confirmation # Confirmation
confirm_exit() { confirm_exit() {
@@ -26,9 +27,9 @@ msg() {
} }
# Variable passed to rofi # Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" options="$lock\n$shutdown\n$reboot\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "" -dmenu -selected-row 2)" chosen="$(echo -e "$options" | $rofi_command -p "🔌 Powermenu" -dmenu)"
case $chosen in case $chosen in
$shutdown) $shutdown)
ans=$(confirm_exit &) ans=$(confirm_exit &)
@@ -51,7 +52,7 @@ case $chosen in
fi fi
;; ;;
$lock) $lock)
xlock -mode maze $lock_command
;; ;;
$suspend) $suspend)
ans=$(confirm_exit &) ans=$(confirm_exit &)

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# send notification # dunst
notify-send -i /usr/share/icons/Papirus/48x48/status/state_paused.svg "Reload" "Reloading desktop..." systemctl restart --user dunst
# bar # bar
killall -q polybar killall -q polybar
@@ -14,5 +14,5 @@ feh --bg-fill $HOME/data/Seafile/images/wallpaper/wallpaper.png
# for some reason xmodmap and xset settings reset sometimes # for some reason xmodmap and xset settings reset sometimes
source $HOME/.profile source $HOME/.profile
# send notification # notification
notify-send -i /usr/share/icons/Papirus/48x48/status/state_running.svg "Reload" "Reload done!" notify-send -i /usr/share/icons/Papirus/48x48/status/state_running.svg "i3wm" "Reloaded desktop"