Dotfiles config update (2023-05-01)

This commit is contained in:
q3aql 2023-05-01 10:30:33 +02:00
parent cda9008e58
commit d650a39f24
6 changed files with 82 additions and 34 deletions

View File

@ -30,7 +30,7 @@ echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + f </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Fullscreen</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + p </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Wofi (Run Mode)</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + o </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Wofi (Drun Mode)</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + q </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Rofi (Window Mode)</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + q </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Wofi (Window Mode)</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + d </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Wofi (Filebrowser)</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + b </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Mozilla Firefox</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + n </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= PCManFM</span></b>'
@ -42,6 +42,7 @@ echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + u </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Xterm</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + i </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= LXAppearance</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + c </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= NetworkManager</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + וּ + c </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Caffeine Mode</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + h </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Set Horizontal</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> Super + v </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Set Vertical</span></b>'
echo '<b><span foreground="#379838" face="UbuntuMono Nerd Font" size="12650">  </span></b><b><span foreground="#e25ee6" face="UbuntuMono Nerd Font" size="12650"> ﱛ </span></b><b><span foreground="#9ca8ce" face="UbuntuMono Nerd Font" size="12650">= Volume +5</span></b>'

52
.config/sway/caffeine.py Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env python3
import tkinter as tk
import os
class MainWindow:
def __init__(self, master):
self.master = master
master.title("Caffeine.py")
# Set theme and window size
master.configure(bg='#262321')
master.geometry('250x150')
self.boton1 = tk.Button(master, text="Enable Caffeine Mode", command=self.exec_command1, bg='#703207', fg="white")
self.boton1.pack(side=tk.TOP, pady=10)
self.boton2 = tk.Button(master, text="Disable Caffeine Mode", command=self.exec_command2, bg='#703207', fg="white")
self.boton2.pack(side=tk.TOP, pady=10)
self.boton3 = tk.Button(master, text="Exit", command=self.exec_command3, bg='#703207', fg="white")
self.boton3.pack(side=tk.TOP, pady=10)
# Set center buttons
self.boton1.pack(side=tk.TOP, padx=10, pady=10, fill=tk.BOTH)
self.boton2.pack(side=tk.TOP, padx=10, pady=10, fill=tk.BOTH)
self.boton3.pack(side=tk.TOP, padx=10, pady=10, fill=tk.BOTH)
def exec_command1(self):
print('# Enabled Caffeine Mode')
command = "killall startwlrscreensaver.sh 2> /dev/null"
os.system(command)
command = "killall swayidle 2> /dev/null"
os.system(command)
def exec_command2(self):
command = "killall startwlrscreensaver.sh 2> /dev/null"
os.system(command)
command = "killall swayidle 2> /dev/null"
os.system(command)
command = "~/.config/sway/startwlrscreensaver.sh &"
os.system(command)
print('# Disabled Caffeine Mode')
def exec_command3(self):
command = "exit"
os.system(command)
exit()
root = tk.Tk()
window = MainWindow(root)
root.mainloop()

View File

@ -34,18 +34,14 @@ exec --no-startup-id pnmixer -t &
# Configure screens and resolution
exec --no-startup-id ~/.config/sway/startwlrrandr.sh &
# Load compton or picom
#exec --no-startup-id compton &
#exec --no-startup-id "sleep 15 && picom &"
# Configure wallpaper
exec --no-startup-id "swaybg -i ~/wallpapers/gruvbox-arch.png -m fill"
# Start Screensaver (Also Super+Ctrl+Shift+l to poweroff/start screen)
exec --no-startup-id ~/.config/sway/startwlrscreensaver.sh
# Clipboard (Diodon)
exec --no-startup-id diodon &
# Clipboard (Clipman)
exec --no-startup-id WAYLAND_DISPLAY=wayland-1 wl-paste -t text --watch clipman store
# Load Conky
#exec --no-startup-id sleep 10 && conky -c ~/.config/conky/conkyrc_sway &
@ -65,10 +61,11 @@ floating_modifier $mod
#new_window 1pixel
#new_window pixel 3
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
# Start a terminal
#bindsym $mod+Return exec xterm
bindsym $mod+Return exec kitty
#bindsym $mod+Return exec env WAYLAND_DISPLAY=wayland-1 alacritty
#bindsym $mod+Return exec env WAYLAND_DISPLAY=wayland-1 foot
# kill focused window
bindsym $mod+Shift+q kill
@ -76,9 +73,10 @@ bindsym $mod+Shift+q kill
# start filebrowser (a program launcher)
bindsym $mod+d exec --no-startup-id ~/.config/sway/wofi/wofi_fbrun
# NetworkManager
# NetworkManager or Clipman
#bindsym $mod+c exec --no-startup-id connman-gtk --no-icon
bindsym $mod+c exec --no-startup-id nm-connection-editor
#bindsym $mod+c exec --no-startup-id WAYLAND_DISPLAY=wayland-1 clipman pick -t wofi
# Run applications
bindsym $mod+o exec --no-startup-id ~/.config/sway/wofi/wofi_drun
@ -94,6 +92,7 @@ bindsym $mod+z exec --no-startup-id kitty -e wf-recorder
bindsym $mod+u exec --no-startup-id ~/.config/sway/xterm-wayland
bindsym $mod+t exec --no-startup-id ~/.config/sway/wayland-screenshot
bindsym $mod+i exec --no-startup-id lxappearance
bindsym $mod+Shift+c exec --no-startup-id ~/.config/sway/caffeine.py
# change focus
bindsym $mod+j focus left
@ -251,12 +250,11 @@ for_window [class="Mozilla VPN" instance="mozillavpn"] floating enable
for_window [class="Lxappearance" instance="lxappearance"] floating enable
for_window [app_id="wdisplays" ] floating enable
for_window [app_id="zenity"] floating enable
for_window [title="Caffeine.py"] floating enable
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+r reload
# exit sway (logs you out of your X session)
#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit Sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'"
@ -303,8 +301,7 @@ exec_always {
gsettings set $gnome-schema font-name 'Sans 10'
}
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# Start sway bar to display a workspace bar
bar {
position top
status_command ~/.config/sway/scripts/status_bar.sh

View File

@ -34,18 +34,14 @@ exec --no-startup-id pnmixer -t &
# Configure screens and resolution
exec --no-startup-id ~/.config/sway/startwlrrandr.sh &
# Load compton or picom
#exec --no-startup-id compton &
#exec --no-startup-id "sleep 15 && picom &"
# Configure wallpaper
exec --no-startup-id "swaybg -i ~/wallpapers/39.png -m fill"
# Start Screensaver (Also Super+Ctrl+Shift+l to poweroff/start screen)
exec --no-startup-id ~/.config/sway/startwlrscreensaver.sh
# Clipboard (Diodon)
exec --no-startup-id diodon &
# Clipboard (Clipman)
exec --no-startup-id WAYLAND_DISPLAY=wayland-1 wl-paste -t text --watch clipman store
# Load Conky
#exec --no-startup-id sleep 10 && conky -c ~/.config/conky/conkyrc_sway &
@ -66,9 +62,10 @@ floating_modifier $mod
#new_window pixel 3
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
#bindsym $mod+Return exec xterm
bindsym $mod+Return exec kitty
#bindsym $mod+Return exec env WAYLAND_DISPLAY=wayland-1 alacritty
#bindsym $mod+Return exec env WAYLAND_DISPLAY=wayland-1 foot
# kill focused window
bindsym $mod+Shift+q kill
@ -76,9 +73,10 @@ bindsym $mod+Shift+q kill
# start filebrowser (a program launcher)
bindsym $mod+d exec --no-startup-id ~/.config/sway/wofi/wofi_fbrun
# NetworkManager
# NetworkManager or Clipman
#bindsym $mod+c exec --no-startup-id connman-gtk --no-icon
bindsym $mod+c exec --no-startup-id nm-connection-editor
#bindsym $mod+c exec --no-startup-id WAYLAND_DISPLAY=wayland-1 clipman pick -t wofi
# Run applications
bindsym $mod+o exec --no-startup-id ~/.config/sway/wofi/wofi_drun
@ -94,6 +92,7 @@ bindsym $mod+z exec --no-startup-id kitty -e wf-recorder
bindsym $mod+u exec --no-startup-id ~/.config/sway/xterm-wayland
bindsym $mod+t exec --no-startup-id ~/.config/sway/wayland-screenshot
bindsym $mod+i exec --no-startup-id lxappearance
bindsym $mod+Shift+c exec --no-startup-id ~/.config/sway/caffeine.py
# change focus
bindsym $mod+j focus left
@ -251,12 +250,11 @@ for_window [class="Mozilla VPN" instance="mozillavpn"] floating enable
for_window [class="Lxappearance" instance="lxappearance"] floating enable
for_window [app_id="wdisplays" ] floating enable
for_window [app_id="zenity"] floating enable
for_window [title="Caffeine.py"] floating enable
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+r reload
# exit sway (logs you out of your X session)
#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit Sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'"
@ -303,8 +301,7 @@ exec_always {
gsettings set $gnome-schema font-name 'Sans 10'
}
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# Start sway bar to display a workspace bar
bar {
position top
status_command ~/.config/sway/scripts/status_bar.sh

View File

@ -69,8 +69,8 @@ function resumeMonitors() {
# Boot parameters
if [ -z "${1}" ] ; then
# Kill previous process
echo "Trying to kill previous process"
killall -9 swayidle
echo "# Trying to kill previous process"
killall -9 swayidle 2> /dev/null
sleep 3
# Init swayidle command
swayidle timeout ${ScreensaverTime} "bash ${0} sleep" resume "bash ${0} resume"

View File

@ -90,9 +90,9 @@ dotfiles - My tiling Sway configuration (for Arch/Devuan/Debian)
My list of extra combinations:
- Super + d = Open Dmenu
- Super + d = Open Wofi (fbrun mode)
- Super + p = Open Wofi (run mode)
- Super + q = Open Rofi (window mode)
- Super + q = Open Wofi (window mode)
- Super + o = Open Wofi (drun mode)
- Super + b = Open Firefox
- Super + n = Open PCManFM
@ -104,6 +104,7 @@ My list of extra combinations:
- Super + u = Open Xterm
- Super + i = Open LXAppearance
- Super + c = Open NetWorkManager
- Super + Shift + c = Caffeine Mode
- Volume-Up = Volume +5
- Volume-Down = Volume -5
- VolumeMute = Mute Volume