瀏覽代碼

save tagimg in jpeg

siduck76 3 年之前
父節點
當前提交
58c70c44bd
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 2 2
      .dwm/save_tagpreview
  2. 2 2
      .dwm/tag_preview
  3. 1 1
      rofi/tag.rasi

+ 2 - 2
.dwm/save_tagpreview

@@ -5,8 +5,8 @@ preview_dir="$HOME/.dwm/tag_previews/"
 current_tag=$(($(wmctrl -d | grep '*' | cut -d ' ' -f1) + 1)) # get tag number, and add 1
 
 save_Screenshot() {
-  file="${preview_dir}${current_tag}.png"
-  maim -u "${file}"
+  file="${preview_dir}${current_tag}.jpeg"
+  scrot -o "${file}"
 }
 
 $(save_Screenshot)

+ 2 - 2
.dwm/tag_preview

@@ -8,8 +8,8 @@ if [ "$1" == "--hide" ]; then # If first argument is --hide execute
 fi
 
 if [ "$1" == "--show" ]; then # If first argument is --show execute
-  file="${screenshot_dir}${2}.png"                              # $2 is the tag which will be previewed
+  file="${screenshot_dir}${2}.jpeg"                              # $2 is the tag which will be previewed
   [ -f $file ] || exit 1                                        # Exit when file does not exist
-  sed -i "s:${HOME}/.*\.png:$file:" $HOME/.config/rofi/tag.rasi #overwrites the tagname in rofi config
+  sed -i "s:${HOME}/.*\.jpeg:$file:" $HOME/.config/rofi/tag.rasi #overwrites the tagname in rofi config
   rofi -show drun -theme tag 2>/dev/null
 fi

+ 1 - 1
rofi/tag.rasi

@@ -9,5 +9,5 @@ window {
     padding: 310px;
     width: 220px;
     height: 122px;
-    background-image: url("/home/sid/u.png",width);
+    background-image: url("/home/sid/.dwm/tag_previews/4.jpeg",width);
 }