Compare commits
2 Commits
fa3faba5a2
...
034090ffb1
Author | SHA1 | Date |
---|---|---|
Lucien Cartier-Tilet | 034090ffb1 | |
Lucien Cartier-Tilet | c19d4b0d96 |
|
@ -346,26 +346,9 @@
|
|||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Set_a_random_wallpaper-104bbeec
|
||||
:END:
|
||||
The following function allows the user to get the list of available
|
||||
wallpapers I have in my wallpapers directory. This depends on the variable
|
||||
described in [[#Variable_definitions-Wallpapers_directory-23b54f4f]]. By the
|
||||
way, the assert on line 3 allows Lua to wait for ~popen~ to run.
|
||||
#+BEGIN_SRC lua -n
|
||||
local function get_papes()
|
||||
local i, papes, popen = 0, {}, io.popen
|
||||
local pfile = assert(popen('find '..papes_dir..' -type f'))
|
||||
for filename in pfile:lines() do
|
||||
i = i + 1
|
||||
papes[i] = filename
|
||||
end
|
||||
pfile:close()
|
||||
return papes
|
||||
end
|
||||
#+END_SRC
|
||||
|
||||
This function is another one that sets a random wallpaper from the list of
|
||||
wallpapers provided by ~get_papes()~ described above. This depends on
|
||||
[[https://github.com/l3ib/nitrogen/][Nitrogen]] and [[https://github.com/dylanaraps/pywal][Pywal]].
|
||||
This function sets a random wallpaper from the directory
|
||||
=~/Pictures/Wallpapers=, see [[file:bin.org::#pape-update-bdecbadf][pape-update]] in my custom scripts. This depends
|
||||
on [[https://github.com/l3ib/nitrogen/][Nitrogen]] and [[https://github.com/dylanaraps/pywal][Pywal]].
|
||||
#+BEGIN_SRC lua
|
||||
local function set_random_pape()
|
||||
awful.spawn.with_shell("pape-update")
|
||||
|
|
|
@ -433,19 +433,6 @@
|
|||
ffmpeg -i $argv[1] -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis $argv[1].webm
|
||||
#+END_SRC
|
||||
|
||||
* pape-update
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :tangle ~/.local/bin/pape-update
|
||||
:CUSTOM_ID: pape-update-bdecbadf
|
||||
:END:
|
||||
This little tool updates my wallpaper using both pywal and nitrogen (because
|
||||
apparently pywal doesn’t like AwesomeWM). It depends on [[#pape-restore-981c39c2][~pape-restore~]].
|
||||
#+BEGIN_SRC fish
|
||||
#!/usr/bin/fish
|
||||
wal -i ~/Pictures/Wallpapers
|
||||
pape-restore
|
||||
#+END_SRC
|
||||
|
||||
* pape-restore
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :tangle ~/.local/bin/pape-restore
|
||||
|
@ -460,6 +447,19 @@
|
|||
end
|
||||
#+END_SRC
|
||||
|
||||
* pape-update
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :tangle ~/.local/bin/pape-update
|
||||
:CUSTOM_ID: pape-update-bdecbadf
|
||||
:END:
|
||||
This little tool updates my wallpaper using both pywal and nitrogen (because
|
||||
apparently pywal doesn’t like AwesomeWM). It depends on [[#pape-restore-981c39c2][~pape-restore~]].
|
||||
#+BEGIN_SRC fish
|
||||
#!/usr/bin/fish
|
||||
wal -i ~/Pictures/Wallpapers
|
||||
pape-restore
|
||||
#+END_SRC
|
||||
|
||||
* Pinfo
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :tangle ~/.local/bin/pinfo
|
||||
|
|
Loading…
Reference in New Issue