file get_updated

This commit is contained in:
2026-06-12 08:05:48 +02:00
parent 84f901a083
commit 71b8cf5ceb
66 changed files with 2916 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
import os
from modules.get_theme import colors
from modules.groups import groups
from modules.hooks import *
from modules.keys import keys, mod
from modules.layouts import layouts, floating_layout
from modules.screens import screens
from modules.scratchpads import *
from libqtile import qtile
from libqtile.config import Click, Drag
from libqtile.lazy import lazy
from libqtile.backend.wayland import InputConfig
# Set xdg variables in Wayland to enable screensharing
if qtile.core.name == "wayland":
os.environ["XDG_SESSION_DESKTOP"] = "qtile:wlroots"
os.environ["XDG_CURRENT_DESKTOP"] = "qtile:wlroots"
dgroups_key_binder = None
dgroups_app_rules = [] # type: list
follow_mouse_focus = True
bring_front_click = False
floats_kept_above = True
cursor_warp = False
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?from libqtile.backend.wayland import InputConfig
auto_minimize = True
# When using the Wayland backend, this can be used to configure input devices.
wl_input_rules = {
"type:touchpad": InputConfig(tap=True, natural_scroll=True, dwt=True),
}
# Cursor theme
wl_xcursor_theme = "Bibata-Modern-Classic"
wl_xcursor_size = 24
# Name of the window manager
wmname = "qtile"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
import os
import json
# Gets colors from wallust wallpaper
def get_colors():
with open(f"{os.path.expanduser('~')}/.cache/qtile/colors.json") as f:
colors = json.load(f)
return colors['colors']
colors = get_colors()
+19
View File
@@ -0,0 +1,19 @@
from libqtile.config import Group
# Create labels for groups and assign them a default layout.
groups = []
group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "minus", "equal", "y", "u"]
group_labels = ["", "", "", "", "", "", "", "", "", "", "", "", "", ""]
group_layouts = ["monadtall", "monadtall", "spiral", "monadtall", "monadwide", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"]
# Add group names, labels, and default layouts to the groups object.
for i in range(len(group_names)):
groups.append(
Group(
name=group_names[i],
layout=group_layouts[i].lower(),
label=group_labels[i],
))
+16
View File
@@ -0,0 +1,16 @@
import os
import subprocess
from libqtile import hook, qtile
# Startup applications
@hook.subscribe.startup_once
def autostart():
if qtile.core.name == "x11":
autostartscript = "~/.config/qtile/scripts/x11-autostart.sh"
elif qtile.core.name == "wayland":
autostartscript = "~/.config/qtile/scripts/wayland-autostart.sh"
home = os.path.expanduser(autostartscript)
subprocess.Popen([home])
+233
View File
@@ -0,0 +1,233 @@
from libqtile import qtile
from libqtile.config import Click, Drag, Key
from libqtile.lazy import lazy
from .groups import groups
mod = "mod4"
terminal = "ghostty"
keys = [
# Open terminal
Key([mod], "Return", lazy.spawn(terminal),
desc="Launch terminal"),
# Qtile System Actions
Key([mod, "shift"], "q", lazy.shutdown(),
desc="Shutdown Qtile"),
# Active Window Actions
Key([mod], "f", lazy.window.toggle_fullscreen(),
desc="Toggle window fullscreen"),
Key([mod], "q", lazy.window.kill(),
desc="Close active window"),
Key([mod, "control"], "l",
lazy.layout.grow_right(),
lazy.layout.grow(),
lazy.layout.increase_ratio(),
lazy.layout.delete(),
desc="Increase active window size."
),
Key([mod, "control"], "Right",
lazy.layout.grow_right(),
lazy.layout.grow(),
lazy.layout.increase_ratio(),
lazy.layout.delete(),
desc="Increase active window size."
),
Key([mod, "control"], "h",
lazy.layout.grow_left(),
lazy.layout.shrink(),
lazy.layout.decrease_ratio(),
lazy.layout.add(),
desc="Decrease active window size."
),
Key([mod, "control"], "Left",
lazy.layout.grow_left(),
lazy.layout.shrink(),
lazy.layout.decrease_ratio(),
lazy.layout.add(),
desc="Decrease active window size."
),
Key([mod, "control"], "k",
lazy.layout.grow_up(),
lazy.layout.grow(),
lazy.layout.decrease_nmaster(),
desc="Increase active window size."
),
Key([mod, "control"], "Up",
lazy.layout.grow_up(),
lazy.layout.grow(),
lazy.layout.decrease_nmaster(),
desc="Increase active window size."
),
Key([mod, "control"], "j",
lazy.layout.grow_down(),
lazy.layout.shrink(),
lazy.layout.increase_nmaster(),
desc="Decrease active window size."
),
Key([mod, "control"], "Down",
lazy.layout.grow_down(),
lazy.layout.shrink(),
lazy.layout.increase_nmaster(),
desc="Decrease active window size."
),
# Window Focus (Arrows and Vim keys)
Key([mod], "Up", lazy.layout.up(),
desc="Change focus to window above."),
Key([mod], "Down", lazy.layout.down(),
desc="Change focus to window below."),
Key([mod], "Left", lazy.layout.left(),
desc="Change focus to window on the left."),
Key([mod], "Right", lazy.layout.right(),
desc="Change focus to window on the right."),
Key([mod], "k", lazy.layout.up(),
desc="Change focus to window above."),
Key([mod], "j", lazy.layout.down(),
desc="Change focus to window below."),
Key([mod], "h", lazy.layout.left(),
desc="Change focus to window on the left."),
Key([mod], "l", lazy.layout.right(),
desc="Change focus to window on the right."),
# Move windows around MonadTall/MonadWide Layouts
Key([mod, "shift"], "Up", lazy.layout.shuffle_up(),
desc="Shuffle window up."),
Key([mod, "shift"], "Down", lazy.layout.shuffle_down(),
desc="Shuffle window down."),
Key([mod, "shift"], "Left", lazy.layout.swap_left(),
desc="Shuffle window left."),
Key([mod, "shift"], "Right", lazy.layout.swap_right(),
desc="Shuffle window right."),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(),
desc="Shuffle window up."),
Key([mod, "shift"], "j", lazy.layout.shuffle_down(),
desc="Shuffle window down."),
Key([mod, "shift"], "h", lazy.layout.swap_left(),
desc="Shuffle window left."),
Key([mod, "shift"], "l", lazy.layout.swap_right(),
desc="Shuffle window right."),
# Qtile Layout Actions
Key([mod], "r", lazy.layout.reset(),
desc="Reset the sizes of all window in group."),
Key([mod], "Tab", lazy.next_layout(),
desc="Switch to the next layout."),
Key([mod, "shift"], "f", lazy.layout.flip(),
desc="Flip layout for Monadtall/Monadwide"),
Key([mod, "shift"], "space", lazy.window.toggle_floating(),
desc="Toggle floating window."),
# Switch focus to specific monitor (out of three)
Key([mod], "i",
lazy.to_screen(0),
desc='Keyboard focus to monitor 1'),
Key([mod], "o",
lazy.to_screen(1),
desc='Keyboard focus to monitor 2'),
Key([mod], "p",
lazy.to_screen(2),
desc='Keyboard focus to monitor 3'),
# Switch focus of monitors
Key([mod], "period",
lazy.next_screen(),
desc='Move focus to next monitor'),
Key([mod], "comma",
lazy.prev_screen(),
desc='Move focus to prev monitor'),
]
# Add group specific keybindings
for i in groups:
keys.extend([
Key([mod], i.name, lazy.group[i.name].toscreen(),
desc="Mod + number to move to that group."),
Key(["mod1"], "Tab", lazy.screen.next_group(),
desc="Move to next group."),
Key(["mod1", "shift"], "Tab", lazy.screen.prev_group(),
desc="Move to previous group."),
Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
desc="Move focused window to new group."),
])
# Scratchpad keybindings
keys.extend([
Key(["mod1"], "Return", lazy.group['scratchpad'].dropdown_toggle('term')),
Key(["mod1"], "v", lazy.group['scratchpad'].dropdown_toggle('volume')),
Key([mod], "a", lazy.group['scratchpad'].dropdown_toggle('angular')),
Key([mod], "n", lazy.group['scratchpad'].dropdown_toggle('notebook')),
])
# Drag floating layouts.
mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(),
start=lazy.window.get_position()),
Drag([mod], "Button3", lazy.window.set_size_floating(),
start=lazy.window.get_size()),
Click([mod], "Button2", lazy.window.bring_to_front())
]
# Application keybindings
keys.extend([
Key([mod, "shift"], "Return", lazy.spawn("ghostty"),
desc="Launch file browser"),
Key([mod], "Space", lazy.spawn("rofi -show drun"),
desc="Application launcher"),
Key([mod], "b", lazy.spawn("firefox"),
desc="Launch web browser"),
Key([mod], "e", lazy.spawn("nautilus"),
desc="Launch file browser"),
# Media Keys
Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03+"),
desc="Volume Up"),
Key([], "XF86AudioLowerVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03-"),
desc="Volume Down"),
Key([], "XF86AudioMute", lazy.spawn("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
desc="Toggle Mute"),
Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause"),
desc="Play/Pause"),
Key([], "XF86AudioNext", lazy.spawn("playerctl next"),
desc="Next Song"),
Key([], "XF86AudioPrev", lazy.spawn("playerctl previous"),
desc="Previous Song"),
Key([], "XF86AudioStop", lazy.spawn("playerctl stop"),
desc="Stop music"),
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set 5%+"),
desc="Increase brightness"),
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-"),
desc="Decrease brightness"),
])
# Add X11-specific keybindings
if qtile.core.name == "x11":
keys.extend([
Key([mod, "shift"], "r", lazy.restart(),
desc="Restart Qtile"),
Key([mod], "Escape", lazy.spawn("betterlockscreen -l"),
desc="Lock screen"),
Key([mod], "v", lazy.spawn("~/.config/qtile/scripts/greenclip.sh"),
desc="Clipboard Manager"),
Key([], "XF86TouchpadToggle", lazy.spawn("/home/wingej0/dotfiles/scripts/touchpad-toggle.sh"),
desc="Toggle Touchpad"),
])
# Add Wayland-specific keybindings
elif qtile.core.name == "wayland":
keys.extend([
Key([mod, "shift"], "r", lazy.reload_config(),
desc="Reload Qtile config"),
Key([mod], "Escape", lazy.spawn("swaylock"),
desc="Lock screen"),
Key(["control", "mod1"], "delete", lazy.spawn("wlogout"),
desc="Launch powermenu"),
Key([mod], "v", lazy.spawn("~/.config/qtile/scripts/clipboard.sh"),
desc="Clipboard Manager"),
Key([mod], "print", lazy.spawn("~/.config/qtile/scripts/gif-recorder.sh"),
desc="Gif Recorder")
])
+49
View File
@@ -0,0 +1,49 @@
from .get_theme import colors
from libqtile import layout
from libqtile.config import Match
# Define layouts and layout themes
layout_theme = {
"margin":8,
"border_width": 4,
"border_focus": colors['color11'],
"border_normal": colors['color0'],
}
layouts = [
layout.Bsp(**layout_theme),
layout.MonadTall(**layout_theme),
layout.MonadWide(**layout_theme),
layout.RatioTile(**layout_theme),
layout.MonadThreeCol(**layout_theme),
layout.Tile(**layout_theme),
layout.Floating(**layout_theme),
layout.Max(**layout_theme),
layout.TreeTab(**layout_theme),
layout.Spiral(
main_pane_ratio = 0.70,
ratio = 0.52,
new_client_position = "bottom",
**layout_theme
)
]
floating_layout = layout.Floating(
float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client.
*layout.Floating.default_float_rules,
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
Match(title="Mailspring"),
Match(func=lambda c: c.is_transient_for()),
],
fullscreen_border_width = 0,
border_width = 4,
border_focus = colors['color11'],
border_normal = colors['color1']
)
+11
View File
@@ -0,0 +1,11 @@
from .groups import groups
from libqtile.config import ScratchPad, DropDown
# Define Scratchpads
groups.append(ScratchPad("scratchpad", [
DropDown("term", "kitty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1),
DropDown("volume", "pavucontrol", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.8),
DropDown("angular", "kitty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1),
DropDown("notebook", "kitty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1),
]))
+43
View File
@@ -0,0 +1,43 @@
from .widgets import init_widgets
from libqtile import bar
from libqtile.config import Screen
screens = [
# HDMI-A-1
Screen(
top=bar.Bar(
widgets=init_widgets(1),
background='#0000003f',
margin=0,
size=30,
opacity=0.9
),
x=0
),
# DP-1
Screen(
top=bar.Bar(
widgets=init_widgets(1),
background='#0000003f',
margin=0,
size=30,
opacity=0.9
),
x=1920
),
# DP-2
Screen(
top=bar.Bar(
widgets=init_widgets(1),
background='#0000003f',
margin=0,
size=30,
opacity=0.9
),
x=3840
),
]
+6
View File
@@ -0,0 +1,6 @@
# Define Widgets
widget_defaults = dict(
font="Fira Code Nerd Font",
fontsize = 11,
)
+392
View File
@@ -0,0 +1,392 @@
import os
import subprocess
from libqtile import qtile
from libqtile.lazy import lazy
from qtile_extras import widget
from qtile_extras.widget.decorations import RectDecoration
from .get_theme import colors
from .widget_defaults import widget_defaults
dark_widgets = {
"decorations" : [
RectDecoration(
colour = colors['color11'],
filled = True,
radius = 10,
padding_y = 4,
group = True
)
]
}
light_widgets = {
"decorations" : [
RectDecoration(
colour = colors['color15'],
filled = True,
radius = 10,
padding_y = 4,
group = True
)
]
}
mid_widgets = {
"decorations" : [
RectDecoration(
colour = colors['color1'],
filled = True,
radius = 10,
padding_y = 4,
group = True
)
]
}
def init_widgets(monitor):
widgets_list = [
widget.Sep(
linewidth = 0,
padding = 5
),
widget.Sep(
linewidth = 0,
padding = 10,
**dark_widgets
),
widget.TextBox(
font="FontAwesome6Free",
fontsize=14,
foreground=colors['color15'],
text="",
**dark_widgets
),
# qtile button
widget.TextBox(
font="Fira Code Nerd Font Bold",
fontsize = 12,
foreground=colors['color15'],
text="Qtile",
mouse_callbacks={
'Button1' : lazy.spawn('rofi -show drun'),
},
**dark_widgets
),
# separators with curved sections
widget.Sep(
linewidth = 0,
padding = 10,
**dark_widgets
),
widget.Sep(
linewidth = 0,
padding = 10,
),
widget.Sep(
linewidth = 0,
padding = 10,
**light_widgets
),
# memory icon
widget.TextBox(
text='',
font="FontAwesome6Free",
fontsize=12,
foreground=colors['color0'],
margin=0,
padding=5,
**light_widgets
),
# memory percentage
widget.Memory(
foreground=colors['color0'],
format='{MemPercent}%',
measure_mem="M",
margin=0,
padding=0,
**widget_defaults,
**light_widgets
),
# separator
widget.Sep(
foreground=colors['color0'],
padding=10,
size_percent=60,
**light_widgets
),
# cpu icon
widget.TextBox(
text='',
font="FontAwesome6Free",
fontsize=12,
foreground=colors['color0'],
margin=0,
padding=5,
**light_widgets
),
# cpu percentage
widget.CPU(
foreground=colors['color0'],
format='{load_percent}%',
margin=0,
padding=0,
**widget_defaults,
**light_widgets
),
# separator
widget.Sep(
foreground=colors['color0'],
padding=10,
size_percent=60,
**light_widgets
),
# temperature icon
widget.TextBox(
text='',
font="FontAwesome6Free",
fontsize=12,
foreground=colors['color0'],
padding=5,
**light_widgets
),
# thermal sensor
widget.ThermalSensor(
foreground=colors['color0'],
**widget_defaults,
**light_widgets
),
# separators to close module and open next
widget.Sep(
linewidth = 0,
padding = 10,
**light_widgets
),
widget.Sep(
linewidth = 0,
padding = 10
),
widget.Sep(
linewidth = 0,
padding = 10,
**light_widgets
),
# sun icon
widget.TextBox(
text='',
font="FontAwesome6Free",
fontsize=12,
foreground=colors['color0'],
**light_widgets
),
# brightness percentage
widget.GenPollText(
foreground=colors['color0'],
func=lambda: subprocess.check_output(f"{os.path.expanduser('~')}/.config/qtile/scripts/brightness.sh").decode("utf-8").strip(),
update_interval=30,
**widget_defaults,
**light_widgets
),
# separator
widget.Sep(
foreground=colors['color0'],
padding=10,
size_percent=60,
**light_widgets
),
# audio icon
widget.TextBox(
font="FontAwesome6Free",
fontsize=12,
foreground=colors['color0'],
text="",
**light_widgets
),
# volume percentage
widget.Volume(
foreground=colors['color0'],
get_volume_command = f"{os.path.expanduser('~')}/.config/qtile/scripts/volume.sh",
**widget_defaults,
**light_widgets
),
# close module, separator, open next module
widget.Sep(
linewidth = 0,
padding = 10,
**light_widgets
),
widget.Sep(
linewidth = 0,
padding = 10
),
widget.Sep(
linewidth = 0,
padding = 10,
**mid_widgets
),
# current layout icon
widget.CurrentLayoutIcon(
foreground=colors['color15'],
scale=0.50,
**mid_widgets
),
# current layout
widget.CurrentLayout(
foreground=colors['color15'],
**widget_defaults,
**mid_widgets
),
# separators
widget.Sep(
linewidth = 0,
padding = 10,
**mid_widgets
),
widget.Sep(
linewidth = 0,
padding = 10
),
# groups/workspaces
widget.GroupBox(
active=colors['color15'],
borderwidth = 2,
foreground=colors['color15'],
disable_drag=True,
font="FontAwesome6Free",
fontsize=11,
hide_unused=False,
highlight_color=['#00000000', '#00000000'],
highlight_method="line",
inactive=colors['color0'],
this_current_screen_border=colors['color0'],
this_screen_border=colors['color15'],
other_current_screen_border=colors['color1'],
other_screen_border=colors['color0'],
urgent_method = "line",
use_mouse_wheel=False,
**dark_widgets
),
# separator
widget.Sep(
linewidth = 0,
padding = 10,
**dark_widgets
),
widget.Sep(
linewidth = 0,
padding = 10
),
widget.Sep(
linewidth = 0,
padding = 10,
**light_widgets
),
# browser
widget.TextBox(
foreground=colors['color0'],
font="FontAwesome6Free",
fontsize=12,
text='',
mouse_callbacks={
'Button1' : lazy.spawn("firefox --new-window"),
},
**light_widgets
),
# filebrowser
widget.TextBox(
foreground=colors['color0'],
font="FontAwesome6Free",
fontsize=12,
text='',
mouse_callbacks={
'Button1' : lazy.spawn('nautilus'),
},
**light_widgets
),
widget.Sep(
linewidth = 0,
padding = 10,
**light_widgets
),
widget.Sep(
linewidth = 0,
padding = 10
),
widget.Sep(
linewidth = 0,
padding = 10,
**dark_widgets
),
widget.Clock(
foreground=colors['color15'],
font="Fira Code Nerd Font Bold",
fontsize=12,
format=' %b %d | %I:%M %p',
mouse_callbacks={
'Button1' : lazy.spawn('wlogout'),
},
**dark_widgets
),
widget.Sep(
linewidth = 0,
padding = 15,
**dark_widgets
),
widget.Sep(
linewidth = 0,
padding = 5
),
]
if qtile.core.name == "x11":
clipboard = widget.TextBox(
foreground=colors['color0'],
font="FontAwesome6Free",
fontsize=12,
text='',
mouse_callbacks={
'Button1' : lazy.spawn(f"{os.path.expanduser('~')}/.config/qtile/scripts/greenclip.sh"),
},
**light_widgets
)
screenshot = widget.TextBox(
foreground=colors['color0'],
font="FontAwesome6Free",
fontsize=12,
text='',
mouse_callbacks={
'Button1' : lazy.spawn('flameshot launcher'),
},
**light_widgets
)
elif qtile.core.name == "wayland":
clipboard = widget.TextBox(
foreground=colors['color0'],
font="FontAwesome6Free",
fontsize=12,
text='',
mouse_callbacks={
'Button1' : lazy.spawn(f"{os.path.expanduser('~')}/.config/qtile/scripts/clipboard.sh"),
},
**light_widgets
)
screenshot = widget.TextBox(
foreground=colors['color0'],
font="FontAwesome6Free",
fontsize=12,
text='',
mouse_callbacks={
'Button1' : lazy.spawn(f"{os.path.expanduser('~')}/.config/qtile/scripts/grim.sh"),
},
**light_widgets
)
#widgets_list.insert(50, clipboard)
#widgets_list.insert(51, screenshot)
return widgets_list
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
brightnessctl | awk '/Current/{print substr($NF, 2, length($NF) -2)}'
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
case $1 in
d) cliphist list | rofi -dmenu -replace -config ~/.dotfiles/home/configs/rofi/config-cliphist.rasi | cliphist delete
;;
w) if [ `echo -e "Clear\nCancel" | rofi -dmenu -config ~/.dotfiles/home/configs/rofi/config-short.rasi` == "Clear" ] ; then
cliphist wipe
fi
;;
*) cliphist list | rofi -dmenu -replace -config ~/.dotfiles/home/configs/rofi/config-cliphist.rasi | cliphist decode | wl-copy
;;
esac
+19
View File
@@ -0,0 +1,19 @@
#!/run/current-system/sw/bin/python
import os.path
from datetime import datetime
def get_last_updated():
lock_file = f"{os.path.expanduser('~')}/.dotfiles/flake.lock"
updated = datetime.fromtimestamp(os.path.getmtime(lock_file))
today = datetime.now()
last_updated = (today - updated).days
if last_updated == 1:
print(f'{last_updated} day')
else:
print(f'{last_updated} days')
if __name__ == '__main__':
get_last_updated()
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# If an instance of wf-recorder is running under this user kill it with SIGINT and exit
pkill --euid "$USER" --signal SIGINT wf-recorder && exit
# Define paths
DefaultSaveDir=$HOME'/Videos'
TmpPathPrefix='/tmp/gif-record'
TmpRecordPath=$TmpPathPrefix'-cap.mp4'
TmpPalettePath=$TmpPathPrefix'-palette.png'
# Trap for cleanup on exit
OnExit() {
[[ -f $TmpRecordPath ]] && rm -f "$TmpRecordPath"
[[ -f $TmpPalettePath ]] && rm -f "$TmpPalettePath"
}
trap OnExit EXIT
# Set umask so tmp files are only acessible to the user
umask 177
# Get selection and honor escape key
Coords=$(slurp) || exit
# Capture video using slurp for screen area
# timeout and exit after 10 minutes as user has almost certainly forgotten it's running
timeout 600 wf-recorder -g "$Coords" -f "$TmpRecordPath" || exit
# Get the filename from the user and honor cancel
SavePath=$( zenity \
--file-selection \
--save \
--confirm-overwrite \
--file-filter=*.gif \
--filename="$DefaultSaveDir"'/.gif' \
) || exit
# Append .gif to the SavePath if it's missing
[[ $SavePath =~ \.gif$ ]] || SavePath+='.gif'
# Produce a pallete from the video file
ffmpeg -i "$TmpRecordPath" -filter_complex "palettegen=stats_mode=full" "$TmpPalettePath" -y || exit
# Return umask to default
umask 022
# Use pallete to produce a gif from the video file
ffmpeg -i "$TmpRecordPath" -i "$TmpPalettePath" -filter_complex "paletteuse=dither=sierra2_4a" "$SavePath" -y || exit
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
rofi -modi "clipboard:greenclip print" -show clipboard -replace -config ~/.dotfiles/home/configs/rofi/config-cliphist.rasi -run-command '{cmd}'
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
DIR="$HOME/Pictures/screenshots/"
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
option2="Selected area"
option3="Fullscreen (delay 3 sec)"
options="$option2\n$option3"
choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/.dotfiles/home/configs/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot")
case $choice in
$option2)
grim -g "$(slurp)" - | swappy -f -
notify-send "Screenshot created" "Mode: Selected area"
;;
$option3)
sleep 3
grim - | swappy -f -
notify-send "Screenshot created" "Mode: Fullscreen"
;;
esac
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
state=`cat /sys/class/power_supply/AC/online`
if [ $state == "1" ]
then
echo $(system76-power charge-thresholds)
echo ""
echo "Select a Charge Threshold"
select threshold in "Full Charge" "Balanced" "Max Lifespan" "Quit"
do
case $threshold in
"Full Charge")
system76-power charge-thresholds --profile full_charge
break;;
"Balanced")
system76-power charge-thresholds --profile balanced
break;;
"Max Lifespan")
system76-power charge-thresholds --profile max_lifespan
break;;
"Quit")
echo "Closing"
break;;
*)
echo "Oops!";;
esac
done
else
echo $(system76-power profile | grep "Power Profile")
echo ""
echo "Select a Power Profile:"
select profile in Battery Balanced Performance Quit
do
case $profile in
"Battery")
system76-power profile battery
break;;
"Balanced")
system76-power profile balanced
break;;
"Performance")
system76-power profile performance
break;;
"Quit")
echo "Closing"
break;;
*)
echo "Oops!";;
esac
done
fi
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
state=`cat /sys/class/power_supply/AC/online`
if [ $state == "1" ]
then
threshold=`system76-power charge-thresholds | awk '/Profile/{print $NF}'`
echo $threshold
else
profile=`system76-power profile | awk '/Profile/{print $NF}'`
echo \($profile\)
fi
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
#
image=$1
# Create the color profile with pywal
wal -i $image
# Copy image to the .cache
cp $image ~/.cache/current_wallpaper.jpg
# Set the image as wallpaper using swww
swww img ~/.cache/current_wallpaper.jpg
# Reload Qtile
qtile cmd-obj -o cmd -f reload_config
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
#
image=$1
# Create the color profile with wallust
wallust run $image
# Copy image to the .cache
cp $image ~/.cache/current_wallpaper.jpg
# Set wallpaper in qtile
qtile cmd-obj -o cmd -f reload_config
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
#
image=$1
# Create the color profile with wallust
wallust run $image
# Copy image to the .cache
cp $image ~/.cache/current_wallpaper.jpg
# Set wallpaper in qtile
qtile cmd-obj -o cmd -f restart
# Update betterlockscreen image
betterlockscreen -u ~/.cache/current_wallpaper.jpg
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
volume=`wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{v = $2; print (v*100)"%"}'`
echo $volume
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
awww-daemon &
dunst &
wl-paste --type text --watch cliphist store &
wl-paste --type image --watch cliphist store &
awww img ~/.config/qtile/wallpaper.png &
wlr-randr --output DP-1 --left-of HDMI-A-1 &
wlr-randr --output DP-3 --right-of HDMI-A-1 &
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
function run {
if ! pgrep $1 ;
then
$@&
fi
}
#starting utility applications at boot time
numlockx &
picom &
/nix/store/$(ls -la /nix/store | grep polkit-gnome | grep '^d' | awk '{print $9}')/libexec/polkit-gnome-authentication-agent-1 &
dunst &
greenclip daemon &
cp ~/.dotfiles/home/configs/qtile/scripts/variety-x11.sh ~/.config/variety/scripts/set_wallpaper &
variety
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB