Update: Added Xresources, picom config, screenshot script, powermenu script.

This commit is contained in:
Keyitdev
2025-07-28 19:05:44 +02:00
parent 17c8a55bbb
commit beb1d80f7b
8 changed files with 370 additions and 23 deletions
+15
View File
@@ -0,0 +1,15 @@
*.background: #1b1b25
*.foreground: #dedede
*.transparent: #0000003f
*.sep: #F8F8F2
*.white: #eeffff
*.black: #15121c
*.red: #cb5760
*.green: #999f63
*.yellow: #d4a067
*.blue: #6c90a8
*.purple: #776690
*.cyan: #528a9b
*.pink: #ffa8c5
*.orange: #c87c3e
+84
View File
@@ -0,0 +1,84 @@
[global]
monitor = 0
follow = none
width = 300
height = (0, 300)
origin = top-right
offset = (10, 50)
scale = 0
notification_limit = 20
progress_bar = true
progress_bar_height = 10
progress_bar_frame_width = 1
progress_bar_min_width = 150
progress_bar_max_width = 300
progress_bar_corner_radius = 0
progress_bar_corners = all
icon_corner_radius = 0
icon_corners = all
indicate_hidden = yes
transparency = 0
separator_height = 2
padding = 8
horizontal_padding = 8
text_icon_padding = 0
frame_width = 3
frame_color = "#aaaaaa"
gap_size = 0
separator_color = frame
sort = yes
font = Monospace 8
line_height = 0
markup = full
format = "<b>%s</b>\n%b"
alignment = left
vertical_alignment = center
show_age_threshold = 60
ellipsize = middle
ignore_newline = no
stack_duplicates = true
hide_duplicate_count = false
show_indicators = yes
enable_recursive_icon_lookup = true
icon_theme = Adwaita
icon_position = left
min_icon_size = 32
max_icon_size = 128
# icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
sticky_history = yes
history_length = 20
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/xdg-open
always_run_script = true
title = Dunst
class = Dunst
corner_radius = 0
corners = all
ignore_dbusclose = false
force_xwayland = false
force_xinerama = false
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
[experimental]
per_monitor_dpi = false
[urgency_low]
background = "#222222"
foreground = "#888888"
timeout = 10
default_icon = dialog-information
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 10
override_pause_level = 30
default_icon = dialog-information
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0
override_pause_level = 60
default_icon = dialog-warning
+20 -6
View File
@@ -8,11 +8,12 @@ tiling_drag modifier titlebar
font pango:Open sans 11 font pango:Open sans 11
exec --no-startup-id dex --autostart --environment i3 exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id xss-lock --transfer-sleep-lock -- lock --nofork exec --no-startup-id xss-lock --transfer-sleep-lock -- lock --nofork
exec --no-startup-id xrandr --dpi 96
exec_always --no-startup-id xrandr --dpi 96 exec_always --no-startup-id feh --no-fehbg --bg-fill $HOME/Pictures/wallpapers/rick.png
exec_always --no-startup-id feh --no-fehbg --bg-fill $HOME/Pictures/wallpapers/background.png
exec_always --no-startup-id $HOME/.config/polybar/launch.sh exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec_always --no-startup-id picom &
exec_always --no-startup-id dunst & exec_always --no-startup-id dunst &
exec_always --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 & exec_always --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
exec_always --no-startup-id asus_fan_listener & exec_always --no-startup-id asus_fan_listener &
@@ -30,11 +31,24 @@ bindsym XF86TouchpadToggle exec --no-startup-id touchpad_toggle
# bindsym XF86RFKill # bindsym XF86RFKill
# bindsym XF86Calculator exec --no-startup-id nemo # bindsym XF86Calculator exec --no-startup-id nemo
bindsym Pause exec screenshot -sa
bindsym Print exec screenshot -sf
bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+Return exec i3-sensible-terminal
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+a exec --no-startup-id rofi -show drun -no-default-config -config ~/.config/rofi/1.rasi
bindsym $mod+d exec --no-startup-id rofi -show drun -no-default-config -config ~/.config/rofi/2.rasi
bindsym $mod+w exec --no-startup-id nemo ~/Pictures/screenshots/
bindsym $mod+e exec --no-startup-id nemo
bindsym $mod+q exec --no-startup-id firefox-developer-edition
bindsym $mod+x exec --no-startup-id rofi-powermenu
bindsym $mod+c exec --no-startup-id rofi-screenshot
# bindsym $mod+d exec --no-startup-id dmenu_run # bindsym $mod+d exec --no-startup-id dmenu_run
# change focus # change focus
@@ -71,9 +85,9 @@ bindsym $mod+v split v
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking # bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed # bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split # bindsym $mod+e layout toggle split
# toggle tiling / floating # toggle tiling / floating
bindsym $mod+Shift+space floating toggle bindsym $mod+Shift+space floating toggle
+22
View File
@@ -0,0 +1,22 @@
# Documentation: https://github.com/yshui/picom/wiki
# Config created by Keyitdev https://www.github.com/keyitdev/dotfiles
# Copyright (C) 2022 Keyitdev
fading = true;
fade-in-step = 0.015;
fade-out-step = 0.1;
fade-delta = 5
experimental-backends = false;
backend = "glx";
vsync = false
refresh-rate = 0
detect-transient = true
log-level = "debug";
opacity-rule: [
"95:class_g = 'Org.gnome.Nautilus'"
];
+14 -14
View File
@@ -1,17 +1,17 @@
[color] [color]
background = #1b1b25 background = ${xrdb:background}
foreground = #dedede foreground = ${xrdb:foreground}
transparent = #0000003f transparent = ${xrdb:transparent}
sep = #F8F8F2 sep = ${xrdb:sep}
white = #eeffff white = ${xrdb:white}
black = #15121c black = ${xrdb:black}
red = #cb5760 red = ${xrdb:red}
green = #999f63 green = ${xrdb:green}
yellow = #d4a067 yellow = ${xrdb:yellow}
blue = #6c90a8 blue = ${xrdb:blue}
purple = #776690 purple = ${xrdb:purple}
cyan = #528a9b cyan = ${xrdb:cyan}
pink = #ffa8c5 pink = ${xrdb:pink}
orange = #c87c3e orange = ${xrdb:orange}
+3 -3
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# rofi theme # rofi theme
theme="$HOME/.config/rofi/main_without_icons.rasi" theme="$HOME/.config/rofi/1.rasi"
get_options() { get_options() {
echo " Poweroff" echo " Poweroff"
@@ -16,8 +16,8 @@ get_options() {
main() { main() {
# get choice from rofi # get choice from rofi
# choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$theme") choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$theme")
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "") # choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "")
# run the selected command # run the selected command
case $choice in case $choice in
+60
View File
@@ -0,0 +1,60 @@
#!/bin/sh
# rofi theme
theme="$HOME/.config/rofi/1.rasi"
get_options() {
echo " Selected area screenshot"
echo " Full screen screenshot"
echo " Selected area video"
echo " Full screen video"
echo " Record audio (microphone)"
echo " Record audio (desktop)"
echo " Selected area video with audio (microphone)"
echo " Full screen video with audio (microphone)"
echo " Stop Recording"
}
main() {
# get choice from rofi
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$theme")
# run the selected command
case $choice in
' Selected area screenshot')
screenshot -sa
;;
' Full screen screenshot')
screenshot -sf
;;
' Selected area video')
screenshot -va
;;
' Full screen video')
screenshot -vf
;;
' Record audio (microphone)')
screenshot -am
;;
' Record audio (desktop)')
screenshot -ad
;;
' Selected area video with audio (microphone)')
screenshot -vaam
;;
' Full screen video with audio (microphone)')
screenshot -vfam
;;
' Stop Recording')
screenshot -s
;;
esac
# done
set -e
}
main &
exit 0
+152
View File
@@ -0,0 +1,152 @@
#!/bin/sh
# screenshot directory
screenshot_directory="$HOME/Pictures/screenshots"
videos_directory="$HOME/Videos"
audio_directory="$HOME/Music"
mkdir -p "$screenshot_directory"
mkdir -p "$videos_directory"
mkdir -p "$audio_directory"
date=$(date '+%d-%m-%Y-%H-%M-%S')
screen_resolution="$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')"
microphone="$(pacmd list-sources | grep -E '^\s+name: .*alsa_input' | cut -c 8- | sed 's/[<,>]//g')"
desktop="$(pacmd list-sources | grep -E '^\s+name: .*alsa_output' | cut -c 8- | sed 's/[<,>]//g')"
get_area(){
slop="$(slop -n -f '%w,%h,%x,%y')"
w=$(echo "$slop" | cut -d ',' -f1)
h=$(echo "$slop" | cut -d ',' -f2)
x=$(echo "$slop" | cut -d ',' -f3)
y=$(echo "$slop" | cut -d ',' -f4)
[ $((w%2)) -eq 1 ] && w=$(( w + 1 ))
[ $((h%2)) -eq 1 ] && h=$(( h + 1 ))
[ $((x%2)) -eq 1 ] && x=$(( x + 1 ))
[ $((y%2)) -eq 1 ] && y=$(( y + 1 ))
wh="${w}x${h}"
}
screenshot_selected_area(){
ffcast -q -g "$(slop)" png "$screenshot_directory/$date.png"
xclip -selection clipboard -t image/png "$screenshot_directory/$date.png"
notify-send -i "$screenshot_directory/$date.png" "Screenshot" "Area screenshot taken"
}
screenshot_full_screen(){
ffcast -q png "$screenshot_directory/$date.png"
xclip -selection clipboard -t image/png "$screenshot_directory/$date.png"
notify-send -i "$screenshot_directory/$date.png" "Screenshot" "Full screen screenshot taken"
}
video_selected_area(){
get_area
ffmpeg -hide_banner -loglevel error -show_region 1 \
-f x11grab -video_size "$wh" -framerate 30 -i :0.0+"$x","$y" -pix_fmt yuv420p "$videos_directory/$date.mp4"
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
notify-send -i "/tmp/$date.png" "Video" "Area video taken"
}
video_full_screen(){
ffmpeg -hide_banner -loglevel error -show_region 1 \
-f x11grab -video_size "$screen_resolution" -framerate 30 -i :0.0 -pix_fmt yuv420p "$videos_directory/$date.mp4"
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
notify-send -i "/tmp/$date.png" "Video" "Full screen video taken"
}
video_full_screen_rgba(){
ffmpeg -hide_banner -loglevel error -show_region 1 \
-f x11grab -video_size "$screen_resolution" -framerate 30 -i :0.0 -pix_fmt rgba "$videos_directory/$date.mp4"
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
notify-send -i "/tmp/$date.png" "Video" "Full screen video taken (rgba)"
}
audio_microphone(){
ffmpeg -f pulse -i "$microphone" -metadata title="$date" "$audio_directory/$date.mp3"
notify-send "Audio" "Microphone audio recorded"
}
audio_desktop(){
ffmpeg -f pulse -i "$desktop" -metadata title="$date" "$audio_directory/$date.mp3"
notify-send "Audio" "Desktop audio recorded"
}
video_selected_area_audio_microphone(){
get_area
ffmpeg -hide_banner -loglevel error -show_region 1 \
-f x11grab -video_size "$wh" -framerate 30 -i :0.0+"$x","$y" \
-f alsa -i default -pix_fmt yuv420p "$videos_directory/$date.mp4"
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
notify-send -i "/tmp/$date.png" "Video" "Area video with audio taken"
}
video_full_screen_audio_microphone(){
ffmpeg -hide_banner -loglevel error -show_region 1 \
-f x11grab -video_size "$screen_resolution" -framerate 30 -i :0.0 \
-f alsa -i default -pix_fmt yuv420p "$videos_directory/$date.mp4"
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
notify-send -i "/tmp/$date.png" "Video" "Full screen video with audio taken"
}
stop(){
pkill -fxn '(/\S+)*ffmpeg\s.*\sx11grab\s.*'
pkill -fxn '(/\S+)*ffmpeg\s.*\spulse\s.*'
exit 1
}
help(){
cat << EOF
-h | -help | --help
-s | -stop
-sa | -screenshot_selected_area
-sf | -screenshot_full_screen
-va | -video_selected_area
-vf | -video_full_screen
-am | -audio_microphone
-ad | -audio_desktop
-vaam | -video_selected_area_audio_microphone
-vfam | -video_full_screen_audio_microphone
EOF
}
main(){
while [ "$1" != "" ]; do
PARAM="$1"
case $PARAM in
-h | -help | --help)
help
exit 1
;;
-s | -stop)
stop
exit 1
;;
-sa | -screenshot_selected_area)
screenshot_selected_area
;;
-sf | -screenshot_full_screen)
screenshot_full_screen
;;
-va | -video_selected_area)
video_selected_area
;;
-vf | -video_full_screen)
video_full_screen
;;
-vf_rgba | -video_full_screen_rgba)
video_full_screen_rgba
;;
-am | -audio_microphone)
audio_microphone
;;
-ad | -audio_desktop)
audio_desktop
;;
-vaam | -video_selected_area_audio_microphone)
video_selected_area_audio_microphone
;;
-vfam | -video_full_screen_audio_microphone)
video_full_screen_audio_microphone
;;
*)
echo "ERROR: unknown parameter \"$PARAM\""
help
exit 1
;;
esac
shift
done
# done
set -e
}
main "$1" &
exit 0