├── .gitignore ├── README.md ├── TODO.md ├── applications ├── networkmanager_dmenu.desktop ├── rofi-anime.desktop ├── rofi-autostart.desktop ├── rofi-battery-info.desktop ├── rofi-bitsearch.desktop ├── rofi-bluetooth.desktop ├── rofi-books.desktop ├── rofi-brightness.desktop ├── rofi-browse.desktop ├── rofi-calc.desktop ├── rofi-calendar.desktop ├── rofi-characters.desktop ├── rofi-cheat.desktop ├── rofi-clip.desktop ├── rofi-clocks.desktop ├── rofi-color-picker.desktop ├── rofi-contacts.desktop ├── rofi-dict.desktop ├── rofi-docker.desktop ├── rofi-emoji.desktop ├── rofi-ffmpeg.desktop ├── rofi-firefox.desktop ├── rofi-flathub.desktop ├── rofi-fontawesome.desktop ├── rofi-fortune.desktop ├── rofi-github.desktop ├── rofi-hangman.desktop ├── rofi-icons.desktop ├── rofi-keyboard-layout.desktop ├── rofi-libvirt.desktop ├── rofi-livetv.desktop ├── rofi-locale.desktop ├── rofi-mime.desktop ├── rofi-monitor-layout.desktop ├── rofi-mpd.desktop ├── rofi-news.desktop ├── rofi-notes.desktop ├── rofi-notifications.desktop ├── rofi-passmenu.desktop ├── rofi-playerctl.desktop ├── rofi-podcast.desktop ├── rofi-projects.desktop ├── rofi-quiz.desktop ├── rofi-radio.desktop ├── rofi-reddit.desktop ├── rofi-screenshot.desktop ├── rofi-search-all.desktop ├── rofi-search-archwiki.desktop ├── rofi-search-content.desktop ├── rofi-search-docs.desktop ├── rofi-search-downloads.desktop ├── rofi-search-google.desktop ├── rofi-search-pics.desktop ├── rofi-search-recent.desktop ├── rofi-search-videos.desktop ├── rofi-search-wikipedia.desktop ├── rofi-search-youtube.desktop ├── rofi-search.desktop ├── rofi-session.desktop ├── rofi-sounds.desktop ├── rofi-steam.desktop ├── rofi-streaming.desktop ├── rofi-system-info.desktop ├── rofi-systemd.desktop ├── rofi-timer.desktop ├── rofi-timezone.desktop ├── rofi-tmux.desktop ├── rofi-tnt.desktop ├── rofi-todo-list.desktop ├── rofi-top.desktop ├── rofi-torrent.desktop ├── rofi-translate.desktop ├── rofi-tv.desktop ├── rofi-virtualbox.desktop ├── rofi-volume.desktop ├── rofi-wallpaper.desktop ├── rofi-weather.desktop ├── rofi-window.desktop ├── rofi-xkcd.desktop ├── rofi-youtube-feeds.desktop ├── update-system.desktop └── wireguard-rofi.desktop ├── config.rasi ├── create-desktop-entries.sh ├── drun.sh ├── gallery ├── demo.webm ├── rofi-colors.png ├── rofi_all.png ├── rofi_appear.png ├── rofi_autostart.png ├── rofi_books.png ├── rofi_calendar.png ├── rofi_chars.png ├── rofi_cheat1.png ├── rofi_cheat2.png ├── rofi_default1.png ├── rofi_default2.png ├── rofi_dict.png ├── rofi_firefox.png ├── rofi_flathub.png ├── rofi_fortune.png ├── rofi_github.png ├── rofi_hangman.png ├── rofi_icons.png ├── rofi_icons_grid.png ├── rofi_icons_list.png ├── rofi_keyboard.png ├── rofi_lang.png ├── rofi_media.png ├── rofi_monitor.png ├── rofi_mpd.png ├── rofi_news.png ├── rofi_news2.png ├── rofi_podcast1.png ├── rofi_podcast2.png ├── rofi_podcast3.png ├── rofi_quiz.png ├── rofi_radio.png ├── rofi_record.png ├── rofi_reddit1.png ├── rofi_reddit2.png ├── rofi_search.png ├── rofi_session.png ├── rofi_settings.png ├── rofi_sport.png ├── rofi_timer.png ├── rofi_timezone.png ├── rofi_tnt.png ├── rofi_todo.png ├── rofi_top.png ├── rofi_torrent.png ├── rofi_trans.png ├── rofi_tv.png ├── rofi_utils.png ├── rofi_volume.png ├── rofi_weather.png ├── rofi_web.png ├── rofi_xkcd.png ├── rofi_youtube1.png └── rofi_youtube2.png ├── scripts ├── appmenu-service.py ├── config │ ├── LANG │ ├── autostart │ └── environment ├── data │ ├── Applications-Radio.svg │ ├── Applications-Television.svg │ ├── colors-name.txt │ ├── emojis.txt │ ├── fa5-icon-list.txt │ ├── hangman │ │ ├── animals │ │ ├── cities │ │ ├── countries │ │ ├── movies │ │ └── words │ ├── mimetypes │ │ ├── application.csv │ │ ├── audio.csv │ │ ├── font.csv │ │ ├── image.csv │ │ ├── message.csv │ │ ├── model.csv │ │ ├── multipart.csv │ │ ├── text.csv │ │ └── video.csv │ ├── news │ ├── podcasts │ │ ├── After Shows.json │ │ ├── Alternative Health.json │ │ ├── Animation and Manga.json │ │ ├── Astronomy.json │ │ ├── Automotive.json │ │ ├── Aviation.json │ │ ├── Baseball.json │ │ ├── Basketball.json │ │ ├── Books.json │ │ ├── Buddhism.json │ │ ├── Business News.json │ │ ├── Careers.json │ │ ├── Chemistry.json │ │ ├── Christianity.json │ │ ├── Comedy Fiction.json │ │ ├── Comedy Interviews.json │ │ ├── Courses.json │ │ ├── Crafts.json │ │ ├── Cricket.json │ │ ├── Daily News.json │ │ ├── Design.json │ │ ├── Documentary.json │ │ ├── Drama.json │ │ ├── Earth Sciences.json │ │ ├── Education for Kids.json │ │ ├── Entertainment News.json │ │ ├── Entrepreneurship.json │ │ ├── Fantasy Sports.json │ │ ├── Fashion and Beauty.json │ │ ├── Film History.json │ │ ├── Film Interviews.json │ │ ├── Film Reviews.json │ │ ├── Fitness.json │ │ ├── Food.json │ │ ├── Football.json │ │ ├── Games.json │ │ ├── Golf.json │ │ ├── Government.json │ │ ├── Hinduism.json │ │ ├── History.json │ │ ├── Hobbies.json │ │ ├── Hockey.json │ │ ├── Home and Garden.json │ │ ├── How To.json │ │ ├── Improv.json │ │ ├── Investing.json │ │ ├── Islam.json │ │ ├── Judaism.json │ │ ├── Language Learning.json │ │ ├── Life Sciences.json │ │ ├── Management.json │ │ ├── Marketing.json │ │ ├── Mathematics.json │ │ ├── Medicine.json │ │ ├── Mental Health.json │ │ ├── Music Commentary.json │ │ ├── Music History.json │ │ ├── Music Interviews.json │ │ ├── Natural Sciences.json │ │ ├── Nature.json │ │ ├── News Commentary.json │ │ ├── Non-Profit.json │ │ ├── Nutrition.json │ │ ├── Parenting.json │ │ ├── Performing Arts.json │ │ ├── Personal Journals.json │ │ ├── Pets & Animals.json │ │ ├── Philosophy.json │ │ ├── Physics.json │ │ ├── Places & Travel.json │ │ ├── Politics.json │ │ ├── Relationships.json │ │ ├── Religion.json │ │ ├── Rugby.json │ │ ├── Running.json │ │ ├── Science Fiction.json │ │ ├── Self-Improvement.json │ │ ├── Sexuality.json │ │ ├── Soccer.json │ │ ├── Social Sciences.json │ │ ├── Spirituality.json │ │ ├── Sports News.json │ │ ├── Stand-Up.json │ │ ├── Stories for Kids.json │ │ ├── Swimming.json │ │ ├── TV Reviews.json │ │ ├── Tech News.json │ │ ├── Technology.json │ │ ├── Tennis.json │ │ ├── True Crime.json │ │ ├── Video Games.json │ │ ├── Visual Arts.json │ │ ├── Volleyball.json │ │ ├── Wilderness.json │ │ └── Wrestling.json │ ├── subreddits │ ├── unicode.txt │ └── yt-feeds ├── download_flathub_icon.sh ├── download_icon.sh ├── download_podcast_icon.sh ├── download_tv_icon.sh ├── download_xkcd_icon.sh ├── drag.py ├── keypress.py ├── menus │ └── Custom Menu.json ├── networkmanager_dmenu ├── play_accept.sh ├── play_camera.sh ├── play_change.sh ├── play_error.sh ├── play_exit.sh ├── play_select.sh ├── rofi-anime.sh ├── rofi-autostart.sh ├── rofi-battery-info.sh ├── rofi-bitsearch.sh ├── rofi-bluetooth.sh ├── rofi-books.sh ├── rofi-brightness.sh ├── rofi-calc-mode.sh ├── rofi-calendar.sh ├── rofi-characters.sh ├── rofi-cheat.sh ├── rofi-clip.sh ├── rofi-clocks.sh ├── rofi-color-picker.sh ├── rofi-contacts.sh ├── rofi-desktop.sh ├── rofi-dict.sh ├── rofi-docker.sh ├── rofi-emoji.sh ├── rofi-ffmpeg.sh ├── rofi-firefox.sh ├── rofi-flathub.sh ├── rofi-fontawesome.sh ├── rofi-fortune.sh ├── rofi-github.sh ├── rofi-hangman.sh ├── rofi-hud.py ├── rofi-icons.sh ├── rofi-json.sh ├── rofi-keepassxc.sh ├── rofi-keyboard-layout.sh ├── rofi-libvirt-mode.sh ├── rofi-livetv-blocked.sh ├── rofi-livetv.sh ├── rofi-locale.sh ├── rofi-mime.sh ├── rofi-monitor-layout.sh ├── rofi-mpd.sh ├── rofi-news.sh ├── rofi-notes.sh ├── rofi-passmenu.sh ├── rofi-playerctl.sh ├── rofi-podcast.sh ├── rofi-projects.sh ├── rofi-quiz.sh ├── rofi-radio.sh ├── rofi-reddit.sh ├── rofi-screenshot.sh ├── rofi-search.sh ├── rofi-session.sh ├── rofi-sounds.sh ├── rofi-steam.sh ├── rofi-streaming.sh ├── rofi-system-info.sh ├── rofi-systemd.sh ├── rofi-timer.sh ├── rofi-tmux.sh ├── rofi-tnt.sh ├── rofi-todo-list.sh ├── rofi-todo.sh ├── rofi-top.sh ├── rofi-torrent.sh ├── rofi-translate.sh ├── rofi-tv.sh ├── rofi-update-system.sh ├── rofi-virtualbox.sh ├── rofi-volume.sh ├── rofi-wallpaper.sh ├── rofi-weather.sh ├── rofi-web-search.sh ├── rofi-web-suggestions.sh ├── rofi-window.sh ├── rofi-wireguard.sh ├── rofi-xkcd.sh ├── rofi-youtube-feeds.sh ├── rofication-daemon.py ├── rofication-gui.py ├── scrape_bitsearch.py ├── scrape_books.py ├── scrape_livetv.py ├── scrape_podcasts.py ├── scrape_subreddits.py ├── scrape_vcf.py ├── scrape_wikipedia.py ├── scrape_xkcd.py ├── sounds │ ├── Carmageddon │ │ ├── accept.wav │ │ ├── cancel.wav │ │ ├── error.wav │ │ └── select2.wav │ ├── Metal Gear Solid │ │ ├── accept.wav │ │ ├── accept3.wav │ │ ├── accept4.wav │ │ ├── camera.wav │ │ ├── cancel.wav │ │ ├── error.wav │ │ ├── select.wav │ │ └── select2.wav │ ├── Resident Evil │ │ ├── accept.wav │ │ ├── cancel.wav │ │ └── select.wav │ ├── Tekken │ │ ├── accept.wav │ │ ├── cancel.wav │ │ └── select.wav │ ├── Xbox360 │ │ ├── accept.wav │ │ ├── camera.wav │ │ ├── cancel.wav │ │ ├── error.wav │ │ └── select.wav │ ├── current │ ├── timer_end.wav │ └── timer_start.wav ├── suggestions │ ├── amazon │ ├── archwiki │ ├── baidu │ ├── ddg │ ├── deezer │ ├── google │ ├── googlebooks │ ├── maps │ ├── wikipedia │ └── youtube ├── thumbnail-pdf ├── thumbnail-txt ├── thumbnail-xapp ├── wireguard.sh └── x11_device_watcher.py ├── start.sh ├── themes ├── README.md ├── arc-red-dark.rasi ├── cloud.rasi ├── fancy.rasi ├── flamingo.rasi ├── flat-orange.rasi ├── fullscreen-preview.rasi ├── material.rasi ├── merah.rasi ├── onedark.rasi ├── oxide.rasi ├── rezlooks.rasi ├── ribbon.rasi ├── sidetab-adapta.rasi ├── sidetab.rasi ├── slate.rasi ├── solarized-darker.rasi └── spotlight.rasi └── thumbnailers ├── ffmpegthumbnailer.thumbnailer ├── gdk-pixbuf-thumbnailer.thumbnailer ├── gsf-office.thumbnailer ├── librsvg.thumbnailer ├── pdf-magick.thumbnailer ├── txt-magick.thumbnailer ├── xapp-appimage-thumbnailer.thumbnailer ├── xapp-epub-thumbnailer.thumbnailer ├── xapp-gimp-thumbnailer.thumbnailer ├── xapp-mp3-thumbnailer.thumbnailer ├── xapp-raw-thumbnailer.thumbnailer └── xapp-vorbiscomment-thumbnailer.thumbnailer /.gitignore: -------------------------------------------------------------------------------- 1 | channels.json 2 | channels.m3u 3 | radios.json 4 | tntvillage-release-dump.csv 5 | history 6 | greenclip 7 | clipster 8 | keyboard-layout 9 | monitor-layout 10 | wallpaper 11 | first-run 12 | todo 13 | notes 14 | events 15 | *.vcf 16 | -------------------------------------------------------------------------------- /applications/networkmanager_dmenu.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Network 3 | GenericName=Networkmanager Settings 4 | Exec=networkmanager_dmenu 5 | Icon=network-wireless 6 | Type=Application 7 | Categories=Rofi;Desktop;Settings;Network; 8 | -------------------------------------------------------------------------------- /applications/rofi-anime.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Watch Anime 3 | Comment= 4 | Exec=rofi-anime.sh --rofi 5 | Icon=multimedia-video-player 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Video;TV;Tuner;Web;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-autostart.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Categories=Rofi;Desktop;Settings; 3 | Comment= 4 | Exec=rofi-autostart.sh 5 | Icon=xfce4-settings 6 | MimeType= 7 | Name=Autostart Applications 8 | Path= 9 | StartupNotify=true 10 | Terminal=false 11 | Type=Application 12 | -------------------------------------------------------------------------------- /applications/rofi-battery-info.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Battery 3 | Comment= 4 | Exec=rofi-battery-info.sh 5 | Icon=battery-full 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-bitsearch.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Torrents (bitsearch) 3 | Comment= 4 | Exec=rofi-bitsearch.sh 5 | Icon=application-x-bittorrent 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network;P2P 9 | -------------------------------------------------------------------------------- /applications/rofi-bluetooth.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Bluetooth 3 | Comment= 4 | Exec=rofi-bluetooth.sh 5 | Icon=bluetooth 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-books.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=eBooks 3 | Comment= 4 | Exec=rofi-books.sh 5 | Icon=application-x-mobipocket-ebook 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Books; 9 | -------------------------------------------------------------------------------- /applications/rofi-brightness.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Brightness 3 | Comment= 4 | Exec=rofi-brightness.sh 5 | Icon=video-display 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-browse.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Browse Files 4 | Comment= 5 | Exec=rofi -show-icons -show filebrowser 6 | Icon=system-file-manager 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem;FileManager; 10 | -------------------------------------------------------------------------------- /applications/rofi-calc.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Calculator 3 | Comment= 4 | Exec=rofi -modi calc -show calc 5 | Icon=accessories-calculator 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Calculator; 9 | -------------------------------------------------------------------------------- /applications/rofi-calendar.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Calendar 3 | Comment= 4 | Exec=rofi-calendar.sh 5 | Icon=x-office-calendar 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-characters.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Characters 3 | Comment= 4 | Exec=rofi-characters.sh 5 | Icon=accessories-character-map 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-cheat.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Cheat Sheets 3 | Comment= 4 | Exec=rofi-cheat.sh 5 | Icon=accessories-text-editor 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-clip.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Clipboard 3 | Comment= 4 | Exec=rofi-clip.sh 5 | Icon=edit-paste 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-clocks.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Clocks 3 | Comment= 4 | Exec=rofi-clocks.sh 5 | Icon=preferences-system-time 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Clock; 9 | -------------------------------------------------------------------------------- /applications/rofi-color-picker.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Color Picker 3 | Comment= 4 | Exec=rofi-color-picker.sh 5 | Icon=preferences-color 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-contacts.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Contacts 3 | Comment= 4 | Exec=rofi-contacts.sh 5 | Icon=office-address-book 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Office;Email; 9 | -------------------------------------------------------------------------------- /applications/rofi-dict.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Dictionary 3 | Comment= 4 | Exec=rofi-dict.sh 5 | Icon=accessories-dictionary 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-docker.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Containers (Docker) 3 | Comment= 4 | Exec=rofi-docker.sh 5 | Icon=utilities-terminal 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Containers; 9 | -------------------------------------------------------------------------------- /applications/rofi-emoji.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Emojis 3 | Comment= 4 | Exec=rofi-emoji.sh 5 | Icon=face-smile 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-ffmpeg.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Record Audio/Video 3 | Comment= 4 | Exec=rofi-ffmpeg.sh 5 | Icon=media-record 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Audio;Video;Recorder; 9 | -------------------------------------------------------------------------------- /applications/rofi-firefox.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Bookmarks 3 | Comment= 4 | Exec=rofi-firefox.sh 5 | Icon=firefox 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-flathub.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=FlatHub 3 | Comment= 4 | Exec=rofi-flathub.sh 5 | Icon=application-gzip 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network;System;PackageManager; 9 | -------------------------------------------------------------------------------- /applications/rofi-fontawesome.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=FontAwesome 3 | Comment= 4 | Exec=rofi-fontawesome.sh 5 | Icon=accessories-character-map 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-fortune.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Fortune 3 | Comment= 4 | Exec=rofi-fortune.sh 5 | Icon=application-vnd.comicbook+zip 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-github.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=GitHub 3 | Comment= 4 | Exec=rofi-github.sh 5 | Icon=applications-internet 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-hangman.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Hangman 3 | Comment= 4 | Exec=rofi-hangman.sh 5 | Icon=applications-games 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Games; 9 | -------------------------------------------------------------------------------- /applications/rofi-icons.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Icons 4 | Comment= 5 | Exec=rofi-icons.sh 6 | Icon=preferences-desktop-theme 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem;Appearance; 10 | -------------------------------------------------------------------------------- /applications/rofi-keyboard-layout.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Keyboard Layout 3 | Comment= 4 | Exec=rofi-keyboard-layout.sh 5 | Icon=input-keyboard 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-libvirt.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Virtual Machines (libvirt) 3 | Comment= 4 | Exec=rofi -show libvirt -modi "libvirt:rofi-libvirt-mode.sh" 5 | Icon=utilities-terminal 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-livetv.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Sport Events 3 | Comment= 4 | Exec=rofi-livetv.sh 5 | Icon=calendar 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Sports;TV; 9 | -------------------------------------------------------------------------------- /applications/rofi-locale.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=System Language 3 | Comment= 4 | Exec=rofi-locale.sh 5 | Icon=preferences-desktop-locale 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-mime.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Default Applications 3 | Comment= 4 | Exec=rofi-mime.sh 5 | Icon=preferences-desktop-default-applications 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-monitor-layout.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Display Configuration 3 | Comment= 4 | Exec=rofi-monitor-layout.sh 5 | Icon=video-display 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-mpd.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Music Player 3 | Comment= 4 | Exec=rofi-mpd.sh 5 | Icon=gmusicbrowser 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Audio;Music;Player; 9 | -------------------------------------------------------------------------------- /applications/rofi-news.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Latest News 3 | Comment= 4 | Exec=rofi-news.sh 5 | Icon=application-rss+xml 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;News; 9 | -------------------------------------------------------------------------------- /applications/rofi-notes.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Notes 3 | Comment= 4 | Exec=rofi-notes.sh 5 | Icon=xfce4-notes-plugin 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-notifications.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Notifications 3 | Comment= 4 | Exec=rofication-gui.py 5 | Icon=plugin-notification 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System; 9 | -------------------------------------------------------------------------------- /applications/rofi-passmenu.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Passwords 3 | Comment= 4 | Exec=rofi-passmenu.sh 5 | Icon=edit-paste 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-playerctl.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Media Controls 3 | Comment= 4 | Exec=rofi-playerctl.sh 5 | Icon=applications-multimedia 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Audio;Video; 9 | -------------------------------------------------------------------------------- /applications/rofi-podcast.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Podcasts 3 | Comment= 4 | Exec=rofi-podcast.sh 5 | Icon=multimedia-player-ipod-touch 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;AudioVideo;Audio; 9 | -------------------------------------------------------------------------------- /applications/rofi-projects.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Projects 3 | Comment= 4 | Exec=rofi-projects.sh 5 | Icon=applications-development 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Development; 9 | -------------------------------------------------------------------------------- /applications/rofi-quiz.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Trivia 3 | Comment= 4 | Exec=rofi-quiz.sh 5 | Icon=dialog-question 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Games; 9 | -------------------------------------------------------------------------------- /applications/rofi-radio.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Radio Stations 3 | Comment= 4 | Exec=rofi-radio.sh 5 | Icon=audio-headphones 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Audio;Tuner; 9 | -------------------------------------------------------------------------------- /applications/rofi-reddit.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Reddit 3 | Comment= 4 | Exec=rofi-reddit.sh 5 | Icon=internet-web-browser 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-screenshot.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Take Screenshot 3 | Comment= 4 | Exec=rofi-screenshot.sh 5 | Icon=camera-photo 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-search-all.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=All Files 4 | Comment= 5 | Exec=rofi-search.sh -t "All" 6 | Icon=system-file-manager 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-archwiki.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=ArchWiki 3 | Comment= 4 | Exec=rofi-web-search.sh "archwiki" 5 | Icon=system-search 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-search-content.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=File Contents 4 | Comment= 5 | Exec=rofi-search.sh -t "Content" 6 | Icon=text-plain 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-docs.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Documents 4 | Comment= 5 | Exec=rofi-search.sh -t "Documents" 6 | Icon=office-document 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-downloads.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Downloads 4 | Comment= 5 | Exec=rofi-search.sh -t "Downloads" 6 | Icon=folder-download 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-google.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Google 3 | Comment= 4 | Exec=rofi-web-search.sh "google" 5 | Icon=google 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-search-pics.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Pictures 4 | Comment= 5 | Exec=rofi-search.sh -t "Pictures" 6 | Icon=multimedia-photo-manager 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-recent.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Recently Used 4 | Comment= 5 | Exec=rofi-search.sh -t "Recent" 6 | Icon=folder-recent 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-videos.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Videos 4 | Comment= 5 | Exec=rofi-search.sh -t "Videos" 6 | Icon=multimedia-video-player 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-search-wikipedia.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Wikipedia 3 | Comment= 4 | Exec=rofi-web-search.sh "wikipedia" 5 | Icon=preferences-system-network 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-search-youtube.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Youtube 3 | Comment= 4 | Exec=rofi-web-search.sh "youtube" 5 | Icon=youtube 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-search.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Search Computer 4 | Comment= 5 | Exec=rofi-search.sh -m 6 | Icon=system-search 7 | Terminal=false 8 | Type=Application 9 | Categories=Rofi;Desktop;Search;Filesystem; 10 | -------------------------------------------------------------------------------- /applications/rofi-session.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Lock/Logout 3 | Comment= 4 | Exec=rofi-session.sh 5 | Icon=org.xfce.session 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System; 9 | -------------------------------------------------------------------------------- /applications/rofi-sounds.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Rofi Sounds 3 | Comment= 4 | Exec=rofi-sounds.sh 5 | Icon=multimedia-volume-control 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings;AudioVideo;Audio; 9 | -------------------------------------------------------------------------------- /applications/rofi-steam.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Steam Games 3 | Comment= 4 | Exec=rofi-steam.sh 5 | Icon=applications-games 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Game; 9 | -------------------------------------------------------------------------------- /applications/rofi-streaming.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Watch Movies/Series 3 | Comment= 4 | Exec=rofi-streaming.sh --rofi 5 | Icon=multimedia-video-player 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Video;TV;Tuner;Web;Network; 9 | -------------------------------------------------------------------------------- /applications/rofi-system-info.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=System Info 3 | Comment= 4 | Exec=rofi-system-info.sh 5 | Icon=applications-system 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-systemd.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=System Services 3 | Comment= 4 | Exec=rofi-systemd.sh 5 | Icon=applications-system 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System;Settings; 9 | -------------------------------------------------------------------------------- /applications/rofi-timer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Set Timer 3 | Comment= 4 | Exec=rofi -modi "Timer:rofi-timer.sh" -show Timer 5 | Icon=preferences-system-time 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Clock; 9 | -------------------------------------------------------------------------------- /applications/rofi-timezone.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Timezone 3 | Comment= 4 | Exec=rofi-clocks.sh 5 | Icon=preferences-system-time 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings;Clock; 9 | -------------------------------------------------------------------------------- /applications/rofi-tmux.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Tmux Sessions 3 | Comment= 4 | Exec=rofi-tmux.sh 5 | Icon=utilities-terminal 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-tnt.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=TNT Village 3 | Comment= 4 | Exec=rofi-tnt.sh 5 | Icon=application-x-bittorrent 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;P2P; 9 | -------------------------------------------------------------------------------- /applications/rofi-todo-list.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=ToDo Lists 3 | Comment= 4 | Exec=rofi-todo-list.sh 5 | Icon=menu-editor 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-top.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Task Manager 3 | Comment= 4 | Exec=rofi-top.sh 5 | Icon=utilities-system-monitor 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System;Monitor; 9 | -------------------------------------------------------------------------------- /applications/rofi-torrent.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Torrents (1337x) 3 | Comment= 4 | Exec=rofi-torrent.sh 5 | Icon=application-x-bittorrent 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Search;Network;P2P 9 | -------------------------------------------------------------------------------- /applications/rofi-translate.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Translate Text 3 | Comment= 4 | Exec=rofi-translate.sh 5 | Icon=preferences-desktop-locale 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Languages; 9 | -------------------------------------------------------------------------------- /applications/rofi-tv.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Watch TV 3 | Comment= 4 | Exec=rofi-tv.sh 5 | Icon=video-display-tv 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;AudioVideo;Video;TV;Tuner; 9 | -------------------------------------------------------------------------------- /applications/rofi-virtualbox.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Virtual Machines (VirtualBox) 3 | Comment= 4 | Exec=rofi-virtualbox.sh 5 | Icon=virtualbox 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-volume.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Volume Controls 3 | Comment= 4 | Exec=rofi-volume.sh 5 | Icon=multimedia-volume-control 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings;AudioVideo;Audio; 9 | -------------------------------------------------------------------------------- /applications/rofi-wallpaper.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Set Wallpaper 3 | Comment= 4 | Exec=rofi-wallpaper.sh 5 | Icon=preferences-desktop-wallpaper 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Settings;System; 9 | -------------------------------------------------------------------------------- /applications/rofi-weather.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Weather Forecast 3 | Comment= 4 | Exec=rofi-weather.sh 5 | Icon=weather-clear-symbolic 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;News; 9 | -------------------------------------------------------------------------------- /applications/rofi-window.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Select Window 3 | Comment= 4 | Exec=rofi-window.sh 5 | Icon=preferences-system-windows 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility; 9 | -------------------------------------------------------------------------------- /applications/rofi-xkcd.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=XKCD Comics 3 | Comment= 4 | Exec=rofi-xkcd.sh 5 | Icon=image-x-generic 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Utility;Amusement; 9 | -------------------------------------------------------------------------------- /applications/rofi-youtube-feeds.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=YouTube Feeds 3 | Comment= 4 | Exec=rofi -show "Youtube Feeds" -modi "Youtube Feeds:rofi-youtube-feeds.sh" 5 | Icon=youtube 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;News;Web;Network;AudioVideo;Video; 9 | -------------------------------------------------------------------------------- /applications/update-system.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Update System 3 | Comment= 4 | Exec=update-system.sh 5 | Icon=system-software-update 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;System;PackageManager; 9 | -------------------------------------------------------------------------------- /applications/wireguard-rofi.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Wireguard VPN 3 | Comment= 4 | Exec=rofi -modi VPN:wireguard-rofi.sh -show VPN 5 | Icon=network-vpn 6 | Terminal=false 7 | Type=Application 8 | Categories=Rofi;Desktop;Network;RemoteAccess;Security; 9 | -------------------------------------------------------------------------------- /config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | hover-select: true; 3 | me-select-entry: ""; 4 | me-accept-entry: [ MousePrimary, MouseSecondary, MouseDPrimary ]; 5 | } 6 | 7 | //@theme "~/.config/rofi/themes/onedark.rasi" 8 | -------------------------------------------------------------------------------- /create-desktop-entries.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | desktop-entry() { 4 | cat < "applications/$desktopname" 23 | done 24 | -------------------------------------------------------------------------------- /drun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # rofi-desktop drun script 4 | 5 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 6 | 7 | set -a 8 | source "$SCRIPT_PATH/scripts/config/environment" 9 | set +a 10 | 11 | export ROFI="${ROFI:-rofi}" 12 | export PATH="$SCRIPT_PATH/scripts/:$PATH" 13 | export XDG_DATA_DIRS="$SCRIPT_PATH:/usr/local/share:/usr/share:$XDG_DATA_DIRS" 14 | 15 | DRUN_CATEGORIES=${DRUN_CATEGORIES:-} 16 | 17 | if [ -n "$DRUN_CATEGORIES" ]; then 18 | categories="-drun-categories $DRUN_CATEGORIES" 19 | fi 20 | 21 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 22 | 23 | $ROFI -show drun $rofi_flags $categories -sidebar-mode 24 | -------------------------------------------------------------------------------- /gallery/demo.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/demo.webm -------------------------------------------------------------------------------- /gallery/rofi-colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi-colors.png -------------------------------------------------------------------------------- /gallery/rofi_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_all.png -------------------------------------------------------------------------------- /gallery/rofi_appear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_appear.png -------------------------------------------------------------------------------- /gallery/rofi_autostart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_autostart.png -------------------------------------------------------------------------------- /gallery/rofi_books.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_books.png -------------------------------------------------------------------------------- /gallery/rofi_calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_calendar.png -------------------------------------------------------------------------------- /gallery/rofi_chars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_chars.png -------------------------------------------------------------------------------- /gallery/rofi_cheat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_cheat1.png -------------------------------------------------------------------------------- /gallery/rofi_cheat2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_cheat2.png -------------------------------------------------------------------------------- /gallery/rofi_default1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_default1.png -------------------------------------------------------------------------------- /gallery/rofi_default2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_default2.png -------------------------------------------------------------------------------- /gallery/rofi_dict.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_dict.png -------------------------------------------------------------------------------- /gallery/rofi_firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_firefox.png -------------------------------------------------------------------------------- /gallery/rofi_flathub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_flathub.png -------------------------------------------------------------------------------- /gallery/rofi_fortune.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_fortune.png -------------------------------------------------------------------------------- /gallery/rofi_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_github.png -------------------------------------------------------------------------------- /gallery/rofi_hangman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_hangman.png -------------------------------------------------------------------------------- /gallery/rofi_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_icons.png -------------------------------------------------------------------------------- /gallery/rofi_icons_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_icons_grid.png -------------------------------------------------------------------------------- /gallery/rofi_icons_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_icons_list.png -------------------------------------------------------------------------------- /gallery/rofi_keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_keyboard.png -------------------------------------------------------------------------------- /gallery/rofi_lang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_lang.png -------------------------------------------------------------------------------- /gallery/rofi_media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_media.png -------------------------------------------------------------------------------- /gallery/rofi_monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_monitor.png -------------------------------------------------------------------------------- /gallery/rofi_mpd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_mpd.png -------------------------------------------------------------------------------- /gallery/rofi_news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_news.png -------------------------------------------------------------------------------- /gallery/rofi_news2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_news2.png -------------------------------------------------------------------------------- /gallery/rofi_podcast1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_podcast1.png -------------------------------------------------------------------------------- /gallery/rofi_podcast2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_podcast2.png -------------------------------------------------------------------------------- /gallery/rofi_podcast3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_podcast3.png -------------------------------------------------------------------------------- /gallery/rofi_quiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_quiz.png -------------------------------------------------------------------------------- /gallery/rofi_radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_radio.png -------------------------------------------------------------------------------- /gallery/rofi_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_record.png -------------------------------------------------------------------------------- /gallery/rofi_reddit1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_reddit1.png -------------------------------------------------------------------------------- /gallery/rofi_reddit2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_reddit2.png -------------------------------------------------------------------------------- /gallery/rofi_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_search.png -------------------------------------------------------------------------------- /gallery/rofi_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_session.png -------------------------------------------------------------------------------- /gallery/rofi_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_settings.png -------------------------------------------------------------------------------- /gallery/rofi_sport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_sport.png -------------------------------------------------------------------------------- /gallery/rofi_timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_timer.png -------------------------------------------------------------------------------- /gallery/rofi_timezone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_timezone.png -------------------------------------------------------------------------------- /gallery/rofi_tnt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_tnt.png -------------------------------------------------------------------------------- /gallery/rofi_todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_todo.png -------------------------------------------------------------------------------- /gallery/rofi_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_top.png -------------------------------------------------------------------------------- /gallery/rofi_torrent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_torrent.png -------------------------------------------------------------------------------- /gallery/rofi_trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_trans.png -------------------------------------------------------------------------------- /gallery/rofi_tv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_tv.png -------------------------------------------------------------------------------- /gallery/rofi_utils.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_utils.png -------------------------------------------------------------------------------- /gallery/rofi_volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_volume.png -------------------------------------------------------------------------------- /gallery/rofi_weather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_weather.png -------------------------------------------------------------------------------- /gallery/rofi_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_web.png -------------------------------------------------------------------------------- /gallery/rofi_xkcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_xkcd.png -------------------------------------------------------------------------------- /gallery/rofi_youtube1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_youtube1.png -------------------------------------------------------------------------------- /gallery/rofi_youtube2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/gallery/rofi_youtube2.png -------------------------------------------------------------------------------- /scripts/appmenu-service.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import gi 4 | gi.require_version('Gtk', '3.0') 5 | from gi.repository import Gtk 6 | import dbus 7 | import dbus.service 8 | from dbus.mainloop.glib import DBusGMainLoop 9 | 10 | class i3AppmenuService(dbus.service.Object): 11 | def __init__(self): 12 | bus_name = dbus.service.BusName('com.canonical.AppMenu.Registrar', bus = dbus.SessionBus()) 13 | dbus.service.Object.__init__(self, bus_name, '/com/canonical/AppMenu/Registrar') 14 | self.window_dict = dict() 15 | 16 | @dbus.service.method('com.canonical.AppMenu.Registrar', 17 | in_signature='uo', 18 | sender_keyword='sender') 19 | def RegisterWindow(self, windowId, menuObjectPath, sender): 20 | self.window_dict[windowId] = (sender, menuObjectPath) 21 | 22 | @dbus.service.method('com.canonical.AppMenu.Registrar', 23 | in_signature='u', 24 | out_signature='so') 25 | def GetMenuForWindow(self, windowId): 26 | if windowId in self.window_dict: 27 | sender, menuObjectPath = self.window_dict[windowId] 28 | return [dbus.String(sender), dbus.ObjectPath(menuObjectPath)] 29 | 30 | @dbus.service.method('com.canonical.AppMenu.Registrar') 31 | def Q(self): 32 | Gtk.main_quit() 33 | 34 | DBusGMainLoop(set_as_default=True) 35 | myservice = i3AppmenuService() 36 | Gtk.main() 37 | 38 | # GTK apps : get dbus service (xprop) 39 | -------------------------------------------------------------------------------- /scripts/config/autostart: -------------------------------------------------------------------------------- 1 | appmenu-service 2 | keypress 3 | x11_device_watcher 4 | -------------------------------------------------------------------------------- /scripts/config/environment: -------------------------------------------------------------------------------- 1 | # rofi command used in all scripts 2 | # example: rofi -kb-accept-entry 'Alt+S' 3 | # example: rofi -kb-screenshot Control+Shift+space" 4 | #ROFI="rofi" 5 | 6 | # path to rofi-desktop data directory 7 | #ROFI_DATA_DIR=/path/to/data 8 | 9 | # path to rofi-desktop config directory 10 | #ROFI_CONFIG_DIR=/path/to/config 11 | 12 | # path to rofi-desktop cache directory 13 | #ROFI_CACHE_DIR=$HOME/.cache 14 | 15 | # show icons in menus, set empty or zero to disable icons 16 | ROFI_ICONS=1 17 | 18 | # grid theme rows and columns 19 | ROFI_GRID_ROWS=3 20 | ROFI_GRID_COLS=4 21 | 22 | # grid and list icon sizes 23 | ROFI_GRID_ICON_SIZE=8 24 | ROFI_LIST_ICON_SIZE=3 25 | 26 | # default terminal emulator 27 | #TERMINAL="xterm" 28 | 29 | # default torrent client and cache for searches 30 | #TORRENT_CLIENT=qbittorrent 31 | 32 | # radio stations file, cache file and player command 33 | #RADIO_PLAYER="mpv --no-resume-playback --force-window=immediate" 34 | 35 | # tv stations file, cache file and player command 36 | #TV_PLAYER="mpv --no-resume-playback --force-window=immediate" 37 | 38 | # podcast player, folder, cache location and expiration time 39 | #PODCAST_PLAYER=-mpv --no-resume-playback --force-window=immediate 40 | 41 | # task manager command 42 | #TASK_MANAGER="xterm -e htop" 43 | 44 | # system info command 45 | #SYSTEM_INFO="inxi -c0 -v2" # neofetch --stdout --color_blocks off 46 | 47 | # keypassxc database file 48 | #KEEPASSXC_DATABASE=path/to/database 49 | 50 | # custom json menus location 51 | #CUSTOM_MENUS_FOLDER=path/to/menus 52 | 53 | # output folders and codec of video and audio recordings 54 | #VIDEO_FOLDER="$HOME/Videos/record" 55 | #AUDIO_FOLDER="$HOME/Music/record" 56 | #VIDEO_CODEC="libvpx" 57 | 58 | # github search cache and default clone folder 59 | #CLONE_FOLDER="$HOME/Downloads/" 60 | 61 | # notes author, path to file and default editor 62 | #NOTES_AUTHOR="$(whoami)" 63 | #NOTES_EDITOR="xdg-open" 64 | 65 | # code projects folder and preferred editor 66 | #PROJECTS_DIR="~/Programs" 67 | #PROJECTS_EDITOR="qtcreator" 68 | 69 | # screenshots filename template (used by scrot) 70 | #SCREENSHOT_NAME="Screenshot_%Y-%m-%d-%S-%H%M%S.png" 71 | 72 | # screen locker in session management 73 | #USE_LOCKER=false 74 | #LOCKER="i3lock" 75 | 76 | # steam games path and caches 77 | #STEAM_ROOT="$HOME/.local/share/Steam" 78 | 79 | # show steam games in a grid, set to zero or empty to show a list 80 | STEAM_GRID=1 81 | 82 | # timer audio effects and notification timeout 83 | #TIMER_START_SOUND="path/to/timer_start_sound" 84 | #TIMER_STOP_SOUND="path/to/timer_stop_sound" 85 | #TIMER_NOTIFICATION_TIMEOUT=5000 86 | 87 | # path to wallpapers directory 88 | #WALLPAPERS_DIR=$HOME/Pictures 89 | 90 | # show wallpapers in a grid, set to zero or empty to show a list 91 | WALLPAPERS_GRID=1 92 | 93 | # number of days of weather forecast 94 | #FORECAST_DAYS=2 95 | 96 | # show windows thumbnails in window switcher, set zero or empty to disable thumbnails 97 | WINDOWS_THUMBNAILS=1 98 | 99 | # show windows thumbnails in a grid, set zero or empty show in list 100 | WINDOWS_GRID=1 101 | 102 | # show xkcd comics in a grid 103 | #XKCD_GRID=1 104 | 105 | # xkcd comics icon size 106 | #XKCD_ICON_SIZE=${XKCD_ICON_SIZE:-35} 107 | 108 | # systemd unit default action 109 | #SYSTEMD_DEFAULT_ACTION="list_actions" # enable/disable/stop/restart/tail 110 | 111 | # categories to show in the drun.sh menu 112 | #DRUN_CATEGORIES=Rofi;Games;Settings;Utilities; 113 | -------------------------------------------------------------------------------- /scripts/data/hangman/countries: -------------------------------------------------------------------------------- 1 | Afghanistan 2 | Albania 3 | Algeria 4 | Andorra 5 | Angola 6 | Antigua 7 | Argentina 8 | Armenia 9 | Australia 10 | Austria 11 | Azerbaijan 12 | Bahamas 13 | Bahrain 14 | Bangladesh 15 | Barbados 16 | Belarus 17 | Belgium 18 | Belize 19 | Benin 20 | Bhutan 21 | Bolivia 22 | Bosnia Herzegovina 23 | Botswana 24 | Brazil 25 | Brunei 26 | Bulgaria 27 | Burkina 28 | Burundi 29 | Cambodia 30 | Cameroon 31 | Canada 32 | Cape Verde 33 | Central African Rep 34 | Chad 35 | Chile 36 | China 37 | Colombia 38 | Comoros 39 | Congo 40 | Congo Democratic Rep 41 | Costa Rica 42 | Croatia 43 | Cuba 44 | Cyprus 45 | Czech Republic 46 | Denmark 47 | Djibouti 48 | Dominica 49 | Dominican Republic 50 | East Timor 51 | Ecuador 52 | Egypt 53 | El Salvador 54 | Equatorial Guinea 55 | Eritrea 56 | Estonia 57 | Ethiopia 58 | Fiji 59 | Finland 60 | France 61 | Gabon 62 | Gambia 63 | Georgia 64 | Germany 65 | Ghana 66 | Greece 67 | Grenada 68 | Guatemala 69 | Guinea 70 | Guinea-Bissau 71 | Guyana 72 | Haiti 73 | Honduras 74 | Hungary 75 | Iceland 76 | India 77 | Indonesia 78 | Iran 79 | Iraq 80 | Ireland 81 | Israel 82 | Italy 83 | Ivory Coast 84 | Jamaica 85 | Japan 86 | Jordan 87 | Kazakhstan 88 | Kenya 89 | Kiribati 90 | Korea North 91 | Korea South 92 | Kosovo 93 | Kuwait 94 | Kyrgyzstan 95 | Laos 96 | Latvia 97 | Lebanon 98 | Lesotho 99 | Liberia 100 | Libya 101 | Liechtenstein 102 | Lithuania 103 | Luxembourg 104 | Macedonia 105 | Madagascar 106 | Malawi 107 | Malaysia 108 | Maldives 109 | Mali 110 | Malta 111 | Marshall Islands 112 | Mauritania 113 | Mauritius 114 | Mexico 115 | Micronesia 116 | Moldova 117 | Monaco 118 | Mongolia 119 | Montenegro 120 | Morocco 121 | Mozambique 122 | Myanmar 123 | Namibia 124 | Nauru 125 | Nepal 126 | Netherlands 127 | New Zealand 128 | Nicaragua 129 | Niger 130 | Nigeria 131 | Norway 132 | Oman 133 | Pakistan 134 | Palau 135 | Panama 136 | Papua New Guinea 137 | Paraguay 138 | Peru 139 | Philippines 140 | Poland 141 | Portugal 142 | Qatar 143 | Romania 144 | Russian Federation 145 | Rwanda 146 | St Kitts & Nevis 147 | St Lucia 148 | Saint Vincent & the Grenadines 149 | Samoa 150 | San Marino 151 | Sao Tome & Principe 152 | Saudi Arabia 153 | Senegal 154 | Serbia 155 | Seychelles 156 | Sierra Leone 157 | Singapore 158 | Slovakia 159 | Slovenia 160 | Solomon Islands 161 | Somalia 162 | South Africa 163 | South Sudan 164 | Spain 165 | Sri Lanka 166 | Sudan 167 | Suriname 168 | Swaziland 169 | Sweden 170 | Switzerland 171 | Syria 172 | Taiwan 173 | Tajikistan 174 | Tanzania 175 | Thailand 176 | Togo 177 | Tonga 178 | Trinidad & Tobago 179 | Tunisia 180 | Turkey 181 | Turkmenistan 182 | Tuvalu 183 | Uganda 184 | Ukraine 185 | United Arab Emirates 186 | United Kingdom 187 | United States 188 | Uruguay 189 | Uzbekistan 190 | Vanuatu 191 | Vatican City 192 | Venezuela 193 | Vietnam 194 | Yemen 195 | Zambia 196 | Zimbabwe 197 | -------------------------------------------------------------------------------- /scripts/data/mimetypes/font.csv: -------------------------------------------------------------------------------- 1 | Name,Template,Reference 2 | collection,font/collection,[RFC8081] 3 | otf,font/otf,[RFC8081] 4 | sfnt,font/sfnt,[RFC8081] 5 | ttf,font/ttf,[RFC8081] 6 | woff,font/woff,[RFC8081] 7 | woff2,font/woff2,[RFC8081] 8 | -------------------------------------------------------------------------------- /scripts/data/mimetypes/message.csv: -------------------------------------------------------------------------------- 1 | Name,Template,Reference 2 | bhttp,message/bhttp,[RFC9292] 3 | CPIM,message/CPIM,[RFC3862] 4 | delivery-status,message/delivery-status,[RFC1894] 5 | disposition-notification,message/disposition-notification,[RFC8098] 6 | example,message/example,[RFC4735] 7 | external-body,,[RFC2045][RFC2046] 8 | feedback-report,message/feedback-report,[RFC5965] 9 | global,message/global,[RFC6532] 10 | global-delivery-status,message/global-delivery-status,[RFC6533] 11 | global-disposition-notification,message/global-disposition-notification,[RFC6533] 12 | global-headers,message/global-headers,[RFC6533] 13 | http,message/http,[RFC9112] 14 | imdn+xml,message/imdn+xml,[RFC5438] 15 | mls,message/mls,[RFC9420] 16 | news (OBSOLETED by [RFC5537]),message/news,[RFC5537][Henry_Spencer] 17 | ohttp-req,message/ohttp-req,[RFC-ietf-ohai-ohttp-09] 18 | ohttp-res,message/ohttp-res,[RFC-ietf-ohai-ohttp-09] 19 | partial,,[RFC2045][RFC2046] 20 | rfc822,,[RFC2045][RFC2046] 21 | s-http (OBSOLETE),message/s-http,[RFC2660][status-change-http-experiments-to-historic] 22 | sip,message/sip,[RFC3261] 23 | sipfrag,message/sipfrag,[RFC3420] 24 | tracking-status,message/tracking-status,[RFC3886] 25 | vnd.si.simp (OBSOLETED by request),message/vnd.si.simp,[Nicholas_Parks_Young] 26 | vnd.wfa.wsc,message/vnd.wfa.wsc,[Mick_Conley] 27 | -------------------------------------------------------------------------------- /scripts/data/mimetypes/model.csv: -------------------------------------------------------------------------------- 1 | Name,Template,Reference 2 | 3mf,model/3mf,[http://www.3mf.io/specification][_3MF][Michael_Sweet] 3 | e57,model/e57,[ASTM] 4 | example,model/example,[RFC4735] 5 | gltf-binary,model/gltf-binary,[Khronos][Saurabh_Bhatia] 6 | gltf+json,model/gltf+json,[Khronos][Uli_Klumpp] 7 | JT,model/JT,[ISO-TC_184-SC_4][Michael_Zink] 8 | iges,model/iges,[Curtis_Parks] 9 | mesh,,[RFC2077] 10 | mtl,model/mtl,[DICOM_Standard_Committee][DICOM_WG_17][Carolyn_Hull] 11 | obj,model/obj,[DICOM_Standard_Committee][DICOM_WG_17][Carolyn_Hull] 12 | prc,model/prc,[ISO-TC_171-SC_2][Betsy_Fanning] 13 | step,model/step,[ISO-TC_184-SC_4][Dana_Tripp] 14 | step+xml,model/step+xml,[ISO-TC_184-SC_4][Dana_Tripp] 15 | step+zip,model/step+zip,[ISO-TC_184-SC_4][Dana_Tripp] 16 | step-xml+zip,model/step-xml+zip,[ISO-TC_184-SC_4][Dana_Tripp] 17 | stl,model/stl,[DICOM_Standard_Committee][DICOM_WG_17][Carolyn_Hull] 18 | u3d,model/u3d,[PDF_Association][Peter_Wyatt] 19 | vnd.bary,model/vnd.bary,[Displaced_Micro-Mesh_SDK_Support] 20 | vnd.cld,model/vnd.cld,[Robert_Monaghan] 21 | vnd.collada+xml,model/vnd.collada+xml,[James_Riordon] 22 | vnd.dwf,model/vnd.dwf,[Jason_Pratt] 23 | vnd.flatland.3dml,model/vnd.flatland.3dml,[Michael_Powers] 24 | vnd.gdl,model/vnd.gdl,[Attila_Babits] 25 | vnd.gs-gdl,model/vnd.gs-gdl,[Attila_Babits] 26 | vnd.gtw,model/vnd.gtw,[Yutaka_Ozaki] 27 | vnd.moml+xml,model/vnd.moml+xml,[Christopher_Brooks] 28 | vnd.mts,model/vnd.mts,[Boris_Rabinovitch] 29 | vnd.opengex,model/vnd.opengex,[Eric_Lengyel] 30 | vnd.parasolid.transmit.binary,model/vnd.parasolid.transmit.binary,[Parasolid] 31 | vnd.parasolid.transmit.text,model/vnd.parasolid.transmit.text,[Parasolid] 32 | vnd.pytha.pyox,model/vnd.pytha.pyox,[Daniel_Flassig] 33 | vnd.rosette.annotated-data-model,model/vnd.rosette.annotated-data-model,[Benson_Margulies] 34 | vnd.sap.vds,model/vnd.sap.vds,[SAP_SE][Igor_Afanasyev] 35 | vnd.usda,model/vnd.usda,[Sebastian_Grassia] 36 | vnd.usdz+zip,model/vnd.usdz+zip,[Sebastian_Grassia] 37 | vnd.valve.source.compiled-map,model/vnd.valve.source.compiled-map,[Henrik_Andersson] 38 | vnd.vtu,model/vnd.vtu,[Boris_Rabinovitch] 39 | vrml,,[RFC2077] 40 | x3d-vrml,model/x3d-vrml,[Web3D][Web3D_X3D] 41 | x3d+fastinfoset,model/x3d+fastinfoset,[Web3D_X3D] 42 | x3d+xml,model/x3d+xml,[Web3D][Web3D_X3D] 43 | -------------------------------------------------------------------------------- /scripts/data/mimetypes/multipart.csv: -------------------------------------------------------------------------------- 1 | Name,Template,Reference 2 | alternative,,[RFC2046][RFC2045] 3 | appledouble,multipart/appledouble,[Patrik_Faltstrom] 4 | byteranges,multipart/byteranges,[RFC9110] 5 | digest,,[RFC2046][RFC2045] 6 | encrypted,multipart/encrypted,[RFC1847] 7 | example,multipart/example,[RFC4735] 8 | form-data,multipart/form-data,[RFC7578] 9 | header-set,multipart/header-set,[Dave_Crocker] 10 | mixed,,[RFC2046][RFC2045] 11 | multilingual,multipart/multilingual,[RFC8255] 12 | parallel,,[RFC2046][RFC2045] 13 | related,multipart/related,[RFC2387] 14 | report,multipart/report,[RFC6522] 15 | signed,multipart/signed,[RFC1847] 16 | vnd.bint.med-plus,multipart/vnd.bint.med-plus,[Heinz-Peter_Schütz] 17 | voice-message,multipart/voice-message,[RFC3801] 18 | x-mixed-replace,multipart/x-mixed-replace,[W3C][Robin_Berjon] 19 | -------------------------------------------------------------------------------- /scripts/data/news: -------------------------------------------------------------------------------- 1 | BBC World=https://feeds.bbci.co.uk/news/rss.xml?edition=int 2 | AP News=https://rsshub.app/apnews/topics/apf-topnews 3 | ANSA.it=https://www.ansa.it/sito/ansait_rss.xml 4 | Al Jazeera=https://www.aljazeera.com/xml/rss/all.xml 5 | Hacker News=https://hnrss.org/frontpage 6 | -------------------------------------------------------------------------------- /scripts/data/podcasts/Swimming.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "podcast_id": 15764, 4 | "title": "Fit on the move podcast", 5 | "description": "Hallo, en welkom! Wij zijn Hannes Tollet en Gust Alaerts, oprichters van Fit On The Move en wij nodigen mensen uit de sportwereld bij ons uit. Wij praten met hun over de ervaringen die ze hebben met sport, wat hun trainingsgewoontes zijn, hun voedingspatroon ,... Luister naar onze podcast en leer de wondere wereld van topsport en het team erachter kennen.\n", 6 | "language": "en", 7 | "author_name": "Fitonthemove", 8 | "slug": "fitonthemove", 9 | "cover": "20201128_144131_5e0d399ea1ef0be291de9cf8788ba025.jpg" 10 | }, 11 | { 12 | "podcast_id": 53408, 13 | "title": "Fitter and Faster Coaches Corner", 14 | "description": "Mike Murray brings on coaches from all around the world to share their stories and some of their secrets to help improve and grow the swimming community.", 15 | "language": "en", 16 | "author_name": "Mike Murray", 17 | "slug": "coaches-corner", 18 | "cover": "20220519_050547_2dfe08e21d6504eed6358cf2b1c327a8.jpg" 19 | }, 20 | { 21 | "podcast_id": 140955, 22 | "title": "The Weekly Freestyle", 23 | "description": "

Tom and Alex catch up every week discussing anything from weekly training to hanging out in the Royal Box. Did we mention that one of us is a double Olympic champion and the other runs Oxford.

", 24 | "language": "en", 25 | "author_name": "Olympic athlete Tom Dean & co host Alex Sutton ", 26 | "slug": "theweeklyfreestyle", 27 | "cover": "20230331_050300_a21c32b58321c9cfb3a424f3c6ae0379.jpg" 28 | }, 29 | { 30 | "podcast_id": 144243, 31 | "title": "The Podcast", 32 | "description": "

a test podcast

", 33 | "language": "en", 34 | "author_name": "jane doe and jack ", 35 | "slug": "testingwuwu", 36 | "cover": "20230523_080504_0b04116ad676bbe34fba6bc676a892fe.jpg" 37 | } 38 | ] -------------------------------------------------------------------------------- /scripts/data/yt-feeds: -------------------------------------------------------------------------------- 1 | // Paste channel IDs here (https://www.streamweasels.com/tools/youtube-channel-id-and-user-id-convertor/) 2 | UC16niRr50-MSBwiO3YDb3RA 3 | UCNye-wNBqNL5ZzHSJj3l8Bg 4 | UCpVm7bg6pXKo1Pr6k5kxG9A 5 | UCwmZiChSryoWQCZMIQezgTg 6 | // Set custom command and download folders here 7 | DOWNLOAD|~/Videos/ 8 | COMMAND|my_custom_command 9 | DOWNLOAD_AUDIO|~/Music/ 10 | -------------------------------------------------------------------------------- /scripts/download_flathub_icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ]; then 4 | exit 1 5 | fi 6 | 7 | if [ -f "$2" ]; then 8 | exit 1 9 | fi 10 | 11 | flathub_url="https://flathub.org/api/v2/appstream" 12 | appstream=$(curl --silent "$flathub_url/$1") 13 | icon_url=$(echo "$appstream" | jq -r '"\(.icon)"') 14 | 15 | nice -n 19 /usr/bin/wget -t 5 --timeout=5 -q -O "$2" "$icon_url" 16 | -------------------------------------------------------------------------------- /scripts/download_icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ]; then 4 | exit 1 5 | fi 6 | 7 | if [ -f "$2" ]; then 8 | exit 1 9 | fi 10 | 11 | nice -n 19 /usr/bin/curl --silent --max-time 5 -o "$2" "$1" 12 | -------------------------------------------------------------------------------- /scripts/download_podcast_icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LINK="https://img.rss.com/$1" 4 | LINK=$(echo "$LINK" | sed -e "s//$3/g") 5 | 6 | if [ -z "$LINK" ]; then 7 | exit 1 8 | fi 9 | 10 | nice -n 19 /usr/bin/wget -q -O "$2" "$LINK" 11 | -------------------------------------------------------------------------------- /scripts/download_tv_icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 4 | 5 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 6 | LINK=$(grep "$1" "$ROFI_DATA_DIR/channels.m3u" | cut -d' ' -f3- | cut -d'"' -f 2) 7 | 8 | if [ -z "$LINK" ]; then 9 | exit 1 10 | fi 11 | 12 | nice -n 19 /usr/bin/wget -q -O "$2" "$LINK" 13 | -------------------------------------------------------------------------------- /scripts/download_xkcd_icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 4 | 5 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 6 | XKCD_CACHE="$ROFI_CACHE_DIR/xkcd" 7 | 8 | comic_id=$1 9 | comic_url="https://xkcd.com/$comic_id/info.0.json" 10 | comic_file="$XKCD_CACHE/$comic_id" 11 | 12 | if [ ! -f "$comic_file" ]; then 13 | curl --silent "$comic_url" -o "$comic_file" 14 | comic_image=$(jq -r '.img' "$comic_file") 15 | curl --silent "$comic_image" -o "$XKCD_CACHE/$comic_id.png" 16 | fi 17 | 18 | if [ ! -f "$2" ]; then 19 | cp "$XKCD_CACHE/$comic_id.png" "$2" 20 | fi 21 | -------------------------------------------------------------------------------- /scripts/drag.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # https://raw.githubusercontent.com/rkevin-arch/CLIdrag/master/drag.py 4 | 5 | import sys 6 | import os 7 | import signal 8 | from PyQt5.QtCore import Qt, QUrl, QMimeData 9 | from PyQt5.QtWidgets import QApplication, QLabel 10 | from PyQt5.QtGui import QDrag 11 | 12 | class MainWindow(QLabel): 13 | def __init__(self, l): 14 | super().__init__() 15 | mimedata = QMimeData() 16 | mimedata.setUrls([QUrl.fromLocalFile(os.path.abspath(fn)) for fn in l]) 17 | qdrag = QDrag(self) 18 | qdrag.setMimeData(mimedata) 19 | qdrag.exec(Qt.DropAction.MoveAction) 20 | 21 | if __name__ == "__main__": 22 | if len(sys.argv) < 2: 23 | print("Usage: %s FILENAME [FILENAME ...]"%sys.argv[0]) 24 | print("Initiates a drag operation as if you're dragging a file / multiple files.") 25 | print("Click in the window you want to drag the files to.") 26 | sys.exit() 27 | app = QApplication(sys.argv) 28 | signal.signal(signal.SIGINT, signal.SIG_DFL) 29 | window = MainWindow(sys.argv[1:]) 30 | 31 | -------------------------------------------------------------------------------- /scripts/keypress.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import signal 6 | import psutil 7 | import subprocess 8 | from pynput.keyboard import Key, Listener 9 | 10 | script_dir = os.path.dirname(os.path.abspath(__file__)) 11 | 12 | cmd_command = script_dir+"/rofi-desktop.sh -a" 13 | alt_command = script_dir+"/rofi-hud.py" 14 | 15 | cmd_pressed = False 16 | alt_pressed = False 17 | 18 | def exit_script(signal, frame): 19 | sys.exit() 20 | 21 | def on_press(key): 22 | global cmd_pressed 23 | global alt_pressed 24 | 25 | cmd_pressed = key == Key.cmd 26 | alt_pressed = key == Key.alt 27 | 28 | def rofi_running(): 29 | for process in psutil.process_iter(): 30 | if process.name() == 'rofi': 31 | #process.kill() 32 | return True 33 | 34 | return False 35 | 36 | def on_release(key): 37 | global cmd_pressed 38 | global alt_pressed 39 | 40 | if key == Key.cmd and cmd_pressed: 41 | cmd_pressed = False 42 | 43 | if (rofi_running()): 44 | return 45 | 46 | os.system("{} & disown".format(cmd_command)) 47 | 48 | if key == Key.alt and alt_pressed: 49 | alt_pressed = False 50 | 51 | if (rofi_running()): 52 | return 53 | 54 | os.system("{} & disown".format(alt_command)) 55 | 56 | if __name__ == '__main__': 57 | with Listener(on_press=on_press, on_release=on_release) as listener: 58 | signal.signal(signal.SIGINT, exit_script) 59 | signal.signal(signal.SIGTERM, exit_script) 60 | 61 | listener.join() 62 | -------------------------------------------------------------------------------- /scripts/menus/Custom Menu.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "journalctl -xeaf", 4 | "command": "urxvt -e bash -c 'journalctl -xeaf'" 5 | }, 6 | { 7 | "name": "udevadm monitor", 8 | "command": "xterm -e bash -c 'udevadm monitor --kernel --udev'" 9 | }, 10 | { 11 | "name": "dmesg --ctime -w", 12 | "command": "xterm -e bash -c 'dmesg --ctime -w'" 13 | }, 14 | { 15 | "name": "neofetch", 16 | "command": "xterm -e bash -c 'neofetch;read'" 17 | }, 18 | { 19 | "name": "edit /etc/fstab", 20 | "command": "xdg-open /etc/fstab" 21 | }, 22 | { 23 | "name": "edit /efi/EFI/ubuntu/grub.cfg", 24 | "command": "xdg-open /efi/EFI/ubuntu/grub.cfg" 25 | }, 26 | { 27 | "name": "edit /etc/X11/xorg.conf", 28 | "command": "xdg-open /etc/X11 /etc/X11/xorg.conf" 29 | }, 30 | { 31 | "name": "edit /usr/share/applications", 32 | "command": "xdg-open /usr/share/applications" 33 | }, 34 | { 35 | "name": "edit ~/.config/rofi", 36 | "command": "xdg-open ~/.config/rofi" 37 | }, 38 | { 39 | "name": "open /usr/share/applications", 40 | "command": "xdg-open /usr/share/applications" 41 | } 42 | ] 43 | -------------------------------------------------------------------------------- /scripts/play_accept.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #echo "$@" >> $HOME/selection_log 4 | 5 | #if [[ -n "$@" ]]; then 6 | #killall espeak 7 | #echo "selected: $@" | sed -e 's///g' | espeak 8 | #coproc aplay -q /home/mat/Music/metal_gear_accept2.wav 9 | coproc aplay -q /home/mat/Programs/rofi-desktop/scripts/sounds/current/accept.wav 10 | #fi 11 | -------------------------------------------------------------------------------- /scripts/play_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -n "$@" ]]; then 4 | #killall espeak 5 | #echo "selected: $@" | sed -e 's///g' | espeak 6 | coproc aplay -q /home/mat/Programs/rofi-desktop/scripts/sounds/current/select.wav 7 | fi 8 | -------------------------------------------------------------------------------- /scripts/play_change.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #echo "$@" >> $HOME/selection_log 4 | 5 | #if [[ -n "$@" ]]; then 6 | #killall espeak 7 | #echo "selected: $@" | sed -e 's///g' | espeak 8 | coproc aplay -q /home/mat/Programs/rofi-desktop/scripts/sounds/current/change.wav 9 | #fi 10 | -------------------------------------------------------------------------------- /scripts/play_error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #echo "$@" >> $HOME/selection_log 4 | 5 | #if [[ -n "$@" ]]; then 6 | #killall espeak 7 | #echo "$@" | sed -e 's///g' | espeak 8 | #killall piper 9 | #echo "$@" | $HOME/Programs/piper/piper --model /home/mat/Programs/piper-voices/en/en_US/lessac/high/en_US-lessac-high.onnx --output-raw | aplay -r 22050 -f S16_LE -t raw - 10 | coproc aplay -q /home/mat/Programs/rofi-desktop/scripts/sounds/current/error.wav 11 | #fi 12 | -------------------------------------------------------------------------------- /scripts/play_exit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #coproc aplay -q /home/mat/Music/metal_gear_cancel.wav 4 | coproc aplay -q /home/mat/Programs/rofi-desktop/scripts/sounds/current/cancel.wav 5 | -------------------------------------------------------------------------------- /scripts/play_select.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #echo "$1" >> $HOME/selection_log 4 | 5 | #if [[ -n "$@" ]]; then 6 | #killall espeak 7 | #echo "selected: $@" | sed -e 's///g' | espeak 8 | #coproc aplay -q /home/mat/Music/metal_gear_select.wav 9 | coproc aplay -q /home/mat/Programs/rofi-desktop/scripts/sounds/current/select.wav 10 | #fi 11 | -------------------------------------------------------------------------------- /scripts/rofi-battery-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # script to pipe battery info into a rofi menu 4 | # 5 | 6 | ROFI="${ROFI:-rofi}" 7 | 8 | info=$(upower -i /org/freedesktop/UPower/devices/DisplayDevice) 9 | 10 | $ROFI -e "$info" 11 | -------------------------------------------------------------------------------- /scripts/rofi-bitsearch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # 3 | # this script search torrent files from bitsearch.to and scrape magnet links to be opened 4 | # with a torrent client 5 | # 6 | # dependencies: rofi, curl, xmllint 7 | 8 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 12 | TORRENT_CLIENT=${TORRENT_CLIENT:-qbittorrent} 13 | 14 | torrent_cache="$ROFI_CACHE_DIR/bitsearch" 15 | query="$1" 16 | 17 | get_torrents() { 18 | page="$1" 19 | query=$(echo "$2" | sed 's/ /+/g') 20 | url="https://bitsearch.to/search?q=$query&page=$page" 21 | 22 | bitsearch=$(curl -s "$url") 23 | 24 | titles=$(echo "$bitsearch" | \ 25 | xmllint --html --xpath '//h5[@class="title w-100 truncate"]/a/text()' -) 26 | 27 | magnets=$(echo "$bitsearch" | \ 28 | xmllint --html --xpath '//a[@class="dl-magnet"]/@href' - | \ 29 | sed -n 's/.*href="\([^"]*\).*/\1/p') 30 | 31 | sizes=$(echo "$bitsearch" | \ 32 | xmllint --html --xpath '//div[@class="stats"]/div[2]/text()' - | \ 33 | sed 's/^/\[/' | \ 34 | sed 's/$/\]/') 35 | 36 | seeders=$(echo "$bitsearch" | \ 37 | xmllint --html --xpath '//div[@class="stats"]/div[3]/font/text()' - | \ 38 | sed 's/^/S:/') 39 | 40 | leechers=$(echo "$bitsearch" | \ 41 | xmllint --html --xpath '//div[@class="stats"]/div[4]/font/text()' - | \ 42 | sed 's/^/L:/') 43 | 44 | if [ -n "$titles" ]; then 45 | paste -d'|' <(echo "$magnets") <(echo "$sizes") <(echo "$seeders") <(echo "$leechers") <(echo "$titles") 46 | fi 47 | } 48 | 49 | [ -z "$query" ] && query=$($ROFI -dmenu -i -p "Search Torrents") 50 | [ -z "$query" ] && exit 1 51 | 52 | while [ -n "$query" ]; do 53 | # search first results page 54 | page=1 55 | row=$((20*($page-1))) 56 | 57 | results=$(get_torrents "$page" "$query") 58 | 59 | if [ -z "$results" ]; then 60 | $ROFI -e "No torrents found, try again." 61 | exit 1 62 | else 63 | echo "$results" > "$torrent_cache" 64 | fi 65 | 66 | torrents=$(cat "$torrent_cache" | cut -d'|' -f2- | column -s "|" -t) 67 | torrents="$torrents\nMore..." 68 | 69 | # display torrents 70 | while selection=$(echo -en "$torrents" | \ 71 | $ROFI -dmenu -i -p "Torrent" -format 'i s' -selected-row ${row}); do 72 | 73 | row=$(($(echo "$selection" | awk '{print $1;}') + 1)) 74 | torrent=$(echo "$selection" | cut -d' ' -f2-) 75 | 76 | [ -z "$torrent" ] && exit 1 77 | 78 | if [ "$torrent" = "More..." ]; then 79 | # increment page page and search again 80 | page=$((page+1)) 81 | row=$((20*($page-1))) 82 | 83 | results=$(get_torrents "$page" "$query") 84 | 85 | if [ -z "$results" ]; then 86 | page=$((page-1)) 87 | else 88 | echo "$results" >> "$torrent_cache" 89 | fi 90 | 91 | torrents=$(cat "$torrent_cache" | cut -d'|' -f2- | column -s "|" -t) 92 | torrents="$torrents\nMore..." 93 | else 94 | # open selected magnet link 95 | magnet=$(sed "${row}q;d" "$torrent_cache" | cut -d'|' -f1) 96 | 97 | $TORRENT_CLIENT "$magnet" & disown 98 | 99 | exit 0 100 | fi 101 | done 102 | 103 | query=$($ROFI -dmenu -i -p "Search Torrents") 104 | done 105 | 106 | exit 1 107 | -------------------------------------------------------------------------------- /scripts/rofi-brightness.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Original Author : Aditya Shakya (adi1090x) 4 | # 5 | # this script manages backlight brightness control for connected displays using xrandr (X11) 6 | # 7 | # dependencies: rofi, xrandr 8 | 9 | ROFI="${ROFI:-rofi}" 10 | 11 | current_bright() { 12 | xrandr --verbose | grep Brightness | cut -d':' -f2 | sed 's/ //' 13 | } 14 | 15 | current_bright_perc() { 16 | current_bright | awk '{print $1 * 100}' 17 | } 18 | 19 | increase_bright() { 20 | echo "$1" | awk '{print $1 + 0.1}' 21 | } 22 | 23 | decrease_bright() { 24 | echo "$1" | awk '{print $1 - 0.1}' 25 | } 26 | 27 | set_bright() { 28 | xrandr | awk '( $2 == "connected" ){ print $1 }' | xargs -I{} xrandr --output {} --brightness $1 29 | } 30 | 31 | options="Increase\nDecrease\nOptimal" 32 | 33 | ## Main 34 | row=0 35 | 36 | while chosen="$(echo -e "$options" | $ROFI -dmenu -i -p "Brightness $(current_bright_perc)%" -selected-row $row)"; do 37 | case $chosen in 38 | "Increase") 39 | set_bright $(increase_bright $(current_bright)) 40 | row=0 41 | ;; 42 | "Decrease") 43 | set_bright $(decrease_bright $(current_bright)) 44 | row=1 45 | ;; 46 | "Optimal") 47 | set_bright 0.75 48 | row=2 49 | ;; 50 | esac 51 | done 52 | 53 | exit 1 54 | -------------------------------------------------------------------------------- /scripts/rofi-calc-mode.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # A rofi mode script that allows calculations to be done 4 | # by Adnan Shameem (adnan360). License: MIT (Expat) 5 | # 6 | # Usage: 7 | # - Download this into a dir 8 | # - Make sure it's executable: chmod +x rofi-calc.sh 9 | # - Make sure you have at least one of these: 10 | # - bc 11 | # - python (v2 or v3) 12 | # - bcalc (curl -LO https://github.com/Phate6660/bcalc/blob/master/bcalc && chmod +x bcalc) 13 | # - Run: rofi -modi "calc:./rofi-calc.sh" -show calc 14 | # or, use this to have both run and calc options: rofi -combi-modi "calc:./rofi-calc.sh",run -show combi 15 | # - Enter expressions like "2+2", "15-5", "10*2", "3^2" to get results 16 | 17 | # Handle input 18 | # Important! It has to be before anything else is done in the script. 19 | # Otherwise it will keep reopening the menu indefinitely! 20 | if [ ! -z "$@" ]; then 21 | # To strip spaces 22 | input=$(echo "$@" | sed 's/[[:space:]]*//g') 23 | # If input has numbers and symbols, process it 24 | if grep -q '+\|-[[:digit:]]\|\*\|\/\|\^' <<<"$input"; then 25 | if [ ! -z "$(command -v bc)" ]; then # has bc package on system 26 | # If there is an equal sign (=) at the end, get rid of it. 27 | input=$(echo "$input" | sed 's/\=//g') 28 | # Show the result in a notification. 29 | echo "$input = "$( echo $input | bc ) 30 | elif [ ! -z "$(command -v python)" ]; then # has python package on system 31 | # If there is an equal sign (=) at the end, get rid of it. 32 | # Replace "^" with "**" so that it can calculate powers. 33 | input=$(echo "$input" | sed 's/\=//g;s/\^/**/g') 34 | # Show the result in a notification. 35 | # The "float(1)*" part is so that Python 2 returns decimal places. 36 | echo "$input = "$( python -c "print( float(1)*$input )" ) 37 | elif [ -f "$(dirname $0)/bcalc" ]; then # has bcalc 38 | # If there is an equal sign (=) at the end, get rid of it. 39 | input=$(echo "$input" | sed 's/\=//g') 40 | echo "$input = "$($(dirname $0)/bcalc "$input") 41 | else 42 | echo 'Error: No calculation utility found.' 43 | echo 'Please install bc, python or bcalc.' 44 | fi 45 | fi 46 | exit 0 47 | fi 48 | 49 | # Change prompt 50 | echo -en "\0prompt\x1fCalculator\n" 51 | -------------------------------------------------------------------------------- /scripts/rofi-characters.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script displays unicode characters in a rofi menu 4 | # selecting an entry will copy the character to the clipboard using xdotool (ydotool on wayland) 5 | # 6 | # dependencies: rofi, xdotool/ydotool 7 | 8 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 12 | 13 | characters_file="$ROFI_DATA_DIR/unicode.txt" 14 | 15 | # to use xclip instead of xdotool 16 | #xclip -selection clipboard 17 | 18 | if [[ -n $WAYLAND_DISPLAY ]]; then 19 | xdotool="ydotool type --file -" 20 | elif [[ -n $DISPLAY ]]; then 21 | xdotool="xdotool type --clearmodifiers --file -" 22 | else 23 | echo "Error: No Wayland or X11 display detected" >&2 24 | exit 1 25 | fi 26 | 27 | selected=$(cat "$characters_file" | $ROFI -dmenu -i -p "Characters") 28 | 29 | if [ -n "$selected" ]; then 30 | echo "$selected" | awk '{print $1;}' | $xdotool 31 | exit 0 32 | fi 33 | 34 | exit 1 35 | -------------------------------------------------------------------------------- /scripts/rofi-cheat.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script search and shows cheat sheets for many languages and commands using the cheat.sh service 4 | # it also shows an option to copy the displayed text to the clipboard 5 | # 6 | # dependencies: rofi, curl, xclip/wl-clipboard 7 | 8 | ROFI="${ROFI:-rofi}" 9 | 10 | rofi_mesg="Type your query and press \"Enter\" to search cheat.sh. \ 11 | Type \":list\" to list available language cheat sheets. \ 12 | Type \":learn\" to get the language basics." 13 | 14 | if [ -n "$WAYLAND_DISPLAY" ]; then 15 | clip_cmd="wl-copy" 16 | elif [ -n "$DISPLAY" ]; then 17 | clip_cmd="xclip -sel clip -r" 18 | else 19 | echo "Error: No Wayland or X11 display detected" >&2 20 | exit 1 21 | fi 22 | 23 | base_url="cheat.sh" 24 | all_entries=$(curl -s "cheat.sh/:list") 25 | 26 | while entry=$(echo -en "$all_entries" | \ 27 | $ROFI -dmenu -i -p "Topic"); do 28 | 29 | while query=$($ROFI -dmenu -i -p "Query" -mesg "$rofi_mesg"); do 30 | 31 | encoded_query=${query// /"+"} 32 | 33 | if [ "$query" != ":list" ]; then 34 | encoded_query="$encoded_query?T" 35 | fi 36 | 37 | url="$base_url/$entry?T" 38 | 39 | if [ -n "$query" ]; then 40 | url="$base_url/$entry/$encoded_query" 41 | fi 42 | 43 | cheat=$(curl -s "$url") 44 | 45 | choice=$(echo -en "Copy to Clipboard\n\n$cheat" | \ 46 | $ROFI -dmenu -i -p "$query") 47 | 48 | if [ "$choice" = "Copy to Clipboard" ]; then 49 | echo "$cheat" | $clip_cmd 50 | exit 0 51 | fi 52 | done 53 | done 54 | 55 | exit 1 56 | -------------------------------------------------------------------------------- /scripts/rofi-clip.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script shows a rofi clipboard menu 4 | # 5 | # dependencies: rofi, clipster/cliphist, wl-clipboard 6 | 7 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | 11 | if [[ -n $WAYLAND_DISPLAY ]]; then 12 | clip_exe="cliphist" 13 | clip_daemon="wl-paste --watch $clip_exe store" 14 | elif [[ -n $DISPLAY ]]; then 15 | clip_exe="clipster" 16 | clip_daemon="$clip_exe -d" 17 | else 18 | echo "Error: No Wayland or X11 display detected" >&2 19 | exit 1 20 | fi 21 | 22 | [ -n "$(command -v $clip_exe)" ] && clip_cmd="$clip_exe" 23 | [ -f "$SCRIPT_PATH/$clip_exe" ] && clip_cmd="$SCRIPT_PATH/$clip_exe" 24 | [ -z "$clip_cmd" ] && $ROFI -e "Download $clip_exe and place it inside \"$SCRIPT_PATH\" to enable the clipboard menu." && exit 1 25 | 26 | if [ "$(ps aux | grep -c "$clip_exe")" -lt 2 ]; then 27 | $ROFI -e "Run \"$clip_daemon\" to enable the clipboard menu" 28 | exit 1 29 | fi 30 | 31 | if [[ -n $WAYLAND_DISPLAY ]]; then 32 | "$clip_cmd" list | $ROFI -dmenu -i -p "Clipboard" | "$clip_cmd" decode | wl-copy 33 | exit 0 34 | else 35 | # Extract clipboard history from clipster and format for rofi 36 | clipboard=$("$clip_cmd" -c -o -n 500 -0 \ 37 | | gawk 'BEGIN {RS = "\0"; ORS = "\0"} NF > 0 { print substr($0, 1, 250) }' \ 38 | | gawk 'BEGIN {RS = "\0"; FS="\n"; OFS=" " } { $1=$1; print $0 }' \ 39 | | sed 's/^ *//') 40 | 41 | selection="$(echo "$clipboard" | $ROFI -dmenu -i -format 'i s' -p 'Clipboard')" 42 | 43 | if [ -n "$selection" ]; then 44 | row=$(($(echo "$selection" | cut -d' ' -f1)+1)) 45 | 46 | # Extract clipboard history from clipster and find the nth non-empty clip based selected line number 47 | selection=$("$clip_cmd" -c -o -n 500 -0 \ 48 | | gawk 'BEGIN {RS = "\0"; ORS = "\0"} NF > 0 { print }' \ 49 | | gawk 'BEGIN {RS = "\0"}'"NR == $row { print; exit }") 50 | 51 | # Echo the selection back to clipster 52 | echo -n "$selection" | "$clip_cmd" -c 53 | exit 0 54 | fi 55 | fi 56 | 57 | exit 1 58 | -------------------------------------------------------------------------------- /scripts/rofi-clocks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script shows current timezone and a list of available timezones to set the system time and date 4 | # 5 | # dependencies: rofi 6 | # optional: timedatectl 7 | 8 | ROFI="${ROFI:-rofi}" 9 | 10 | #https://stackoverflow.com/questions/12521114/getting-the-canonical-time-zone-name-in-shell-script 11 | current_timezone=$(readlink /etc/localtime | sed "s/\/usr\/share\/zoneinfo\///" | sed "s/\..//g") 12 | current_time=$(date "+%H:%M, %a %d %b %Y") 13 | rofi_mesg="Current time zone: $current_timezone $current_time" 14 | 15 | get_timezones() { 16 | cd /usr/share/zoneinfo/posix && 17 | find * -type f -or -type l |\ 18 | sort |\ 19 | xargs -I{} sh -c "echo -n {}': ' && TZ={} date \"+%H:%M, %a %d %b %Y\"" 20 | } 21 | 22 | while timezone=$(get_timezones |\ 23 | $ROFI -dmenu -i -p "Time Zone" -mesg "$rofi_mesg"); do 24 | timezone_text=$(echo "$timezone" | cut -d':' -f1) 25 | 26 | choice=$(echo -e "Yes\nNo" | $ROFI -dmenu -i -p "Set time zone to $timezone_text?") 27 | 28 | if [ "$choice" = "Yes" ]; then 29 | if command -v timedatectl &> /dev/null; then 30 | timedatectl set-timezone "$timezone_text" 31 | else 32 | pkexec sh -c "ln -sf /usr/share/zoneinfo/$timezone_text /etc/localtime" 33 | fi 34 | 35 | exit 0 36 | fi 37 | done 38 | 39 | exit 1 40 | -------------------------------------------------------------------------------- /scripts/rofi-color-picker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # script to display and pick colors 4 | # 5 | # dependencies: rofi, xclip/wl-clip 6 | 7 | SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 11 | 12 | colors_file="$ROFI_DATA_DIR/colors-name.txt" 13 | 14 | if [ -n "$WAYLAND_DISPLAY" ]; then 15 | clip_cmd="wl-copy" 16 | elif [ -n "$DISPLAY" ]; then 17 | clip_cmd="xclip -sel clip -r" 18 | else 19 | echo "Error: No Wayland or X11 display detected" >&2 20 | exit 1 21 | fi 22 | 23 | selected=$(cat "$colors_file" | $ROFI -dmenu -i -markup-rows -p "Colors") 24 | 25 | if [ -n "$selected" ]; then 26 | echo -n "$(echo "$selected" | cut -d\' -f2)" | $clip_cmd 27 | exit 0 28 | fi 29 | 30 | exit 1 31 | -------------------------------------------------------------------------------- /scripts/rofi-contacts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script scrapes a list of contacts from a .vcf file and shows it in rofi 4 | # selecting a contact opens a menu to copy numbers/mails to clipboard or send an email 5 | # 6 | # dependencies: rofi 7 | # optional: xclip/wl-clipboard 8 | 9 | # TODO: remove duplicate mails/numbers 10 | # TODO: implement edit contact 11 | # TODO: implement add contact 12 | # TODO: implement remove contact 13 | 14 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 15 | 16 | ROFI="${ROFI:-rofi}" 17 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 18 | 19 | contacts_file="$ROFI_DATA_DIR/Contacts.vcf" 20 | 21 | # set clipboard commad to use 22 | if [ -n "$WAYLAND_DISPLAY" ]; then 23 | clip_cmd="wl-copy" 24 | elif [ -n "$DISPLAY" ]; then 25 | clip_cmd="xclip -sel clip -r" 26 | else 27 | echo "Error: No Wayland or X11 display detected" >&2 28 | exit 1 29 | fi 30 | 31 | # show menu 32 | row=0 33 | 34 | while contact=$(echo -e "New Contact\n$(grep "FN:" "$contacts_file" | sort)" | cut -d: -f2 | \ 35 | $ROFI -dmenu -i -format 'i s' -selected-row "$row" -p "Contacts"); do 36 | 37 | row=$(echo "$contact" | cut -d' ' -f1) 38 | contact_name=$(echo "$contact" | cut -d' ' -f2-) 39 | contact_info=$(sed -n "/FN:$contact_name$/,/END:VCARD/p" "$contacts_file") 40 | 41 | numbers=$(echo -e "$contact_info" | grep TEL | cut -d: -f2 | uniq) 42 | mails=$(echo -e "$contact_info"| grep EMAIL | cut -d: -f2 | uniq) 43 | 44 | rofi_mesg="$contact_name Numbers: $numbers Emails: $mails" 45 | actions="Edit Contact\nCopy Number\nCopy Email\nWrite Email\nRemove Contact" 46 | 47 | [ -z "$numbers" ] && actions=$(echo "$actions" | sed 's/Copy Number\\n//') 48 | [ -z "$mails" ] && actions=$(echo "$actions" | sed 's/Copy Email\\nWrite Email\\n//') 49 | 50 | action=$(echo -en "$actions" | $ROFI -dmenu -i -p Action -rofi_mesg "$rofi_mesg") 51 | 52 | if [ "$action" = "Copy Number" ]; then 53 | [ $(echo -e "$numbers" | wc -l) -gt 1 ] && \ 54 | numbers=$(echo -e "$numbers" | $ROFI -dmenu -i -p "$contact_name Number") 55 | [ -n "$numbers" ] && echo "$numbers" | $clip_cmd && exit 0 56 | elif [ "$action" = "Copy Email" ]; then 57 | [ $(echo -e "$mails" | wc -l) -gt 1 ] && \ 58 | mails=$(echo -e "$mails" | $ROFI -dmenu -i -p "$contact_name Email") 59 | [ -n "$mails" ] && echo "$mails" | $clip_cmd && exit 0 60 | elif [ "$action" = "Write Email" ]; then 61 | [ $(echo -e "$mails" | wc -l) -gt 1 ] && \ 62 | mails=$(echo -e "$mails" | $ROFI -dmenu -i -p "$contact_name Email") 63 | [ -n "$mails" ] && xdg-email mailto:$mails && exit 0 64 | elif [ "$action" = "Remove Contact" ]; then 65 | echo "remove $contact_name" 66 | elif [ "$action" = "Edit Contact" ]; then 67 | echo "edit $contact_name" 68 | fi 69 | done 70 | 71 | exit 1 72 | -------------------------------------------------------------------------------- /scripts/rofi-dict.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # https://gitlab.com/-/snippets/1986400 4 | # 5 | # this script looks up word definitions in a dictionary using sdcv (stardict command line interface) 6 | # 7 | # dependencies: rofi, links, sdcv 8 | 9 | ROFI="${ROFI:-rofi}" 10 | 11 | if ! command -v sdcv &> /dev/null; then 12 | $ROFI -e "Install sdcv and links to enable the dictionary menu" 13 | exit 1 14 | fi 15 | 16 | pag() { \ 17 | sed -e 1d \ 18 | -e 's; _\([A-Z]\); \1;p' \ 19 | -e '/^$/d' -e '/^-->/d' \ 20 | | eval "$ROFI" -dmenu -i -p "Result" 21 | } 22 | 23 | while phrase="$(echo $src | $ROFI -dmenu -i -markup -p 'Word to search')"; do 24 | { 25 | sdcv -n --utf8-input --utf8-output "$phrase" 26 | printf "Urban\n" 27 | links -dump "https://www.urbandictionary.com/define.php?term=$phrase" \ 28 | | sed -e '1,75d'| head -n -24 | sed '/^ Flag/d' | sed '/^ Get the /d' 29 | } | pag 30 | done 31 | 32 | exit 1 33 | -------------------------------------------------------------------------------- /scripts/rofi-docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # 3 | # https://github.com/denpolischuk/rofi-docker 4 | # 5 | # rofi script to control docker containers 6 | # 7 | # dependencies: rofi, docker 8 | 9 | ROFI="${ROFI:-rofi}" 10 | TERMINAL="${TERMINAL:-xterm}" 11 | 12 | function execInTerminal { 13 | $TERMINAL -e $SHELL -c "$1" 14 | } 15 | 16 | selected_container=$(docker ps --format "table {{.ID}}:\t[{{.Image}}]\t{{.Names}}" | sed '1d' | $ROFI -dmenu -i -p "Running Containers") 17 | container_attach="Attach" 18 | container_stop="Stop" 19 | container_logs="Logs" 20 | container_restart="Restart" 21 | 22 | if [[ ! -z $selected_container ]]; then 23 | container_id=$(echo $selected_container | cut -d':' -f 1) 24 | container_name=$(echo $selected_container | cut -d ' ' -f 3) 25 | selected_action=$(echo -e "$container_attach\n$container_logs\n$container_restart\n$container_stop" | $ROFI -dmenu -i -p "Action") 26 | 27 | case $selected_action in 28 | $container_attach) 29 | execInTerminal "docker exec -it ${container_id} /bin/sh" 30 | exit 0 ;; 31 | $container_restart) 32 | msg=$(docker restart $container_id) 33 | $ROFI -e "Message from docker: $msg" ;; 34 | $container_logs) 35 | execInTerminal "docker logs -f ${container_id}" ;; 36 | $container_stop) 37 | msg=$(docker stop $container_id) 38 | $ROFI -e "Message from docker: $msg" ;; 39 | esac 40 | fi 41 | 42 | exit 1 43 | -------------------------------------------------------------------------------- /scripts/rofi-emoji.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # script to display and pick emojis 4 | # 5 | # dependencies: rofi, xclip/wl-clip 6 | 7 | SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 11 | 12 | icons_file="$ROFI_DATA_DIR/emojis.txt" 13 | 14 | if [ -n "$WAYLAND_DISPLAY" ]; then 15 | clip_cmd="wl-copy" 16 | elif [ -n "$DISPLAY" ]; then 17 | clip_cmd="xclip -sel clip -r" 18 | else 19 | echo "Error: No Wayland or X11 display detected" >&2 20 | exit 1 21 | fi 22 | 23 | selected=$(cat "$icons_file" | $ROFI -dmenu -i -p "Emoji") 24 | 25 | if [ -n "$selected" ]; then 26 | echo "$selected" | cut -f1 | $clip_cmd 27 | exit 0 28 | fi 29 | 30 | exit 1 31 | -------------------------------------------------------------------------------- /scripts/rofi-firefox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # https://github.com/lamarios/dotfiles/blob/master/scripts/rofi-firefox 4 | # 5 | # this script displays firefox bookmarks 6 | # 7 | # dependencies: rofi, firefox, sqlite 8 | 9 | ROFI="${ROFI:-rofi}" 10 | 11 | SQL="SELECT b.title, p.url FROM moz_bookmarks b JOIN moz_places p ON b.fk = p.id WHERE b.fk is not null AND b.title <> '' AND url <> '' AND url NOT LIKE 'place:%'" 12 | 13 | # https://github.com/ant-arctica/rofi-bookmarks/blob/main/rofi-bookmarks.py 14 | FIREFOX_PROFILE=$(grep "Default=" "$HOME/.mozilla/firefox/installs.ini" | cut -d"=" -f2) 15 | 16 | if [ -z "${FIREFOX_PROFILE+x}" ]; then 17 | echo "FIREFOX_PROFILE not set" 18 | exit 1 19 | fi 20 | 21 | PROFILE_DB=~/.mozilla/firefox/${FIREFOX_PROFILE}/places.sqlite 22 | TMP_PLACES=$HOME/.cache/firefox-places 23 | 24 | #avoiding db lock 25 | cp -f ${PROFILE_DB} ${TMP_PLACES} 26 | ENTRIES=$(sqlite3 -separator " | " ${TMP_PLACES} "${SQL}" | $ROFI -dmenu -i -p "Firefox") 27 | 28 | IFS=' | ' 29 | read -ra ADDR <<< "$ENTRIES" 30 | for i in "${ADDR[@]}"; do 31 | URL=$i 32 | done 33 | 34 | if [[ $URL == http* ]]; then 35 | echo "URL: '$URL'" 36 | else 37 | WORDS=$(echo ${ENTRIES} | wc -w) 38 | 39 | # we exit at empty string 40 | if [ $WORDS -eq 0 ]; then 41 | rm ${TMP_PLACES} 42 | exit 1 43 | fi 44 | 45 | echo "${URL} is not url, using google search instead" 46 | URL="https://www.google.com/search?client=firefox-b-d&q=${ENTRIES}" 47 | fi 48 | 49 | xdg-open "$URL" 50 | 51 | rm ${TMP_PLACES} 52 | -------------------------------------------------------------------------------- /scripts/rofi-flathub.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script downloads and shows the list of flatpaks on flathub 4 | # selecting an entry will launch a terminal with the command to install the flatpak 5 | # 6 | # dependencies: rofi, flatpak, jq 7 | 8 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 12 | ROFI_ICONS=${ROFI_ICONS:-} 13 | TERMINAL="${TERMINAL:-xterm}" 14 | 15 | flathub_refresh=3600 # refresh applications list every hour 16 | flathub_url="https://flathub.org/api/v2/appstream" 17 | flathub_cache="$ROFI_CACHE_DIR/flathub.json" 18 | flathub_preview="$SCRIPT_PATH/download_flathub_icon.sh {input} {output} {size}" 19 | 20 | rofi_flags="" 21 | 22 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 23 | 24 | # TODO: do this job in background and display message 25 | if [ -f "$flathub_cache" ]; then 26 | # compute time delta between current date and news file date 27 | file_date=$(date -r "$flathub_cache" +%s) 28 | current_date=$(date +%s) 29 | 30 | delta=$((current_date - file_date)) 31 | 32 | # refresh news file if it's too old 33 | if [ $delta -gt $flathub_refresh ]; then 34 | curl --silent "$flathub_url" -o "$flathub_cache" 35 | fi 36 | else 37 | curl --silent "$flathub_url" -o "$flathub_cache" 38 | fi 39 | 40 | row=0 41 | 42 | while selected=$(jq -r '.[]' "$flathub_cache" | awk '{print $1""$1}' |\ 43 | sed -e "s//\\x00icon\\x1fthumbnail:\/\//g" |\ 44 | $ROFI -dmenu -i $rofi_flags -format 'i s' -selected-row "$row" -preview-cmd "$flathub_preview" -p "Flatpak"); do 45 | 46 | row=$(echo "$selected" | cut -d' ' -f1) 47 | app_id=$(echo "$selected" | cut -d' ' -f2) 48 | 49 | if [ -n "$app_id" ]; then 50 | appstream=$(curl --silent "$flathub_url/$app_id") 51 | 52 | actions="Install\nOpen page in flathub.org" 53 | mesg=$(echo "$appstream" | jq -r '"\(.summary)"') 54 | action=$(echo -e "$actions" | $ROFI -dmenu -i -p "$app_id" -mesg "$mesg") 55 | 56 | if [ "$action" = "Install" ]; then 57 | # check flatpak cmd 58 | if ! command -v flatpak &> /dev/null; then 59 | $ROFI -e "Install flatpak" 60 | exit 1 61 | fi 62 | 63 | $TERMINAL -e "flatpak install $app_id" && exit 0 64 | 65 | elif [ "$action" = "Open page in flathub.org" ]; then 66 | app_url="https://flathub.org/apps/$app_id" 67 | xdg-open "$app_url" && exit 0 68 | fi 69 | fi 70 | done 71 | 72 | exit 1 73 | -------------------------------------------------------------------------------- /scripts/rofi-fontawesome.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # https://github.com/wstam88/rofi-fontawesome 4 | # 5 | # script to display and pick fontawesome icons 6 | # 7 | # dependencies: rofi, xclip/wl-clip 8 | 9 | SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 10 | 11 | ROFI="${ROFI:-rofi}" 12 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 13 | 14 | icons_file="$ROFI_DATA_DIR/fa5-icon-list.txt" 15 | 16 | if [ -n "$WAYLAND_DISPLAY" ]; then 17 | clip_cmd="wl-copy" 18 | elif [ -n "$DISPLAY" ]; then 19 | clip_cmd="xclip -sel clip -r" 20 | else 21 | echo "Error: No Wayland or X11 display detected" >&2 22 | exit 1 23 | fi 24 | 25 | selected=$(cat "$icons_file" | $ROFI -dmenu -i -markup-rows -p "Icons") 26 | 27 | if [ -n "$selected" ]; then 28 | echo -en "$(echo "$selected" | \ 29 | awk -F';' -v RS='>' 'NR==2{sub("&#x","",$1);print "\\u" $1;exit}' 30 | )" | $clip_cmd 31 | exit 0 32 | fi 33 | 34 | exit 1 35 | -------------------------------------------------------------------------------- /scripts/rofi-fortune.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # 3 | # this script shows fortunes 4 | # 5 | # dependencies: rofi, fortune 6 | # optional: cowsay 7 | 8 | ROFI="${ROFI:-rofi}" 9 | ROFI_ICONS="${ROFI_ICONS:-}" 10 | 11 | rofi_flags="" 12 | 13 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 14 | 15 | if ! command -v fortune &> /dev/null; then 16 | $ROFI -e "Install fortune" 17 | exit 1 18 | fi 19 | 20 | get_fortune() { 21 | if command -v cowsay &> /dev/null; then 22 | fortune | cowsay 23 | else 24 | fortune 25 | fi 26 | } 27 | 28 | rofi_theme="listview{lines:1;}\ 29 | entry{enabled:false;}\ 30 | mainbox{children:[message,listview];}" 31 | 32 | while continue=$(echo -en "Next\x00icon\x1fgo-next" | \ 33 | $ROFI -dmenu -i $rofi_flags -p "Fortune" -theme-str "$rofi_theme" -mesg "$(get_fortune)"); do 34 | echo "next" 35 | done 36 | -------------------------------------------------------------------------------- /scripts/rofi-github.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # 3 | # this script search github repositories, opens repositories in browser or clone them locally 4 | # 5 | # dependencies: rofi, curl, jq 6 | 7 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 11 | CLONE_FOLDER=${CLONE_FOLDER:-"$HOME/Downloads/"} 12 | ROFI_ICONS=${ROFI_ICONS:-} 13 | ROFI_LIST_ICON_SIZE=${ROFI_LIST_ICON_SIZE:-3} 14 | 15 | github_preview="$SCRIPT_PATH/download_icon.sh {input} {output} {size}" 16 | github_cache="$ROFI_CACHE_DIR/github.json" 17 | 18 | rofi_theme="element-icon{size:$ROFI_LIST_ICON_SIZE.0em;}\ 19 | element-text{vertical-align:0.5;}\ 20 | listview{lines:7;}" 21 | 22 | rofi_flags="-eh 2 -sep |" 23 | 24 | ((ROFI_ICONS)) && rofi_flags="$rofi_flags -show-icons" 25 | 26 | query="$@" 27 | 28 | [ -z "$query" ] && query=$($ROFI -dmenu -i -p "Search GitHub") 29 | [ -z "$query" ] && exit 1 30 | 31 | # url_encode query 32 | urlencode() { 33 | echo ${1// /"%20"} 34 | } 35 | 36 | get_repos() { 37 | jq -r '.items | .[] | "🟊\(.stargazers_count) \(.full_name) [\(.language)]\\n\(.description)\\x00icon\\x1fthumbnail:\/\/\(.owner.avatar_url)"' "$github_cache" | paste -sd'|' - 38 | } 39 | 40 | page=1 41 | per_page=50 42 | 43 | search_url="https://api.github.com/search/repositories?q=$(urlencode "$query")&per_page=$per_page&page=$page" 44 | 45 | curl -s "$search_url" -o "$github_cache" 46 | 47 | repos_count=$(jq '.total_count' "$github_cache") 48 | repos=$(get_repos) 49 | 50 | [ "$repos_count" -gt $per_page ] && repos="$repos|More..." 51 | 52 | row=0 53 | 54 | while repo=$(echo -en "$repos" | \ 55 | $ROFI -dmenu -i $rofi_flags -preview-cmd "$github_preview" -format 'i s' -theme-str "$rofi_theme" -selected-row "$row" -p "Repository"); do 56 | 57 | row=$(echo "$repo" | cut -d' ' -f1) 58 | repo=$(echo "$repo" | cut -d' ' -f2-) 59 | 60 | if [ "$repo" = "More..." ]; then 61 | page=$((page+1)) 62 | search_url="https://api.github.com/search/repositories?q=$(urlencode "$query")&per_page=$per_page&page=$page" 63 | 64 | curl -s "$search_url" -o "$github_cache"$page 65 | 66 | repos=$(jq -n '{ items: [ inputs.items ] | add }' "$github_cache" "$github_cache"$page) 67 | echo "$repos" > "$github_cache" 68 | 69 | rm "$github_cache"$page 70 | 71 | repos=$(get_repos) 72 | new_count=$(jq '.items | length' "$github_cache") 73 | 74 | if [ "$new_count" -lt $repos_count ]; then 75 | repos="$repos|More..." 76 | fi 77 | else 78 | repo_name=$(echo "$repo" | cut -d' ' -f2 | head -n1) 79 | 80 | action=$(echo -en "Open in Browser\nClone" | $ROFI -dmenu -i -p "Action") 81 | 82 | if [ "$action" = "Open in Browser" ]; then 83 | repo_url=$(jq ".items | .[] | select(.full_name==\"$repo_name\") | .html_url" "$github_cache" | tr -d '"') 84 | 85 | xdg-open "$repo_url" 86 | exit 0 87 | elif [ "$action" = "Clone" ]; then 88 | repo_folder=$(jq ".items | .[] | select(.full_name==\"$repo_name\") | .name" "$github_cache" | tr -d '"') 89 | clone_url=$(jq ".items | .[] | select(.full_name==\"$repo_name\") | .clone_url" "$github_cache" | tr -d '"') 90 | 91 | cd "$CLONE_FOLDER" && git clone "$clone_url" && xdg-open "$CLONE_FOLDER/$repo_folder" 92 | exit 0 93 | fi 94 | fi 95 | done 96 | 97 | exit 1 98 | -------------------------------------------------------------------------------- /scripts/rofi-json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # https://github.com/luiscrjunior/rofi-json 4 | 5 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 6 | 7 | menu_cache="$ROFI_CACHE_DIR/rofi-json" 8 | user_file="$(eval echo ${1})" 9 | 10 | if [[ "$user_file" = /* ]] 11 | then 12 | config_file="$user_file" 13 | else 14 | cwd=$(dirname $0) 15 | config_file="${cwd}/${user_file}" 16 | fi 17 | 18 | json=$(cat "$config_file") 19 | 20 | rm "$menu_cache" 21 | touch "$menu_cache" 22 | 23 | if [ $# -eq 1 ]; then 24 | echo "$json" | jq -cr '.[] | "\(.name)|\(.command)|\(.icon)"' | 25 | while IFS="|" read -r name command icon 26 | do 27 | if [[ $name == "null" ]]; then 28 | continue 29 | fi 30 | if [[ $icon == "null" ]]; then 31 | icon="system-run" 32 | fi 33 | echo -en "${name}\0icon\x1f${icon}\n" 34 | done 35 | fi 36 | 37 | if [ $# -eq 2 ]; then 38 | selected=$2 39 | task=$(echo $json | jq ".[] | select(.name == \"$selected\")") 40 | 41 | if [[ $task == "" ]]; then 42 | exit 1 43 | fi 44 | 45 | command=$(echo $task | jq -j ".command") 46 | 47 | if [[ $command == "null" ]]; then 48 | command=$(echo $task | jq -j ".name") 49 | fi 50 | 51 | echo "$2" > "$menu_cache" 52 | 53 | coproc bash -c "$command" 54 | exit 0 55 | fi 56 | 57 | exit 1 58 | -------------------------------------------------------------------------------- /scripts/rofi-keyboard-layout.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script manages the current keyboard layout (on x11) 4 | # 5 | # dependencies: rofi, setxkbmap 6 | 7 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | ROFI_CONFIG_DIR="${ROFI_CONFIG_DIR:-$SCRIPT_PATH/config}" 11 | 12 | keymap_cache="$ROFI_CONFIG_DIR/keyboard-layout" 13 | keymaps="/usr/share/X11/xkb/rules/evdev.lst" 14 | 15 | rofi_mesg="Current Layout: "$(setxkbmap -query | grep layout | cut -d':' -f2 | sed 's/ //g') 16 | 17 | selected=$(cat $keymaps |\ 18 | grep -Poz '(?<=layout\n)(.|\n)*(?=! variant)' |\ 19 | head -n -2 |\ 20 | $ROFI -dmenu -i -p "Keyboard Layout" -mesg "$rofi_mesg" |\ 21 | awk '{print $1;}' 22 | ) 23 | 24 | if [ -n "$selected" ]; then 25 | setxkbmap "$selected" 26 | 27 | echo "$selected" > "$keymap_cache" 28 | fi 29 | -------------------------------------------------------------------------------- /scripts/rofi-livetv-blocked.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script scrape and show the list of upcoming sport events streamed on livetv.sx 4 | # 5 | # dependencies: rofi, jq, python3-lxml, python3-requests 6 | 7 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 11 | 12 | livetv_refresh=3600 # refresh livetv file every hour 13 | livetv_file="$ROFI_CACHE_DIR/livetv.json" 14 | 15 | if [ -f "$livetv_file" ]; then 16 | # compute time delta between current date and news file date 17 | news_date=$(date -r "$livetv_file" +%s) 18 | current_date=$(date +%s) 19 | 20 | delta=$((current_date - news_date)) 21 | 22 | # refresh livetv file if it's too old 23 | if [ $delta -gt $livetv_refresh ]; then 24 | "$SCRIPT_PATH"/scrape_livetv.py "$livetv_file" 25 | fi 26 | else 27 | "$SCRIPT_PATH"/scrape_livetv.py "$livetv_file" 28 | fi 29 | 30 | while name=$(jq '.[] | "{\(.time)} \(.category) \(.name)"' "$livetv_file" | tr -d '"' |\ 31 | sort | $ROFI -dmenu -i -p "LiveTV" -format 'i s'); do 32 | 33 | name_idx=$(echo "$name" | cut -d' ' -f1) 34 | link_sel=".[$name_idx].link" 35 | event_link=$(jq "$link_sel" "$livetv_file" | tr -d '"') 36 | 37 | echo "$name" 38 | echo "name: $name_str sel: $link_sel event: $event_link" 39 | 40 | # follow redirect with curl using -L 41 | streams=$(curl -L "$event_link" | grep "OnClick=\"show_webplayer" |\ 42 | sed -E 's/^.*href/href/; s/>.*//' | sed -r 's/.*href="([^"]+).*/\1/g') 43 | 44 | if [ -z "$streams" ]; then 45 | $ROFI -e "No stream links available, retry later." 46 | else 47 | selected_stream=$(echo -en "$streams" | $ROFI -dmenu -i -p "Link") 48 | 49 | if [ -n "$selected_stream" ]; then 50 | 51 | xdg-open https:"$selected_stream" 52 | 53 | exit 0 54 | fi 55 | fi 56 | done 57 | 58 | exit 1 59 | -------------------------------------------------------------------------------- /scripts/rofi-livetv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # this script scrape and show the list of upcoming sport events streamed on livetv.sx 4 | # 5 | # dependencies: rofi, jq, curl 6 | 7 | ROFI="${ROFI:-rofi}" 8 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 9 | 10 | livetv_url="https://webmaster.livetv.club/list.php?id=21&sport=&sp=&r=_ru" 11 | livetv_refresh=3600 # refresh livetv file every hour 12 | livetv_file="$ROFI_CACHE_DIR/livetv" 13 | 14 | fix_link() { 15 | local link="$1" 16 | 17 | if [[ "$link" = "//"* ]]; then 18 | echo "https://$link" 19 | else 20 | echo "$link" 21 | fi 22 | } 23 | 24 | if [ -f "$livetv_file" ]; then 25 | # compute time delta between current date and news file date 26 | news_date=$(date -r "$livetv_file" +%s) 27 | current_date=$(date +%s) 28 | 29 | delta=$((current_date - news_date)) 30 | 31 | # refresh livetv file if it's too old 32 | if [ $delta -gt $livetv_refresh ]; then 33 | curl -s "$livetv_url" -o "$livetv_file" 34 | fi 35 | else 36 | curl -s "$livetv_url" -o "$livetv_file" 37 | fi 38 | 39 | matches=$(cat "$livetv_file" | grep -o -P '(?<=ev_arr = ).*(?=;)') 40 | channels=$(cat "$livetv_file" | grep -o -P '(?<=chan_arr = ).*(?=;)') 41 | 42 | while match=$(echo "$matches" | jq -r '.[] | "\(.date) [\(.sport)]\(.match)"' | $ROFI -dmenu -i -p "Events"); do 43 | match_name=$(echo "$match" | cut -d']' -f2-) 44 | match_id=$(echo "$matches" | jq ".[] | select(.match==\"$match_name\") | .id") 45 | match_links=$(echo "$channels" | jq -r ".[$match_id]" | jq -r ".[] | select(.type==\"Flash\") | .link") 46 | 47 | if [ -n "$match_links" ]; then 48 | link=$(echo "$match_links" | $ROFI -dmenu -i -p "$match_name Links") 49 | 50 | [[ -n "$link" ]] && xdg-open $(fix_link "$link") && exit 0 51 | else 52 | rofi -e "No stream links available for "$match", retry later." 53 | fi 54 | done 55 | 56 | exit 1 57 | -------------------------------------------------------------------------------- /scripts/rofi-locale.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script manages the current system language, writing the corresponding 4 | # entry either in "$HOME/.profile" (for slackware) or in "$HOME/.i18n" 5 | # 6 | # dependencies: rofi 7 | 8 | ROFI="${ROFI:-rofi}" 9 | 10 | current_locale=$(locale | head -n1) 11 | selected_locale=$(locale -a | $ROFI -dmenu -i -no-custom -p "Language" -mesg "Current Language: $current_locale") 12 | 13 | if [ -n "$selected_locale" ]; then 14 | distro=$(grep "^NAME=" /etc/os-release | sed 's/NAME=//') 15 | 16 | if [ $(echo $distro | grep -i "slackware") ]; then 17 | # workaround for slackware 18 | sed -i "/LANG=/d" "$HOME/.profile" 19 | echo "LANG=$selected_locale" >> "$HOME/.profile" 20 | else 21 | echo "LANG=\"$selected_locale\"" > $HOME/.i18n 22 | echo "LC_ALL=\"$selected_locale\"" >> $HOME/.i18n 23 | fi 24 | 25 | $ROFI -markup -e "Language set to $selected_locale. Logout to apply changes" 26 | fi 27 | -------------------------------------------------------------------------------- /scripts/rofi-monitor-layout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # https://github.com/davatorium/rofi-scripts/blob/master/monitor_layout.sh 4 | # 5 | # this controls the monitor layout using xrand 6 | # 7 | # dependencies: rofi, xrandr 8 | 9 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 10 | 11 | ROFI="${ROFI:-rofi}" 12 | ROFI_CONFIG_DIR="${ROFI_CONFIG_DIR:-$SCRIPT_PATH/config}" 13 | 14 | monitors_cache="$ROFI_CONFIG_DIR/monitor-layout" 15 | 16 | XRANDR=$(which xrandr) 17 | MONITORS=( $( ${XRANDR} | awk '( $2 == "connected" ){ print $1 }' ) ) 18 | NUM_MONITORS=${#MONITORS[@]} 19 | TITLES=() 20 | COMMANDS=() 21 | 22 | function gen_xrandr_only() 23 | { 24 | selected=$1 25 | 26 | cmd="xrandr --output ${MONITORS[$selected]} --auto " 27 | 28 | for entry in $(seq 0 $((${NUM_MONITORS}-1))) 29 | do 30 | if [ $selected != $entry ] 31 | then 32 | cmd="$cmd --output ${MONITORS[$entry]} --off" 33 | fi 34 | done 35 | 36 | echo $cmd 37 | } 38 | 39 | declare -i index=0 40 | TILES[$index]="Cancel" 41 | COMMANDS[$index]="true" 42 | index+=1 43 | 44 | for entry in $(seq 0 $((${NUM_MONITORS}-1))) 45 | do 46 | TILES[$index]="Only ${MONITORS[$entry]}" 47 | COMMANDS[$index]=$(gen_xrandr_only $entry) 48 | index+=1 49 | done 50 | 51 | ## 52 | # Dual screen options 53 | ## 54 | for entry_a in $(seq 0 $((${NUM_MONITORS}-1))) 55 | do 56 | for entry_b in $(seq 0 $((${NUM_MONITORS}-1))) 57 | do 58 | if [ $entry_a != $entry_b ] 59 | then 60 | TILES[$index]="Dual Screen ${MONITORS[$entry_a]} -> ${MONITORS[$entry_b]}" 61 | COMMANDS[$index]="xrandr --output ${MONITORS[$entry_a]} --auto \ 62 | --output ${MONITORS[$entry_b]} --auto --left-of ${MONITORS[$entry_a]}" 63 | 64 | index+=1 65 | fi 66 | done 67 | done 68 | 69 | ## 70 | # Clone monitors 71 | ## 72 | for entry_a in $(seq 0 $((${NUM_MONITORS}-1))) 73 | do 74 | for entry_b in $(seq 0 $((${NUM_MONITORS}-1))) 75 | do 76 | if [ $entry_a != $entry_b ] 77 | then 78 | TILES[$index]="Clone Screen ${MONITORS[$entry_a]} -> ${MONITORS[$entry_b]}" 79 | COMMANDS[$index]="xrandr --output ${MONITORS[$entry_a]} --auto \ 80 | --output ${MONITORS[$entry_b]} --auto --same-as ${MONITORS[$entry_a]}" 81 | 82 | index+=1 83 | fi 84 | done 85 | done 86 | 87 | ## 88 | # Generate entries, where first is key. 89 | ## 90 | function gen_entries() 91 | { 92 | for a in $(seq 0 $(( ${#TILES[@]} -1 ))) 93 | do 94 | echo $a ${TILES[a]} 95 | done 96 | } 97 | 98 | # Call menu 99 | SEL=$( gen_entries | $ROFI -dmenu -i -p "Monitor Setup" | awk '{print $1}' ) 100 | 101 | # Call xrandr 102 | if [ "${COMMANDS[$SEL]}" != "true" ]; then 103 | $( ${COMMANDS[$SEL]} ) 104 | 105 | # Save command to cache 106 | echo "${COMMANDS[$SEL]}" > "$monitors_cache" 107 | else 108 | echo "Cancel" 109 | fi 110 | -------------------------------------------------------------------------------- /scripts/rofi-news.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # this script fetches and show the latest news from bbc internationals rss 4 | # selecting an entry will open the corresponding web page 5 | # add other sources in the "$ROFI_DATA_DIR/news" file using the format "PROVIDER_NAME=RSS_URL" 6 | # 7 | # dependencies: rofi, curl, libxml2 8 | 9 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 10 | 11 | ROFI="${ROFI:-rofi}" 12 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 13 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 14 | 15 | rss_refresh=600 # refresh news file every ten minutes 16 | rss_file="$ROFI_DATA_DIR/news" 17 | rss_cache="$ROFI_CACHE_DIR/news" 18 | 19 | show_news() { 20 | local provider_name="$1" 21 | 22 | rss_url=$(grep "$provider_name=" "$rss_file" | cut -d'=' -f2-) 23 | rss_cache_file="$rss_cache/$provider_name.news" 24 | 25 | # TODO: do this job in background and display message 26 | if [ -f "$rss_cache_file" ]; then 27 | # compute time delta between current date and news file date 28 | news_date=$(date -r "$rss_cache_file" +%s) 29 | current_date=$(date +%s) 30 | 31 | delta=$((current_date - news_date)) 32 | 33 | # refresh news file if it's too old 34 | if [ $delta -gt $rss_refresh ]; then 35 | curl --silent "$rss_url" -o "$rss_cache_file" 36 | fi 37 | else 38 | curl --silent "$rss_url" -o "$rss_cache_file" 39 | fi 40 | 41 | titles=$(cat "$rss_cache_file" | xmllint --xpath '/rss/channel/item[*]/title/text()' - | sed -e 's/\!\[CDATA\[//' -e 's/\]\]//' | tr -d '<>,') 42 | 43 | selected=$(echo "$titles" | $ROFI -dmenu -i -p "$provider_name" -format 'i s') 44 | 45 | # get selected news and open corresponding link in browser 46 | if [ -n "$selected" ]; then 47 | row=$(echo "$selected" | awk '{print $1;}') 48 | row=$(($row+1)) # xpath arrays starts from 1 49 | 50 | link=$(cat "$rss_cache_file" | xmllint --xpath "/rss/channel/item[$row]/link/text()" -) 51 | 52 | xdg-open "$link" 53 | 54 | exit 0; 55 | fi 56 | 57 | exit 1 58 | } 59 | 60 | mkdir -p "$rss_cache" 61 | 62 | providers=$(cat "$rss_file" | cut -d'=' -f1) 63 | providers_count=$(cat "$rss_file" | wc -l) 64 | 65 | if [ $providers_count -gt 1 ]; then 66 | # remember last entry chosen 67 | provider_row=0 68 | 69 | while provider=$(echo -en "$providers" | $ROFI -dmenu -i -selected-row ${provider_row} -format 'i s' -p "News"); do 70 | provider_row=$(echo "$provider" | awk '{print $1;}') 71 | provider_name=$(echo "$provider" | cut -d' ' -f2-) 72 | 73 | $(show_news "$provider_name") && exit 0 74 | done 75 | else 76 | provider_name=$(head -n 1 "$rss_file" | cut -d'=' -f1) 77 | 78 | $(show_news "$provider_name") && exit 0 79 | fi 80 | 81 | exit 1 82 | -------------------------------------------------------------------------------- /scripts/rofi-notes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # https://github.com/christianholman/rofi_notes 4 | # 5 | # this script allows writing and reading simple notes that are stored locally 6 | # 7 | # dependencies: rofi 8 | 9 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 10 | 11 | ROFI="${ROFI:-rofi}" 12 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 13 | NOTES_AUTHOR="${NOTES_AUTOR:-$(whoami)}" 14 | NOTES_EDITOR="${NOTES_EDITOR:-xdg-open}" 15 | 16 | notes_folder="$ROFI_DATA_DIR/notes" 17 | 18 | if [[ ! -d "${notes_folder}" ]]; then 19 | mkdir -p "$notes_folder" 20 | fi 21 | 22 | get_notes() { 23 | ls "${notes_folder}" 24 | } 25 | 26 | edit_note() { 27 | note_location=$1 28 | $NOTES_EDITOR "$note_location" 29 | } 30 | 31 | delete_note() { 32 | local note=$1 33 | local action=$(echo -e "Yes\nNo" | $ROFI -dmenu -p "Are you sure you want to delete $note? ") 34 | 35 | case $action in 36 | "Yes") 37 | rm "$notes_folder/$note" 38 | main 39 | ;; 40 | "No") 41 | main 42 | esac 43 | } 44 | 45 | note_context() { 46 | local note=$1 47 | local note_location="$notes_folder/$note" 48 | local action=$(echo -e "Edit\nDelete" | $ROFI -dmenu -p "$note > ") 49 | case $action in 50 | "Edit") 51 | edit_note "$note_location" 52 | exit 0;; 53 | "Delete") 54 | delete_note "$note" 55 | exit 0;; 56 | esac 57 | 58 | exit 1 59 | } 60 | 61 | new_note() { 62 | local title=$(echo -e "Cancel" | $ROFI -dmenu -p "Note title") 63 | 64 | case "$title" in 65 | "Cancel") 66 | main 67 | ;; 68 | *) 69 | local file=$(echo "$title" | sed 's/ /_/g;s/\(.*\)/\L\1/g') 70 | local template=$(cat <<- END 71 | --- 72 | title: $title 73 | date: $(date --rfc-3339=seconds) 74 | author: $NOTES_AUTHOR 75 | --- 76 | 77 | # $title 78 | END 79 | ) 80 | 81 | note_location="$notes_folder/$file.md" 82 | if [ "$title" != "" ]; then 83 | echo "$template" > "$note_location" | edit_note "$note_location" 84 | exit 0 85 | fi 86 | ;; 87 | esac 88 | } 89 | 90 | main() 91 | { 92 | local all_notes="$(get_notes)" 93 | local first_menu="New Note" 94 | 95 | if [ "$all_notes" ];then 96 | first_menu="New Note\n${all_notes}" 97 | fi 98 | 99 | local note=$(echo -e "$first_menu" | $ROFI -dmenu -i -p "Notes") 100 | 101 | case $note in 102 | "New Note") 103 | new_note 104 | ;; 105 | "") 106 | exit 1;; 107 | *) 108 | note_context "$note" && exit 0 # handle esc key in note_context 109 | esac 110 | 111 | exit 1 112 | } 113 | 114 | 115 | main 116 | -------------------------------------------------------------------------------- /scripts/rofi-passmenu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu 4 | 5 | shopt -s nullglob globstar 6 | 7 | ROFI="${ROFI:-rofi}" 8 | 9 | typeit=0 10 | if [[ $1 == "--type" ]]; then 11 | typeit=1 12 | shift 13 | fi 14 | 15 | if [[ -n $WAYLAND_DISPLAY ]]; then 16 | xdotool="ydotool type --file -" 17 | elif [[ -n $DISPLAY ]]; then 18 | xdotool="xdotool type --clearmodifiers --file -" 19 | else 20 | echo "Error: No Wayland or X11 display detected" >&2 21 | exit 1 22 | fi 23 | 24 | prefix=${PASSWORD_STORE_DIR-~/.password-store} 25 | password_files=( "$prefix"/**/*.gpg ) 26 | password_files=( "${password_files[@]#"$prefix"/}" ) 27 | password_files=( "${password_files[@]%.gpg}" ) 28 | 29 | password=$(printf '%s\n' "${password_files[@]}" | $ROFI -dmenu -i -p "Passwords" "$@") 30 | 31 | [[ -n $password ]] || exit 1 32 | 33 | if [[ $typeit -eq 0 ]]; then 34 | pass show -c "$password" 2>/dev/null 35 | else 36 | pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool 37 | fi 38 | -------------------------------------------------------------------------------- /scripts/rofi-playerctl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # https://github.com/mrHeavenli/rofi-playerctl 4 | # 5 | # this script controls the current media playing using playerctl 6 | # 7 | # dependencies: rofi, playerctl 8 | 9 | # TODO: fix player change 10 | 11 | ROFI="${ROFI:-rofi}" 12 | ROFI_ICONS="${ROFI_ICONS:-}" 13 | 14 | rofi_flags="" 15 | 16 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 17 | 18 | if ! command -v playerctl &> /dev/null; then 19 | $ROFI -e "Install playerctl to enable the media player controls menu" 20 | exit 1 21 | fi 22 | 23 | status_function () { 24 | if playerctl status > /dev/null; then 25 | player_name=$(playerctl status -f "{{playerName}}") 26 | player_metadata=$(playerctl metadata -f "{{trunc(default(title, \"[Unknown]\"), 25)}} by {{trunc(default(artist, \"[Unknown]\"), 25)}}") 27 | player_status=$(playerctl status) 28 | 29 | echo "$player_name: $player_metadata ($player_status)" 30 | else 31 | echo "Nothing is playing" 32 | fi 33 | } 34 | 35 | 36 | # Options 37 | toggle="Play/Pause" # media-playback-start 38 | next="Next" # media-skip-forward 39 | prev="Previous" # media-skip-backward 40 | seekminus="Go back 15 seconds" # media-seek-backward 41 | seekplus="Go ahead 15 seconds" # media-seek-forward 42 | switch="Change selected player" # multimedia-player 43 | 44 | # Variable passed to rofi 45 | print_options() { 46 | echo -e "$toggle\x00icon\x1fmedia-playback-start" 47 | echo -e "$next\x00icon\x1fmedia-skip-forward" 48 | echo -e "$prev\x00icon\x1fmedia-skip-backward" 49 | echo -e "$seekplus\x00icon\x1fmedia-seek-forward" 50 | echo -e "$seekminus\x00icon\x1fmedia-seek-backward" 51 | echo -e "$switch\x00icon\x1fmultimedia-player" 52 | } 53 | 54 | row=0 55 | status=$(status_function) 56 | 57 | while chosen="$(print_options | $ROFI -dmenu -i -p "Media Player" $rofi_flags -markup-rows -mesg "${status^}" -selected-row ${row} -format 'i s')"; do 58 | row=$(echo "$chosen" | awk '{print $1;}') 59 | selected_text=$(echo "$chosen" | cut -d' ' -f2-) 60 | 61 | case "$selected_text" in 62 | "$toggle") 63 | playerctl play-pause 64 | ;; 65 | "$next") 66 | playerctl next 67 | ;; 68 | "$prev") 69 | playerctl previous 70 | ;; 71 | "$seekminus") 72 | playerctl position 15- 73 | ;; 74 | "$seekplus") 75 | playerctl position 15+ 76 | ;; 77 | "$switch") 78 | playerctld shift 79 | ;; 80 | esac 81 | 82 | status=$(status_function) 83 | done 84 | 85 | exit 1 86 | -------------------------------------------------------------------------------- /scripts/rofi-projects.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script shows code projects in a directory and opens them with the editor of choice 4 | # 5 | # dependencies: rofi 6 | 7 | ROFI="${ROFI:-rofi}" 8 | PROJECTS_EDITOR="${PROJECTS_EDITOR:-qtcreator}" 9 | PROJECTS_DIR="${PROJECTS_DIR:-"$HOME"/Projects}" 10 | 11 | if ! command -v $PROJECTS_EDITOR &> /dev/null; then 12 | $ROFI -e "Projects Editor $PROJECTS_EDITOR not found" 13 | exit 1 14 | fi 15 | 16 | project=$(ls "$PROJECTS_DIR" | $ROFI -dmenu -i -p "Project") 17 | 18 | if [ -n "$project" ]; then 19 | $PROJECTS_EDITOR "$PROJECTS_DIR/$project" & disown 20 | exit 0 21 | fi 22 | 23 | exit 1 24 | -------------------------------------------------------------------------------- /scripts/rofi-quiz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # a simple quiz game in rofi using opentdb api 4 | # 5 | # dependencies: rofi, curl, jq 6 | 7 | ROFI="${ROFI:-rofi}" 8 | 9 | url="https://opentdb.com/api.php?amount=1" 10 | points=0 11 | 12 | remove_quotes() { 13 | local str=${*:-$(/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 12 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 13 | ROFI_ICONS="${ROFI_ICONS:-}" 14 | RADIO_PLAYER="${RADIO_PLAYER:-mpv --no-resume-playback --force-window=immediate}" 15 | 16 | radio_file="$ROFI_DATA_DIR/radios.json" 17 | radio_cache="$ROFI_CACHE_DIR/rofi-radio" 18 | radio_url="https://de1.api.radio-browser.info/json/stations/search?name=" 19 | radio_preview="$SCRIPT_PATH/download_icon.sh {input} {output} {size}" 20 | 21 | rofi_flags="" 22 | 23 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 24 | 25 | play(){ 26 | if [ -n "$1" ]; then 27 | printf "Fetching channel, please wait...\n" 28 | $RADIO_PLAYER "$1" 29 | fi 30 | } 31 | 32 | select_channel(){ 33 | row=$(cat "$radio_cache") 34 | 35 | # favicon key contains the url to the icon to show 36 | while radio=$(\ 37 | jq -r '.[] | "[\(.countrycode)] \(.name)\(.favicon)"' "$radio_file" |\ 38 | sed -e "s//\\x00icon\\x1fthumbnail:\/\//g" |\ 39 | $ROFI -dmenu -i -p "Radio" -selected-row "${row}" -format 'i s' $rofi_flags -preview-cmd "$radio_preview" \ 40 | ); do 41 | 42 | row=$(echo "$radio" | awk '{print $1;}') 43 | echo "$row" > "$radio_cache" 44 | 45 | radio_name=$(echo "$radio" | cut -d' ' -f3-) 46 | var=".[] | select(.name==\"$radio_name\") | .url" 47 | 48 | play "$(jq "$var" "$radio_file" | tr -d '"')" 49 | 50 | exit 0 51 | done 52 | 53 | exit 1 54 | } 55 | 56 | # TODO: do this job in background and display message 57 | if [ ! -f "$radio_file" ];then 58 | printf "Downloading channel list...\n"; 59 | 60 | wget -q --show-progress "$radio_url" -O "$radio_file" ||\ 61 | print_error "Cannot download channel list" 62 | fi 63 | 64 | select_channel 65 | -------------------------------------------------------------------------------- /scripts/rofi-reddit.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # 3 | # this script displays a list of all subreddits 4 | # selecting an entry will open a search dialog to search posts in the subreddit 5 | # 6 | # dependencies: rofi, curl, jq 7 | 8 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 12 | 13 | subreddits="$ROFI_DATA_DIR/subreddits" 14 | base_url="https://www.reddit.com/" 15 | 16 | search_subreddit() { 17 | subreddit_name="$1" 18 | search_query="$2" 19 | 20 | search_url="https://www.reddit.com/r/${subreddit_name}/search/.json?q=${search_query}&restrict_sr=1" 21 | search_results=$(curl -H "User-Agent: 'your bot 0.1'" "$search_url") 22 | 23 | no_link="$(echo "$search_results" | grep -c permalink)" 24 | 25 | if [ -n "$search_results" ] && [ "$no_link" -ne 0 ]; then 26 | permalink=$(jq '.data.children[] | .data["title", "permalink"]' <<< "$search_results" |\ 27 | paste -d "|" - - | $ROFI -dmenu -i -p "Results" | cut -d'|' -f 2 | xargs) 28 | 29 | if [ -n "$permalink" ]; then 30 | xdg-open "$base_url$permalink" 31 | exit 0 32 | fi 33 | else 34 | $ROFI -e "No results found" 35 | fi 36 | } 37 | 38 | # remember last selection 39 | row=0 40 | 41 | while subreddit=$(cat "$subreddits" | $ROFI -dmenu -i -selected-row ${row} -format 'i s' -p "Subreddit"); do 42 | if [ ${#subreddit} = 0 ]; then 43 | continue 44 | fi 45 | 46 | row=$(echo "$subreddit" | awk '{print $1;}') 47 | selected_subreddit=$(echo "$subreddit" | cut -d' ' -f2-) 48 | 49 | # remove spaces 50 | subreddit=$(echo "$subreddit" | sed "s/ //g") 51 | 52 | action=$(echo -e "Open in Browser\nSearch Posts" | $ROFI -dmenu -i -p "Action") 53 | 54 | if [ ${#action} = 0 ]; then 55 | continue 56 | fi 57 | 58 | if [ "$action" = "Open in Browser" ]; then 59 | xdg-open $base_url"/r/""$selected_subreddit" 60 | exit 0 61 | fi 62 | 63 | # search in selected subreddit 64 | while search_term=$(echo | $ROFI -dmenu -i -p "Search"); do 65 | if [ ${#search_term} -gt 0 ]; then 66 | search_term=$(echo "$search_term" | sed "s/ /%20/g") 67 | search_subreddit "$selected_subreddit" "$search_term" 68 | fi 69 | done 70 | done 71 | 72 | exit 1 73 | 74 | -------------------------------------------------------------------------------- /scripts/rofi-screenshot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script allows taking screenshots of the desktop 4 | # 5 | # dependencies: rofi, scrot/grim, slurp/flameshot/spectacle/xfce4-screenshooter 6 | 7 | ROFI="${ROFI:-rofi}" 8 | SCREENSHOT_NAME="${SCREENSHOT_NAME:-Screenshot_%Y-%m-%d-%S-%H%M%S.png}" 9 | 10 | # check for available programs working in both wayland and x11 11 | declare -a programs=("flameshot" "spectacle") 12 | 13 | # launch program if found on system 14 | for cmd in "${programs[@]}"; do 15 | if command -v "$cmd" &> /dev/null; then 16 | if [ "$cmd" = "flameshot" ]; then 17 | flameshot launcher 18 | else 19 | $cmd 20 | fi 21 | 22 | exit 0 23 | fi 24 | done 25 | 26 | if [ -n "$WAYLAND_DISPLAY" ]; then 27 | # fallback on grim 28 | if ! command -v grim &> /dev/null; then 29 | $ROFI -e "Install grim or a screenshot program for wayland." 30 | exit 1 31 | fi 32 | 33 | screen_cmd() { 34 | sleep 1 ; grim "$(xdg-user-dir PICTURES)/$SCREENSHOT_NAME" ; xdg-open "$(xdg-user-dir PICTURES)/$SCREENSHOT_NAME" 35 | } 36 | 37 | area_cmd() { 38 | grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/$SCREENSHOT_NAME" ; xdg-open "$(xdg-user-dir PICTURES)/$SCREENSHOT_NAME" 39 | } 40 | 41 | window_cmd() { 42 | grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/$SCREENSHOT_NAME" ; xdg-open "$(xdg-user-dir PICTURES)/$SCREENSHOT_NAME" 43 | } 44 | elif [ -n "$DISPLAY" ]; then 45 | # try xfce4-screenshoter 46 | if command -v "xfce4-screenshooter" &> /dev/null; then 47 | xfce4-screenshooter 48 | exit 0 49 | fi 50 | 51 | # fallback on scrot 52 | if ! command -v scrot &> /dev/null; then 53 | $ROFI -e "Install scrot or a screenshot program for X11." 54 | exit 1 55 | fi 56 | 57 | screen_cmd() { 58 | sleep 1 ; scrot "$SCREENSHOT_NAME" -e 'mv $f $$(xdg-user-dir PICTURES) ; xdg-open $$(xdg-user-dir PICTURES)/$f' 59 | } 60 | 61 | area_cmd() { 62 | scrot -s "$SCREENSHOT_NAME" -e 'mv $f $$(xdg-user-dir PICTURES) ; xdg-open $$(xdg-user-dir PICTURES)/$f' 63 | } 64 | 65 | window_cmd() { 66 | scrot -s "$SCREENSHOT_NAME" -e 'mv $f $$(xdg-user-dir PICTURES) ; xdg-open $$(xdg-user-dir PICTURES)/$f' 67 | } 68 | else 69 | echo "Error: No Wayland or X11 display detected" >&2 70 | exit 1 71 | fi 72 | 73 | options="Screen\nArea\nWindow" 74 | 75 | chosen="$(echo -e $options | $ROFI -dmenu -i -p 'Screenshot')" 76 | 77 | case $chosen in 78 | "Screen") 79 | screen_cmd 80 | exit 0;; 81 | "Area") 82 | area_cmd 83 | exit 0;; 84 | "Window") 85 | window_cmd 86 | exit 0;; 87 | esac 88 | 89 | exit 1 90 | -------------------------------------------------------------------------------- /scripts/rofi-session.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script manages the user session using loginctl and an optional screen locker 4 | # 5 | # dependencies: rofi, systemd/elogind 6 | # optional: i3lock 7 | 8 | ROFI="${ROFI:-rofi}" 9 | ROFI_ICONS="${ROFI_ICONS:-}" 10 | USE_LOCKER="${USE_LOCKER:-false}" 11 | LOCKER="${LOCKER:-i3lock}" 12 | 13 | rofi_flags="" 14 | 15 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 16 | 17 | entries="Lock Screen\x00icon\x1fsystem-lock-screen 18 | Log Out\x00icon\x1fsystem-log-out 19 | Reboot\x00icon\x1fsystem-reboot 20 | Shutdown\x00icon\x1fsystem-shutdown 21 | Suspend\x00icon\x1fsystem-suspend 22 | Hibernate\x00icon\x1fsystem-suspend-hibernate" 23 | 24 | declare -A commands=( 25 | ["Lock Screen"]=lock_screen 26 | ["Log Out"]=logout_user 27 | ["Reboot"]=reboot_sys 28 | ["Shutdown"]=shutdown_sys 29 | ["Suspend"]=suspend_sys 30 | ["Hibernate"]=hibernate_sys 31 | ) 32 | 33 | confirm_action() { 34 | local choice 35 | 36 | choice=$(echo -e "Yes\nNo" |\ 37 | $ROFI -p "Are you sure?" -dmenu -i -a 0 -u 1 -selected-row 1) 38 | 39 | if [ "$choice" == "Yes" ]; then 40 | echo "$choice" 41 | fi 42 | } 43 | 44 | lock_screen() { loginctl lock-session "${XDG_SESSION_ID-}"; } 45 | logout_user() { loginctl terminate-session "${XDG_SESSION_ID-}"; } 46 | reboot_sys() { [ "$(confirm_action)" = "Yes" ] && loginctl reboot; } 47 | shutdown_sys() { [ "$(confirm_action)" = "Yes" ] && loginctl poweroff; } 48 | suspend_sys() { $($USE_LOCKER) && "$LOCKER"; loginctl suspend; } 49 | hibernate_sys() { $($USE_LOCKER) && "$LOCKER"; loginctl hibernate; } 50 | 51 | while choice=$(echo -en "$entries" | $ROFI $rofi_flags -dmenu -i -p "Session"); do 52 | ${commands[$choice]}; 53 | 54 | exit 0 55 | done 56 | 57 | exit 1 58 | -------------------------------------------------------------------------------- /scripts/rofi-sounds.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # rofi sound theme selection script 4 | 5 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 6 | 7 | ROFI="${ROFI:-rofi}" 8 | 9 | sounds_dir="$SCRIPT_PATH/sounds" 10 | current=$(readlink -f "$sounds_dir/current") 11 | current=$(basename "$current") 12 | 13 | theme=$(find "$sounds_dir" -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sed -e "s/$current/$current<\/b>/g" | $ROFI -dmenu -i -p "Sounds" -markup-rows) 14 | 15 | if [ -d "$sounds_dir/$theme" ] && [ -n "$theme" ]; then 16 | rm "$sounds_dir/current" 17 | ln -s "$sounds_dir/$theme" "$sounds_dir/current" 18 | fi 19 | -------------------------------------------------------------------------------- /scripts/rofi-system-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # script to pipe system info into a rofi menu 4 | # 5 | 6 | ROFI="${ROFI:-rofi}" 7 | SYSTEM_INFO="${SYSTEM_INFO:-inxi -c0 -v2}" # neofetch --stdout --color_blocks off 8 | 9 | info=$(eval $SYSTEM_INFO) 10 | 11 | $ROFI -e "$info" 12 | -------------------------------------------------------------------------------- /scripts/rofi-timer.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # https://gist.github.com/emmanuelrosa/1f913b267d03df9826c36202cf8b1c4e 4 | 5 | # USAGE: rofi -show timer -modi timer:/path/to/rofi-timer.sh 6 | 7 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 8 | 9 | # Sounds effects from soundbible.com 10 | TIMER_START_SOUND="${TIMER_START_SOUND:-$SCRIPT_PATH/sounds/timer_start.wav}" 11 | TIMER_STOP_SOUND="${TIMER_STOP_SOUND:-$SCRIPT_PATH/sounds/timer_end.wav}" 12 | TIMER_NOTIFICATION_TIMEOUT=${TIMER_NOTIFICATION_TIMEOUT:-5000} 13 | 14 | timer_help="To set a custom timer, type for example: 1h 23m 53s" 15 | timers="30 seconds\n45 seconds\n1 minute\n2 minutes\n3 minutes\n4 minutes\n5 minutes\n10 minutes\n15 minutes\n20 minutes\n30 minutes\n45 minutes\n1 hour" 16 | 17 | declare -A timer_seconds=( 18 | ["1 hour"]=3600 19 | ["45 minutes"]=2700 20 | ["30 minutes"]=1800 21 | ["20 minutes"]=1200 22 | ["15 minutes"]=900 23 | ["10 minutes"]=600 24 | ["5 minutes"]=300 25 | ["4 minutes"]=240 26 | ["3 minutes"]=180 27 | ["2 minutes"]=120 28 | ["1 minute"]=60 29 | ["45 seconds"]=45 30 | ["30 seconds"]=30 31 | ) 32 | 33 | start_timer() { 34 | notify-send -t $TIMER_NOTIFICATION_TIMEOUT "$1 timer started" && coproc ( paplay $TIMER_START_SOUND ) 35 | 36 | if command -v systemd-run &> /dev/null; then 37 | systemd-run --user --on-active=$2 --timer-property=AccuracySec=1000ms bash -c "coproc ( paplay $TIMER_STOP_SOUND ); notify-send -i 'clock' -u critical 'Time Out!';" 38 | elif command -v at &> /dev/null; then 39 | echo "sleep $2 ; coproc ( paplay $TIMER_STOP_SOUND ); notify-send -i 'clock' -u critical 'Time Out!'" | at now 40 | fi 41 | } 42 | 43 | custom_timer() { 44 | seconds=$(echo "$@" | grep -o '[^ ]*s[^ ]*') 45 | minutes=$(echo "$@" | grep -o '[^ ]*m[^ ]*') 46 | hours=$(echo "$@" | grep -o '[^ ]*h[^ ]*') 47 | 48 | seconds=${seconds/s/} 49 | minutes=${minutes/m/} 50 | hours=${hours/h/} 51 | 52 | total_time=0 53 | 54 | [[ ${#seconds} -gt 0 ]] && total_time=$(($total_time + $seconds)) 55 | [[ ${#minutes} -gt 0 ]] && total_time=$(($total_time + 60*$minutes)) 56 | [[ ${#hours} -gt 0 ]] && total_time=$(($total_time + 3600*$hours)) 57 | 58 | start_timer "$@" $total_time 59 | } 60 | 61 | if [ "$@" ] 62 | then 63 | if [[ -v timer_seconds["$@"] ]]; then 64 | start_timer "$@" ${timer_seconds["$@"]} 65 | exit 0 66 | else 67 | custom_timer "$@" 68 | fi 69 | else 70 | echo -en "\0message\x1f$timer_help\n" 71 | echo -e "$timers" 72 | fi 73 | 74 | exit 1 75 | -------------------------------------------------------------------------------- /scripts/rofi-tmux.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # 3 | # this script manages tmux sessions 4 | # 5 | # dependencies: rofi, tmux 6 | 7 | ROFI="${ROFI:-rofi}" 8 | TERMINAL="${TERMINAL:-xterm}" 9 | 10 | if ! command -v tmux &> /dev/null; then 11 | $ROFI -e "Install tmux to enable the tmux sessions menu" 12 | exit 1 13 | fi 14 | 15 | function tmux_sessions() { 16 | tmux list-session -F '#S' 17 | } 18 | 19 | TMUX_SESSION=$( (echo "New session"; tmux_sessions) | $ROFI -dmenu -i -p "Session") 20 | 21 | if [[ x"New session" = x"${TMUX_SESSION}" ]]; then 22 | $TERMINAL -e tmux new-session & 23 | exit 0 24 | elif [[ -z "${TMUX_SESSION}" ]]; then 25 | exit 1 26 | else 27 | $TERMINAL -e tmux attach -t "${TMUX_SESSION}" & 28 | exit 0 29 | fi 30 | -------------------------------------------------------------------------------- /scripts/rofi-tnt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # this script fetches and search torrents inside the tntvillage csv archive 4 | # selecting an entry will generate the magnet link and open it 5 | # 6 | # dependencies: rofi 7 | 8 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 12 | TORRENT_CLIENT=${TORRENT_CLIENT:-qbittorrent} 13 | 14 | tnt_file="$ROFI_DATA_DIR/tntvillage-release-dump.csv" 15 | tnt_url="https://raw.githubusercontent.com/edoardopigaiani/tntvillage-release-dump/master/tntvillage-release-dump.csv" 16 | 17 | # TODO: do this job in background and display message 18 | if [ ! -f "$tnt_file" ];then 19 | printf "Downloading torrent list...\n"; 20 | 21 | wget -q --show-progress $tnt_url -O "$tnt_file" ||\ 22 | print_error "Cannot download torrent list" 23 | fi 24 | 25 | selected=$(\ 26 | awk -F "\"*,\"*" 'NR>1 {print $6 $7" - " $2}' "$tnt_file" |\ 27 | $ROFI -dmenu -i -p "Torrent" | rev | cut -d " " -f 1 | rev |\ 28 | awk '{print "magnet:?xt=urn:btih:"$1"&dn=&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopentor.org%3A2710&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Ftracker.blackunicorn.xyz%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969"}'\ 29 | ) 30 | 31 | if [ -n "$selected" ]; then 32 | $TORRENT_CLIENT "$selected" 33 | exit 0 34 | fi 35 | 36 | exit 1 37 | -------------------------------------------------------------------------------- /scripts/rofi-todo-list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # this script manages a folder of todo lists using the modi in rofi-todo.sh 4 | # 5 | # dependencies: rofi 6 | 7 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 8 | 9 | ROFI="${ROFI:-rofi}" 10 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 11 | 12 | todo_dir="$ROFI_DATA_DIR/todo" 13 | 14 | mkdir -p "$todo_dir" 15 | 16 | get_todo_lists() { 17 | cd "$todo_dir" && find * -type f | xargs -I{} wc -l {} 18 | } 19 | 20 | while todo_file=$(echo -en "New ToDo List\n$(get_todo_lists)" |\ 21 | $ROFI -dmenu -i -p "ToDo List"); do 22 | 23 | if [[ "$todo_file" = "New ToDo List"* ]]; then 24 | todo_file=$((echo) | $ROFI -dmenu -p "List Name") 25 | else 26 | todo_file=$(echo "$todo_file" | cut -d' ' -f2-) # remove items count 27 | fi 28 | 29 | [ -z "$todo_file" ] && exit 1 30 | 31 | TODO_FILE="$todo_dir/$todo_file" \ 32 | $ROFI -modi "ToDo $todo_file:$SCRIPT_PATH/rofi-todo.sh" -show "ToDo $todo_file" 33 | done 34 | -------------------------------------------------------------------------------- /scripts/rofi-todo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # https://github.com/claudiodangelis/rofi-todo 4 | # 5 | # this script manages a simple to-do list stored locally 6 | # it allows adding and removing to-do entries 7 | # 8 | # dependencies: rofi 9 | 10 | TODO_FILE="${TODO_FILE:-$HOME/.todos}" 11 | 12 | todo_help="Type something with a \"+\" prefix and press Enter to add a new item" 13 | 14 | if [[ ! -a "${TODO_FILE}" ]]; then 15 | touch "${TODO_FILE}" 16 | fi 17 | 18 | function add_todo() { 19 | echo -e "`date +"%d %B %Y %H:%M"` $*" >> "${TODO_FILE}" 20 | } 21 | 22 | function remove_todo() { 23 | if [[ ! -z "$DONE_FILE" ]]; then 24 | echo "${*}" >> "${DONE_FILE}" 25 | fi 26 | # 27 | sed -i "s|^${*}$|${*}|g" "${TODO_FILE}" 28 | #sed -i '/^$/d' "${TODO_FILE}" 29 | 30 | # doesn't work 31 | #awk -i inplace '/^${*}$/ { $0 = "" $0 "" }; 1' "${TODO_FILE}" 32 | } 33 | 34 | function get_todos() { 35 | echo -en "\0markup-rows\x1ftrue\n" 36 | echo -en "\0message\x1f$todo_help\n" 37 | echo "$(cat "${TODO_FILE}" | sort)" 38 | } 39 | 40 | if [ -z "$@" ]; then 41 | get_todos 42 | else 43 | LINE=$(echo "${@}" | sed "s/\([^a-zA-Z0-9]\)/\\\\\\1/g") 44 | LINE_UNESCAPED=${@} 45 | if [[ $LINE_UNESCAPED == +* ]]; then 46 | LINE_UNESCAPED=$(echo $LINE_UNESCAPED | sed s/^+//g |sed s/^\s+//g ) 47 | add_todo ${LINE_UNESCAPED} 48 | elif [[ $LINE_UNESCAPED != ""* ]]; then 49 | MATCHING=$(grep "^${LINE_UNESCAPED}$" "${TODO_FILE}") 50 | if [[ -n "${MATCHING}" ]]; then 51 | remove_todo ${LINE_UNESCAPED} 52 | fi 53 | fi 54 | get_todos 55 | fi 56 | -------------------------------------------------------------------------------- /scripts/rofi-top.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | toLinesJson(){ 4 | echo "$1" | sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' -e 's/.*/"&"/' | paste -sd "," - 5 | } 6 | 7 | toStringJson(){ 8 | echo "$1" | sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' -e '$!s/.*/&\\n/' | paste -sd "" - 9 | } 10 | 11 | execTop(){ 12 | echo '{"prompt": "search"}'; 13 | top -c -b -d 1 | while IFS= read -r line; do 14 | TOP="$line" 15 | while true; do 16 | IFS= read -t 0.01 -r line; 17 | VAR=$? 18 | if ((VAR == 0)); then # read another line successfully 19 | TOP="$TOP"$'\n'"$line" 20 | elif (( VAR > 128 )); then # timeout happened 21 | break; 22 | else # any other reason 23 | exit 24 | fi 25 | done 26 | TOP="$(sed '/./,$!d' <<< "$TOP")" 27 | TOP_INFO="$(sed -n '1,/^\s*PID/p' <<< "$TOP")" 28 | TOP_PIDLIST="$(sed '1,/^\s*PID/d' <<< "$TOP")" 29 | JSON_LINES="$(toLinesJson "$TOP_PIDLIST")" 30 | JSON_MESSAGE="$(toStringJson "$TOP_INFO")" 31 | printf '{"message": "%s","lines":[%s]}\n' "$JSON_MESSAGE" "$JSON_LINES" 32 | done 33 | } 34 | 35 | execTop | rofi -kb-screenshot Control+Shift+space -modi blocks -show blocks "$@" 36 | -------------------------------------------------------------------------------- /scripts/rofi-translate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script translates text written in the prompt using translate-shell 4 | # 5 | # dependencies: rofi, translate-shell 6 | 7 | ROFI="${ROFI:-rofi}" 8 | 9 | # 10 | rofi_mesg="Type or paste the text to translate and press \"Enter\". Specify a language by prefixing the query with \":lang\" (default is english), for example \":fr Hello World\"" 11 | 12 | if ! command -v trans &> /dev/null; then 13 | $ROFI -e "Install translate-shell to enable the translation menu" 14 | exit 1 15 | fi 16 | 17 | while text=$((echo) | $ROFI -dmenu -i -p "Text to translate" -mesg "$rofi_mesg"); do 18 | lang="" 19 | 20 | if [[ $text == :* ]]; then 21 | lang=$(echo "$text" | cut -d' ' -f1) 22 | text=$(echo "$text" | cut -d' ' -f2-) 23 | fi 24 | 25 | translation=$(trans $lang "$text" -no-ansi -show-original n -show-translation n) && $ROFI -e "$translation" -markup 26 | done 27 | 28 | -------------------------------------------------------------------------------- /scripts/rofi-tv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script fetches and show a list of iptv stations 4 | # selecting an entry will open the tv stream with mpv 5 | # 6 | # dependencies: rofi, mpv 7 | 8 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 9 | 10 | ROFI="${ROFI:-rofi}" 11 | ROFI_DATA_DIR="${ROFI_DATA_DIR:-$SCRIPT_PATH/data}" 12 | ROFI_CACHE_DIR="${ROFI_CACHE_DIR:-$HOME/.cache}" 13 | ROFI_ICONS="${ROFI_ICONS:-}" 14 | TV_PLAYER="${TV_PLAYER:-mpv --no-resume-playback --force-window=immediate}" 15 | 16 | tv_file="$ROFI_DATA_DIR/channels.m3u" 17 | tv_cache="$ROFI_CACHE_DIR/rofi-tv" 18 | tv_preview=$SCRIPT_PATH'/download_tv_icon.sh "{input}" "{output}"' 19 | tv_url="https://iptv-org.github.io/iptv/index.m3u" 20 | 21 | rofi_flags="" 22 | 23 | ((ROFI_ICONS)) && rofi_flags="-show-icons" 24 | 25 | if [ ! -f "$tv_file" ]; then 26 | printf "Downloading channel list...\n"; 27 | 28 | wget -q --show-progress $tv_url -O "$tv_file" ||\ 29 | print_error "Cannot download channel list" 30 | fi 31 | 32 | row=$(cat "$tv_cache") 33 | 34 | # TODO: tvg-logo contains the url to the icon to show 35 | while channel=$(\ 36 | grep "#EXTINF" "$tv_file" | rev | cut -d"," -f1 | rev | awk '{print $0""$0}' |\ 37 | sed -e "s//\\x00icon\\x1fthumbnail:\/\//g" |\ 38 | $ROFI -dmenu -i $rofi_flags -preview-cmd "$tv_preview" -selected-row "${row}" -format 'i s' -p "Channel"); do 39 | 40 | channel_index=$(echo "$channel" | awk '{print $1;}') 41 | channel_name=$(echo "$channel" | cut -d' ' -f2-) 42 | channel_name=${channel_name//[/\\[} 43 | channel_name=${channel_name//]/\\]} 44 | 45 | channel_link=$(grep -A 1 "$channel_name" "$tv_file" | tail -1) 46 | 47 | echo "Playing " "$channel_link" 48 | echo "$channel_index" > "$tv_cache" 49 | 50 | $TV_PLAYER "$channel_link" 51 | 52 | exit 0 53 | done 54 | 55 | exit 1 56 | -------------------------------------------------------------------------------- /scripts/rofi-update-system.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ROFI="${ROFI:-rofi}" 4 | TERMINAL="${TERMINAL:-xterm}" 5 | 6 | distro=$(grep "^NAME=" /etc/os-release | sed 's/NAME=//') 7 | update_cmd="" 8 | update_flatpak="flatpak update" 9 | 10 | if [ $(echo $distro | grep -i "ubuntu") ]; then 11 | update_cmd="apt update && apt upgrade" 12 | echo $update_cmd 13 | elif [ $(echo $distro | grep -i "debian") ]; then 14 | update_cmd="apt update && apt upgrade" 15 | echo $update_cmd 16 | elif [ $(echo $distro | grep -i "arch") ]; then 17 | update_cmd="pacman -Syu" 18 | echo $update_cmd 19 | elif [ $(echo $distro | grep -i "gentoo") ]; then 20 | update_cmd="emerge -uDNav world" 21 | echo $update_cmd 22 | elif [ $(echo $distro | grep -i "fedora") ]; then 23 | update_cmd="dnf update" 24 | echo $update_cmd 25 | elif [ $(echo $distro | grep -i "slackware") ]; then 26 | update_cmd="slackpkg update && slackpkg install-new; slackpkg upgrade-all" 27 | echo "$update_cmd" 28 | else 29 | $ROFI -e "$distro is not supported by the update-system script" 30 | exit 1 31 | fi 32 | 33 | $TERMINAL -e "su -c '$update_cmd && $update_flatpak'; read -n1" 34 | -------------------------------------------------------------------------------- /scripts/rofi-virtualbox.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # https://github.com/okraits/rofi-tools/blob/master/rofi-virtualbox/rofi-virtualbox 4 | # 5 | # script to manage virtualbox machines with rofi 6 | # 7 | # dependencies: rofi, virtualbox 8 | 9 | ROFI="${ROFI:-rofi}" 10 | 11 | # function definitions 12 | ###################### 13 | 14 | function vmsList() 15 | { 16 | vboxmanage list vms | awk -F '"' '{print $2}' 17 | #vboxmanage list runningvms | awk -F '"' '{print "Running: "$2}' 18 | } 19 | 20 | function startVM() 21 | { 22 | vboxmanage startvm "$1" --type headless 23 | } 24 | 25 | function poweroffVM() 26 | { 27 | vboxmanage controlvm "$1" acpipowerbutton --type headless 28 | } 29 | 30 | function cloneVM() 31 | { 32 | vboxmanage clonevm "$1" --mode machine --register --options keepallmacs 33 | } 34 | 35 | function deleteVM() 36 | { 37 | vboxmanage unregistervm "$1" --delete 38 | } 39 | 40 | # script execution starts here 41 | ############################## 42 | options="Start VM\nPower-off VM\nClone VM\nDelete VM" 43 | 44 | while true 45 | do 46 | # select machine to control 47 | vm=$(vmsList | $ROFI -dmenu -i -p 'Select VM') 48 | retval=$? 49 | [ $retval -ne 0 ] && exit $retval 50 | # select action to be executed 51 | option=$(echo -e $options | $ROFI -dmenu -i -p 'Select action') 52 | retval=$? 53 | [ $retval -ne 0 ] && exit $retval 54 | case "$option" in 55 | "Start VM") 56 | startVM "$vm" 57 | ;; 58 | "Power-off VM") 59 | poweroffVM "$vm" 60 | ;; 61 | "Clone VM") 62 | cloneVM "$vm" 63 | ;; 64 | "Delete VM") 65 | deleteVM "$vm" 66 | ;; 67 | *) 68 | exit 1 69 | ;; 70 | esac 71 | done 72 | -------------------------------------------------------------------------------- /scripts/rofi-volume.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script manages audio volume using pulseaudio interface (pactl) 4 | # 5 | # dependencies: rofi, pactl 6 | # optional: pavucontrol 7 | 8 | ROFI="${ROFI:-rofi}" 9 | ROFI_ICONS="${ROFI_ICONS:-}" 10 | 11 | rofi_flags="" 12 | 13 | ((ROFI_ICONS)) && rofi_flags="$rofi_flags -show-icons" 14 | 15 | gen_menu() { 16 | is_muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{ print $NF }') 17 | 18 | echo -ne "Up\x00icon\x1faudio-volume-high\nDown\x00icon\x1faudio-volume-low" 19 | 20 | if [ "$is_muted" == "yes" ]; then 21 | echo -ne "\nUnmute\x00icon\x1faudio-volume-muted" 22 | else 23 | echo -ne "\nMute\x00icon\x1faudio-volume-muted" 24 | fi 25 | 26 | echo -ne "\nVolume Configuration\x00icon\x1fapplications-system" 27 | } 28 | 29 | declare -A commands=( 30 | ["Up"]=vol_up 31 | ["Down"]=vol_down 32 | ["Mute"]=vol_mute 33 | ["Unmute"]=vol_mute 34 | ["Volume Configuration"]=vol_config 35 | ) 36 | 37 | get_volume() { pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5 }'; } 38 | vol_up() { pactl set-sink-volume @DEFAULT_SINK@ +10%; } 39 | vol_down() { pactl set-sink-volume @DEFAULT_SINK@ -10%; } 40 | vol_mute() { pactl set-sink-mute @DEFAULT_SINK@ toggle; } 41 | 42 | vol_config() { 43 | if ! command -v pavucontrol &> /dev/null; then 44 | $ROFI -e "Install 'pavucontrol'" 45 | else 46 | pavucontrol 47 | fi 48 | } 49 | 50 | # remember last entry chosen 51 | row=0 52 | 53 | while action=$(gen_menu | $ROFI -dmenu -i $rofi_flags -format 'i s' -selected-row ${row} -p "Volume $(get_volume)"); do 54 | row=$(echo "$action" | awk '{print $1;}') 55 | action_text=$(echo "$action" | cut -d' ' -f2-) 56 | 57 | if [ -n "$action_text" ]; then 58 | ${commands[$action_text]}; 59 | fi 60 | done 61 | -------------------------------------------------------------------------------- /scripts/rofi-wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # this script manages the desktop wallpaper, allowing to choose from a thumbnail's 4 | # grid of images found in the wallpapers directory (default to "$HOME/Pictures") 5 | # 6 | # dependencies: rofi 7 | # optional: feh 8 | 9 | # TODO: implement list+preview view 10 | 11 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 12 | 13 | ROFI="${ROFI:-rofi}" 14 | ROFI_CONFIG_DIR="${ROFI_CONFIG_DIR:-$SCRIPT_PATH/config}" 15 | ROFI_GRID_ROWS=${ROFI_GRID_ROWS:-3} 16 | ROFI_GRID_COLS=${ROFI_GRID_COLS:-5} 17 | ROFI_GRID_ICON_SIZE=${ROFI_GRID_ICON_SIZE:-7} 18 | WALLPAPERS_GRID=${WALLPAPERS_GRID:-} 19 | WALLPAPERS_DIR="${WALLPAPERS_DIR:-$HOME/Pictures}" 20 | 21 | wallpaper="$1" 22 | wallpaper_cache="$ROFI_CONFIG_DIR/wallpaper" 23 | rofi_theme_grid="element{orientation:vertical;}element-text{horizontal-align:0.5;}element-icon{size:$ROFI_GRID_ICON_SIZE.0em;}listview{lines:$ROFI_GRID_ROWS;columns:$ROFI_GRID_COLS;}" 24 | 25 | rofi_flags="-show-icons" 26 | 27 | ((WALLPAPERS_GRID)) && rofi_flags="$rofi_flags -theme-str $rofi_theme_grid" 28 | 29 | set_wallpaper() { 30 | if [ "$XDG_CURRENT_DESKTOP" = "KDE" ]; then 31 | qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "var allDesktops = desktops();print (allDesktops);for (i=0;i /dev/null; then 48 | $ROFI -e "Install 'feh'" 49 | exit 1 50 | fi 51 | 52 | feh --bg-scale "$wallpaper" 53 | 54 | exit 0 55 | fi 56 | } 57 | 58 | if [ -z "$wallpaper" ]; then 59 | # find image size to display (very slow) 60 | #echo $(identify -format '%[fx:w]x%[fx:h]\' ~/Pictures/$A 2>/dev/null) 61 | 62 | # sort by time 63 | images=$(find "$WALLPAPERS_DIR" -type f -maxdepth 1 \ 64 | -printf "%T@ %f\x00icon\x1f$WALLPAPERS_DIR/%f\n" |\ 65 | sort -rn | cut -d' ' -f2-) 66 | 67 | choice=$(echo -en "Random Choice\x00icon\x1funknown\n$images" | \ 68 | $ROFI -dmenu -i $rofi_flags -p "Wallpaper") 69 | 70 | if [ -z "$choice" ]; then 71 | exit 1; 72 | fi 73 | 74 | if [ "$choice" = "Random Choice" ]; then 75 | choice=$(find "$WALLPAPERS_DIR" -type f -maxdepth 1 -printf "%f\n" | shuf -n1) 76 | 77 | if [ -z "$choice" ]; then 78 | exit 1; 79 | fi 80 | fi 81 | 82 | wallpaper="$WALLPAPERS_DIR/$choice" 83 | 84 | # store wallpaper in cache 85 | cp "$wallpaper" "$wallpaper_cache" 86 | 87 | set_wallpaper 88 | elif [ -f "$wallpaper" ]; then 89 | set_wallpaper 90 | fi 91 | -------------------------------------------------------------------------------- /scripts/rofi-weather.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # this script shows the weather forecast for a city using wttr.in curl interface 4 | # 5 | # dependencies: curl 6 | 7 | ROFI="${ROFI:-rofi}" 8 | FORECAST_DAYS="${FORECAST_DAYS:-2}" # 0 current weather, 1 today, 2 today & tomorrow, empty 3days 9 | 10 | weather_help="Type the name of a place and press Enter to show its weather forecast" 11 | 12 | weather=$(curl -s wttr.in/"$city"?ATFn$FORECAST_DAYS) 13 | 14 | while city=$($ROFI -dmenu -i -mesg "$weather_help $weather" -p "Place" -theme-str "listview{enabled:false;}"); do 15 | city=$(echo $city | tr " " "+") 16 | weather=$(curl -s wttr.in/"$city"?ATFn$FORECAST_DAYS) 17 | done 18 | -------------------------------------------------------------------------------- /scripts/rofi-web-search.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script allows searching from various web sources with real time suggestions 4 | # 5 | # dependencies: rofi 6 | # optional: rofi-blocks 7 | 8 | # TODO: implement other apis for suggestions 9 | 10 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 11 | 12 | ROFI="${ROFI:-rofi}" 13 | 14 | search_blocks_help="Type to search" 15 | 16 | api=$1 17 | 18 | case "$api" in 19 | "google") api_url="https://www.google.com/search?q=" ;; 20 | "youtube") api_url="https://www.youtube.com/results?search_query=" ;; 21 | "wikipedia") api_url="https://en.wikipedia.org/?curid=" ;; 22 | "archwiki") api_url="https://wiki.archlinux.org/index.php?search=" ;; 23 | "maps") api_url="https://nominatim.openstreetmap.org/search?q=" ;; 24 | *) echo "unrecognized api" && exit 1 ;; 25 | esac 26 | 27 | # detect rofi-blocks and integrate suggestions 28 | have_blocks=$(rofi -dump-config | grep blocks) 29 | 30 | if [ -n "$have_blocks" ]; then 31 | logfile="$HOME/.cache/suggestions.tmp" 32 | blockfile="$SCRIPT_PATH/rofi-web-suggestions.sh" 33 | 34 | mkdir -p "${logfile%suggestions.tmp}" 35 | echo "$api" > "$logfile" 36 | 37 | $ROFI -modi blocks -show blocks -blocks-wrap "$blockfile" -display-blocks "$api" 2>/dev/null 38 | 39 | [ -f "$logfile" ] && query="$(cat "$logfile")" || exit 1 40 | 41 | rm "$logfile" 42 | 43 | if [ -n "$query" ]; then 44 | # extract wikipedia page id from string 45 | if [ "$api" = "wikipedia" ]; then 46 | word_count=$(echo "$query" | wc -w) 47 | 48 | if [ "$word_count" -gt 1 ]; then 49 | query=$(echo "$query" | awk '{print $NF}') 50 | else 51 | api_url="https://en.wikipedia.org/w/index.php?fulltext=1&search=" 52 | fi 53 | fi 54 | 55 | url=$api_url$query 56 | xdg-open "$url" 57 | 58 | exit 0 59 | fi 60 | else 61 | query=$((echo) | $ROFI -dmenu -i -p "$api"); 62 | 63 | if [ -n "$query" ]; then 64 | url=$api_url$query 65 | xdg-open "$url" 66 | 67 | exit 0 68 | fi 69 | fi 70 | 71 | exit 1 72 | -------------------------------------------------------------------------------- /scripts/rofi-web-suggestions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit ; pwd -P )" 4 | 5 | refreshrate=2 # refresh suggestions every n characters hit 6 | 7 | logfile="$HOME/.cache/suggestions.tmp" 8 | 9 | [ ! -f "$logfile" ] && echo "run the wrapper script instead" && exit 1 10 | 11 | api=$(cat "$logfile") 12 | rm "$logfile" 13 | 14 | get_suggestions="$SCRIPT_PATH/suggestions/$api" 15 | allowExcess=true 16 | 17 | suggestions="" 18 | default_custom_format="{{name_enum}}:{{value}}" 19 | custom_format="${format:-$default_custom_format}" 20 | 21 | convertJson(){ 22 | echo "$1" | sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' -e 's/.*/"&"/' | paste -sd "," - 23 | } 24 | 25 | removeIllegal(){ 26 | ##### https://github.com/fogine/rofi-blocks/commit/9f45da637baf0f0d342c2e2957535564aa622164 27 | ##### if you care about special characters, the patch above 28 | ##### fixes the issue in which they break rofi 29 | ##### once installed you can omit this function 30 | echo "$1" | tr -dc '[:alnum:][:space:]-\n\r' 31 | } 32 | 33 | fill_menu(){ 34 | 35 | JSON_LINES="$(convertJson "$suggestions")" 36 | 37 | TEXT=$(cat <"$logfile" 75 | 76 | exit 0 77 | -------------------------------------------------------------------------------- /scripts/rofi-window.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script shows the rofi window modi to switch active window using an optional thumbnails grid 4 | # 5 | # dependencies: rofi 6 | 7 | ROFI="${ROFI:-rofi}" 8 | ROFI_ICONS="${ROFI_ICONS:-}" 9 | WINDOWS_THUMBNAILS="${WINDOWS_THUMBNAILS:-}" 10 | WINDOWS_GRID="${WINDOWS_GRID:-}" 11 | WINDOWS_GRID_ROWS=${WINDOWS_GRID_ROWS:-${ROFI_GRID_ROWS:-2}} 12 | WINDOWS_GRID_COLS=${WINDOWS_GRID_COLS:-${ROFI_GRID_COLS:-4}} 13 | WINDOWS_GRID_ICON_SIZE=${WINDOWS_GRID_ICON_SIZE:-${ROFI_GRID_ICON_SIZE:-10}} 14 | 15 | rofi_theme_grid="element{orientation:vertical;}element-text{horizontal-align:0.5;}element-icon{size:$WINDOWS_GRID_ICON_SIZE.0em;}listview{lines:$WINDOWS_GRID_ROWS;columns:$WINDOWS_GRID_COLS;}" 16 | rofi_flags="" 17 | 18 | ((ROFI_ICONS)) && rofi_flags="$rofi_flags -show-icons" 19 | ((ROFI_ICONS)) && ((WINDOWS_THUMBNAILS)) && rofi_flags="$rofi_flags -window-thumbnail" 20 | ((ROFI_ICONS)) && ((WINDOWS_GRID)) && rofi_flags="$rofi_flags -theme-str $rofi_theme_grid" 21 | 22 | $ROFI -show window $rofi_flags -display-window "Window" 23 | -------------------------------------------------------------------------------- /scripts/rofi-wireguard.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # https://github.com/HarHarLinks/wireguard-rofi-waybar 4 | # 5 | # rofi menu script to manage NetworkManager WireGuard connections 6 | # install to the same directory as wireguard.sh 7 | # example usage with rofi: rofi -modi 'WireGuard:~/.config/rofi/rofi-wireguard.sh' -show WireGuard 8 | # 9 | # dependencies: rofi, wireguard 10 | 11 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit; pwd -P )" 12 | 13 | if [[ $# != 0 ]] 14 | then 15 | if [[ "$@" == "Quit" ]] 16 | then 17 | exit 0 18 | elif [[ "$1" != "Reload" ]] 19 | then 20 | connection=$(echo $1 | cut -d: -f1) 21 | message="$($SCRIPT_PATH/wireguard.sh toggle $connection)" 22 | if command -v notify-send >/dev/null 2>&1; then 23 | notify-send "wireguard" "$message" 24 | fi 25 | exit 0 26 | fi 27 | fi 28 | 29 | active=-1 30 | urgent=-1 31 | 32 | while read -r state connection IP 33 | do 34 | if [[ "$state" == "connected:" ]] 35 | then 36 | active=$(($active+1)) 37 | elif [[ "$state" == "available:" ]] 38 | then 39 | urgent=$(($urgent+1)) 40 | fi 41 | if [[ "$IP" != "" ]] 42 | then 43 | connection="$connection [$IP]" 44 | fi 45 | echo -en "$connection\0icon\x1fwireguard\n" 46 | done < <($SCRIPT_PATH/wireguard.sh menu) 47 | 48 | if [[ $active -ge 0 ]] 49 | then 50 | echo -en "\0active\x1f0-$active\n" 51 | fi 52 | if [[ $urgent -ge 0 ]] 53 | then 54 | echo -en "\0urgent\x1f$(($active+1))-$(($active+1+$urgent))\n" 55 | fi 56 | 57 | echo "Reload" 58 | echo "Quit" 59 | -------------------------------------------------------------------------------- /scripts/scrape_bitsearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import requests 4 | from lxml import html 5 | import sys 6 | 7 | if (len(sys.argv) > 1): 8 | query = sys.argv[1] 9 | 10 | if (len(sys.argv) > 2): 11 | page = sys.argv[2] 12 | else: 13 | page = 1 14 | else: 15 | sys.exit() 16 | 17 | url = "https://bitsearch.to/search?q=" + query.replace(" ","+") + "&page=" + str(page) 18 | r = requests.get(url) 19 | tree = html.fromstring(r.content) 20 | 21 | titles = tree.xpath('//h5[@class="title w-100 truncate"]') 22 | stats = tree.xpath('//div[@class="stats"]') 23 | magnets = tree.xpath('//a[@class="dl-magnet"]') 24 | 25 | if (len(titles) == 0): 26 | sys.exit() 27 | 28 | for i in range(0, len(titles)): 29 | entry_num = 20*(int(page) - 1) + i + 1 30 | entry_title = titles[i].text_content().replace("\n","").replace("⭐","").replace("✅","").strip() 31 | entry_stats = stats[i].text_content().replace("\n"," ") 32 | entry_size = stats[i].getchildren()[1].text_content().replace("\n","") 33 | entry_seeders = stats[i].getchildren()[2].text_content().replace("\n","").replace(" ","") 34 | entry_leechers = stats[i].getchildren()[3].text_content().replace("\n","").replace(" ","") 35 | entry_magnet = magnets[i].attrib['href'] 36 | 37 | entry_line = "{} {} - [{}] [S:{}, L:{}] {}".format( 38 | entry_magnet, entry_num, entry_size, entry_seeders, entry_leechers, entry_title) 39 | 40 | print(entry_line) 41 | 42 | 43 | -------------------------------------------------------------------------------- /scripts/scrape_books.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import requests 4 | from lxml import html 5 | import sys 6 | 7 | if (len(sys.argv) > 1): 8 | query = sys.argv[1] 9 | 10 | if (len(sys.argv) > 2): 11 | page = int(sys.argv[2]) 12 | else: 13 | page = 1 14 | else: 15 | sys.exit() 16 | 17 | base_url = "https://annas-archive.li" 18 | 19 | if (page > 1): 20 | url = base_url + "/search?q=" + query.replace(" ","+") + "&page=" + str(page) 21 | else: 22 | url = base_url + "/search?q=" + query.replace(" ","+") 23 | 24 | r = requests.get(url) 25 | tree = html.fromstring(r.content) 26 | 27 | books = tree.xpath('//div[@class="h-[110px] flex flex-col justify-center "]/a') 28 | books_hidden = tree.xpath('//div[@class="h-[110px] flex flex-col justify-center js-scroll-hidden"]') 29 | 30 | for b in books_hidden: 31 | b = ((html.tostring(b, encoding=str)).replace("","")) 32 | books.append(html.fromstring(b).getchildren()[0]) 33 | 34 | for b in books: 35 | book_url = base_url + b.attrib['href'] 36 | book_thumb = b.getchildren()[0].getchildren()[0].getchildren()[1].attrib['src'] 37 | book_info = b.getchildren()[1] 38 | 39 | full_title = book_info.getchildren()[0].text 40 | title = book_info.getchildren()[1].text 41 | publisher = book_info.getchildren()[2].text 42 | author = book_info.getchildren()[3].text 43 | 44 | # more book info (lang, size, type, source) 45 | book_info_parts = full_title.split(", ") 46 | 47 | if (" [" in book_info_parts[0]): 48 | lang = book_info_parts[0].split(" ")[1] 49 | file_type = book_info_parts[1] 50 | file_size = book_info_parts[3] 51 | else: 52 | lang = "xx" 53 | file_type = book_info_parts[0] 54 | file_size = book_info_parts[2] 55 | 56 | if (title is None): 57 | title = book_info_parts[-1] 58 | 59 | if (author is None): 60 | author = publisher 61 | 62 | line = "{} {} {} {} {} || {}\\x00icon\\x1fthumbnail://{}".format( 63 | book_url,lang,file_type,file_size,author,title,book_thumb) 64 | 65 | print(line) 66 | 67 | 68 | -------------------------------------------------------------------------------- /scripts/scrape_livetv.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import requests 3 | from lxml import html 4 | import json 5 | import os 6 | import sys 7 | 8 | base_url = "http://www.livetv782.me/" 9 | url = "http://www.livetv782.me/enx/allupcoming" 10 | 11 | if (len(sys.argv) > 1): 12 | filename = sys.argv[1] 13 | else: 14 | print("no file name provided") 15 | filename = os.path.expanduser('~') + "/.cache/livetv.json" 16 | 17 | r = requests.get(url) 18 | 19 | # get filtered source code 20 | tree = html.fromstring(r.content) 21 | 22 | event_names = tree.xpath('//td[@align="left"]/a[@class="live"]') 23 | event_details = tree.xpath('//td[@align="left"]/span[@class="evdesc"]') 24 | events = list(zip(event_names, event_details)) 25 | events_list = [] 26 | 27 | # print texts in first element in list 28 | for ele in events: 29 | #print (ele[0].text, " - ", ele[1].text, " (", url+ele[0].get("href"), ")") 30 | name = ele[0].text.strip() 31 | desc = str(ele[1].text_content()) 32 | time = desc.split("\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t")[0] 33 | category = desc.split("\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t")[1] 34 | link = base_url+ele[0].get("href") 35 | events_list.append({"time":time, "category":category, "name":name, "link":link}) 36 | 37 | events_list = sorted(events_list, key=lambda k: (k['time'], k['category'])) 38 | 39 | with open(filename, 'w') as f: 40 | json.dump(events_list, f) 41 | -------------------------------------------------------------------------------- /scripts/scrape_subreddits.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import requests 3 | from bs4 import BeautifulSoup 4 | 5 | sublist = set() 6 | 7 | for i in range(1,35): 8 | url=f"http://redditlist.com/?page={i}" 9 | 10 | print("scraping", url) 11 | 12 | r = requests.get(url) 13 | soup = BeautifulSoup(r.text, 'html.parser') 14 | entries=soup.findAll('div', {'class' : 'listing-item'}) 15 | 16 | for entry in entries: 17 | sub=entry.get('data-target-subreddit') 18 | if sub not in sublist: 19 | sublist.add(sub) 20 | 21 | with open('subreddits', 'w') as f: 22 | for sub in sublist: 23 | f.write(f"{sub}\n") 24 | -------------------------------------------------------------------------------- /scripts/scrape_vcf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import json 5 | 6 | if (len(sys.argv) > 2): 7 | filename = sys.argv[1] 8 | output = sys.argv[2] 9 | else: 10 | sys.exit("provide a vcf file and an output path as arguments") 11 | 12 | all_contacts = [] 13 | contact = {"name":"", "num":[], "mail":[]} 14 | 15 | with open(filename, 'r') as f: 16 | for line in f: 17 | if line.startswith("BEGIN:"): 18 | contact = {"name":"", "num":[], "mail":[]} 19 | elif line.startswith("END:"): 20 | if len(contact["name"]) > 0: 21 | all_contacts.append(contact) 22 | elif line.startswith("FN:"): 23 | contact["name"] = line.split(":")[1].replace("\n","") 24 | elif line.startswith("TEL;"): 25 | num = line.split(":")[1].replace("\n","") 26 | if num not in contact["num"]: 27 | contact["num"].append(num) 28 | elif line.startswith("EMAIL;"): 29 | mail = line.split(":")[1].replace("\n","") 30 | if mail not in contact["mail"]: 31 | contact["mail"].append(mail) 32 | 33 | if len(all_contacts) > 0: 34 | with open(output, 'w') as f: 35 | f.write(json.dumps(all_contacts, indent=4)) 36 | -------------------------------------------------------------------------------- /scripts/scrape_wikipedia.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import requests 4 | from lxml import html 5 | import sys 6 | 7 | all_entries = [] 8 | count = 1 9 | 10 | def scrape_page(page_url): 11 | global count 12 | print(count, "scraping", page_url) 13 | count = count + 1 14 | 15 | r = requests.get(page_url) 16 | tree = html.fromstring(r.content) 17 | 18 | entries = tree.xpath('//a[@class="mw-redirect"]') 19 | nextbtm = tree.xpath('//a[@title="Special:AllPages"]') 20 | 21 | #global all_entries 22 | #all_entries += [{"title":entry.text, "link":entry.get("href")} for entry in entries] 23 | 24 | with open("data/wikipedia.txt", "a") as myfile: 25 | for entry in entries: 26 | myfile.write(entry.text + " " + entry.get("href") + "\n") 27 | 28 | 29 | if (len(nextbtm) > 0): 30 | if (len(nextbtm) > 2): 31 | return nextbtm[1].get("href") 32 | else: 33 | return nextbtm[0].get("href") 34 | else: 35 | return None 36 | 37 | url = "https://en.wikipedia.org/wiki/Special:AllPages" 38 | next_url = scrape_page(url) 39 | 40 | while (next_url): 41 | url = "https://en.wikipedia.org"+next_url 42 | next_url = scrape_page(url) 43 | 44 | -------------------------------------------------------------------------------- /scripts/scrape_xkcd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import requests 3 | from lxml import html 4 | import os 5 | import sys 6 | 7 | if (len(sys.argv) > 1): 8 | filename = sys.argv[1] 9 | else: 10 | print("no file name provided, fallback to ~/.cache/xkcd") 11 | filename = os.path.expanduser('~') + "/.cache/xkcd" 12 | 13 | url = "https://xkcd.com/archive/" 14 | 15 | r = requests.get(url) 16 | 17 | tree = html.fromstring(r.content) 18 | 19 | comics = tree.xpath('//div[@id="middleContainer"]/a') 20 | 21 | with open(filename, 'w') as f: 22 | f.write("Random\n") 23 | 24 | for ele in comics: 25 | name = ele.text 26 | href = ele.attrib['href'].replace("/","") 27 | f.write("{} {}\n".format(href, name)) 28 | 29 | 30 | -------------------------------------------------------------------------------- /scripts/sounds/Carmageddon/accept.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Carmageddon/accept.wav -------------------------------------------------------------------------------- /scripts/sounds/Carmageddon/cancel.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Carmageddon/cancel.wav -------------------------------------------------------------------------------- /scripts/sounds/Carmageddon/error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Carmageddon/error.wav -------------------------------------------------------------------------------- /scripts/sounds/Carmageddon/select2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Carmageddon/select2.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/accept.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/accept.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/accept3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/accept3.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/accept4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/accept4.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/camera.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/camera.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/cancel.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/cancel.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/error.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/select.wav -------------------------------------------------------------------------------- /scripts/sounds/Metal Gear Solid/select2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Metal Gear Solid/select2.wav -------------------------------------------------------------------------------- /scripts/sounds/Resident Evil/accept.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Resident Evil/accept.wav -------------------------------------------------------------------------------- /scripts/sounds/Resident Evil/cancel.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Resident Evil/cancel.wav -------------------------------------------------------------------------------- /scripts/sounds/Resident Evil/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Resident Evil/select.wav -------------------------------------------------------------------------------- /scripts/sounds/Tekken/accept.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Tekken/accept.wav -------------------------------------------------------------------------------- /scripts/sounds/Tekken/cancel.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Tekken/cancel.wav -------------------------------------------------------------------------------- /scripts/sounds/Tekken/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Tekken/select.wav -------------------------------------------------------------------------------- /scripts/sounds/Xbox360/accept.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Xbox360/accept.wav -------------------------------------------------------------------------------- /scripts/sounds/Xbox360/camera.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Xbox360/camera.wav -------------------------------------------------------------------------------- /scripts/sounds/Xbox360/cancel.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Xbox360/cancel.wav -------------------------------------------------------------------------------- /scripts/sounds/Xbox360/error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Xbox360/error.wav -------------------------------------------------------------------------------- /scripts/sounds/Xbox360/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/Xbox360/select.wav -------------------------------------------------------------------------------- /scripts/sounds/current: -------------------------------------------------------------------------------- 1 | /home/mat/Programs/rofi-desktop/scripts/sounds/Metal Gear Solid -------------------------------------------------------------------------------- /scripts/sounds/timer_end.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/timer_end.wav -------------------------------------------------------------------------------- /scripts/sounds/timer_start.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giomatfois62/rofi-desktop/ea6c89eee748e31007b03b5118631b578ddefccb/scripts/sounds/timer_start.wav -------------------------------------------------------------------------------- /scripts/suggestions/amazon: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/BelkaDev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | #settings 10 | # - 11 | ####### 12 | 13 | url="https://completion.amazon.com/search/complete?search-alias=aps&mkt=1&q=$(urlencode "$*")" 14 | res=$(jq -r '.[1][]' <<< "$(curl -s "$url" &)" | tr -d '"' ) 15 | echo "$res" -------------------------------------------------------------------------------- /scripts/suggestions/archwiki: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/BelkaDev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | #settings 10 | limit=10 11 | ####### 12 | 13 | url="https://wiki.archlinux.org/api.php?action=opensearch&format=json&formatversion=2&search=$(urlencode "$*")&namespace=0%7C3000&limit=$limit&suggest=true" 14 | res=$(jq -r '.[1][]' <<< "$(curl -s "$url" &)" | tr -d '"' ) 15 | echo "$res" -------------------------------------------------------------------------------- /scripts/suggestions/baidu: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/BelkaDev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | url="http://www.baidu.com/sugrec?pre=1&p=3&ie=utf-8&json=1&prod=pc&from=pc_web&sugsid=31726,1468,31672,21112,31111,31591,31605,31464,30823&wd=$(urlencode "$*")&csor=4&pwd=isn" 10 | res=$( jq '.g[]["q"]' <<< "$(curl -s "$url" &)" | tr -d '"') 11 | echo "$res" 12 | -------------------------------------------------------------------------------- /scripts/suggestions/ddg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/BelkaDev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | #settings 10 | lang="us-en" 11 | ####### 12 | 13 | url="https://ac.duckduckgo.com/ac/?q=$(urlencode "$*")&type=list&kl=$lang" 14 | res=$(jq -r '.[1][]' <<< "$(curl -s "$url" &)" | tr -d '"' | sed 's/\(.*\),/\1 /') 15 | echo "$res" -------------------------------------------------------------------------------- /scripts/suggestions/deezer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/Belkadev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | # settings 10 | search=track # options {track,album} 11 | ####### 12 | 13 | # read the deezer documentation for more options 14 | # doc url: https://developers.deezer.com/api 15 | 16 | url="https://api.deezer.com/search/$search?q=$(urlencode "$*")" 17 | res=$(jq '.data[] | "\(.artist.name) - \(.title)"' <<< "$(curl -s "$url" &)" | tr -d '"') 18 | echo "$res" 19 | -------------------------------------------------------------------------------- /scripts/suggestions/google: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | urlencode() { 4 | echo ${1// /"%20"} 5 | } 6 | 7 | url="http://suggestqueries.google.com/complete/search?client=chrome&q=$(urlencode "$*")" 8 | res=$(jq -r '.[1] | .[]' <<< "$(curl -s "$url" &)" | tr -d '"') 9 | 10 | echo "$res" 11 | -------------------------------------------------------------------------------- /scripts/suggestions/googlebooks: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/Belkadev 4 | 5 | # settings 6 | language="en" 7 | maxResults=10 8 | orderBy="relevance" # {relevance,newest} 9 | 10 | # doc url https://developers.google.com/books/docs/v1/using 11 | urlencode() { 12 | echo ${1// /"%20"} 13 | } 14 | 15 | 16 | url="https://www.googleapis.com/books/v1/volumes\?q=intitle:$(urlencode "$*")&langRestrict=$lang&gl=$lang&maxResults=$maxResults&orderBy=$orderBy" 17 | res=$( jq '.items[] | " \(.volumeInfo.authors[0]) \(.volumeInfo.title) "' <<< "$(curl -s "$url" &)" | tr -d '"') 18 | echo "$res" 19 | 20 | -------------------------------------------------------------------------------- /scripts/suggestions/maps: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | urlencode() { 4 | echo ${@// /"%20"} 5 | } 6 | 7 | url="https://nominatim.openstreetmap.org/search?q=$(urlencode "$*")&format=json&limit=5" 8 | curl "$url" | jq ".[].display_name" 9 | -------------------------------------------------------------------------------- /scripts/suggestions/wikipedia: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/BelkaDev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | #settings 10 | lang="en" 11 | limit=6 12 | ####### 13 | 14 | url="https://$lang.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&prop=pageprops|pageimages|description&redirects=&ppprop=displaytitle&piprop=thumbnail&pithumbsize=80&pilimit=6&gpssearch=$(urlencode "$*")&gpsnamespace=0&gpslimit=$limit" 15 | res=$(jq -r '.query["pages"][] | "\(.title) - \(.description) \(.pageid)"' <<< "$(curl -s "$url" &)" | tr -d '"') 16 | echo "$res" 17 | -------------------------------------------------------------------------------- /scripts/suggestions/youtube: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # requires jq 3 | # Author: https://github.com/BelkaDev 4 | 5 | urlencode() { 6 | echo ${1// /"%20"} 7 | } 8 | 9 | #settings 10 | lang="en" 11 | ####### 12 | 13 | url="http://suggestqueries.google.com/complete/search?client=chrome&ds=yt&q=$(urlencode "$*")" 14 | res=$(jq -r '.[1] | .[]' <<< "$(curl -s "$url" &)" | tr -d '"') 15 | echo "$res" 16 | -------------------------------------------------------------------------------- /scripts/thumbnail-pdf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | convert -thumbnail $3 "$1"[0] $2 4 | -------------------------------------------------------------------------------- /scripts/thumbnail-txt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | magick -font Dejavu-Sans-Mono -size $3x text:$1[0] $2 4 | -------------------------------------------------------------------------------- /themes/README.md: -------------------------------------------------------------------------------- 1 | #### fancy 2 | ![fancy](https://53280.de/rofi/fancy.png) 3 | 4 | #### flat-orange 5 | ![flat_orange](https://53280.de/rofi/flat_orange.png) 6 | 7 | #### oxide 8 | ![oxide](https://53280.de/rofi/oxide.png) 9 | 10 | #### solarized-darker 11 | ![solarized_darker](https://53280.de/rofi/solarized_darker.png) 12 | 13 | #### sidetab 14 | ![sidetab](https://53280.de/rofi/sidetab.png) 15 | 16 | #### material 17 | ![material](https://53280.de/rofi/material.png) 18 | 19 | #### arc-red-dark 20 | ![arc-red-dark](https://53280.de/rofi/arc-red.png) 21 | 22 | #### onedark 23 | ![onedark](https://53280.de/rofi/onedark.png) 24 | 25 | #### ribbon 26 | ![ribbon](https://53280.de/rofi/ribbon.png) 27 | 28 | #### rezlooks 29 | ![rezlooks](https://53280.de/rofi/rezlooks.png) 30 | 31 | #### slate 32 | ![slate](https://53280.de/rofi/slate.png) 33 | 34 | #### flamingo 35 | ![flamingo](https://53280.de/rofi/flamingo.png) 36 | 37 | #### cloud 38 | ![cloud](https://53280.de/rofi/cloud.png) 39 | 40 | #### merah 41 | ![merah](https://raw.githubusercontent.com/ipang-dwi/merah/master/img2.jpg) 42 | -------------------------------------------------------------------------------- /themes/flamingo.rasi: -------------------------------------------------------------------------------- 1 | /** 2 | * User: keystroke3 3 | * Copyright: keystroke3 4 | * 5 | */ 6 | 7 | configuration { 8 | display-drun: ""; 9 | display-run: ""; 10 | display-window: ""; 11 | display-ssh: "~#"; 12 | show-icons: true; 13 | sidebar-mode: false; 14 | font: "Source Code Pro 15"; 15 | } 16 | 17 | * { 18 | text-color: @foreground; 19 | active-background: rgb(170, 70, 104); 20 | active-foreground: @foreground; 21 | normal-background: @background; 22 | normal-foreground: @foreground; 23 | urgent-background: #9E2A5E; 24 | urgent-foreground: @foreground; 25 | alternate-active-background: @background; 26 | alternate-active-foreground: @foreground; 27 | alternate-normal-background: @background; 28 | alternate-normal-foreground: @foreground; 29 | alternate-urgent-background: @background; 30 | alternate-urgent-foreground: @foreground; 31 | selected-active-background: #9E2A5E; 32 | selected-active-foreground: @foreground; 33 | selected-normal-background: rgb(170, 70, 104); 34 | selected-normal-foreground: #0c0816; 35 | selected-urgent-background: #9D596B; 36 | selected-urgent-foreground: @foreground; 37 | background-color: #0c0816; 38 | background: #D03C6E30; 39 | foreground: #8fc5c6; 40 | spacing: 0; 41 | } 42 | 43 | window { 44 | location: west; 45 | anchor: west; 46 | height: 70%; 47 | width: 25%; 48 | orientation: vertical; 49 | children: [mainbox]; 50 | border: 2px 2px 2px 0px; 51 | border-color: @active-background; 52 | hide-scrollbar: true; 53 | } 54 | 55 | mainbox { 56 | spacing: 0.2em; 57 | children: [inputbar, listview]; 58 | } 59 | 60 | 61 | 62 | listview { 63 | spacing: 0.6em; 64 | dynamic: false; 65 | cycle: true; 66 | padding: 0px 5px 0px 5px; 67 | } 68 | 69 | inputbar { 70 | border-radius: 50%; 71 | padding: 5px; 72 | border-spacing: 5px 0 0 0; 73 | border: 1px; 74 | spacing: 10px; 75 | margin: 5px 0 10px; 76 | border-color: @foreground; 77 | 78 | } 79 | 80 | entry{ 81 | padding: 2px; 82 | } 83 | 84 | 85 | prompt{ 86 | padding: 5px; 87 | background-color: @foreground; 88 | text-color: @background-color; 89 | border: 1px; 90 | border-radius: 50%; 91 | 92 | } 93 | 94 | 95 | element { 96 | padding: 10px; 97 | border-radius: 50%; 98 | } 99 | 100 | element normal.normal { 101 | background-color: @normal-background; 102 | text-color: @normal-foreground; 103 | } 104 | 105 | element normal.urgent { 106 | background-color: @urgent-background; 107 | text-color: @urgent-foreground; 108 | } 109 | 110 | element normal.active { 111 | background-color: @active-background; 112 | text-color: @active-foreground; 113 | } 114 | 115 | element selected.normal { 116 | background-color: @selected-normal-background; 117 | text-color: @selected-normal-foreground; 118 | border-color: @active-background; 119 | } 120 | 121 | element selected.urgent { 122 | background-color: @selected-urgent-background; 123 | text-color: @selected-urgent-foreground; 124 | } 125 | 126 | element selected.active { 127 | background-color: @selected-active-background; 128 | text-color: @selected-active-foreground; 129 | } 130 | 131 | element alternate.normal { 132 | background-color: @normal-background; 133 | text-color: @normal-foreground; 134 | } 135 | 136 | element alternate.urgent { 137 | background-color: @urgent-background; 138 | text-color: @urgent-foreground; 139 | } 140 | 141 | element alternate.active { 142 | background-color: @active-background; 143 | text-color: @active-foreground; 144 | } 145 | -------------------------------------------------------------------------------- /themes/flat-orange.rasi: -------------------------------------------------------------------------------- 1 | /** 2 | * ROFI Color theme 3 | * User: mbfraga 4 | * Copyright: Martin B. Fraga 5 | */ 6 | 7 | /* global settings and color variables */ 8 | * { 9 | maincolor: #ed8712; 10 | highlight: bold #ed8712; 11 | urgentcolor: #e53714; 12 | 13 | fgwhite: #cfcfcf; 14 | blackdarkest: #1d1d1d; 15 | blackwidget: #262626; 16 | blackentry: #292929; 17 | blackselect: #303030; 18 | darkgray: #848484; 19 | scrollbarcolor: #505050; 20 | font: "DejaVu Sans Mono Regular 14"; 21 | background-color: @blackdarkest; 22 | } 23 | 24 | window { 25 | background-color: @blackdarkest; 26 | anchor: north; 27 | location: north; 28 | y-offset: 20%; 29 | } 30 | 31 | mainbox { 32 | background-color: @blackdarkest; 33 | spacing:0px; 34 | children: [inputbar, message, mode-switcher, listview]; 35 | } 36 | 37 | message { 38 | padding: 6px 10px; 39 | background-color:@blackwidget; 40 | } 41 | 42 | textbox { 43 | text-color:@darkgray; 44 | background-color:@blackwidget; 45 | } 46 | 47 | listview { 48 | fixed-height: false; 49 | dynamic: true; 50 | scrollbar: true; 51 | spacing: 0px; 52 | padding: 1px 0px 0px 0px; 53 | margin: 0px 0px 1px 0px; 54 | background: @blackdarkest; 55 | } 56 | 57 | element { 58 | padding: 2px 15px; 59 | } 60 | 61 | element normal.normal { 62 | padding: 0px 15px; 63 | background-color: @blackentry; 64 | text-color: @fgwhite; 65 | } 66 | 67 | element normal.urgent { 68 | background-color: @blackentry; 69 | text-color: @urgentcolor; 70 | } 71 | 72 | element normal.active { 73 | background-color: @blackentry; 74 | text-color: @maincolor; 75 | } 76 | 77 | element selected.normal { 78 | background-color: @blackselect; 79 | text-color: @fgwhite; 80 | } 81 | 82 | element selected.urgent { 83 | background-color: @urgentcolor; 84 | text-color: @blackdarkest; 85 | } 86 | 87 | element selected.active { 88 | background-color: @maincolor; 89 | text-color: @blackdarkest; 90 | } 91 | 92 | element alternate.normal { 93 | background-color: @blackentry; 94 | text-color: @fgwhite; 95 | } 96 | 97 | element alternate.urgent { 98 | background-color: @blackentry; 99 | text-color: @urgentcolor; 100 | } 101 | 102 | element alternate.active { 103 | background-color: @blackentry; 104 | text-color: @maincolor; 105 | } 106 | 107 | scrollbar { 108 | background-color: @blackwidget; 109 | handle-color: @darkgray; 110 | handle-width: 15px; 111 | } 112 | 113 | mode-switcher { 114 | background-color: @blackwidget; 115 | } 116 | 117 | button { 118 | background-color: @blackwidget; 119 | text-color: @darkgray; 120 | } 121 | 122 | button selected { 123 | text-color: @maincolor; 124 | } 125 | 126 | inputbar { 127 | background-color: @blackdarkest; 128 | spacing: 0px; 129 | } 130 | 131 | prompt { 132 | padding:6px 9px; 133 | background-color: @maincolor; 134 | text-color:@blackwidget; 135 | } 136 | 137 | entry { 138 | padding:6px 10px; 139 | background-color:@blackwidget; 140 | text-color:@fgwhite; 141 | } 142 | 143 | case-indicator { 144 | padding:6px 10px; 145 | text-color:@maincolor; 146 | background-color:@blackwidget; 147 | } 148 | -------------------------------------------------------------------------------- /themes/fullscreen-preview.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background-color: transparent; 3 | text-color: white; 4 | } 5 | 6 | window { 7 | fullscreen: true; 8 | background-color: black/80%; 9 | padding: 4em; 10 | children: [ wrap, listview-split]; 11 | spacing: 1em; 12 | } 13 | 14 | 15 | /** We add an extra child to this if PREVIEW=true */ 16 | listview-split { 17 | orientation: horizontal; 18 | spacing: 0.4em; 19 | children: [listview]; 20 | } 21 | 22 | wrap { 23 | expand: false; 24 | orientation: vertical; 25 | children: [ inputbar, message ]; 26 | background-image: linear-gradient(white/5%, white/40%); 27 | border-color: lightblue; 28 | border: 3px; 29 | border-radius: 0.4em; 30 | } 31 | 32 | icon-ib { 33 | expand: false; 34 | filename: "system-search"; 35 | vertical-align: 0.5; 36 | horizontal-align: 0.5; 37 | size: 1em; 38 | } 39 | inputbar { 40 | spacing: 0.4em; 41 | padding: 0.4em; 42 | children: [ icon-ib, entry ]; 43 | } 44 | entry { 45 | placeholder: "Search"; 46 | placeholder-color: grey; 47 | } 48 | message { 49 | background-color: red/20%; 50 | border-color: lightsalmon; 51 | border: 3px 0px 0px 0px; 52 | padding: 0.4em; 53 | spacing: 0.4em; 54 | } 55 | 56 | listview { 57 | flow: horizontal; 58 | fixed-columns: true; 59 | columns: 7; 60 | lines: 5; 61 | spacing: 1.0em; 62 | } 63 | 64 | element { 65 | orientation: vertical; 66 | padding: 0.1em; 67 | 68 | background-image: linear-gradient(white/5%, white/20%); 69 | border-color: lightblue /15%; 70 | border: 3px; 71 | border-radius: 0.4em; 72 | 73 | children: [element-icon, element-text ]; 74 | } 75 | element-icon { 76 | size: calc(((100% - 8em) / 7 )); 77 | horizontal-align: 0.5; 78 | vertical-align: 0.5; 79 | } 80 | element-text { 81 | horizontal-align: 0.5; 82 | vertical-align: 0.5; 83 | padding: 0.2em; 84 | } 85 | 86 | element selected { 87 | background-image: linear-gradient(white/25%, white/10%); 88 | border-color: lightblue; 89 | border: 3px; 90 | border-radius: 0.4em; 91 | } 92 | 93 | /** 94 | * Launching rofi with environment PREVIEW set to true 95 | * will split the screen and show a preview widget. 96 | */ 97 | @media ( enabled: env(PREVIEW, false)) { 98 | // preview widget 99 | icon-current-entry { 100 | expand: true; 101 | size: 80%; 102 | } 103 | // override the children of `listview-split` 104 | listview-split { 105 | children: [listview, icon-current-entry]; 106 | } 107 | // Reduce to 4 columns 108 | listview { 109 | columns: 4; 110 | } 111 | 112 | } 113 | -------------------------------------------------------------------------------- /themes/material.rasi: -------------------------------------------------------------------------------- 1 | /* 2 | * ROFI color theme 3 | * 4 | * Based on Base16 Material Color Scheme (https://github.com/ntpeters/base16-materialtheme-scheme) 5 | * 6 | * User: Tomaszal 7 | * Copyright: Tomas Zaluckij 8 | */ 9 | 10 | * { 11 | base00: #263238; 12 | base01: #2E3C43; 13 | base02: #314549; 14 | base03: #546E7A; 15 | base04: #B2CCD6; 16 | base05: #EEFFFF; 17 | base06: #EEFFFF; 18 | base07: #FFFFFF; 19 | base08: #F07178; 20 | base09: #F78C6C; 21 | base0A: #FFCB6B; 22 | base0B: #C3E88D; 23 | base0C: #89DDFF; 24 | base0D: #82AAFF; 25 | base0E: #C792EA; 26 | base0F: #FF5370; 27 | 28 | /*base0D: #00BCD4;*/ 29 | 30 | spacing: 0; 31 | background-color: transparent; 32 | 33 | font: "Roboto Mono 13"; 34 | } 35 | 36 | window { 37 | transparency: "real"; 38 | /*fullscreen: true;*/ 39 | background-color: #263238CC; /*base00 + CC (80% opacity)*/ 40 | } 41 | 42 | mainbox { 43 | children: [inputbar, message, mode-switcher, listview]; 44 | spacing: 30px; 45 | /*margin: 20%;*/ 46 | padding: 30px 0; 47 | border: 1px; 48 | border-color: @base0D; 49 | } 50 | 51 | inputbar { 52 | padding: 0 30px; 53 | children: [prompt, textbox-prompt-colon, entry, case-indicator]; 54 | } 55 | 56 | prompt { 57 | text-color: @base0D; 58 | } 59 | 60 | textbox-prompt-colon { 61 | expand: false; 62 | str: ":"; 63 | margin: 0 1ch 0 0; 64 | text-color: @base0D; 65 | } 66 | 67 | entry { 68 | text-color: @base07; 69 | } 70 | 71 | case-indicator { 72 | text-color: @base0F; 73 | } 74 | 75 | mode-switcher, message { 76 | border: 1px 0; 77 | border-color: @base0D; 78 | } 79 | 80 | button, textbox { 81 | background-color: @base03; 82 | text-color: @base07; 83 | padding: 5px; 84 | } 85 | 86 | button selected { 87 | background-color: @base0D; 88 | } 89 | 90 | listview { 91 | scrollbar: true; 92 | margin: 0 10px 0 30px; 93 | } 94 | 95 | scrollbar { 96 | background-color: @base03; 97 | handle-color: @base0D; 98 | handle-width: 10px; 99 | border: 0 1px; 100 | border-color: @base0D; 101 | margin: 0 0 0 20px; 102 | } 103 | 104 | element { 105 | padding: 5px; 106 | highlight: bold underline; 107 | } 108 | 109 | element normal { 110 | background-color: transparent; 111 | } 112 | 113 | element selected { 114 | background-color: @base0D; 115 | } 116 | 117 | element alternate { 118 | /*background-color: @base03;*/ 119 | } 120 | 121 | element normal normal, element selected normal, element alternate normal { 122 | text-color: @base07; 123 | } 124 | 125 | element normal urgent, element selected urgent, element alternate urgent { 126 | text-color: @base0F; 127 | } 128 | 129 | element normal active, element selected active, element alternate active { 130 | text-color: @base0B; 131 | } 132 | -------------------------------------------------------------------------------- /themes/onedark.rasi: -------------------------------------------------------------------------------- 1 | /* 2 | * ROFI One Dark 3 | * 4 | * Based on OneDark.vim (https://github.com/joshdick/onedark.vim) 5 | * 6 | * Author: Benjamin Stauss 7 | * User: me-benni 8 | * 9 | */ 10 | 11 | 12 | * { 13 | black: #000000; 14 | red: #eb6e67; 15 | green: #95ee8f; 16 | yellow: #f8c456; 17 | blue: #6eaafb; 18 | mangenta: #d886f3; 19 | purple: #800080; 20 | cyan: #6cdcf7; 21 | emphasis: #50536b; 22 | text: #ffffff; 23 | text-alt: #b2b2b2; 24 | fg: #abb2bf; 25 | bg: #282c34; 26 | 27 | spacing: 0; 28 | background-color: transparent; 29 | 30 | font: "Monospace 18"; 31 | text-color: @text; 32 | } 33 | 34 | window { 35 | transparency: "real"; 36 | fullscreen: true; 37 | background-color: #282c34dd; 38 | } 39 | 40 | mainbox { 41 | padding: 3% 2%; 42 | //border: 2px; 43 | //border-color: @cyan; 44 | } 45 | 46 | inputbar { 47 | margin: 0px 0px 20px 0px; 48 | children: [prompt, textbox-prompt-colon, entry, case-indicator, num-filtered-rows ]; 49 | } 50 | 51 | prompt { 52 | text-color: @blue; 53 | } 54 | 55 | textbox-prompt-colon { 56 | expand: false; 57 | str: ":"; 58 | text-color: @text-alt; 59 | } 60 | 61 | entry { 62 | margin: 0px 10px; 63 | } 64 | 65 | listview { 66 | spacing: 5px; 67 | dynamic: false; 68 | scrollbar: true; 69 | } 70 | 71 | scrollbar { 72 | width: 4px ; 73 | border: 0; 74 | handle-color: @text-alt; 75 | handle-width: 6px ; 76 | padding: 0; 77 | } 78 | 79 | element-icon{ 80 | size:1.0000em; 81 | } 82 | 83 | element { 84 | padding: 5px; 85 | spacing: 5px; 86 | text-color: @text-alt; 87 | highlight: bold #95ee8f; /* green */ 88 | border-radius: 3px; 89 | } 90 | 91 | element selected { 92 | background-color: @emphasis; 93 | text-color: @text; 94 | } 95 | 96 | element urgent, element selected urgent { 97 | text-color: @red; 98 | } 99 | 100 | element active, element selected active { 101 | text-color: @purple; 102 | } 103 | 104 | message { 105 | padding: 5px; 106 | border-radius: 3px; 107 | /*background-color: @emphasis;*/ 108 | border: 0px; 109 | border-color: @cyan; 110 | } 111 | 112 | button selected { 113 | padding: 5px; 114 | border-radius: 3px; 115 | background-color: @emphasis; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /themes/ribbon.rasi: -------------------------------------------------------------------------------- 1 | /** 2 | * ROFI Color theme 3 | * User: Rokit 4 | */ 5 | 6 | * { 7 | base-bg: #d9d6b7ee; 8 | selected-bg: #f7f0ac; 9 | base-color: #222222aa; 10 | selected-color: #222; 11 | border-color: #00000066; 12 | transparent: #00000000; 13 | text-color: @base-color; 14 | font: "Times New Roman 20"; 15 | } 16 | #window { 17 | anchor: south; 18 | location: south; 19 | width: 100%; 20 | background-color: @base-bg; 21 | margin: 0px 0px 10% 0px; 22 | children: [ horibox ]; 23 | } 24 | #horibox { 25 | background-color: @transparent; 26 | orientation: horizontal; 27 | children: [ prompt, textbox-prompt-colon, entry, listview ]; 28 | } 29 | #prompt { 30 | text-color: @selected-color; 31 | padding: 0.7em 0px 0.7em 10px; 32 | background-color: @transparent; 33 | } 34 | #textbox-prompt-colon { 35 | expand: false; 36 | str: ":"; 37 | padding: 0.7em 10px 0.7em 0px; 38 | text-color: @selected-color; 39 | background-color: @transparent; 40 | } 41 | #entry { 42 | padding: 0.7em; 43 | text-color: @selected-color; 44 | background-color: #eee; 45 | expand: false; 46 | width: 10em; 47 | } 48 | #listview { 49 | background-color: @transparent; 50 | layout: horizontal; 51 | spacing: 5px; 52 | lines: 100; 53 | } 54 | #element { 55 | background-color: @transparent; 56 | padding: 0.7em; 57 | } 58 | #element selected { 59 | border: 0px 1px; 60 | text-color: @selected-color; 61 | background-color: @selected-bg; 62 | } 63 | -------------------------------------------------------------------------------- /themes/sidetab-adapta.rasi: -------------------------------------------------------------------------------- 1 | /* 2 | * sidetab-adapta theme, 3 | * based on sidetab theme by deadguy. 4 | * 5 | * This theme has been dedicated to the public domain. 6 | * 7 | */ 8 | 9 | configuration { 10 | show-icons: true; 11 | sidebar-mode: true; 12 | } 13 | 14 | * { 15 | background-color: #222d32; 16 | text-color: #ffffff; 17 | 18 | accent-color: #00bcd4; 19 | accent2-color: #4db6ac; 20 | hover-color: #39454b; 21 | urgent-color: #ff5252; 22 | window-color: #ffffff; 23 | 24 | selected-normal-foreground: @window-color; 25 | normal-foreground: @text-color; 26 | selected-normal-background: @hover-color; 27 | normal-background: @background-color; 28 | 29 | selected-urgent-foreground: @background-color; 30 | urgent-foreground: @text-color; 31 | selected-urgent-background: @urgent-color; 32 | urgent-background: @background-color; 33 | 34 | selected-active-foreground: @window-color; 35 | active-foreground: @text-color; 36 | selected-active-background: @hover-color; 37 | active-background: @accent-color; 38 | } 39 | 40 | #window { 41 | anchor: west; 42 | location: west; 43 | width: 384px; 44 | height: 100%; 45 | } 46 | 47 | #mainbox { 48 | children: [ entry, listview, mode-switcher ]; 49 | } 50 | 51 | entry { 52 | expand: false; 53 | margin: 8px; 54 | } 55 | 56 | element { 57 | padding: 8px; 58 | } 59 | 60 | element normal.normal { 61 | background-color: @normal-background; 62 | text-color: @normal-foreground; 63 | } 64 | 65 | element normal.urgent { 66 | background-color: @urgent-background; 67 | text-color: @urgent-foreground; 68 | } 69 | 70 | element normal.active { 71 | background-color: @active-background; 72 | text-color: @active-foreground; 73 | } 74 | 75 | element selected.normal { 76 | background-color: @selected-normal-background; 77 | text-color: @selected-normal-foreground; 78 | border: 0 4px solid 0 0; 79 | border-color: @accent2-color; 80 | } 81 | 82 | element selected.urgent { 83 | background-color: @selected-urgent-background; 84 | text-color: @selected-urgent-foreground; 85 | } 86 | 87 | element selected.active { 88 | background-color: @selected-active-background; 89 | text-color: @selected-active-foreground; 90 | } 91 | 92 | element alternate.normal { 93 | background-color: @normal-background; 94 | text-color: @normal-foreground; 95 | } 96 | 97 | element alternate.urgent { 98 | background-color: @urgent-background; 99 | text-color: @urgent-foreground; 100 | } 101 | 102 | element alternate.active { 103 | background-color: @active-background; 104 | text-color: @active-foreground; 105 | } 106 | 107 | button { 108 | padding: 8px; 109 | } 110 | 111 | button selected { 112 | background-color: @active-background; 113 | text-color: @background-color; 114 | } 115 | 116 | /* vim: ft=css 117 | -------------------------------------------------------------------------------- /themes/sidetab.rasi: -------------------------------------------------------------------------------- 1 | /** 2 | * User: deadguy 3 | * Copyright: deadguy 4 | */ 5 | 6 | configuration { 7 | display-drun: "Activate"; 8 | display-run: "Execute"; 9 | display-window: "Window"; 10 | show-icons: true; 11 | sidebar-mode: true; 12 | } 13 | 14 | * { 15 | background-color: #080808; 16 | text-color: #d3d7cf; 17 | selbg: #215d9c; 18 | actbg: #262626; 19 | urgbg: #e53935; 20 | winbg: #26c6da; 21 | 22 | selected-normal-foreground: @winbg; 23 | normal-foreground: @text-color; 24 | selected-normal-background: @actbg; 25 | normal-background: @background-color; 26 | 27 | selected-urgent-foreground: @background-color; 28 | urgent-foreground: @text-color; 29 | selected-urgent-background: @urgbg; 30 | urgent-background: @background-color; 31 | 32 | selected-active-foreground: @winbg; 33 | active-foreground: @text-color; 34 | selected-active-background: @actbg; 35 | active-background: @selbg; 36 | 37 | line-margin: 2; 38 | line-padding: 2; 39 | separator-style: "none"; 40 | hide-scrollbar: "true"; 41 | margin: 0; 42 | padding: 0; 43 | } 44 | 45 | window { 46 | location: west; 47 | anchor: west; 48 | height: 100%; 49 | width: 22%; 50 | orientation: horizontal; 51 | children: [mainbox]; 52 | } 53 | 54 | mainbox { 55 | spacing: 0.8em; 56 | children: [ entry,listview,mode-switcher ]; 57 | } 58 | 59 | button { padding: 5px 2px; } 60 | 61 | button selected { 62 | background-color: @active-background; 63 | text-color: @background-color; 64 | } 65 | 66 | inputbar { 67 | padding: 5px; 68 | spacing: 5px; 69 | } 70 | 71 | listview { 72 | spacing: 0.5em; 73 | dynamic: false; 74 | cycle: true; 75 | } 76 | 77 | element { padding: 10px; } 78 | 79 | entry { 80 | expand: false; 81 | text-color: @normal-foreground; 82 | vertical-align: 1; 83 | padding: 5px; 84 | } 85 | 86 | element normal.normal { 87 | background-color: @normal-background; 88 | text-color: @normal-foreground; 89 | } 90 | 91 | element normal.urgent { 92 | background-color: @urgent-background; 93 | text-color: @urgent-foreground; 94 | } 95 | 96 | element normal.active { 97 | background-color: @active-background; 98 | text-color: @active-foreground; 99 | } 100 | 101 | element selected.normal { 102 | background-color: @selected-normal-background; 103 | text-color: @selected-normal-foreground; 104 | border: 0 5px solid 0 0; 105 | border-color: @active-background; 106 | } 107 | 108 | element selected.urgent { 109 | background-color: @selected-urgent-background; 110 | text-color: @selected-urgent-foreground; 111 | } 112 | 113 | element selected.active { 114 | background-color: @selected-active-background; 115 | text-color: @selected-active-foreground; 116 | } 117 | 118 | element alternate.normal { 119 | background-color: @normal-background; 120 | text-color: @normal-foreground; 121 | } 122 | 123 | element alternate.urgent { 124 | background-color: @urgent-background; 125 | text-color: @urgent-foreground; 126 | } 127 | 128 | element alternate.active { 129 | background-color: @active-background; 130 | text-color: @active-foreground; 131 | } 132 | -------------------------------------------------------------------------------- /themes/slate.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background-color: #282C33; 3 | border-color: #2e343f; 4 | text-color: #8ca0aa; 5 | spacing: 0; 6 | width: 512px; 7 | } 8 | 9 | inputbar { 10 | border: 0 0 1px 0; 11 | children: [prompt,entry]; 12 | } 13 | 14 | prompt { 15 | padding: 16px; 16 | border: 0 1px 0 0; 17 | } 18 | 19 | textbox { 20 | background-color: #2e343f; 21 | border: 0 0 1px 0; 22 | border-color: #282C33; 23 | padding: 8px 16px; 24 | } 25 | 26 | entry { 27 | padding: 16px; 28 | } 29 | 30 | listview { 31 | cycle: false; 32 | margin: 0 0 -1px 0; 33 | scrollbar: false; 34 | } 35 | 36 | element { 37 | border: 0 0 1px 0; 38 | padding: 16px; 39 | } 40 | 41 | element selected { 42 | background-color: #2e343f; 43 | } -------------------------------------------------------------------------------- /themes/spotlight.rasi: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * MACOS SPOTLIGHT LIKE THEME FOR ROFI 3 | * User : LR-Tech 4 | * Theme Repo : https://github.com/lr-tech/rofi-themes-collection 5 | *******************************************************************************/ 6 | 7 | * { 8 | font: "Montserrat 12"; 9 | 10 | bg0: #F5F5F5BF; 11 | bg1: #7E7E7E80; 12 | bg2: #0860F2E6; 13 | 14 | fg0: #242424; 15 | fg1: #FFFFFF; 16 | fg2: #24242480; 17 | 18 | background-color: transparent; 19 | text-color: @fg0; 20 | 21 | margin: 0; 22 | padding: 0; 23 | spacing: 0; 24 | } 25 | 26 | window { 27 | background-color: @bg0; 28 | 29 | location: center; 30 | width: 640; 31 | y-offset: -200; 32 | border-radius: 8; 33 | } 34 | 35 | inputbar { 36 | font: "Montserrat 20"; 37 | padding: 12px; 38 | spacing: 12px; 39 | children: [ icon-search, entry ]; 40 | } 41 | 42 | icon-search { 43 | expand: false; 44 | filename: "search"; 45 | size: 28px; 46 | } 47 | 48 | icon-search, entry, element-icon, element-text { 49 | vertical-align: 0.5; 50 | } 51 | 52 | entry { 53 | font: inherit; 54 | 55 | placeholder : "Search"; 56 | placeholder-color : @fg2; 57 | } 58 | 59 | message { 60 | border: 2px 0 0; 61 | border-color: @bg1; 62 | background-color: @bg1; 63 | } 64 | 65 | textbox { 66 | padding: 8px 24px; 67 | } 68 | 69 | listview { 70 | lines: 10; 71 | columns: 1; 72 | 73 | fixed-height: false; 74 | border: 1px 0 0; 75 | border-color: @bg1; 76 | } 77 | 78 | element { 79 | padding: 8px 16px; 80 | spacing: 16px; 81 | background-color: transparent; 82 | } 83 | 84 | element normal active { 85 | text-color: @bg2; 86 | } 87 | 88 | element selected normal, element selected active { 89 | background-color: @bg2; 90 | text-color: @fg1; 91 | } 92 | 93 | element-icon { 94 | size: 1em; 95 | } 96 | 97 | element-text { 98 | text-color: inherit; 99 | } 100 | -------------------------------------------------------------------------------- /thumbnailers/ffmpegthumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=ffmpegthumbnailer 3 | Exec=ffmpegthumbnailer -i %i -o %o -s %s -f 4 | MimeType=video/jpeg;video/mp4;video/mpeg;video/quicktime;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-ms-asx;video/x-ms-wmx;video/x-ms-wvx;video/x-msvideo;video/x-flv;video/x-matroska;application/mxf;video/3gp;video/3gpp;video/dv;video/divx;video/fli;video/flv;video/mp2t;video/mp4v-es;video/msvideo;video/ogg;video/vivo;video/vnd.divx;video/vnd.mpegurl;video/vnd.rn-realvideo;application/vnd.rn-realmedia;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-m4v;video/x-mpeg;video/x-mpeg2;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg 5 | -------------------------------------------------------------------------------- /thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=/usr/bin/gdk-pixbuf-thumbnailer 3 | Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o 4 | MimeType=image/png;image/jpeg;image/bmp;image/x-bmp;image/x-MS-bmp;image/gif;image/x-icon;image/x-ico;image/x-win-bitmap;image/vnd.microsoft.icon;application/ico;image/ico;image/icon;text/ico;application/x-navi-animation;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/tiff;image/x-xpixmap;image/x-xbitmap;image/x-tga;image/x-icns;image/x-quicktime;image/qtif; 5 | -------------------------------------------------------------------------------- /thumbnailers/gsf-office.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=gsf-office-thumbnailer 3 | Exec=gsf-office-thumbnailer -i %i -o %o -s %s 4 | MimeType=application/msword;application/vnd.ms-excel;application/vnd.ms-powerpoint;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.formula;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.oasis.opendocument.image;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-master;application/vnd.oasis.opendocument.text-template;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.sun.xml.math;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.global;application/vnd.sun.xml.writer.template; 5 | -------------------------------------------------------------------------------- /thumbnailers/librsvg.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=/usr/bin/gdk-pixbuf-thumbnailer 3 | Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o 4 | MimeType=image/svg+xml;image/svg+xml-compressed; 5 | -------------------------------------------------------------------------------- /thumbnailers/pdf-magick.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=convert 3 | Exec=thumbnail-pdf %i %o %s 4 | MimeType=application/pdf;application/x-pdf; 5 | -------------------------------------------------------------------------------- /thumbnailers/txt-magick.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=magick 3 | Exec=thumbnail-txt %i %o %s 4 | MimeType=text/plain;text/x-chdr;text/x-cmake;text/x-csh;text/x-shellscript;text/markdown;text/x-markdown;text/x-asm;text/x-c;text/x-fortran;text/x-java-source;text/x-pascal;text/x-python;text/css;text/csv;text/html;text/javascript 5 | -------------------------------------------------------------------------------- /thumbnailers/xapp-appimage-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=thumbnail-xapp 3 | Exec=thumbnail-xapp -t appimage -i %i -o %o -s %s 4 | MimeType=application/vnd.appimage; 5 | -------------------------------------------------------------------------------- /thumbnailers/xapp-epub-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=thumbnail-xapp 3 | Exec=thumbnail-xapp -t epub -i %i -o %o -s %s 4 | MimeType=application/epub+zip; 5 | -------------------------------------------------------------------------------- /thumbnailers/xapp-gimp-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=thumbnail-xapp 3 | Exec=thumbnail-xapp -t gimp -i %i -o %o -s %s 4 | MimeType=image/x-compressed-xcf;image/x-xcf;image/x-xcursor; 5 | -------------------------------------------------------------------------------- /thumbnailers/xapp-mp3-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=thumbnail-xapp 3 | Exec=thumbnail-xapp -t mp3 -i %i -o %o -s %s 4 | MimeType=audio/mpeg; 5 | -------------------------------------------------------------------------------- /thumbnailers/xapp-raw-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=thumbnail-xapp 3 | Exec=thumbnail-xapp -t raw -i %i -o %o -s %s 4 | MimeType=image/x-sony-arw;image/x-canon-cr2;image/x-canon-crw;image/x-kodak-dcr;image/x-adobe-dng;image/x-epson-erf;image/x-kodak-k25;image/x-kodak-kdc;image/x-minolta-mrw;image/x-nikon-nef;image/x-olympus-orf;image/x-pentax-pef;image/x-fuji-raf;image/x-panasonic-raw;image/x-panasonic-rw2;image/x-sony-sr2;image/x-sony-srf;image/x-sigma-x3f; 5 | -------------------------------------------------------------------------------- /thumbnailers/xapp-vorbiscomment-thumbnailer.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=thumbnail-xapp 3 | Exec=thumbnail-xapp -t vorbis -i %i -o %o -s %s 4 | MimeType=audio/flac;audio/ogg;x-flac+ogg.xml;audio/x-opus+ogg;x-speex+ogg.xml;audio/x-vorbis+ogg 5 | --------------------------------------------------------------------------------